/* Options: Date: 2025-09-15 04:32:47 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: MessageTemplatesQuery.* //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="/messages/templates", Verbs="GET") @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) @ValidateRequest(Validator="IsAuthenticated") open class MessageTemplatesQuery : QueryDb(), IReturn>, ICompany { /** * The company id, if empty will use the company id for the user you are logged in with. */ @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.") override var CompanyId:UUID? = null /** * The message template id. */ @ApiMember(Description="The message template id.") open var Id:Int? = null /** * The message type id. See GET /messages/templates/types */ @ApiMember(Description="The message type id. See GET /messages/templates/types ") open var TypeId:Int? = null /** * The message send method id.1 = Email and 2 = SMS. See GET /messages/templates/types */ @ApiMember(Description="The message send method id.1 = Email and 2 = SMS. See GET /messages/templates/types ") open var MessageTypeSendMethodId:Int? = null /** * If you only want to retrieve active message templates (not inactive). */ @ApiMember(Description="If you only want to retrieve active message templates (not inactive).") open var Default:Boolean? = null /** * If you want to include the message type information */ @ApiMember(DataType="boolean", Description="If you want to include the message type information", ParameterType="query") open var IncludeMessageTypeInformation:Boolean? = null /** * If you want to include the services that are conencted to this template */ @ApiMember(DataType="boolean", Description="If you want to include the services that are conencted to this template", ParameterType="query") open var IncludeConnectedServices:Boolean? = null companion object { private val responseType = object : TypeToken>(){}.type } override fun getResponseType(): Any? = MessageTemplatesQuery.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() { } interface ICompany { var CompanyId:UUID? } open class MessageType : BaseModel() { @Required() open var Name:String? = null @Required() open var Description:String? = null @Required() open var MaxCharacters:Int? = null @Required() open var DefaultText:String? = null @Required() open var SendMethodId:Int? = null open var ModifiedDate:Date? = null open var Id:Int? = null } open class MessageTypeQueryResponse { /** * The message type id */ @ApiMember(Description="The message type id") open var Id:Int? = null /** * The message type name. */ @ApiMember(Description="The message type name.") open var Name:String? = null /** * The message type description. */ @ApiMember(Description="The message type description.") open var Description:String? = null /** * The maximum number of characters that can be entered into message body using this type. */ @ApiMember(Description="The maximum number of characters that can be entered into message body using this type.") open var MaxCharacters:Int? = null /** * The default text that is always included when sending messages of this type. */ @ApiMember(Description="The default text that is always included when sending messages of this type.") open var DefaultText:String? = null /** * The send method for this type. 1 = Email, 2 = SMS. */ @ApiMember(Description="The send method for this type. 1 = Email, 2 = SMS.") open var SendMethodId:Int? = null } open class CompanyMessageTemplate : BaseModel() { @References(Type=MessageType::class) @Ignore() open var Type:MessageType? = null open var MessageServiceRelation:ArrayList? = null @Ignore() open var Services:ArrayList? = null @Required() open var CompanyId:UUID? = null open var Id:Int? = null @Required() open var TypeId:Int? = null @Required() open var Name:String? = null @Required() open var Sender:String? = null open var Title:String? = null @Required() open var Body:String? = null @Required() open var Default:Boolean? = null @Required() open var Readonly:Boolean? = null @Required() open var HeaderFooterBGColor:String? = null open var ModifiedDate:Date? = null open var MessageTemplate:String? = null open var Language:String? = null } open class MessageServices { open var Id:Int? = null /** * Name of the service */ @ApiMember(Description="Name of the service") open var Name:String? = null /** * The image url of the service */ @ApiMember(Description="The image url of the service") open var ImageUrl:Uri? = null } @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 { } open class CompanyMessageTemplateMessageServiceRelation : BaseModel() { @Required() open var CompanyId:UUID? = null open var Id:Int? = null @Required() open var CompanyMessageTemplateId:Int? = null @Required() open var ServiceId:Int? = null open var ModifiedDate:Date? = null } open class MessageTemplatesQueryResponse { /** * The message template id */ @ApiMember(Description="The message template id") open var Id:Int? = null /** * The message template name. */ @ApiMember(Description="The message template name.") open var Name:String? = null /** * The message template title. */ @ApiMember(Description="The message template title.") open var Title:String? = null /** * The message template title. */ @ApiMember(Description="The message template title.") open var Body:String? = null /** * The message template sender (an email for message types with sendmethod 1, for SMS this cannot be set). */ @ApiMember(Description="The message template sender (an email for message types with sendmethod 1, for SMS this cannot be set).") open var Sender:String? = null /** * If the message template is the default message currently in use. */ @ApiMember(Description="If the message template is the default message currently in use.") open var Default:Boolean? = null /** * If the message type information. */ @ApiMember(Description="If the message type information.") open var MessageType:MessageTypeQueryResponse? = null /** * Template language. */ @ApiMember(Description="Template language.") open var Language:String? = null /** * The connected services which the template is valid for. If empty then it's valid for all services. */ @ApiMember(Description="The connected services which the template is valid for. If empty then it's valid for all services.") open var Services:ArrayList? = null }