/* Options: Date: 2024-09-19 03:10:05 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://testapi.bokamera.se //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: SubscribeToNewsletter.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; abstract class ICompany { String? CompanyId; } class SubscribedUserResponse implements IConvertible { bool? Subscribed; String? CompanyId; SubscribedUserResponse({this.Subscribed,this.CompanyId}); SubscribedUserResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Subscribed = json['Subscribed']; CompanyId = json['CompanyId']; return this; } Map toJson() => { 'Subscribed': Subscribed, 'CompanyId': CompanyId }; getTypeName() => "SubscribedUserResponse"; TypeContext? context = _ctx; } // @Route("/newsletter/subscribe", "PUT") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) class SubscribeToNewsletter implements IReturn>, ICompany, IConvertible, IPut { /** * 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.") String? CompanyId; /** * Companies for which user is subscribed. */ // @ApiMember(Description="Companies for which user is subscribed.", IsRequired=true) List? SubscribedCompanies; SubscribeToNewsletter({this.CompanyId,this.SubscribedCompanies}); SubscribeToNewsletter.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; SubscribedCompanies = JsonConverters.fromJson(json['SubscribedCompanies'],'List',context!); return this; } Map toJson() => { 'CompanyId': CompanyId, 'SubscribedCompanies': JsonConverters.toJson(SubscribedCompanies,'List',context!) }; createResponse() => []; getResponseTypeName() => "List"; getTypeName() => "SubscribeToNewsletter"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'testapi.bokamera.se', types: { 'ICompany': TypeInfo(TypeOf.Interface), 'SubscribedUserResponse': TypeInfo(TypeOf.Class, create:() => SubscribedUserResponse()), 'SubscribeToNewsletter': TypeInfo(TypeOf.Class, create:() => SubscribeToNewsletter()), 'List': TypeInfo(TypeOf.Class, create:() => []), });