mirror of
https://bitbucket.org/FransoletThomas/tablet-app.git
synced 2025-12-06 16:41:19 +00:00
108 lines
3.0 KiB
Dart
108 lines
3.0 KiB
Dart
//
|
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
|
//
|
|
// @dart=2.0
|
|
|
|
// ignore_for_file: unused_element, unused_import
|
|
// ignore_for_file: always_put_required_named_parameters_first
|
|
// ignore_for_file: lines_longer_than_80_chars
|
|
|
|
part of openapi.api;
|
|
|
|
class MapDTO {
|
|
/// Returns a new [MapDTO] instance.
|
|
MapDTO({
|
|
this.zoom,
|
|
this.mapType,
|
|
this.points,
|
|
this.iconResourceId,
|
|
this.iconSource,
|
|
});
|
|
|
|
int zoom;
|
|
|
|
MapTypeApp mapType;
|
|
|
|
List<GeoPointDTO> points;
|
|
|
|
String iconResourceId;
|
|
|
|
String iconSource;
|
|
|
|
@override
|
|
bool operator ==(Object other) => identical(this, other) || other is MapDTO &&
|
|
other.zoom == zoom &&
|
|
other.mapType == mapType &&
|
|
other.points == points &&
|
|
other.iconResourceId == iconResourceId &&
|
|
other.iconSource == iconSource;
|
|
|
|
@override
|
|
int get hashCode =>
|
|
(zoom == null ? 0 : zoom.hashCode) +
|
|
(mapType == null ? 0 : mapType.hashCode) +
|
|
(points == null ? 0 : points.hashCode) +
|
|
(iconResourceId == null ? 0 : iconResourceId.hashCode) +
|
|
(iconSource == null ? 0 : iconSource.hashCode);
|
|
|
|
@override
|
|
String toString() => 'MapDTO[zoom=$zoom, mapType=$mapType, points=$points, iconResourceId=$iconResourceId, iconSource=$iconSource]';
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final json = <String, dynamic>{};
|
|
if (zoom != null) {
|
|
json[r'zoom'] = zoom;
|
|
}
|
|
if (mapType != null) {
|
|
json[r'mapType'] = mapType;
|
|
}
|
|
if (points != null) {
|
|
json[r'points'] = points;
|
|
}
|
|
if (iconResourceId != null) {
|
|
json[r'iconResourceId'] = iconResourceId;
|
|
}
|
|
if (iconSource != null) {
|
|
json[r'iconSource'] = iconSource;
|
|
}
|
|
return json;
|
|
}
|
|
|
|
/// Returns a new [MapDTO] instance and imports its values from
|
|
/// [json] if it's non-null, null if [json] is null.
|
|
static MapDTO fromJson(Map<String, dynamic> json) => json == null
|
|
? null
|
|
: MapDTO(
|
|
zoom: json[r'zoom'],
|
|
mapType: MapTypeApp.fromJson(json[r'mapType']),
|
|
points: GeoPointDTO.listFromJson(json[r'points']),
|
|
iconResourceId: json[r'iconResourceId'],
|
|
iconSource: json[r'iconSource'],
|
|
);
|
|
|
|
static List<MapDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
|
json == null || json.isEmpty
|
|
? true == emptyIsNull ? null : <MapDTO>[]
|
|
: json.map((v) => MapDTO.fromJson(v)).toList(growable: true == growable);
|
|
|
|
static Map<String, MapDTO> mapFromJson(Map<String, dynamic> json) {
|
|
final map = <String, MapDTO>{};
|
|
if (json != null && json.isNotEmpty) {
|
|
json.forEach((String key, dynamic v) => map[key] = MapDTO.fromJson(v));
|
|
}
|
|
return map;
|
|
}
|
|
|
|
// maps a json object with a list of MapDTO-objects as value to a dart map
|
|
static Map<String, List<MapDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
|
final map = <String, List<MapDTO>>{};
|
|
if (json != null && json.isNotEmpty) {
|
|
json.forEach((String key, dynamic v) {
|
|
map[key] = MapDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
|
|
});
|
|
}
|
|
return map;
|
|
}
|
|
}
|
|
|