/* Options: Date: 2024-06-17 02:41:38 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: GeoDataCitiesQuery.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class BaseModel implements IConvertible { BaseModel(); BaseModel.fromJson(Map json) : super(); fromMap(Map json) { return this; } Map toJson() => {}; getTypeName() => "BaseModel"; TypeContext? context = _ctx; } class City extends BaseModel implements IConvertible { // @Ignore() double? Longitude; // @Ignore() double? Latitude; // @Required() String? Name; // @Required() String? Country; String? Iso2; // @Required() String? Admin; String? Capital; int? Population; int? PopulationProper; DateTime? ModifiedDate; // @Required() String? Id; City({this.Longitude,this.Latitude,this.Name,this.Country,this.Iso2,this.Admin,this.Capital,this.Population,this.PopulationProper,this.ModifiedDate,this.Id}); City.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); Longitude = JsonConverters.toDouble(json['Longitude']); Latitude = JsonConverters.toDouble(json['Latitude']); Name = json['Name']; Country = json['Country']; Iso2 = json['Iso2']; Admin = json['Admin']; Capital = json['Capital']; Population = json['Population']; PopulationProper = json['PopulationProper']; ModifiedDate = JsonConverters.fromJson(json['ModifiedDate'],'DateTime',context!); Id = json['Id']; return this; } Map toJson() => super.toJson()..addAll({ 'Longitude': Longitude, 'Latitude': Latitude, 'Name': Name, 'Country': Country, 'Iso2': Iso2, 'Admin': Admin, 'Capital': Capital, 'Population': Population, 'PopulationProper': PopulationProper, 'ModifiedDate': JsonConverters.toJson(ModifiedDate,'DateTime',context!), 'Id': Id }); getTypeName() => "City"; TypeContext? context = _ctx; } class GeoDataCitiesQueryResponse implements IConvertible { String? Id; String? City; String? Longitude; String? Latitude; String? Country; String? Iso2; String? Admin; String? Capital; int? Population; int? PopulationProper; GeoDataCitiesQueryResponse({this.Id,this.City,this.Longitude,this.Latitude,this.Country,this.Iso2,this.Admin,this.Capital,this.Population,this.PopulationProper}); GeoDataCitiesQueryResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; City = json['City']; Longitude = json['Longitude']; Latitude = json['Latitude']; Country = json['Country']; Iso2 = json['Iso2']; Admin = json['Admin']; Capital = json['Capital']; Population = json['Population']; PopulationProper = json['PopulationProper']; return this; } Map toJson() => { 'Id': Id, 'City': City, 'Longitude': Longitude, 'Latitude': Latitude, 'Country': Country, 'Iso2': Iso2, 'Admin': Admin, 'Capital': Capital, 'Population': Population, 'PopulationProper': PopulationProper }; getTypeName() => "GeoDataCitiesQueryResponse"; TypeContext? context = _ctx; } // @Route("/geodata/{CountryId}/cities/", "GET") class GeoDataCitiesQuery extends QueryDb2 implements IReturn>, IConvertible, IGet { /** * Enter the country id you want to search cities. Example SE for Sweden. */ // @ApiMember(Description="Enter the country id you want to search cities. Example SE for Sweden.", IsRequired=true, ParameterType="path") String? CountryId; GeoDataCitiesQuery({this.CountryId}); GeoDataCitiesQuery.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); CountryId = json['CountryId']; return this; } Map toJson() => super.toJson()..addAll({ 'CountryId': CountryId }); createResponse() => QueryResponse(); getResponseTypeName() => "QueryResponse"; getTypeName() => "GeoDataCitiesQuery"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'testapi.bokamera.se', types: { 'BaseModel': TypeInfo(TypeOf.Class, create:() => BaseModel()), 'City': TypeInfo(TypeOf.Class, create:() => City()), 'GeoDataCitiesQueryResponse': TypeInfo(TypeOf.Class, create:() => GeoDataCitiesQueryResponse()), 'QueryResponse': TypeInfo(TypeOf.Class, create:() => QueryResponse()), 'GeoDataCitiesQuery': TypeInfo(TypeOf.Class, create:() => GeoDataCitiesQuery()), 'List': TypeInfo(TypeOf.Class, create:() => []), });