tablet-app/manager_api/lib/model/image_geo_point.dart

81 lines
2.5 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 ImageGeoPoint {
/// Returns a new [ImageGeoPoint] instance.
ImageGeoPoint({
this.imageResourceId,
this.imageSource,
});
String imageResourceId;
String imageSource;
@override
bool operator ==(Object other) => identical(this, other) || other is ImageGeoPoint &&
other.imageResourceId == imageResourceId &&
other.imageSource == imageSource;
@override
int get hashCode =>
(imageResourceId == null ? 0 : imageResourceId.hashCode) +
(imageSource == null ? 0 : imageSource.hashCode);
@override
String toString() => 'ImageGeoPoint[imageResourceId=$imageResourceId, imageSource=$imageSource]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (imageResourceId != null) {
json[r'imageResourceId'] = imageResourceId;
}
if (imageSource != null) {
json[r'imageSource'] = imageSource;
}
return json;
}
/// Returns a new [ImageGeoPoint] instance and imports its values from
/// [json] if it's non-null, null if [json] is null.
static ImageGeoPoint fromJson(Map<String, dynamic> json) => json == null
? null
: ImageGeoPoint(
imageResourceId: json[r'imageResourceId'],
imageSource: json[r'imageSource'],
);
static List<ImageGeoPoint> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
json == null || json.isEmpty
? true == emptyIsNull ? null : <ImageGeoPoint>[]
: json.map((v) => ImageGeoPoint.fromJson(v)).toList(growable: true == growable);
static Map<String, ImageGeoPoint> mapFromJson(Map<String, dynamic> json) {
final map = <String, ImageGeoPoint>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) => map[key] = ImageGeoPoint.fromJson(v));
}
return map;
}
// maps a json object with a list of ImageGeoPoint-objects as value to a dart map
static Map<String, List<ImageGeoPoint>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
final map = <String, List<ImageGeoPoint>>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) {
map[key] = ImageGeoPoint.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
});
}
return map;
}
}