/* Options: Date: 2024-12-22 21:35:30 Version: 8.51 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://blazor-gallery.servicestack.net //Package: //GlobalNamespace: dtos //AddPropertyAccessors: True //SettersReturnThis: True //AddServiceStackTypes: True //AddResponseStatus: False //AddDescriptionAsComments: True //AddImplicitVersion: IncludeTypes: UpdateBooking.* //ExcludeTypes: //TreatTypesAsStrings: //DefaultImports: java.math.*,java.util.*,java.io.InputStream,net.servicestack.client.* */ import java.math.*; import java.util.*; import java.io.InputStream; import net.servicestack.client.*; public class dtos { /** * Update an existing Booking */ @Route(Path="/booking/{Id}", Verbs="PATCH") @ValidateRequest(Validator="HasRole(`Employee`)") public static class UpdateBooking implements IReturn, IPatchDb { public Integer id = null; public String name = null; public RoomType roomType = null; @Validate(Validator="GreaterThan(0)") public Integer roomNumber = null; @Validate(Validator="GreaterThan(0)") public BigDecimal cost = null; public Date bookingStartDate = null; public Date bookingEndDate = null; public String notes = null; public String couponId = null; public Boolean cancelled = null; public Integer getId() { return id; } public UpdateBooking setId(Integer value) { this.id = value; return this; } public String getName() { return name; } public UpdateBooking setName(String value) { this.name = value; return this; } public RoomType getRoomType() { return roomType; } public UpdateBooking setRoomType(RoomType value) { this.roomType = value; return this; } public Integer getRoomNumber() { return roomNumber; } public UpdateBooking setRoomNumber(Integer value) { this.roomNumber = value; return this; } public BigDecimal getCost() { return cost; } public UpdateBooking setCost(BigDecimal value) { this.cost = value; return this; } public Date getBookingStartDate() { return bookingStartDate; } public UpdateBooking setBookingStartDate(Date value) { this.bookingStartDate = value; return this; } public Date getBookingEndDate() { return bookingEndDate; } public UpdateBooking setBookingEndDate(Date value) { this.bookingEndDate = value; return this; } public String getNotes() { return notes; } public UpdateBooking setNotes(String value) { this.notes = value; return this; } public String getCouponId() { return couponId; } public UpdateBooking setCouponId(String value) { this.couponId = value; return this; } public Boolean isCancelled() { return cancelled; } public UpdateBooking setCancelled(Boolean value) { this.cancelled = value; return this; } private static Object responseType = IdResponse.class; public Object getResponseType() { return responseType; } } @DataContract public static class IdResponse { @DataMember(Order=1) public String id = null; @DataMember(Order=2) public ResponseStatus responseStatus = null; public String getId() { return id; } public IdResponse setId(String value) { this.id = value; return this; } public ResponseStatus getResponseStatus() { return responseStatus; } public IdResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; } } /** * Booking Details */ public static class Booking extends AuditBase { public Integer id = null; public String name = null; public RoomType roomType = null; public Integer roomNumber = null; public Date bookingStartDate = null; public Date bookingEndDate = null; public BigDecimal cost = null; @References(Type=Coupon.class) public String couponId = null; public Coupon discount = null; public String notes = null; public Boolean cancelled = null; public Integer getId() { return id; } public Booking setId(Integer value) { this.id = value; return this; } public String getName() { return name; } public Booking setName(String value) { this.name = value; return this; } public RoomType getRoomType() { return roomType; } public Booking setRoomType(RoomType value) { this.roomType = value; return this; } public Integer getRoomNumber() { return roomNumber; } public Booking setRoomNumber(Integer value) { this.roomNumber = value; return this; } public Date getBookingStartDate() { return bookingStartDate; } public Booking setBookingStartDate(Date value) { this.bookingStartDate = value; return this; } public Date getBookingEndDate() { return bookingEndDate; } public Booking setBookingEndDate(Date value) { this.bookingEndDate = value; return this; } public BigDecimal getCost() { return cost; } public Booking setCost(BigDecimal value) { this.cost = value; return this; } public String getCouponId() { return couponId; } public Booking setCouponId(String value) { this.couponId = value; return this; } public Coupon getDiscount() { return discount; } public Booking setDiscount(Coupon value) { this.discount = value; return this; } public String getNotes() { return notes; } public Booking setNotes(String value) { this.notes = value; return this; } public Boolean isCancelled() { return cancelled; } public Booking setCancelled(Boolean value) { this.cancelled = value; return this; } } public static enum RoomType { Single, Double, Queen, Twin, Suite; } }