/* Options: Date: 2025-09-15 14:33:39 Version: 8.80 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.bookmore.com //Package: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: ResourceQuery.* //ExcludeTypes: //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: java.math.*,java.util.*,java.io.InputStream,net.servicestack.client.*,com.google.gson.annotations.*,com.google.gson.reflect.* */ import java.math.* import java.util.* import java.io.InputStream import net.servicestack.client.* import com.google.gson.annotations.* import com.google.gson.reflect.* @Route(Path="/resource", Verbs="GET") @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) // @ApiResponse(Description="You have too low privilegies to call this service", StatusCode=403) @ValidateRequest(Validator="IsAuthenticated") open class ResourceQuery : QueryDb(), IReturn> { /** * Enter the company and id you want to see the information for a resource, if blank company id and you are an admin, your company id will be used. If blank id, all resources will be shown */ @ApiMember(Description="Enter the company and id you want to see the information for a resource, if blank company id and you are an admin, your company id will be used. If blank id, all resources will be shown ", IsRequired=true, ParameterType="query") open var CompanyId:UUID? = null open var Id:Int? = null open var Active:Boolean? = null /** * If you want to include the exceptions for each resource, only allowed for administrators. Select between what dates in the parameters [ExceptionsQueryFromDate] and [ExceptionsQueryToDate] , if no dates added */ @ApiMember(DataType="boolean", Description="If you want to include the exceptions for each resource, only allowed for administrators. Select between what dates in the parameters [ExceptionsQueryFromDate] and [ExceptionsQueryToDate] , if no dates added ", ParameterType="query") open var IncludeExceptions:Boolean? = null /** * If [IncludeExceptions], choose what from and to date to search exceptions between, if nothing entered it will search from today's date. */ @ApiMember(DataType="dateTime", Description="If [IncludeExceptions], choose what from and to date to search exceptions between, if nothing entered it will search from today's date.", ParameterType="query") open var ExceptionsQueryFromDate:Date? = null /** * If [IncludeExceptions], choose what from and to date to search exceptions between, if nothing entered it will search to 1 year forward from today's date. */ @ApiMember(DataType="dateTime", Description="If [IncludeExceptions], choose what from and to date to search exceptions between, if nothing entered it will search to 1 year forward from today's date.", ParameterType="query") open var ExceptionsQueryToDate:Date? = null /** * If you want to include the bookings for each resource, only allowed for administrators. Select between what dates in the parameters [BookingsQueryFromDate] and [BookingsQueryToDate] , if nothing entered it will search to 1 year forward from todays date. */ @ApiMember(DataType="boolean", Description="If you want to include the bookings for each resource, only allowed for administrators. Select between what dates in the parameters [BookingsQueryFromDate] and [BookingsQueryToDate] , if nothing entered it will search to 1 year forward from todays date.", ParameterType="query") open var IncludeBookings:Boolean? = null /** * If [IncludeBookings], choose what from and to date to search bookings between, if nothing entered it will search from today's date. */ @ApiMember(DataType="dateTime", Description="If [IncludeBookings], choose what from and to date to search bookings between, if nothing entered it will search from today's date.", ParameterType="query") open var BookingsQueryFromDate:Date? = null /** * If [IncludeBookings], choose what from and to date to search bookings between, if nothing entered it will search to 1 year forward from today's date. */ @ApiMember(DataType="dateTime", Description="If [IncludeBookings], choose what from and to date to search bookings between, if nothing entered it will search to 1 year forward from today's date.", ParameterType="query") open var BookingsQueryToDate:Date? = null companion object { private val responseType = object : TypeToken>(){}.type } override fun getResponseType(): Any? = ResourceQuery.responseType } @DataContract open class QueryResponse { @DataMember(Order=1) open var Offset:Int? = null @DataMember(Order=2) open var Total:Int? = null @DataMember(Order=3) open var Results:ArrayList? = null @DataMember(Order=4) open var Meta:HashMap? = null @DataMember(Order=5) open var ResponseStatus:ResponseStatus? = null } open class QueryDb : QueryBase() { } 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), } interface IInterval { var From:Date? var To:Date? } open class CustomFieldConfig : BaseModel() { @Ignore() open var Values:ArrayList? = null open var CustomField:CustomField? = null @Ignore() open var RegEx:RegEx? = null @Ignore() open var Services:ArrayList? = null open var CustomFieldServiceRelation:ArrayList? = null @Required() open var CompanyId:UUID? = null open var Id:Int? = null open var GroupId:Int? = null @Required() open var FieldId:Int? = null @Required() open var IconId:Int? = null open var RegExId:Int? = null @Required() open var Name:String? = null @Required() open var Description:String? = null @Required() open var Datatype:String? = null @Required() open var MaxLength:Int? = null @Required() open var IsPublic:Boolean? = null @Required() open var IsHidden:Boolean? = null @Required() open var IsMandatory:Boolean? = null open var DefaultValue:String? = null open var RegExErrorMessage:String? = null open var MandatoryErrorMessage:String? = null open var Width:Int? = null @Required() open var MultipleLineText:Boolean? = null open var ModifiedDate:Date? = null } open class Resource : BaseModel(), ICustomFieldTable, IBaseModelCreated, IBaseModelUpdated { @Ignore() open var Priority:Int? = null @Ignore() open var Schedules:IList? = null @Ignore() open var Exceptions:IList? = null @Ignore() open var Bookings:IList? = null @Ignore() override var CustomFieldsConfig:IList? = null @Ignore() override var CustomFieldsData:IList? = null @Required() open var CompanyId:UUID? = null open var Id:Int? = null @Required() open var Name:String? = null @Required() open var Active:Boolean? = null open var Description:String? = null open var ImageUrl:String? = null @Required() override var UpdatedDate:Date? = null @Required() override var CreatedDate:Date? = null @Required() open var Color:String? = null open var Email:String? = null open var MobilePhone:String? = null open var EmailNotification:Boolean? = null open var SMSNotification:Boolean? = null @Required() open var SendSMSReminder:Boolean? = null @Required() open var SendEmailReminder:Boolean? = null open var ModifiedDate:Date? = null open var AccessGroup:String? = null override var TextField1:String? = null override var TextField2:String? = null override var TextField3:String? = null override var TextField4:String? = null override var TextField5:String? = null override var TextField6:String? = null override var TextField7:String? = null override var TextField8:String? = null override var TextField9:String? = null override var TextField10:String? = null override var TextField11:String? = null override var TextField12:String? = null override var TextField13:String? = null override var TextField14:String? = null override var TextField15:String? = null override var TextField16:String? = null override var TextField17:String? = null override var TextField18:String? = null override var TextField19:String? = null override var TextField20:String? = null } open class CustomFieldDataResponse { open var Id:Int? = null open var Column:String? = null open var Name:String? = null open var Description:String? = null open var Value:String? = null /** * Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox' */ @ApiMember(Description="Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'") open var DataType:String? = null } open class BookedCustomer { open var Id:UUID? = null open var Firstname:String? = null open var Lastname:String? = null open var Email:String? = null open var Phone:String? = null open var FacebookUserName:String? = null open var ImageUrl:String? = null open var CorporateIdentityNumber:String? = null open var InvoiceAddress1:String? = null open var InvoiceAddress2:String? = null open var InvoiceCity:String? = null open var InvoicePostalCode:String? = null open var InvoiceCountryCode:String? = null } open class TimeException : ITimeException { /** * Time exception id */ @ApiMember(Description="Time exception id") override var Id:Int? = null /** * Indicates whether or not the time exception is recurring */ @ApiMember(Description="Indicates whether or not the time exception is recurring") override 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") override 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, ...") override 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, ...") override var ReasonTextPublic:String? = null /** * Time exception start */ @ApiMember(Description="Time exception start") open var From:Date? = null /** * Time exception end */ @ApiMember(Description="Time exception end") open var To:Date? = null /** * Resources that owns this exception */ @ApiMember(Description="Resources that owns this exception") override var ResourceIds:ArrayList? = null } open class BookedTime : IBookedTime { /** * Booking id */ @ApiMember(Description="Booking id") override var Id:Int? = null /** * The booked service */ @ApiMember(Description="The booked service") override var ServiceId:Int? = null /** * Booking start */ @ApiMember(Description="Booking start") open var From:Date? = null /** * Booking end */ @ApiMember(Description="Booking end") open var To:Date? = null /** * Number of booked spots */ @ApiMember(Description="Number of booked spots") override var BookedSpots:Int? = null /** * Number of total spots for the service */ @ApiMember(Description="Number of total spots for the service") override var TotalSpots:Int? = null /** * The pause after the booking */ @ApiMember(Description="The pause after the booking") override var PauseAfterInMinutes:Int? = null /** * The booking status */ @ApiMember(Description="The booking status") override var StatusId:Int? = null override var Status:BookingStatusEnum? = null /** * The customer the booking belongs to */ @ApiMember(Description="The customer the booking belongs to") override var Customer:BookedCustomer? = null } enum class ScheduleType { NotDefined, RecurringSchedule, DateSchedule, } @DataContract open class QueryBase { /** * Skip over a given number of elements in a sequence and then return the remainder. Use this when you need paging.

Example:
?skip=10&orderBy=Id */ @DataMember(Order=1) open var Skip:Int? = null /** * Return a given number of elements in a sequence and then skip over the remainder. Use this when you need paging.

Example:
?take=20 */ @DataMember(Order=2) open var Take:Int? = null /** * Comma separated list of fields to order by. Prefix the field name with a minus if you wan't to invert the sort for that field.

Example:
?orderBy=Id,-Age,FirstName */ @DataMember(Order=3) open var OrderBy:String? = null /** * Comma separated list of fields to order by in descending order. Prefix the field name with a minus if you wan't to invert the sort for that field.

Example:
?orderByDesc=Id,-Age,FirstName */ @DataMember(Order=4) open var OrderByDesc:String? = null /** * Include any of the aggregates AVG, COUNT, FIRST, LAST, MAX, MIN, SUM in your result set. The results will be returned in the meta field.

Example:
?include=COUNT(*) as Total

or multiple fields with
?include=Count(*) Total, Min(Age), AVG(Age) AverageAge

or unique with
?include=COUNT(DISTINCT LivingStatus) as UniqueStatus */ @DataMember(Order=5) open var Include:String? = null @DataMember(Order=6) open var Fields:String? = null @DataMember(Order=7) open var Meta:HashMap? = null } open class BaseModel { } interface IBaseModelCreated { var CreatedDate:Date? } interface IBaseModelUpdated { var UpdatedDate:Date? } interface ICustomFieldTable { var CustomFieldsConfig:IList? var CustomFieldsData:IList? var TextField1:String? var TextField2:String? var TextField3:String? var TextField4:String? var TextField5:String? var TextField6:String? var TextField7:String? var TextField8:String? var TextField9:String? var TextField10:String? var TextField11:String? var TextField12:String? var TextField13:String? var TextField14:String? var TextField15:String? var TextField16:String? var TextField17:String? var TextField18:String? var TextField19:String? var TextField20:String? } open class CustomFieldValue : BaseModel() { @Required() open var CompanyId:UUID? = null open var Id:Int? = null @Required() open var Value:String? = null @Required() open var Active:Boolean? = null open var SortOrder:Short? = null open var ModifiedDate:Date? = null } open class CustomField : BaseModel() { @Required() open var Table:String? = null @Required() open var Column:String? = null @Required() open var DataType:String? = null @Required() open var Description:String? = null @Required() open var Active:Boolean? = null open var ModifiedDate:Date? = null open var Id:Int? = null } open class RegEx : BaseModel() { @Required() open var Name:String? = null @Required() open var Description:String? = null @Required() open var RegExCode:String? = null open var ErrorMessage:String? = null open var ModifiedDate:Date? = null open var Id:Int? = null } open class CustomFieldServiceRelation : BaseModel() { @Required() open var CompanyId:UUID? = null open var Id:Int? = null @Required() open var CustomFieldConfigId:Int? = null @Required() open var ServiceId:Int? = null open var ModifiedDate:Date? = null } interface ISchedule { var CompanyId:UUID? var Resources:IList? var Type:ScheduleType? var Active:Boolean? var IsResourceSpecific:Boolean? } interface ITimeException : IInterval { var Id:Int? var ReasonText:String? var IsBlock:Boolean? var ReasonTextPublic:String? var IsRecurring:Boolean? var ResourceIds:ArrayList? } 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? } open class ResourceQueryResponse { /** * The resource id */ @ApiMember(Description="The resource id") open var Id:Int? = null /** * The resource name */ @ApiMember(Description="The resource name") open var Name:String? = null /** * The resource description */ @ApiMember(Description="The resource description") open var Description:String? = null /** * If resource is active or not */ @ApiMember(Description="If resource is active or not") open 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.") open var Color:String? = null /** * The Email of the resource */ @ApiMember(Description="The Email of the resource") open var Email:String? = null /** * The Image URL of the resource */ @ApiMember(Description="The Image URL of the resource") open var ImageUrl:Uri? = null /** * The Mobile phone number of the resource */ @ApiMember(Description="The Mobile phone number of the resource") open 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") open var AccessGroup:String? = null /** * If the resource should receive Email notification when booked */ @ApiMember(Description="If the resource should receive Email notification when booked") open var EmailNotification:Boolean? = null /** * If the resource should receive SMS notification when booked */ @ApiMember(Description="If the resource should receive SMS notification when booked") open var SMSNotification:Boolean? = null /** * If the resource should receive Email reminders on bookings */ @ApiMember(Description="If the resource should receive Email reminders on bookings") open var SendEmailReminder:Boolean? = null /** * If the resource should receive SMS reminders on bookings */ @ApiMember(Description="If the resource should receive SMS reminders on bookings") open var SendSMSReminder:Boolean? = null /** * The resource time exceptions */ @ApiMember(Description="The resource time exceptions") open var Exceptions:ArrayList? = null /** * The resource bookings */ @ApiMember(Description="The resource bookings") open var Bookings:ArrayList? = null /** * The date when the resource was created */ @ApiMember(Description="The date when the resource was created") open var Created:Date? = null /** * The date when the resource was updated */ @ApiMember(Description="The date when the resource was updated") open var Updated:Date? = null open var ResponseStatus:ResponseStatus? = null }