/* Options: Date: 2024-11-21 13:18:44 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.bokamera.se //Package: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: UpdateResource.* //ExcludeTypes: //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: java.math.*,java.util.*,net.servicestack.client.* */ import java.math.* import java.util.* import net.servicestack.client.* @Route(Path="/resource/{Id}", Verbs="PUT") @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) @ValidateRequest(Validator="IsAuthenticated") open class UpdateResource : 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) var CompanyId:UUID? = null /** * Id of the resource */ @ApiMember(Description="Id of the resource", IsRequired=true, ParameterType="path") var Id:Int? = null /** * The resource name */ @ApiMember(Description="The resource name") var Name:String? = null /** * The resource description */ @ApiMember(Description="The resource description") var Description:String? = null /** * If resource is active or not */ @ApiMember(Description="If resource is active or not") var Active:Boolean? = null /** * The resource color in scheduler */ @ApiMember(Description="The resource color in scheduler") var Color:String? = null /** * The image url of the resource */ @ApiMember(Description="The image url of the resource") var ImageUrl:Uri? = null /** * The email of the resource */ @ApiMember(Description="The email of the resource") var Email:String? = null /** * The mobile phone number of the resource */ @ApiMember(Description="The mobile phone number of the resource") var MobilePhone:String? = 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") var AccessGroup:String? = null /** * If the resource should receive email notification when booked */ @ApiMember(Description="If the resource should receive email notification when booked") var EmailNotification:Boolean? = null /** * If the resource should receive SMS notification when booked */ @ApiMember(Description="If the resource should receive SMS notification when booked") var SMSNotification:Boolean? = null /** * If the resource should receive email reminders on bookings */ @ApiMember(Description="If the resource should receive email reminders on bookings") var SendEmailReminder:Boolean? = null /** * If the resource should receive SMS reminders on bookings */ @ApiMember(Description="If the resource should receive SMS reminders on bookings") var SendSMSReminder:Boolean? = null /** * If Custom Fields are added to the resource, here you will send the id and the value for each custom field to be saved */ @ApiMember(Description="If Custom Fields are added to the resource, here you will send the id and the value for each custom field to be saved") var CustomFields:ArrayList = ArrayList() companion object { private val responseType = ResourceQueryResponse::class.java } override fun getResponseType(): Any? = UpdateResource.responseType } open class ResourceQueryResponse { /** * The resource id */ @ApiMember(Description="The resource id") var Id:Int? = null /** * The resource name */ @ApiMember(Description="The resource name") var Name:String? = null /** * The resource description */ @ApiMember(Description="The resource description") var Description:String? = null /** * If resource is active or not */ @ApiMember(Description="If resource is active or not") var Active:Boolean? = 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.") var Color:String? = null /** * The email of the resource */ @ApiMember(Description="The email of the resource") var Email:String? = null /** * The image url of the resource */ @ApiMember(Description="The image url of the resource") var ImageUrl:Uri? = null /** * The mobile phone number of the resource */ @ApiMember(Description="The mobile phone number of the resource") var MobilePhone:String? = 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") var AccessGroup:String? = null /** * If the resource should receive email notification when booked */ @ApiMember(Description="If the resource should receive email notification when booked") var EmailNotification:Boolean? = null /** * If the resource should receive SMS notification when booked */ @ApiMember(Description="If the resource should receive SMS notification when booked") var SMSNotification:Boolean? = null /** * If the resource should receive email reminders on bookings */ @ApiMember(Description="If the resource should receive email reminders on bookings") var SendEmailReminder:Boolean? = null /** * If the resource should receive SMS reminders on bookings */ @ApiMember(Description="If the resource should receive SMS reminders on bookings") var SendSMSReminder:Boolean? = null /** * The resource time exceptions */ @ApiMember(Description="The resource time exceptions") var Exceptions:ArrayList = ArrayList() /** * The resource bookings */ @ApiMember(Description="The resource bookings") var Bookings:ArrayList = ArrayList() /** * Then date when the resource was created */ @ApiMember(Description="Then date when the resource was created") var Created:Date? = null /** * Then date when the resource was updated */ @ApiMember(Description="Then date when the resource was updated") var Updated:Date? = null var ResponseStatus:ResponseStatus? = null } open interface ICompany { var CompanyId:UUID? } enum class BookingStatusEnum(val value:Int) { Booked(1), Unbooked(2), Reserved(3), Canceled(4), AwaitingPayment(5), AwaitingPaymentNoTimeLimit(6), Payed(7), AwaitingPaymentRequestFromAdmin(8), AwaitingPaymentFromProvider(9), Invoiced(10), } open class AddCustomField { var Id:Int? = null var Value:String? = null } open interface IInterval { var From:Date? var To:Date? } open class BookedCustomer { var Id:UUID? = null var Firstname:String? = null var Lastname:String? = null var Email:String? = null var Phone:String? = null var FacebookUserName:String? = null var ImageUrl:String? = null var CorporateIdentityNumber:String? = null var InvoiceAddress1:String? = null var InvoiceAddress2:String? = null var InvoiceCity:String? = null var InvoicePostalCode:String? = null var InvoiceCountryCode:String? = null } open class TimeException : ITimeException { /** * Time exception id */ @ApiMember(Description="Time exception id") var Id:Int? = null /** * Indicates whether or not the time exception is recurring */ @ApiMember(Description="Indicates whether or not the time exception is recurring") var IsRecurring:Boolean? = 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") var IsBlock:Boolean? = null /** * The reason of the time exception, example: Vacation, doctors appointment, ... */ @ApiMember(Description="The reason of the time exception, example: Vacation, doctors appointment, ...") var ReasonText:String? = 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, ...") var ReasonTextPublic:String? = null /** * Time exception start */ @ApiMember(Description="Time exception start") var From:Date? = null /** * Time exception end */ @ApiMember(Description="Time exception end") var To:Date? = null /** * Resources that owns this exception */ @ApiMember(Description="Resources that owns this exception") var ResourceIds:ArrayList? = null } open class BookedTime : IBookedTime { /** * Booking id */ @ApiMember(Description="Booking id") var Id:Int? = null /** * The booked service */ @ApiMember(Description="The booked service") var ServiceId:Int? = null /** * Booking start */ @ApiMember(Description="Booking start") var From:Date? = null /** * Booking end */ @ApiMember(Description="Booking end") var To:Date? = null /** * Number of booked spots */ @ApiMember(Description="Number of booked spots") var BookedSpots:Int? = null /** * Number of total spots for the service */ @ApiMember(Description="Number of total spots for the service") var TotalSpots:Int? = null /** * The pause after the booking */ @ApiMember(Description="The pause after the booking") var PauseAfterInMinutes:Int? = null /** * The booking status */ @ApiMember(Description="The booking status") var StatusId:Int? = null var Status:BookingStatusEnum? = null /** * The customer the booking belongs to */ @ApiMember(Description="The customer the booking belongs to") var Customer:BookedCustomer? = null } open interface ITimeException : IInterval { var Id:Int? var ReasonText:String? var IsBlock:Boolean? var ReasonTextPublic:String? var IsRecurring:Boolean? var ResourceIds:ArrayList? } open interface IBookedTime : IInterval { var Id:Int? var ServiceId:Int? var BookedSpots:Int? var TotalSpots:Int? var PauseAfterInMinutes:Int? var Status:BookingStatusEnum? var StatusId:Int? var Customer:BookedCustomer? }