2025-07-17 12:11:59 +02:00

312 lines
10 KiB
Dart

//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class Envelope {
/// Returns a new [Envelope] instance.
Envelope({
this.isNull,
this.width,
this.height,
this.diameter,
this.minX,
this.maxX,
this.minY,
this.maxY,
this.area,
this.minExtent,
this.maxExtent,
this.centre,
});
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
bool? isNull;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
double? width;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
double? height;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
double? diameter;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
double? minX;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
double? maxX;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
double? minY;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
double? maxY;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
double? area;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
double? minExtent;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
double? maxExtent;
PointAllOfCoordinate? centre;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is Envelope &&
other.isNull == isNull &&
other.width == width &&
other.height == height &&
other.diameter == diameter &&
other.minX == minX &&
other.maxX == maxX &&
other.minY == minY &&
other.maxY == maxY &&
other.area == area &&
other.minExtent == minExtent &&
other.maxExtent == maxExtent &&
other.centre == centre;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(isNull == null ? 0 : isNull!.hashCode) +
(width == null ? 0 : width!.hashCode) +
(height == null ? 0 : height!.hashCode) +
(diameter == null ? 0 : diameter!.hashCode) +
(minX == null ? 0 : minX!.hashCode) +
(maxX == null ? 0 : maxX!.hashCode) +
(minY == null ? 0 : minY!.hashCode) +
(maxY == null ? 0 : maxY!.hashCode) +
(area == null ? 0 : area!.hashCode) +
(minExtent == null ? 0 : minExtent!.hashCode) +
(maxExtent == null ? 0 : maxExtent!.hashCode) +
(centre == null ? 0 : centre!.hashCode);
@override
String toString() =>
'Envelope[isNull=$isNull, width=$width, height=$height, diameter=$diameter, minX=$minX, maxX=$maxX, minY=$minY, maxY=$maxY, area=$area, minExtent=$minExtent, maxExtent=$maxExtent, centre=$centre]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.isNull != null) {
json[r'isNull'] = this.isNull;
} else {
json[r'isNull'] = null;
}
if (this.width != null) {
json[r'width'] = this.width;
} else {
json[r'width'] = null;
}
if (this.height != null) {
json[r'height'] = this.height;
} else {
json[r'height'] = null;
}
if (this.diameter != null) {
json[r'diameter'] = this.diameter;
} else {
json[r'diameter'] = null;
}
if (this.minX != null) {
json[r'minX'] = this.minX;
} else {
json[r'minX'] = null;
}
if (this.maxX != null) {
json[r'maxX'] = this.maxX;
} else {
json[r'maxX'] = null;
}
if (this.minY != null) {
json[r'minY'] = this.minY;
} else {
json[r'minY'] = null;
}
if (this.maxY != null) {
json[r'maxY'] = this.maxY;
} else {
json[r'maxY'] = null;
}
if (this.area != null) {
json[r'area'] = this.area;
} else {
json[r'area'] = null;
}
if (this.minExtent != null) {
json[r'minExtent'] = this.minExtent;
} else {
json[r'minExtent'] = null;
}
if (this.maxExtent != null) {
json[r'maxExtent'] = this.maxExtent;
} else {
json[r'maxExtent'] = null;
}
if (this.centre != null) {
json[r'centre'] = this.centre;
} else {
json[r'centre'] = null;
}
return json;
}
/// Returns a new [Envelope] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static Envelope? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key),
'Required key "Envelope[$key]" is missing from JSON.');
assert(json[key] != null,
'Required key "Envelope[$key]" has a null value in JSON.');
});
return true;
}());
return Envelope(
isNull: mapValueOfType<bool>(json, r'isNull'),
width: mapValueOfType<double>(json, r'width'),
height: mapValueOfType<double>(json, r'height'),
diameter: mapValueOfType<double>(json, r'diameter'),
minX: mapValueOfType<double>(json, r'minX'),
maxX: mapValueOfType<double>(json, r'maxX'),
minY: mapValueOfType<double>(json, r'minY'),
maxY: mapValueOfType<double>(json, r'maxY'),
area: mapValueOfType<double>(json, r'area'),
minExtent: mapValueOfType<double>(json, r'minExtent'),
maxExtent: mapValueOfType<double>(json, r'maxExtent'),
centre: PointAllOfCoordinate.fromJson(json[r'centre']),
);
}
return null;
}
static List<Envelope> listFromJson(
dynamic json, {
bool growable = false,
}) {
final result = <Envelope>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = Envelope.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, Envelope> mapFromJson(dynamic json) {
final map = <String, Envelope>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = Envelope.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of Envelope-objects as value to a dart map
static Map<String, List<Envelope>> mapListFromJson(
dynamic json, {
bool growable = false,
}) {
final map = <String, List<Envelope>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = Envelope.listFromJson(
entry.value,
growable: growable,
);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{};
}