/* Options: Date: 2024-11-21 18:43:30 Version: 6.111 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://northwind.netcore.io //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CachedGetAllCustomers.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; // @DataContract class Customer implements IConvertible { // @DataMember String? id; // @DataMember String? companyName; // @DataMember String? contactName; // @DataMember String? contactTitle; // @DataMember String? address; // @DataMember String? city; // @DataMember String? region; // @DataMember String? postalCode; // @DataMember String? country; // @DataMember String? phone; // @DataMember String? fax; Customer({this.id,this.companyName,this.contactName,this.contactTitle,this.address,this.city,this.region,this.postalCode,this.country,this.phone,this.fax}); Customer.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; companyName = json['companyName']; contactName = json['contactName']; contactTitle = json['contactTitle']; address = json['address']; city = json['city']; region = json['region']; postalCode = json['postalCode']; country = json['country']; phone = json['phone']; fax = json['fax']; return this; } Map toJson() => { 'id': id, 'companyName': companyName, 'contactName': contactName, 'contactTitle': contactTitle, 'address': address, 'city': city, 'region': region, 'postalCode': postalCode, 'country': country, 'phone': phone, 'fax': fax }; getTypeName() => "Customer"; TypeContext? context = _ctx; } // @DataContract class CustomersResponse implements IConvertible { // @DataMember List? results; // @DataMember ResponseStatus? responseStatus; CustomersResponse({this.results,this.responseStatus}); CustomersResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { results = JsonConverters.fromJson(json['results'],'List',context!); responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!); return this; } Map toJson() => { 'results': JsonConverters.toJson(results,'List',context!), 'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!) }; getTypeName() => "CustomersResponse"; TypeContext? context = _ctx; } // @Route("/cached/customers") class CachedGetAllCustomers implements IReturn, IGet, IConvertible { CachedGetAllCustomers(); CachedGetAllCustomers.fromJson(Map json) : super(); fromMap(Map json) { return this; } Map toJson() => {}; createResponse() => CustomersResponse(); getResponseTypeName() => "CustomersResponse"; getTypeName() => "CachedGetAllCustomers"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'northwind.netcore.io', types: { 'Customer': TypeInfo(TypeOf.Class, create:() => Customer()), 'CustomersResponse': TypeInfo(TypeOf.Class, create:() => CustomersResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'CachedGetAllCustomers': TypeInfo(TypeOf.Class, create:() => CachedGetAllCustomers()), });