/* Options: Date: 2025-03-14 04:13:18 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: CompanyIncentiveQuery.* //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; } enum IncentiveActionType { Upgrade, AddOn, Information, } class IncentiveAction extends BaseModel implements IConvertible { int? Id; IncentiveActionType? ActionType; String? Page; String? Segment; String? Element; IncentiveAction({this.Id,this.ActionType,this.Page,this.Segment,this.Element}); IncentiveAction.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); Id = json['Id']; ActionType = JsonConverters.fromJson(json['ActionType'],'IncentiveActionType',context!); Page = json['Page']; Segment = json['Segment']; Element = json['Element']; return this; } Map toJson() => super.toJson()..addAll({ 'Id': Id, 'ActionType': JsonConverters.toJson(ActionType,'IncentiveActionType',context!), 'Page': Page, 'Segment': Segment, 'Element': Element }); getTypeName() => "IncentiveAction"; TypeContext? context = _ctx; } class CompanyIncentiveResponse implements IConvertible { int? Id; String? Heading; String? StorageUrl; String? SuccessButtonText; int? ActionId; int? InitialDelayInSeconds; int? MaxDisplayCount; DateTime? ValidFrom; DateTime? ValidTo; IncentiveAction? Action; String? Payload; CompanyIncentiveResponse({this.Id,this.Heading,this.StorageUrl,this.SuccessButtonText,this.ActionId,this.InitialDelayInSeconds,this.MaxDisplayCount,this.ValidFrom,this.ValidTo,this.Action,this.Payload}); CompanyIncentiveResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Heading = json['Heading']; StorageUrl = json['StorageUrl']; SuccessButtonText = json['SuccessButtonText']; ActionId = json['ActionId']; InitialDelayInSeconds = json['InitialDelayInSeconds']; MaxDisplayCount = json['MaxDisplayCount']; ValidFrom = JsonConverters.fromJson(json['ValidFrom'],'DateTime',context!); ValidTo = JsonConverters.fromJson(json['ValidTo'],'DateTime',context!); Action = JsonConverters.fromJson(json['Action'],'IncentiveAction',context!); Payload = json['Payload']; return this; } Map toJson() => { 'Id': Id, 'Heading': Heading, 'StorageUrl': StorageUrl, 'SuccessButtonText': SuccessButtonText, 'ActionId': ActionId, 'InitialDelayInSeconds': InitialDelayInSeconds, 'MaxDisplayCount': MaxDisplayCount, 'ValidFrom': JsonConverters.toJson(ValidFrom,'DateTime',context!), 'ValidTo': JsonConverters.toJson(ValidTo,'DateTime',context!), 'Action': JsonConverters.toJson(Action,'IncentiveAction',context!), 'Payload': Payload }; getTypeName() => "CompanyIncentiveResponse"; TypeContext? context = _ctx; } class CompanyIncentivesQueryResponse implements IConvertible { List? Incentives; String? CompanyId; CompanyIncentivesQueryResponse({this.Incentives,this.CompanyId}); CompanyIncentivesQueryResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Incentives = JsonConverters.fromJson(json['Incentives'],'List',context!); CompanyId = json['CompanyId']; return this; } Map toJson() => { 'Incentives': JsonConverters.toJson(Incentives,'List',context!), 'CompanyId': CompanyId }; getTypeName() => "CompanyIncentivesQueryResponse"; TypeContext? context = _ctx; } // @Route("/companies/{CompanyId}/incentives", "GET") // @ValidateRequest(Validator="IsAuthenticated") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) class CompanyIncentiveQuery 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="path") String? CompanyId; CompanyIncentiveQuery({this.CompanyId}); CompanyIncentiveQuery.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; return this; } Map toJson() => { 'CompanyId': CompanyId }; createResponse() => CompanyIncentivesQueryResponse(); getResponseTypeName() => "CompanyIncentivesQueryResponse"; getTypeName() => "CompanyIncentiveQuery"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'testapi.bokamera.se', types: { 'ICompany': TypeInfo(TypeOf.Interface), 'BaseModel': TypeInfo(TypeOf.Class, create:() => BaseModel()), 'IncentiveActionType': TypeInfo(TypeOf.Enum, enumValues:IncentiveActionType.values), 'IncentiveAction': TypeInfo(TypeOf.Class, create:() => IncentiveAction()), 'CompanyIncentiveResponse': TypeInfo(TypeOf.Class, create:() => CompanyIncentiveResponse()), 'CompanyIncentivesQueryResponse': TypeInfo(TypeOf.Class, create:() => CompanyIncentivesQueryResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'CompanyIncentiveQuery': TypeInfo(TypeOf.Class, create:() => CompanyIncentiveQuery()), });