/* Options: Date: 2025-04-04 19:31:55 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: GetVossProducts.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; abstract class ICompany { String? CompanyId; } enum TypeEnum { Main, Addon, License, Usage, } enum StatusEnum { Published, Disabled, } // @DataContract(Name="ProductResultProductFamilyDto") class ProductResultProductFamilyDto implements IConvertible { // @DataMember(Name="id", IsRequired=true) String? id; // @DataMember(Name="externalId") String? externalId; ProductResultProductFamilyDto({this.id,this.externalId}); ProductResultProductFamilyDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['Id']; externalId = json['ExternalId']; return this; } Map toJson() => { 'id': id, 'externalId': externalId }; getTypeName() => "ProductResultProductFamilyDto"; TypeContext? context = _ctx; } // @DataContract(Name="ProductResult") class ProductResult implements IConvertible { // @DataMember(Name="type", IsRequired=true) TypeEnum? type; // @DataMember(Name="status", IsRequired=true) StatusEnum? status; // @DataMember(Name="id", IsRequired=true) String? id; // @DataMember(Name="name", IsRequired=true) String? name; // @DataMember(Name="externalId") String? externalId; // @DataMember(Name="articleNumber", IsRequired=true) String? articleNumber; // @DataMember(Name="productFamily", IsRequired=true) ProductResultProductFamilyDto? productFamily; ProductResult({this.type,this.status,this.id,this.name,this.externalId,this.articleNumber,this.productFamily}); ProductResult.fromJson(Map json) { fromMap(json); } fromMap(Map json) { type = JsonConverters.fromJson(json['Type'],'TypeEnum',context!); status = JsonConverters.fromJson(json['Status'],'StatusEnum',context!); id = json['Id']; name = json['Name']; externalId = json['ExternalId']; articleNumber = json['ArticleNumber']; productFamily = JsonConverters.fromJson(json['ProductFamily'],'ProductResultProductFamilyDto',context!); return this; } Map toJson() => { 'type': JsonConverters.toJson(type,'TypeEnum',context!), 'status': JsonConverters.toJson(status,'StatusEnum',context!), 'id': id, 'name': name, 'externalId': externalId, 'articleNumber': articleNumber, 'productFamily': JsonConverters.toJson(productFamily,'ProductResultProductFamilyDto',context!) }; getTypeName() => "ProductResult"; TypeContext? context = _ctx; } // @DataContract(Name="SearchProductsResult") class SearchProductsResult implements IConvertible { // @DataMember(Name="items", EmitDefaultValue=false) List? items; // @DataMember(Name="totalCount", EmitDefaultValue=false) int? totalCount; // @DataMember(Name="pageIndex", EmitDefaultValue=false) int? pageIndex; // @DataMember(Name="pageSize", EmitDefaultValue=false) int? pageSize; // @DataMember(Name="totalPages", EmitDefaultValue=false) int? totalPages; SearchProductsResult({this.items,this.totalCount,this.pageIndex,this.pageSize,this.totalPages}); SearchProductsResult.fromJson(Map json) { fromMap(json); } fromMap(Map json) { items = JsonConverters.fromJson(json['Items'],'List',context!); totalCount = json['TotalCount']; pageIndex = json['PageIndex']; pageSize = json['PageSize']; totalPages = json['TotalPages']; return this; } Map toJson() => { 'items': JsonConverters.toJson(items,'List',context!), 'totalCount': totalCount, 'pageIndex': pageIndex, 'pageSize': pageSize, 'totalPages': totalPages }; getTypeName() => "SearchProductsResult"; TypeContext? context = _ctx; } // @Route("/voss/products", "GET") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) class GetVossProducts 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.") String? CompanyId; GetVossProducts({this.CompanyId}); GetVossProducts.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CompanyId = json['CompanyId']; return this; } Map toJson() => { 'CompanyId': CompanyId }; createResponse() => SearchProductsResult(); getResponseTypeName() => "SearchProductsResult"; getTypeName() => "GetVossProducts"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'testapi.bokamera.se', types: { 'ICompany': TypeInfo(TypeOf.Interface), 'TypeEnum': TypeInfo(TypeOf.Enum, enumValues:TypeEnum.values), 'StatusEnum': TypeInfo(TypeOf.Enum, enumValues:StatusEnum.values), 'ProductResultProductFamilyDto': TypeInfo(TypeOf.Class, create:() => ProductResultProductFamilyDto()), 'ProductResult': TypeInfo(TypeOf.Class, create:() => ProductResult()), 'SearchProductsResult': TypeInfo(TypeOf.Class, create:() => SearchProductsResult()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'GetVossProducts': TypeInfo(TypeOf.Class, create:() => GetVossProducts()), });