/* Options: Date: 2025-12-06 07:07:08 Version: 8.80 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://backoffice-api.brovs.com //GlobalNamespace: BackofficeApi //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: BusinessSearchRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ library BackofficeApi; import 'package:servicestack/servicestack.dart'; class BusinessContact implements IConvertible { String? firstName; String? lastName; String? position; String? phone; String? email; BusinessContact({this.firstName,this.lastName,this.position,this.phone,this.email}); BusinessContact.fromJson(Map json) { fromMap(json); } fromMap(Map json) { firstName = json['firstName']; lastName = json['lastName']; position = json['position']; phone = json['phone']; email = json['email']; return this; } Map toJson() => { 'firstName': firstName, 'lastName': lastName, 'position': position, 'phone': phone, 'email': email }; getTypeName() => "BusinessContact"; TypeContext? context = _ctx; } class BusinessDto implements IConvertible { int? id; String? name; String? organizationNumber; String? postalAddress; String? postalCode; String? city; String? country; BusinessContact? contact; BusinessDto({this.id,this.name,this.organizationNumber,this.postalAddress,this.postalCode,this.city,this.country,this.contact}); BusinessDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; name = json['name']; organizationNumber = json['organizationNumber']; postalAddress = json['postalAddress']; postalCode = json['postalCode']; city = json['city']; country = json['country']; contact = JsonConverters.fromJson(json['contact'],'BusinessContact',context!); return this; } Map toJson() => { 'id': id, 'name': name, 'organizationNumber': organizationNumber, 'postalAddress': postalAddress, 'postalCode': postalCode, 'city': city, 'country': country, 'contact': JsonConverters.toJson(contact,'BusinessContact',context!) }; getTypeName() => "BusinessDto"; TypeContext? context = _ctx; } class BusinessSearchResponse implements IConvertible { List? businesses = []; int? total; int? size; int? offset; BusinessSearchResponse({this.businesses,this.total,this.size,this.offset}); BusinessSearchResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { businesses = JsonConverters.fromJson(json['businesses'],'List',context!); total = json['total']; size = json['size']; offset = json['offset']; return this; } Map toJson() => { 'businesses': JsonConverters.toJson(businesses,'List',context!), 'total': total, 'size': size, 'offset': offset }; getTypeName() => "BusinessSearchResponse"; TypeContext? context = _ctx; } // @Route("/business/search", "GET") class BusinessSearchRequest implements IReturn, IGet, IConvertible { String? query; int? size; int? offset; BusinessSearchRequest({this.query,this.size,this.offset}); BusinessSearchRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { query = json['query']; size = json['size']; offset = json['offset']; return this; } Map toJson() => { 'query': query, 'size': size, 'offset': offset }; createResponse() => BusinessSearchResponse(); getResponseTypeName() => "BusinessSearchResponse"; getTypeName() => "BusinessSearchRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'BackofficeApi', types: { 'BusinessContact': TypeInfo(TypeOf.Class, create:() => BusinessContact()), 'BusinessDto': TypeInfo(TypeOf.Class, create:() => BusinessDto()), 'BusinessSearchResponse': TypeInfo(TypeOf.Class, create:() => BusinessSearchResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'BusinessSearchRequest': TypeInfo(TypeOf.Class, create:() => BusinessSearchRequest()), });