/* Options: Date: 2025-04-13 22:28:41 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: 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<String, dynamic> json) { fromMap(json); } fromMap(Map<String, dynamic> json) { Subscribed = json['Subscribed']; CompanyId = json['CompanyId']; return this; } Map<String, dynamic> 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<List<SubscribedUserResponse>>, 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<SubscribedUserResponse>? SubscribedCompanies; SubscribeToNewsletter({this.CompanyId,this.SubscribedCompanies}); SubscribeToNewsletter.fromJson(Map<String, dynamic> json) { fromMap(json); } fromMap(Map<String, dynamic> json) { CompanyId = json['CompanyId']; SubscribedCompanies = JsonConverters.fromJson(json['SubscribedCompanies'],'List<SubscribedUserResponse>',context!); return this; } Map<String, dynamic> toJson() => { 'CompanyId': CompanyId, 'SubscribedCompanies': JsonConverters.toJson(SubscribedCompanies,'List<SubscribedUserResponse>',context!) }; createResponse() => <SubscribedUserResponse>[]; getResponseTypeName() => "List<SubscribedUserResponse>"; getTypeName() => "SubscribeToNewsletter"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: <String, TypeInfo> { 'ICompany': TypeInfo(TypeOf.Interface), 'SubscribedUserResponse': TypeInfo(TypeOf.Class, create:() => SubscribedUserResponse()), 'SubscribeToNewsletter': TypeInfo(TypeOf.Class, create:() => SubscribeToNewsletter()), 'List<SubscribedUserResponse>': TypeInfo(TypeOf.Class, create:() => <SubscribedUserResponse>[]), });