// // 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; MapType mapType; List 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 toJson() { final json = {}; 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 json) => json == null ? null : MapDTO( zoom: json[r'zoom'], mapType: MapType.fromJson(json[r'mapType']), points: GeoPointDTO.listFromJson(json[r'points']), iconResourceId: json[r'iconResourceId'], iconSource: json[r'iconSource'], ); static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => json == null || json.isEmpty ? true == emptyIsNull ? null : [] : json.map((v) => MapDTO.fromJson(v)).toList(growable: true == growable); static Map mapFromJson(Map json) { final map = {}; 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> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { final map = >{}; if (json != null && json.isNotEmpty) { json.forEach((String key, dynamic v) { map[key] = MapDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); }); } return map; } }