/* Options: Date: 2024-11-21 12:44:32 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: MessageTypeQuery.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; 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; } // @Route("/messages/templates/types", "GET") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) // @ValidateRequest(Validator="IsAuthenticated") class MessageTypeQuery extends QueryDb2 implements IReturn>, IConvertible, IGet { /** * The message type id. */ // @ApiMember(Description="The message type id.") int? Id; /** * The message send method id. 1 = Email, 2 = SMS */ // @ApiMember(Description="The message send method id. 1 = Email, 2 = SMS") int? SendMethodId; MessageTypeQuery({this.Id,this.SendMethodId}); MessageTypeQuery.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); Id = json['Id']; SendMethodId = json['SendMethodId']; return this; } Map toJson() => super.toJson()..addAll({ 'Id': Id, 'SendMethodId': SendMethodId }); createResponse() => QueryResponse(); getResponseTypeName() => "QueryResponse"; getTypeName() => "MessageTypeQuery"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: { 'BaseModel': TypeInfo(TypeOf.Class, create:() => BaseModel()), 'MessageType': TypeInfo(TypeOf.Class, create:() => MessageType()), 'MessageTypeQueryResponse': TypeInfo(TypeOf.Class, create:() => MessageTypeQueryResponse()), 'QueryResponse': TypeInfo(TypeOf.Class, create:() => QueryResponse()), 'MessageTypeQuery': TypeInfo(TypeOf.Class, create:() => MessageTypeQuery()), 'List': TypeInfo(TypeOf.Class, create:() => []), });