/* Options: Date: 2024-11-21 12:49:02 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: NewsletterLogQuery.* //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 NewsletterLog extends BaseModel implements IMessageLog, IConvertible { int? NewslettersId; // @Required() String? SenderName; DateTime? ModifiedDate; String? CorrelationId; // @Required() String? CompanyId; int? Id; // @Required() int? SendMethodId; // @Required() String? Receiver; // @Required() String? Sender; String? MessageTitle; // @Required() String? MessageBody; // @Required() bool? Sent; // @Required() DateTime? ToSendDate; DateTime? SentDate; int? MessageCount; int? SMSStatus; // @Required() int? MessageRetries; String? CreatedBy; // @Required() DateTime? Created; String? StorageUrl; NewsletterLog({this.NewslettersId,this.SenderName,this.ModifiedDate,this.CorrelationId,this.CompanyId,this.Id,this.SendMethodId,this.Receiver,this.Sender,this.MessageTitle,this.MessageBody,this.Sent,this.ToSendDate,this.SentDate,this.MessageCount,this.SMSStatus,this.MessageRetries,this.CreatedBy,this.Created,this.StorageUrl}); NewsletterLog.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); NewslettersId = json['NewslettersId']; SenderName = json['SenderName']; ModifiedDate = JsonConverters.fromJson(json['ModifiedDate'],'DateTime',context!); CorrelationId = json['CorrelationId']; CompanyId = json['CompanyId']; Id = json['Id']; SendMethodId = json['SendMethodId']; Receiver = json['Receiver']; Sender = json['Sender']; MessageTitle = json['MessageTitle']; MessageBody = json['MessageBody']; Sent = json['Sent']; ToSendDate = JsonConverters.fromJson(json['ToSendDate'],'DateTime',context!); SentDate = JsonConverters.fromJson(json['SentDate'],'DateTime',context!); MessageCount = json['MessageCount']; SMSStatus = json['SMSStatus']; MessageRetries = json['MessageRetries']; CreatedBy = json['CreatedBy']; Created = JsonConverters.fromJson(json['Created'],'DateTime',context!); StorageUrl = json['StorageUrl']; return this; } Map toJson() => super.toJson()..addAll({ 'NewslettersId': NewslettersId, 'SenderName': SenderName, 'ModifiedDate': JsonConverters.toJson(ModifiedDate,'DateTime',context!), 'CorrelationId': CorrelationId, 'CompanyId': CompanyId, 'Id': Id, 'SendMethodId': SendMethodId, 'Receiver': Receiver, 'Sender': Sender, 'MessageTitle': MessageTitle, 'MessageBody': MessageBody, 'Sent': Sent, 'ToSendDate': JsonConverters.toJson(ToSendDate,'DateTime',context!), 'SentDate': JsonConverters.toJson(SentDate,'DateTime',context!), 'MessageCount': MessageCount, 'SMSStatus': SMSStatus, 'MessageRetries': MessageRetries, 'CreatedBy': CreatedBy, 'Created': JsonConverters.toJson(Created,'DateTime',context!), 'StorageUrl': StorageUrl }); getTypeName() => "NewsletterLog"; TypeContext? context = _ctx; } abstract class IMessageLog { String? CompanyId; int? Id; String? Receiver; String? Sender; String? MessageTitle; String? MessageBody; String? CreatedBy; DateTime? Created; bool? Sent; DateTime? ToSendDate; DateTime? SentDate; int? SendMethodId; int? MessageCount; int? SMSStatus; int? MessageRetries; String? StorageUrl; } class NewsletterLogQueryResponse implements IConvertible { /** * The message log id */ // @ApiMember(Description="The message log id") int? Id; /** * The message receiver. Either a email or a mobile phone number. */ // @ApiMember(Description="The message receiver. Either a email or a mobile phone number.") String? Receiver; /** * Nessage Title. */ // @ApiMember(Description="Nessage Title.") String? MessageTitle; /** * Nessage Body. */ // @ApiMember(Description="Nessage Body.") String? MessageBody; /** * When message was created. */ // @ApiMember(Description="When message was created.") DateTime? Created; /** * When the message will be sent. */ // @ApiMember(Description="When the message will be sent.") DateTime? ToSendDate; /** * When the message was sent. */ // @ApiMember(Description="When the message was sent.") DateTime? SentDate; /** * If Message is sent */ // @ApiMember(Description="If Message is sent") bool? Sent; /** * Number of retries to send the message */ // @ApiMember(Description="Number of retries to send the message") int? MessageRetries; /** * Send Method. 1 = Email, 2 = SMS */ // @ApiMember(Description="Send Method. 1 = Email, 2 = SMS") int? SendMethodId; NewsletterLogQueryResponse({this.Id,this.Receiver,this.MessageTitle,this.MessageBody,this.Created,this.ToSendDate,this.SentDate,this.Sent,this.MessageRetries,this.SendMethodId}); NewsletterLogQueryResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Receiver = json['Receiver']; MessageTitle = json['MessageTitle']; MessageBody = json['MessageBody']; Created = JsonConverters.fromJson(json['Created'],'DateTime',context!); ToSendDate = JsonConverters.fromJson(json['ToSendDate'],'DateTime',context!); SentDate = JsonConverters.fromJson(json['SentDate'],'DateTime',context!); Sent = json['Sent']; MessageRetries = json['MessageRetries']; SendMethodId = json['SendMethodId']; return this; } Map toJson() => { 'Id': Id, 'Receiver': Receiver, 'MessageTitle': MessageTitle, 'MessageBody': MessageBody, 'Created': JsonConverters.toJson(Created,'DateTime',context!), 'ToSendDate': JsonConverters.toJson(ToSendDate,'DateTime',context!), 'SentDate': JsonConverters.toJson(SentDate,'DateTime',context!), 'Sent': Sent, 'MessageRetries': MessageRetries, 'SendMethodId': SendMethodId }; getTypeName() => "NewsletterLogQueryResponse"; TypeContext? context = _ctx; } // @Route("/newsletter/log", "GET") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) // @ValidateRequest(Validator="IsAuthenticated") class NewsletterLogQuery 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.", ParameterType="path") String? CompanyId; /** * If you want to search on sent messages */ // @ApiMember(DataType="boolean", Description="If you want to search on sent messages", ParameterType="query") bool? Sent; /** * Message Id */ // @ApiMember(DataType="int", Description="Message Id", ParameterType="query") int? Id; /** * If you want to search on a messages for a specific receiver */ // @ApiMember(DataType="string", Description="If you want to search on a messages for a specific receiver", ParameterType="query") String? Receiver; /** * If you want to search on a messages created a specific date */ // @ApiMember(DataType="datetime", Description="If you want to search on a messages created a specific date", ParameterType="query") DateTime? Created; /** * If you want to search on a messages sent a specific date */ // @ApiMember(DataType="datetime", Description="If you want to search on a messages sent a specific date", ParameterType="query") DateTime? SentDate; ResponseStatus? ResponseStatus; NewsletterLogQuery({this.CompanyId,this.Sent,this.Id,this.Receiver,this.Created,this.SentDate,this.ResponseStatus}); NewsletterLogQuery.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); CompanyId = json['CompanyId']; Sent = json['Sent']; Id = json['Id']; Receiver = json['Receiver']; Created = JsonConverters.fromJson(json['Created'],'DateTime',context!); SentDate = JsonConverters.fromJson(json['SentDate'],'DateTime',context!); ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!); return this; } Map toJson() => super.toJson()..addAll({ 'CompanyId': CompanyId, 'Sent': Sent, 'Id': Id, 'Receiver': Receiver, 'Created': JsonConverters.toJson(Created,'DateTime',context!), 'SentDate': JsonConverters.toJson(SentDate,'DateTime',context!), 'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!) }); createResponse() => QueryResponse(); getResponseTypeName() => "QueryResponse"; getTypeName() => "NewsletterLogQuery"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: { 'ICompany': TypeInfo(TypeOf.Interface), 'BaseModel': TypeInfo(TypeOf.Class, create:() => BaseModel()), 'NewsletterLog': TypeInfo(TypeOf.Class, create:() => NewsletterLog()), 'IMessageLog': TypeInfo(TypeOf.Interface), 'NewsletterLogQueryResponse': TypeInfo(TypeOf.Class, create:() => NewsletterLogQueryResponse()), 'QueryResponse': TypeInfo(TypeOf.Class, create:() => QueryResponse()), 'NewsletterLogQuery': TypeInfo(TypeOf.Class, create:() => NewsletterLogQuery()), 'List': TypeInfo(TypeOf.Class, create:() => []), });