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