@ -13,38 +13,68 @@ part of openapi.api;
class MapMarkerResponseDto {
/ / / Returns a new [ MapMarkerResponseDto ] instance .
MapMarkerResponseDto ( {
required this . city ,
required this . country ,
required this . id ,
required this . lat ,
required this . lon ,
required this . state ,
} ) ;
String ? city ;
String ? country ;
String id ;
double lat ;
double lon ;
String ? state ;
@ override
bool operator = = ( Object other ) = > identical ( this , other ) | | other is MapMarkerResponseDto & &
other . city = = city & &
other . country = = country & &
other . id = = id & &
other . lat = = lat & &
other . lon = = lon ;
other . lon = = lon & &
other . state = = state ;
@ override
int get hashCode = >
/ / ignore: unnecessary_parenthesis
( city = = null ? 0 : city ! . hashCode ) +
( country = = null ? 0 : country ! . hashCode ) +
( id . hashCode ) +
( lat . hashCode ) +
( lon . hashCode ) ;
( lon . hashCode ) +
( state = = null ? 0 : state ! . hashCode ) ;
@ override
String toString ( ) = > ' MapMarkerResponseDto[ id=$ id , lat= $ lat , lon= $ lon ] ' ;
String toString ( ) = > ' MapMarkerResponseDto[ city=$ city , country= $ country , id=$ id , lat= $ lat , lon= $ lon , state= $ state ] ' ;
Map < String , dynamic > toJson ( ) {
final json = < String , dynamic > { } ;
if ( this . city ! = null ) {
json [ r'city' ] = this . city ;
} else {
/ / json [ r'city' ] = null ;
}
if ( this . country ! = null ) {
json [ r'country' ] = this . country ;
} else {
/ / json [ r'country' ] = null ;
}
json [ r'id' ] = this . id ;
json [ r'lat' ] = this . lat ;
json [ r'lon' ] = this . lon ;
if ( this . state ! = null ) {
json [ r'state' ] = this . state ;
} else {
/ / json [ r'state' ] = null ;
}
return json ;
}
@ -56,9 +86,12 @@ class MapMarkerResponseDto {
final json = value . cast < String , dynamic > ( ) ;
return MapMarkerResponseDto (
city: mapValueOfType < String > ( json , r'city' ) ,
country: mapValueOfType < String > ( json , r'country' ) ,
id: mapValueOfType < String > ( json , r'id' ) ! ,
lat: ( mapValueOfType < num > ( json , r'lat' ) ! ) . toDouble ( ) ,
lon: ( mapValueOfType < num > ( json , r'lon' ) ! ) . toDouble ( ) ,
state: mapValueOfType < String > ( json , r'state' ) ,
) ;
}
return null ;
@ -106,9 +139,12 @@ class MapMarkerResponseDto {
/ / / The list of required keys that must be present in a JSON .
static const requiredKeys = < String > {
' city ' ,
' country ' ,
' id ' ,
' lat ' ,
' lon ' ,
' state ' ,
} ;
}