/* Options: Date: 2026-01-22 01:55:15 Version: 6.110 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://pecuario-backend.develsystems.com //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: GetRegionsByCountry.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class Status implements IConvertible { String? message; int? statusCode; Status({this.message,this.statusCode}); Status.fromJson(Map json) { fromMap(json); } fromMap(Map json) { message = json['message']; statusCode = json['statusCode']; return this; } Map toJson() => { 'message': message, 'statusCode': statusCode }; getTypeName() => "Status"; TypeContext? context = _ctx; } class BaseResponse implements IConvertible { Status? status; BaseResponse({this.status}); BaseResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { status = JsonConverters.fromJson(json['status'],'Status',context!); return this; } Map toJson() => { 'status': JsonConverters.toJson(status,'Status',context!) }; getTypeName() => "BaseResponse"; TypeContext? context = _ctx; } class Country implements IConvertible { int? id; // @required() // @StringLength(2) String? code; // @required() // @StringLength(3) String? phoneCode; // @required() // @StringLength(200) String? name; // @required() // @StringLength(5) String? currencySymbol; // @required() // @StringLength(200) String? currencyName; // @required() int? order; Country({this.id,this.code,this.phoneCode,this.name,this.currencySymbol,this.currencyName,this.order}); Country.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; code = json['code']; phoneCode = json['phoneCode']; name = json['name']; currencySymbol = json['currencySymbol']; currencyName = json['currencyName']; order = json['order']; return this; } Map toJson() => { 'id': id, 'code': code, 'phoneCode': phoneCode, 'name': name, 'currencySymbol': currencySymbol, 'currencyName': currencyName, 'order': order }; getTypeName() => "Country"; TypeContext? context = _ctx; } class Region implements IConvertible { int? id; // @References(typeof(Country)) int? countryId; // @required() // @StringLength(200) String? name; Region({this.id,this.countryId,this.name}); Region.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; countryId = json['countryId']; name = json['name']; return this; } Map toJson() => { 'id': id, 'countryId': countryId, 'name': name }; getTypeName() => "Region"; TypeContext? context = _ctx; } class GetRegionsByCountryResponse extends BaseResponse implements IConvertible { List? regions; GetRegionsByCountryResponse({this.regions}); GetRegionsByCountryResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); regions = JsonConverters.fromJson(json['regions'],'List',context!); return this; } Map toJson() => super.toJson()..addAll({ 'regions': JsonConverters.toJson(regions,'List',context!) }); getTypeName() => "GetRegionsByCountryResponse"; TypeContext? context = _ctx; } // @Route("/api/v1/utils/regions/{CountryId}", "GET") // @Route("/api/v1/utils/regions", "GET") class GetRegionsByCountry implements IReturn, IGet, IConvertible { int? countryId; GetRegionsByCountry({this.countryId}); GetRegionsByCountry.fromJson(Map json) { fromMap(json); } fromMap(Map json) { countryId = json['countryId']; return this; } Map toJson() => { 'countryId': countryId }; createResponse() => GetRegionsByCountryResponse(); getResponseTypeName() => "GetRegionsByCountryResponse"; getTypeName() => "GetRegionsByCountry"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'pecuario_backend.develsystems.com', types: { 'Status': TypeInfo(TypeOf.Class, create:() => Status()), 'BaseResponse': TypeInfo(TypeOf.Class, create:() => BaseResponse()), 'Country': TypeInfo(TypeOf.Class, create:() => Country()), 'Region': TypeInfo(TypeOf.Class, create:() => Region()), 'GetRegionsByCountryResponse': TypeInfo(TypeOf.Class, create:() => GetRegionsByCountryResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'GetRegionsByCountry': TypeInfo(TypeOf.Class, create:() => GetRegionsByCountry()), });