/* Options: Date: 2024-11-21 12:10:51 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: NewsletterEmailTemplateQuery.* //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 EmailTemplate extends BaseModel implements IConvertible { // @Required() String? Name; // @Required() String? Description; // @Required() String? Body; // @Required() int? Type; DateTime? ModifiedDate; int? Id; EmailTemplate({this.Name,this.Description,this.Body,this.Type,this.ModifiedDate,this.Id}); EmailTemplate.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); Name = json['Name']; Description = json['Description']; Body = json['Body']; Type = json['Type']; ModifiedDate = JsonConverters.fromJson(json['ModifiedDate'],'DateTime',context!); Id = json['Id']; return this; } Map toJson() => super.toJson()..addAll({ 'Name': Name, 'Description': Description, 'Body': Body, 'Type': Type, 'ModifiedDate': JsonConverters.toJson(ModifiedDate,'DateTime',context!), 'Id': Id }); getTypeName() => "EmailTemplate"; TypeContext? context = _ctx; } class NewsletterEmailTemplatesQueryResponse implements IConvertible { /** * The email template id */ // @ApiMember(Description="The email template id") int? Id; /** * The email template name. */ // @ApiMember(Description="The email template name.") String? Name; /** * The email template description. */ // @ApiMember(Description="The email template description.") String? Description; /** * The email template html content. */ // @ApiMember(Description="The email template html content.") String? Body; NewsletterEmailTemplatesQueryResponse({this.Id,this.Name,this.Description,this.Body}); NewsletterEmailTemplatesQueryResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Name = json['Name']; Description = json['Description']; Body = json['Body']; return this; } Map toJson() => { 'Id': Id, 'Name': Name, 'Description': Description, 'Body': Body }; getTypeName() => "NewsletterEmailTemplatesQueryResponse"; TypeContext? context = _ctx; } // @Route("/newsletter/emailtemplates", "GET") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) // @ValidateRequest(Validator="IsAuthenticated") class NewsletterEmailTemplateQuery extends QueryDb2 implements IReturn>, IConvertible, IGet { /** * The email template id. */ // @ApiMember(Description="The email template id.") int? Id; NewsletterEmailTemplateQuery({this.Id}); NewsletterEmailTemplateQuery.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); Id = json['Id']; return this; } Map toJson() => super.toJson()..addAll({ 'Id': Id }); createResponse() => QueryResponse(); getResponseTypeName() => "QueryResponse"; getTypeName() => "NewsletterEmailTemplateQuery"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: { 'BaseModel': TypeInfo(TypeOf.Class, create:() => BaseModel()), 'EmailTemplate': TypeInfo(TypeOf.Class, create:() => EmailTemplate()), 'NewsletterEmailTemplatesQueryResponse': TypeInfo(TypeOf.Class, create:() => NewsletterEmailTemplatesQueryResponse()), 'QueryResponse': TypeInfo(TypeOf.Class, create:() => QueryResponse()), 'NewsletterEmailTemplateQuery': TypeInfo(TypeOf.Class, create:() => NewsletterEmailTemplateQuery()), 'List': TypeInfo(TypeOf.Class, create:() => []), });