/* Options: Date: 2024-11-21 11:30:47 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.bokamera.se //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: MessageTemplatesQuery.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; abstract class ICompany { String? CompanyId; } class BaseModel implements IConvertible { BaseModel(); BaseModel.fromJson(Map json) : super(); fromMap(Map json) { return this; } Map toJson() => {}; getTypeName() => "BaseModel"; TypeContext? context = _ctx; } class MessageType extends BaseModel implements IConvertible { // @Required() String? Name; // @Required() String? Description; // @Required() int? MaxCharacters; // @Required() String? DefaultText; // @Required() int? SendMethodId; DateTime? ModifiedDate; int? Id; MessageType({this.Name,this.Description,this.MaxCharacters,this.DefaultText,this.SendMethodId,this.ModifiedDate,this.Id}); MessageType.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); Name = json['Name']; Description = json['Description']; MaxCharacters = json['MaxCharacters']; DefaultText = json['DefaultText']; SendMethodId = json['SendMethodId']; ModifiedDate = JsonConverters.fromJson(json['ModifiedDate'],'DateTime',context!); Id = json['Id']; return this; } Map toJson() => super.toJson()..addAll({ 'Name': Name, 'Description': Description, 'MaxCharacters': MaxCharacters, 'DefaultText': DefaultText, 'SendMethodId': SendMethodId, 'ModifiedDate': JsonConverters.toJson(ModifiedDate,'DateTime',context!), 'Id': Id }); getTypeName() => "MessageType"; TypeContext? context = _ctx; } class MessageTypeQueryResponse implements IConvertible { /** * The message type id */ // @ApiMember(Description="The message type id") int? Id; /** * The message type name. */ // @ApiMember(Description="The message type name.") String? Name; /** * The message type description. */ // @ApiMember(Description="The message type description.") String? Description; /** * The maximum number of charachters that can be entered into message body using this type. */ // @ApiMember(Description="The maximum number of charachters that can be entered into message body using this type.") int? MaxCharacters; /** * 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.") String? DefaultText; /** * The send method for this type. 1 = Email, 2 = SMS. */ // @ApiMember(Description="The send method for this type. 1 = Email, 2 = SMS.") int? SendMethodId; MessageTypeQueryResponse({this.Id,this.Name,this.Description,this.MaxCharacters,this.DefaultText,this.SendMethodId}); MessageTypeQueryResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Name = json['Name']; Description = json['Description']; MaxCharacters = json['MaxCharacters']; DefaultText = json['DefaultText']; SendMethodId = json['SendMethodId']; return this; } Map toJson() => { 'Id': Id, 'Name': Name, 'Description': Description, 'MaxCharacters': MaxCharacters, 'DefaultText': DefaultText, 'SendMethodId': SendMethodId }; getTypeName() => "MessageTypeQueryResponse"; TypeContext? context = _ctx; } class CompanyMessageTemplateMessageServiceRelation extends BaseModel implements IConvertible { // @Required() String? CompanyId; int? Id; // @Required() int? CompanyMessageTemplateId; // @Required() int? ServiceId; DateTime? ModifiedDate; CompanyMessageTemplateMessageServiceRelation({this.CompanyId,this.Id,this.CompanyMessageTemplateId,this.ServiceId,this.ModifiedDate}); CompanyMessageTemplateMessageServiceRelation.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); CompanyId = json['CompanyId']; Id = json['Id']; CompanyMessageTemplateId = json['CompanyMessageTemplateId']; ServiceId = json['ServiceId']; ModifiedDate = JsonConverters.fromJson(json['ModifiedDate'],'DateTime',context!); return this; } Map toJson() => super.toJson()..addAll({ 'CompanyId': CompanyId, 'Id': Id, 'CompanyMessageTemplateId': CompanyMessageTemplateId, 'ServiceId': ServiceId, 'ModifiedDate': JsonConverters.toJson(ModifiedDate,'DateTime',context!) }); getTypeName() => "CompanyMessageTemplateMessageServiceRelation"; TypeContext? context = _ctx; } class CompanyMessageTemplate extends BaseModel implements IConvertible { // @References(typeof(MessageType)) // @Ignore() MessageType? Type; List? MessageServiceRelation; // @Ignore() List? Services; // @Required() String? CompanyId; int? Id; // @Required() int? TypeId; // @Required() String? Name; // @Required() String? Sender; String? Title; // @Required() String? Body; // @Required() bool? Default; // @Required() bool? Readonly; // @Required() String? HeaderFooterBGColor; DateTime? ModifiedDate; String? MessageTemplate; String? Language; CompanyMessageTemplate({this.Type,this.MessageServiceRelation,this.Services,this.CompanyId,this.Id,this.TypeId,this.Name,this.Sender,this.Title,this.Body,this.Default,this.Readonly,this.HeaderFooterBGColor,this.ModifiedDate,this.MessageTemplate,this.Language}); CompanyMessageTemplate.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); Type = JsonConverters.fromJson(json['Type'],'MessageType',context!); MessageServiceRelation = JsonConverters.fromJson(json['MessageServiceRelation'],'List',context!); Services = JsonConverters.fromJson(json['Services'],'List',context!); CompanyId = json['CompanyId']; Id = json['Id']; TypeId = json['TypeId']; Name = json['Name']; Sender = json['Sender']; Title = json['Title']; Body = json['Body']; Default = json['Default']; Readonly = json['Readonly']; HeaderFooterBGColor = json['HeaderFooterBGColor']; ModifiedDate = JsonConverters.fromJson(json['ModifiedDate'],'DateTime',context!); MessageTemplate = json['MessageTemplate']; Language = json['Language']; return this; } Map toJson() => super.toJson()..addAll({ 'Type': JsonConverters.toJson(Type,'MessageType',context!), 'MessageServiceRelation': JsonConverters.toJson(MessageServiceRelation,'List',context!), 'Services': JsonConverters.toJson(Services,'List',context!), 'CompanyId': CompanyId, 'Id': Id, 'TypeId': TypeId, 'Name': Name, 'Sender': Sender, 'Title': Title, 'Body': Body, 'Default': Default, 'Readonly': Readonly, 'HeaderFooterBGColor': HeaderFooterBGColor, 'ModifiedDate': JsonConverters.toJson(ModifiedDate,'DateTime',context!), 'MessageTemplate': MessageTemplate, 'Language': Language }); getTypeName() => "CompanyMessageTemplate"; TypeContext? context = _ctx; } class MessageServices implements IConvertible { int? Id; /** * Name of the service */ // @ApiMember(Description="Name of the service") String? Name; /** * The image url of the service */ // @ApiMember(Description="The image url of the service") Uri? ImageUrl; MessageServices({this.Id,this.Name,this.ImageUrl}); MessageServices.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Name = json['Name']; ImageUrl = JsonConverters.fromJson(json['ImageUrl'],'Uri',context!); return this; } Map toJson() => { 'Id': Id, 'Name': Name, 'ImageUrl': JsonConverters.toJson(ImageUrl,'Uri',context!) }; getTypeName() => "MessageServices"; TypeContext? context = _ctx; } class MessageTemplatesQueryResponse implements IConvertible { /** * The message template id */ // @ApiMember(Description="The message template id") int? Id; /** * The message template name. */ // @ApiMember(Description="The message template name.") String? Name; /** * The message template title. */ // @ApiMember(Description="The message template title.") String? Title; /** * The message template title. */ // @ApiMember(Description="The message template title.") String? Body; /** * 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).") String? Sender; /** * If the message template is the default message currently in use. */ // @ApiMember(Description="If the message template is the default message currently in use.") bool? Default; /** * If the message type information. */ // @ApiMember(Description="If the message type information.") MessageTypeQueryResponse? MessageType; /** * Template language. */ // @ApiMember(Description="Template language.") String? Language; /** * 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.") List? Services; MessageTemplatesQueryResponse({this.Id,this.Name,this.Title,this.Body,this.Sender,this.Default,this.MessageType,this.Language,this.Services}); MessageTemplatesQueryResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Name = json['Name']; Title = json['Title']; Body = json['Body']; Sender = json['Sender']; Default = json['Default']; MessageType = JsonConverters.fromJson(json['MessageType'],'MessageTypeQueryResponse',context!); Language = json['Language']; Services = JsonConverters.fromJson(json['Services'],'List',context!); return this; } Map toJson() => { 'Id': Id, 'Name': Name, 'Title': Title, 'Body': Body, 'Sender': Sender, 'Default': Default, 'MessageType': JsonConverters.toJson(MessageType,'MessageTypeQueryResponse',context!), 'Language': Language, 'Services': JsonConverters.toJson(Services,'List',context!) }; getTypeName() => "MessageTemplatesQueryResponse"; TypeContext? context = _ctx; } // @Route("/messages/templates", "GET") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) // @ValidateRequest(Validator="IsAuthenticated") class MessageTemplatesQuery extends QueryDb2 implements IReturn>, ICompany, IConvertible, IGet { /** * 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.") String? CompanyId; /** * The message template id. */ // @ApiMember(Description="The message template id.") int? Id; /** * The message type id. See GET /messages/templates/types */ // @ApiMember(Description="The message type id. See GET /messages/templates/types ") int? TypeId; /** * 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 ") int? MessageTypeSendMethodId; /** * If you only want to retrieve active message templates (not inactive). */ // @ApiMember(Description="If you only want to retrieve active message templates (not inactive).") bool? Default; /** * If you want to include the message type information */ // @ApiMember(DataType="boolean", Description="If you want to include the message type information", ParameterType="query") bool? IncludeMessageTypeInformation; /** * 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") bool? IncludeConnectedServices; MessageTemplatesQuery({this.CompanyId,this.Id,this.TypeId,this.MessageTypeSendMethodId,this.Default,this.IncludeMessageTypeInformation,this.IncludeConnectedServices}); MessageTemplatesQuery.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); CompanyId = json['CompanyId']; Id = json['Id']; TypeId = json['TypeId']; MessageTypeSendMethodId = json['MessageTypeSendMethodId']; Default = json['Default']; IncludeMessageTypeInformation = json['IncludeMessageTypeInformation']; IncludeConnectedServices = json['IncludeConnectedServices']; return this; } Map toJson() => super.toJson()..addAll({ 'CompanyId': CompanyId, 'Id': Id, 'TypeId': TypeId, 'MessageTypeSendMethodId': MessageTypeSendMethodId, 'Default': Default, 'IncludeMessageTypeInformation': IncludeMessageTypeInformation, 'IncludeConnectedServices': IncludeConnectedServices }); createResponse() => QueryResponse(); getResponseTypeName() => "QueryResponse"; getTypeName() => "MessageTemplatesQuery"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: { 'ICompany': TypeInfo(TypeOf.Interface), 'BaseModel': TypeInfo(TypeOf.Class, create:() => BaseModel()), 'MessageType': TypeInfo(TypeOf.Class, create:() => MessageType()), 'MessageTypeQueryResponse': TypeInfo(TypeOf.Class, create:() => MessageTypeQueryResponse()), 'CompanyMessageTemplateMessageServiceRelation': TypeInfo(TypeOf.Class, create:() => CompanyMessageTemplateMessageServiceRelation()), 'CompanyMessageTemplate': TypeInfo(TypeOf.Class, create:() => CompanyMessageTemplate()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'Service': TypeInfo(TypeOf.Class, create:() => Service()), 'MessageServices': TypeInfo(TypeOf.Class, create:() => MessageServices()), 'Uri': TypeInfo(TypeOf.Class, create:() => Uri()), 'MessageTemplatesQueryResponse': TypeInfo(TypeOf.Class, create:() => MessageTemplatesQueryResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'QueryResponse': TypeInfo(TypeOf.Class, create:() => QueryResponse()), 'MessageTemplatesQuery': TypeInfo(TypeOf.Class, create:() => MessageTemplatesQuery()), 'List': TypeInfo(TypeOf.Class, create:() => []), });