/* Options: Date: 2024-11-21 16:46:02 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.bokamera.se //Package: //GlobalNamespace: dtos //AddPropertyAccessors: True //SettersReturnThis: True //AddServiceStackTypes: True //AddResponseStatus: False //AddDescriptionAsComments: True //AddImplicitVersion: IncludeTypes: DeleteResource.* //ExcludeTypes: //TreatTypesAsStrings: //DefaultImports: java.math.*,java.util.*,net.servicestack.client.* */ import java.math.*; import java.util.*; import net.servicestack.client.*; public class dtos { @Route(Path="/resource/{Id}", Verbs="DELETE") @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) // @ApiResponse(Description="You have too low privilegies to call this service", StatusCode=403) // @ApiResponse(Description="Bookings exists that needs to be unbooked before creating this time exceptions, use the /timeexceptions/collidingevents to find which bookings and use the booking service to unbook them", StatusCode=409) @ValidateRequest(Validator="IsAuthenticated") public static class DeleteResource implements IReturn, ICompany { /** * Enter the company id, if blank company id and you are an admin, your company id will be used. */ @ApiMember(Description="Enter the company id, if blank company id and you are an admin, your company id will be used.", IsRequired=true) public UUID CompanyId = null; /** * Id of the resource to delete */ @ApiMember(Description="Id of the resource to delete", IsRequired=true) public Integer Id = null; /** * If this equals true it will force to set the resource as active = false, this is used when bookings exists on the resource and it can't be deleted. */ @ApiMember(Description="If this equals true it will force to set the resource as active = false, this is used when bookings exists on the resource and it can't be deleted. ") public Boolean Force = null; public UUID getCompanyId() { return CompanyId; } public DeleteResource setCompanyId(UUID value) { this.CompanyId = value; return this; } public Integer getId() { return Id; } public DeleteResource setId(Integer value) { this.Id = value; return this; } public Boolean isForce() { return Force; } public DeleteResource setForce(Boolean value) { this.Force = value; return this; } private static Object responseType = ResourceQueryResponse.class; public Object getResponseType() { return responseType; } } public static class ResourceQueryResponse { /** * The resource id */ @ApiMember(Description="The resource id") public Integer Id = null; /** * The resource name */ @ApiMember(Description="The resource name") public String Name = null; /** * The resource description */ @ApiMember(Description="The resource description") public String Description = null; /** * If resource is active or not */ @ApiMember(Description="If resource is active or not") public Boolean Active = null; /** * The resource color in scheduler in hexadecimal color code. Example: #00b0f0 for blue. */ @ApiMember(Description="The resource color in scheduler in hexadecimal color code. Example: #00b0f0 for blue.") public String Color = null; /** * The email of the resource */ @ApiMember(Description="The email of the resource") public String Email = null; /** * The image url of the resource */ @ApiMember(Description="The image url of the resource") public Uri ImageUrl = null; /** * The mobile phone number of the resource */ @ApiMember(Description="The mobile phone number of the resource") public String MobilePhone = null; /** * Used by example code locks to know what access group the resource is assigned to */ @ApiMember(Description="Used by example code locks to know what access group the resource is assigned to") public String AccessGroup = null; /** * If the resource should receive email notification when booked */ @ApiMember(Description="If the resource should receive email notification when booked") public Boolean EmailNotification = null; /** * If the resource should receive SMS notification when booked */ @ApiMember(Description="If the resource should receive SMS notification when booked") public Boolean SMSNotification = null; /** * If the resource should receive email reminders on bookings */ @ApiMember(Description="If the resource should receive email reminders on bookings") public Boolean SendEmailReminder = null; /** * If the resource should receive SMS reminders on bookings */ @ApiMember(Description="If the resource should receive SMS reminders on bookings") public Boolean SendSMSReminder = null; /** * The resource time exceptions */ @ApiMember(Description="The resource time exceptions") public ArrayList Exceptions = null; /** * The resource bookings */ @ApiMember(Description="The resource bookings") public ArrayList Bookings = null; /** * Then date when the resource was created */ @ApiMember(Description="Then date when the resource was created") public Date Created = null; /** * Then date when the resource was updated */ @ApiMember(Description="Then date when the resource was updated") public Date Updated = null; public ResponseStatus ResponseStatus = null; public Integer getId() { return Id; } public ResourceQueryResponse setId(Integer value) { this.Id = value; return this; } public String getName() { return Name; } public ResourceQueryResponse setName(String value) { this.Name = value; return this; } public String getDescription() { return Description; } public ResourceQueryResponse setDescription(String value) { this.Description = value; return this; } public Boolean isActive() { return Active; } public ResourceQueryResponse setActive(Boolean value) { this.Active = value; return this; } public String getColor() { return Color; } public ResourceQueryResponse setColor(String value) { this.Color = value; return this; } public String getEmail() { return Email; } public ResourceQueryResponse setEmail(String value) { this.Email = value; return this; } public Uri getImageUrl() { return ImageUrl; } public ResourceQueryResponse setImageUrl(Uri value) { this.ImageUrl = value; return this; } public String getMobilePhone() { return MobilePhone; } public ResourceQueryResponse setMobilePhone(String value) { this.MobilePhone = value; return this; } public String getAccessGroup() { return AccessGroup; } public ResourceQueryResponse setAccessGroup(String value) { this.AccessGroup = value; return this; } public Boolean isEmailNotification() { return EmailNotification; } public ResourceQueryResponse setEmailNotification(Boolean value) { this.EmailNotification = value; return this; } public Boolean isSmsNotification() { return SMSNotification; } public ResourceQueryResponse setSmsNotification(Boolean value) { this.SMSNotification = value; return this; } public Boolean isSendEmailReminder() { return SendEmailReminder; } public ResourceQueryResponse setSendEmailReminder(Boolean value) { this.SendEmailReminder = value; return this; } public Boolean isSendSMSReminder() { return SendSMSReminder; } public ResourceQueryResponse setSendSMSReminder(Boolean value) { this.SendSMSReminder = value; return this; } public ArrayList getExceptions() { return Exceptions; } public ResourceQueryResponse setExceptions(ArrayList value) { this.Exceptions = value; return this; } public ArrayList getBookings() { return Bookings; } public ResourceQueryResponse setBookings(ArrayList value) { this.Bookings = value; return this; } public Date getCreated() { return Created; } public ResourceQueryResponse setCreated(Date value) { this.Created = value; return this; } public Date getUpdated() { return Updated; } public ResourceQueryResponse setUpdated(Date value) { this.Updated = value; return this; } public ResponseStatus getResponseStatus() { return ResponseStatus; } public ResourceQueryResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; } } public static interface ICompany { public UUID CompanyId = null; } public static enum BookingStatusEnum { Booked(1), Unbooked(2), Reserved(3), Canceled(4), AwaitingPayment(5), AwaitingPaymentNoTimeLimit(6), Payed(7), AwaitingPaymentRequestFromAdmin(8), AwaitingPaymentFromProvider(9), Invoiced(10); private final int value; BookingStatusEnum(final int intValue) { value = intValue; } public int getValue() { return value; } } public static interface IInterval { public Date From = null; public Date To = null; } public static class BookedCustomer { public UUID Id = null; public String Firstname = null; public String Lastname = null; public String Email = null; public String Phone = null; public String FacebookUserName = null; public String ImageUrl = null; public String CorporateIdentityNumber = null; public String InvoiceAddress1 = null; public String InvoiceAddress2 = null; public String InvoiceCity = null; public String InvoicePostalCode = null; public String InvoiceCountryCode = null; public UUID getId() { return Id; } public BookedCustomer setId(UUID value) { this.Id = value; return this; } public String getFirstname() { return Firstname; } public BookedCustomer setFirstname(String value) { this.Firstname = value; return this; } public String getLastname() { return Lastname; } public BookedCustomer setLastname(String value) { this.Lastname = value; return this; } public String getEmail() { return Email; } public BookedCustomer setEmail(String value) { this.Email = value; return this; } public String getPhone() { return Phone; } public BookedCustomer setPhone(String value) { this.Phone = value; return this; } public String getFacebookUserName() { return FacebookUserName; } public BookedCustomer setFacebookUserName(String value) { this.FacebookUserName = value; return this; } public String getImageUrl() { return ImageUrl; } public BookedCustomer setImageUrl(String value) { this.ImageUrl = value; return this; } public String getCorporateIdentityNumber() { return CorporateIdentityNumber; } public BookedCustomer setCorporateIdentityNumber(String value) { this.CorporateIdentityNumber = value; return this; } public String getInvoiceAddress1() { return InvoiceAddress1; } public BookedCustomer setInvoiceAddress1(String value) { this.InvoiceAddress1 = value; return this; } public String getInvoiceAddress2() { return InvoiceAddress2; } public BookedCustomer setInvoiceAddress2(String value) { this.InvoiceAddress2 = value; return this; } public String getInvoiceCity() { return InvoiceCity; } public BookedCustomer setInvoiceCity(String value) { this.InvoiceCity = value; return this; } public String getInvoicePostalCode() { return InvoicePostalCode; } public BookedCustomer setInvoicePostalCode(String value) { this.InvoicePostalCode = value; return this; } public String getInvoiceCountryCode() { return InvoiceCountryCode; } public BookedCustomer setInvoiceCountryCode(String value) { this.InvoiceCountryCode = value; return this; } } public static class TimeException implements ITimeException { /** * Time exception id */ @ApiMember(Description="Time exception id") public Integer Id = null; /** * Indicates whether or not the time exception is recurring */ @ApiMember(Description="Indicates whether or not the time exception is recurring") public Boolean IsRecurring = null; /** * Indicates whether the time exception is blocking the time or not */ @ApiMember(Description="Indicates whether the time exception is blocking the time or not") public Boolean IsBlock = null; /** * The reason of the time exception, example: Vacation, doctors appointment, ... */ @ApiMember(Description="The reason of the time exception, example: Vacation, doctors appointment, ...") public String ReasonText = null; /** * The public reason of the time exception, example: Vacation, doctors appointment, ... */ @ApiMember(Description="The public reason of the time exception, example: Vacation, doctors appointment, ...") public String ReasonTextPublic = null; /** * Time exception start */ @ApiMember(Description="Time exception start") public Date From = null; /** * Time exception end */ @ApiMember(Description="Time exception end") public Date To = null; /** * Resources that owns this exception */ @ApiMember(Description="Resources that owns this exception") public ArrayList ResourceIds = null; public Integer getId() { return Id; } public TimeException setId(Integer value) { this.Id = value; return this; } public Boolean getIsRecurring() { return IsRecurring; } public TimeException setIsRecurring(Boolean value) { this.IsRecurring = value; return this; } public Boolean getIsBlock() { return IsBlock; } public TimeException setIsBlock(Boolean value) { this.IsBlock = value; return this; } public String getReasonText() { return ReasonText; } public TimeException setReasonText(String value) { this.ReasonText = value; return this; } public String getReasonTextPublic() { return ReasonTextPublic; } public TimeException setReasonTextPublic(String value) { this.ReasonTextPublic = value; return this; } public Date getFrom() { return From; } public TimeException setFrom(Date value) { this.From = value; return this; } public Date getTo() { return To; } public TimeException setTo(Date value) { this.To = value; return this; } public ArrayList getResourceIds() { return ResourceIds; } public TimeException setResourceIds(ArrayList value) { this.ResourceIds = value; return this; } } public static class BookedTime implements IBookedTime { /** * Booking id */ @ApiMember(Description="Booking id") public Integer Id = null; /** * The booked service */ @ApiMember(Description="The booked service") public Integer ServiceId = null; /** * Booking start */ @ApiMember(Description="Booking start") public Date From = null; /** * Booking end */ @ApiMember(Description="Booking end") public Date To = null; /** * Number of booked spots */ @ApiMember(Description="Number of booked spots") public Integer BookedSpots = null; /** * Number of total spots for the service */ @ApiMember(Description="Number of total spots for the service") public Integer TotalSpots = null; /** * The pause after the booking */ @ApiMember(Description="The pause after the booking") public Integer PauseAfterInMinutes = null; /** * The booking status */ @ApiMember(Description="The booking status") public Integer StatusId = null; public BookingStatusEnum Status = null; /** * The customer the booking belongs to */ @ApiMember(Description="The customer the booking belongs to") public BookedCustomer Customer = null; public Integer getId() { return Id; } public BookedTime setId(Integer value) { this.Id = value; return this; } public Integer getServiceId() { return ServiceId; } public BookedTime setServiceId(Integer value) { this.ServiceId = value; return this; } public Date getFrom() { return From; } public BookedTime setFrom(Date value) { this.From = value; return this; } public Date getTo() { return To; } public BookedTime setTo(Date value) { this.To = value; return this; } public Integer getBookedSpots() { return BookedSpots; } public BookedTime setBookedSpots(Integer value) { this.BookedSpots = value; return this; } public Integer getTotalSpots() { return TotalSpots; } public BookedTime setTotalSpots(Integer value) { this.TotalSpots = value; return this; } public Integer getPauseAfterInMinutes() { return PauseAfterInMinutes; } public BookedTime setPauseAfterInMinutes(Integer value) { this.PauseAfterInMinutes = value; return this; } public Integer getStatusId() { return StatusId; } public BookedTime setStatusId(Integer value) { this.StatusId = value; return this; } public BookingStatusEnum getStatus() { return Status; } public BookedTime setStatus(BookingStatusEnum value) { this.Status = value; return this; } public BookedCustomer getCustomer() { return Customer; } public BookedTime setCustomer(BookedCustomer value) { this.Customer = value; return this; } } public static interface ITimeException implements IInterval { public Integer Id = null; public String ReasonText = null; public Boolean IsBlock = null; public String ReasonTextPublic = null; public Boolean IsRecurring = null; public ArrayList ResourceIds = null; } public static interface IBookedTime implements IInterval { public Integer Id = null; public Integer ServiceId = null; public Integer BookedSpots = null; public Integer TotalSpots = null; public Integer PauseAfterInMinutes = null; public BookingStatusEnum Status = null; public Integer StatusId = null; public BookedCustomer Customer = null; } }