/* Options: Date: 2025-01-18 08:49:24 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: ListWebhookMessages.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; abstract class ICompany { String? CompanyId; } enum Ordering { Ascending, Descending, } abstract class ClientWebhookRequestBase { String? ClientId; ClientWebhookRequestBase({this.ClientId}); ClientWebhookRequestBase.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ClientId = json['ClientId']; return this; } Map toJson() => { 'ClientId': ClientId }; getTypeName() => "ClientWebhookRequestBase"; TypeContext? context = _ctx; } class ListMessagesRequestDto extends ClientWebhookRequestBase implements IConvertible { DateTime? Before; DateTime? After; String? Channel; String? Iterator; int? Limit; Ordering? Order; List? EventTypes; bool? WithContent; ListMessagesRequestDto({this.Before,this.After,this.Channel,this.Iterator,this.Limit,this.Order,this.EventTypes,this.WithContent}); ListMessagesRequestDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); Before = JsonConverters.fromJson(json['Before'],'DateTime',context!); After = JsonConverters.fromJson(json['After'],'DateTime',context!); Channel = json['Channel']; Iterator = json['Iterator']; Limit = json['Limit']; Order = JsonConverters.fromJson(json['Order'],'Ordering',context!); EventTypes = JsonConverters.fromJson(json['EventTypes'],'List',context!); WithContent = json['WithContent']; return this; } Map toJson() => super.toJson()..addAll({ 'Before': JsonConverters.toJson(Before,'DateTime',context!), 'After': JsonConverters.toJson(After,'DateTime',context!), 'Channel': Channel, 'Iterator': Iterator, 'Limit': Limit, 'Order': JsonConverters.toJson(Order,'Ordering',context!), 'EventTypes': JsonConverters.toJson(EventTypes,'List',context!), 'WithContent': WithContent }); getTypeName() => "ListMessagesRequestDto"; TypeContext? context = _ctx; } class ListMessagesResponseDto implements IConvertible { List? Data; bool? Done; String? Iterator; ListMessagesResponseDto({this.Data,this.Done,this.Iterator}); ListMessagesResponseDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Data = JsonConverters.fromJson(json['Data'],'List',context!); Done = json['Done']; Iterator = json['Iterator']; return this; } Map toJson() => { 'Data': JsonConverters.toJson(Data,'List',context!), 'Done': Done, 'Iterator': Iterator }; getTypeName() => "ListMessagesResponseDto"; TypeContext? context = _ctx; } // @Route("/webhook/messages", "GET") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) // @ValidateRequest(Validator="IsAuthenticated") class ListWebhookMessages extends ListMessagesRequestDto 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.", IsRequired=true, ParameterType="query") String? CompanyId; ListWebhookMessages({this.CompanyId}); ListWebhookMessages.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); CompanyId = json['CompanyId']; return this; } Map toJson() => super.toJson()..addAll({ 'CompanyId': CompanyId }); createResponse() => ListMessagesResponseDto(); getResponseTypeName() => "ListMessagesResponseDto"; getTypeName() => "ListWebhookMessages"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: { 'ICompany': TypeInfo(TypeOf.Interface), 'Ordering': TypeInfo(TypeOf.Enum, enumValues:Ordering.values), 'ClientWebhookRequestBase': TypeInfo(TypeOf.AbstractClass), 'ListMessagesRequestDto': TypeInfo(TypeOf.Class, create:() => ListMessagesRequestDto()), 'ListMessagesResponseDto': TypeInfo(TypeOf.Class, create:() => ListMessagesResponseDto()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'GetMessageResponseDto': TypeInfo(TypeOf.Class, create:() => GetMessageResponseDto()), 'ListWebhookMessages': TypeInfo(TypeOf.Class, create:() => ListWebhookMessages()), });