/* Options: Date: 2025-01-18 06:53:00 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: CreateWebhookEndpoint.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; abstract class ICompany { String? CompanyId; } class WebhookEndpoint implements IConvertible { String? Description; String? Url; String? Id; bool? Disabled; List? EventTypes; WebhookEndpoint({this.Description,this.Url,this.Id,this.Disabled,this.EventTypes}); WebhookEndpoint.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Description = json['Description']; Url = json['Url']; Id = json['Id']; Disabled = json['Disabled']; EventTypes = JsonConverters.fromJson(json['EventTypes'],'List',context!); return this; } Map toJson() => { 'Description': Description, 'Url': Url, 'Id': Id, 'Disabled': Disabled, 'EventTypes': JsonConverters.toJson(EventTypes,'List',context!) }; getTypeName() => "WebhookEndpoint"; TypeContext? context = _ctx; } // @Route("/webhook/endpoints", "POST") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) // @ValidateRequest(Validator="IsAuthenticated") class CreateWebhookEndpoint implements IReturn, ICompany, IConvertible, IPost { /** * 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; /** * The webhook endpoint URL. */ // @ApiMember(Description="The webhook endpoint URL.", IsRequired=true) Uri? Url; /** * List of event types. At least one event type is required. */ // @ApiMember(Description="List of event types. At least one event type is required.", IsRequired=true) // @Validate(Validator="NotEmpty", ErrorCode="At least one event type is required.") List? EventTypes; String? Description; // @ApiMember() bool? Disabled; CreateWebhookEndpoint({this.CompanyId,this.Url,this.EventTypes,this.Description,this.Disabled}); CreateWebhookEndpoint.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; Url = JsonConverters.fromJson(json['Url'],'Uri',context!); EventTypes = JsonConverters.fromJson(json['EventTypes'],'List',context!); Description = json['Description']; Disabled = json['Disabled']; return this; } Map toJson() => { 'CompanyId': CompanyId, 'Url': JsonConverters.toJson(Url,'Uri',context!), 'EventTypes': JsonConverters.toJson(EventTypes,'List',context!), 'Description': Description, 'Disabled': Disabled }; createResponse() => WebhookEndpoint(); getResponseTypeName() => "WebhookEndpoint"; getTypeName() => "CreateWebhookEndpoint"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: { 'ICompany': TypeInfo(TypeOf.Interface), 'WebhookEndpoint': TypeInfo(TypeOf.Class, create:() => WebhookEndpoint()), 'CreateWebhookEndpoint': TypeInfo(TypeOf.Class, create:() => CreateWebhookEndpoint()), 'Uri': TypeInfo(TypeOf.Class, create:() => Uri()), });