532 lines
19 KiB
Dart
532 lines
19 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 GeometryCentroid {
|
|
/// Returns a new [GeometryCentroid] instance.
|
|
GeometryCentroid({
|
|
this.factory_,
|
|
this.userData,
|
|
this.srid,
|
|
this.precisionModel,
|
|
this.numGeometries,
|
|
this.isSimple,
|
|
this.isValid,
|
|
this.area,
|
|
this.length,
|
|
this.centroid,
|
|
this.interiorPoint,
|
|
this.pointOnSurface,
|
|
this.envelope,
|
|
this.envelopeInternal,
|
|
this.isRectangle,
|
|
this.coordinateSequence,
|
|
this.coordinates = const [],
|
|
this.numPoints,
|
|
this.isEmpty,
|
|
this.dimension,
|
|
this.boundaryDimension,
|
|
this.x,
|
|
this.y,
|
|
this.coordinate,
|
|
this.geometryType,
|
|
this.ogcGeometryType,
|
|
this.boundary,
|
|
this.z,
|
|
this.m,
|
|
});
|
|
|
|
GeometryFactory? factory_;
|
|
|
|
Object? userData;
|
|
|
|
///
|
|
/// 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.
|
|
///
|
|
int? srid;
|
|
|
|
GeometryPrecisionModel? precisionModel;
|
|
|
|
///
|
|
/// 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.
|
|
///
|
|
int? numGeometries;
|
|
|
|
///
|
|
/// 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? isSimple;
|
|
|
|
///
|
|
/// 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? isValid;
|
|
|
|
///
|
|
/// 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? length;
|
|
|
|
GeometryCentroid? centroid;
|
|
|
|
GeometryCentroid? interiorPoint;
|
|
|
|
GeometryCentroid? pointOnSurface;
|
|
|
|
MapAnnotationGeometry? envelope;
|
|
|
|
GeometryEnvelopeInternal? envelopeInternal;
|
|
|
|
///
|
|
/// 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? isRectangle;
|
|
|
|
PointAllOfCoordinateSequence? coordinateSequence;
|
|
|
|
List<Coordinate>? coordinates;
|
|
|
|
///
|
|
/// 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.
|
|
///
|
|
int? numPoints;
|
|
|
|
///
|
|
/// 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? isEmpty;
|
|
|
|
///
|
|
/// 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.
|
|
///
|
|
Dimension? dimension;
|
|
|
|
///
|
|
/// 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.
|
|
///
|
|
Dimension? boundaryDimension;
|
|
|
|
///
|
|
/// 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? x;
|
|
|
|
///
|
|
/// 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? y;
|
|
|
|
PointAllOfCoordinate? coordinate;
|
|
|
|
String? geometryType;
|
|
|
|
///
|
|
/// 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.
|
|
///
|
|
OgcGeometryType? ogcGeometryType;
|
|
|
|
PointAllOfBoundary? boundary;
|
|
|
|
///
|
|
/// 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? z;
|
|
|
|
///
|
|
/// 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? m;
|
|
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
other is GeometryCentroid &&
|
|
other.factory_ == factory_ &&
|
|
other.userData == userData &&
|
|
other.srid == srid &&
|
|
other.precisionModel == precisionModel &&
|
|
other.numGeometries == numGeometries &&
|
|
other.isSimple == isSimple &&
|
|
other.isValid == isValid &&
|
|
other.area == area &&
|
|
other.length == length &&
|
|
other.centroid == centroid &&
|
|
other.interiorPoint == interiorPoint &&
|
|
other.pointOnSurface == pointOnSurface &&
|
|
other.envelope == envelope &&
|
|
other.envelopeInternal == envelopeInternal &&
|
|
other.isRectangle == isRectangle &&
|
|
other.coordinateSequence == coordinateSequence &&
|
|
_deepEquality.equals(other.coordinates, coordinates) &&
|
|
other.numPoints == numPoints &&
|
|
other.isEmpty == isEmpty &&
|
|
other.dimension == dimension &&
|
|
other.boundaryDimension == boundaryDimension &&
|
|
other.x == x &&
|
|
other.y == y &&
|
|
other.coordinate == coordinate &&
|
|
other.geometryType == geometryType &&
|
|
other.ogcGeometryType == ogcGeometryType &&
|
|
other.boundary == boundary &&
|
|
other.z == z &&
|
|
other.m == m;
|
|
|
|
@override
|
|
int get hashCode =>
|
|
// ignore: unnecessary_parenthesis
|
|
(factory_ == null ? 0 : factory_!.hashCode) +
|
|
(userData == null ? 0 : userData!.hashCode) +
|
|
(srid == null ? 0 : srid!.hashCode) +
|
|
(precisionModel == null ? 0 : precisionModel!.hashCode) +
|
|
(numGeometries == null ? 0 : numGeometries!.hashCode) +
|
|
(isSimple == null ? 0 : isSimple!.hashCode) +
|
|
(isValid == null ? 0 : isValid!.hashCode) +
|
|
(area == null ? 0 : area!.hashCode) +
|
|
(length == null ? 0 : length!.hashCode) +
|
|
(centroid == null ? 0 : centroid!.hashCode) +
|
|
(interiorPoint == null ? 0 : interiorPoint!.hashCode) +
|
|
(pointOnSurface == null ? 0 : pointOnSurface!.hashCode) +
|
|
(envelope == null ? 0 : envelope!.hashCode) +
|
|
(envelopeInternal == null ? 0 : envelopeInternal!.hashCode) +
|
|
(isRectangle == null ? 0 : isRectangle!.hashCode) +
|
|
(coordinateSequence == null ? 0 : coordinateSequence!.hashCode) +
|
|
(coordinates == null ? 0 : coordinates!.hashCode) +
|
|
(numPoints == null ? 0 : numPoints!.hashCode) +
|
|
(isEmpty == null ? 0 : isEmpty!.hashCode) +
|
|
(dimension == null ? 0 : dimension!.hashCode) +
|
|
(boundaryDimension == null ? 0 : boundaryDimension!.hashCode) +
|
|
(x == null ? 0 : x!.hashCode) +
|
|
(y == null ? 0 : y!.hashCode) +
|
|
(coordinate == null ? 0 : coordinate!.hashCode) +
|
|
(geometryType == null ? 0 : geometryType!.hashCode) +
|
|
(ogcGeometryType == null ? 0 : ogcGeometryType!.hashCode) +
|
|
(boundary == null ? 0 : boundary!.hashCode) +
|
|
(z == null ? 0 : z!.hashCode) +
|
|
(m == null ? 0 : m!.hashCode);
|
|
|
|
@override
|
|
String toString() =>
|
|
'GeometryCentroid[factory_=$factory_, userData=$userData, srid=$srid, precisionModel=$precisionModel, numGeometries=$numGeometries, isSimple=$isSimple, isValid=$isValid, area=$area, length=$length, centroid=$centroid, interiorPoint=$interiorPoint, pointOnSurface=$pointOnSurface, envelope=$envelope, envelopeInternal=$envelopeInternal, isRectangle=$isRectangle, coordinateSequence=$coordinateSequence, coordinates=$coordinates, numPoints=$numPoints, isEmpty=$isEmpty, dimension=$dimension, boundaryDimension=$boundaryDimension, x=$x, y=$y, coordinate=$coordinate, geometryType=$geometryType, ogcGeometryType=$ogcGeometryType, boundary=$boundary, z=$z, m=$m]';
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final json = <String, dynamic>{};
|
|
if (this.factory_ != null) {
|
|
json[r'factory'] = this.factory_;
|
|
} else {
|
|
json[r'factory'] = null;
|
|
}
|
|
if (this.userData != null) {
|
|
json[r'userData'] = this.userData;
|
|
} else {
|
|
json[r'userData'] = null;
|
|
}
|
|
if (this.srid != null) {
|
|
json[r'srid'] = this.srid;
|
|
} else {
|
|
json[r'srid'] = null;
|
|
}
|
|
if (this.precisionModel != null) {
|
|
json[r'precisionModel'] = this.precisionModel;
|
|
} else {
|
|
json[r'precisionModel'] = null;
|
|
}
|
|
if (this.numGeometries != null) {
|
|
json[r'numGeometries'] = this.numGeometries;
|
|
} else {
|
|
json[r'numGeometries'] = null;
|
|
}
|
|
if (this.isSimple != null) {
|
|
json[r'isSimple'] = this.isSimple;
|
|
} else {
|
|
json[r'isSimple'] = null;
|
|
}
|
|
if (this.isValid != null) {
|
|
json[r'isValid'] = this.isValid;
|
|
} else {
|
|
json[r'isValid'] = null;
|
|
}
|
|
if (this.area != null) {
|
|
json[r'area'] = this.area;
|
|
} else {
|
|
json[r'area'] = null;
|
|
}
|
|
if (this.length != null) {
|
|
json[r'length'] = this.length;
|
|
} else {
|
|
json[r'length'] = null;
|
|
}
|
|
if (this.centroid != null) {
|
|
json[r'centroid'] = this.centroid;
|
|
} else {
|
|
json[r'centroid'] = null;
|
|
}
|
|
if (this.interiorPoint != null) {
|
|
json[r'interiorPoint'] = this.interiorPoint;
|
|
} else {
|
|
json[r'interiorPoint'] = null;
|
|
}
|
|
if (this.pointOnSurface != null) {
|
|
json[r'pointOnSurface'] = this.pointOnSurface;
|
|
} else {
|
|
json[r'pointOnSurface'] = null;
|
|
}
|
|
if (this.envelope != null) {
|
|
json[r'envelope'] = this.envelope;
|
|
} else {
|
|
json[r'envelope'] = null;
|
|
}
|
|
if (this.envelopeInternal != null) {
|
|
json[r'envelopeInternal'] = this.envelopeInternal;
|
|
} else {
|
|
json[r'envelopeInternal'] = null;
|
|
}
|
|
if (this.isRectangle != null) {
|
|
json[r'isRectangle'] = this.isRectangle;
|
|
} else {
|
|
json[r'isRectangle'] = null;
|
|
}
|
|
if (this.coordinateSequence != null) {
|
|
json[r'coordinateSequence'] = this.coordinateSequence;
|
|
} else {
|
|
json[r'coordinateSequence'] = null;
|
|
}
|
|
if (this.coordinates != null) {
|
|
json[r'coordinates'] = this.coordinates;
|
|
} else {
|
|
json[r'coordinates'] = null;
|
|
}
|
|
if (this.numPoints != null) {
|
|
json[r'numPoints'] = this.numPoints;
|
|
} else {
|
|
json[r'numPoints'] = null;
|
|
}
|
|
if (this.isEmpty != null) {
|
|
json[r'isEmpty'] = this.isEmpty;
|
|
} else {
|
|
json[r'isEmpty'] = null;
|
|
}
|
|
if (this.dimension != null) {
|
|
json[r'dimension'] = this.dimension;
|
|
} else {
|
|
json[r'dimension'] = null;
|
|
}
|
|
if (this.boundaryDimension != null) {
|
|
json[r'boundaryDimension'] = this.boundaryDimension;
|
|
} else {
|
|
json[r'boundaryDimension'] = null;
|
|
}
|
|
if (this.x != null) {
|
|
json[r'x'] = this.x;
|
|
} else {
|
|
json[r'x'] = null;
|
|
}
|
|
if (this.y != null) {
|
|
json[r'y'] = this.y;
|
|
} else {
|
|
json[r'y'] = null;
|
|
}
|
|
if (this.coordinate != null) {
|
|
json[r'coordinate'] = this.coordinate;
|
|
} else {
|
|
json[r'coordinate'] = null;
|
|
}
|
|
if (this.geometryType != null) {
|
|
json[r'geometryType'] = this.geometryType;
|
|
} else {
|
|
json[r'geometryType'] = null;
|
|
}
|
|
if (this.ogcGeometryType != null) {
|
|
json[r'ogcGeometryType'] = this.ogcGeometryType;
|
|
} else {
|
|
json[r'ogcGeometryType'] = null;
|
|
}
|
|
if (this.boundary != null) {
|
|
json[r'boundary'] = this.boundary;
|
|
} else {
|
|
json[r'boundary'] = null;
|
|
}
|
|
if (this.z != null) {
|
|
json[r'z'] = this.z;
|
|
} else {
|
|
json[r'z'] = null;
|
|
}
|
|
if (this.m != null) {
|
|
json[r'm'] = this.m;
|
|
} else {
|
|
json[r'm'] = null;
|
|
}
|
|
return json;
|
|
}
|
|
|
|
/// Returns a new [GeometryCentroid] instance and imports its values from
|
|
/// [value] if it's a [Map], null otherwise.
|
|
// ignore: prefer_constructors_over_static_methods
|
|
static GeometryCentroid? 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 "GeometryCentroid[$key]" is missing from JSON.');
|
|
assert(json[key] != null,
|
|
'Required key "GeometryCentroid[$key]" has a null value in JSON.');
|
|
});
|
|
return true;
|
|
}());
|
|
|
|
return GeometryCentroid(
|
|
factory_: GeometryFactory.fromJson(json[r'factory']),
|
|
userData: mapValueOfType<Object>(json, r'userData'),
|
|
srid: mapValueOfType<int>(json, r'srid'),
|
|
precisionModel:
|
|
GeometryPrecisionModel.fromJson(json[r'precisionModel']),
|
|
numGeometries: mapValueOfType<int>(json, r'numGeometries'),
|
|
isSimple: mapValueOfType<bool>(json, r'isSimple'),
|
|
isValid: mapValueOfType<bool>(json, r'isValid'),
|
|
area: mapValueOfType<double>(json, r'area'),
|
|
length: mapValueOfType<double>(json, r'length'),
|
|
centroid: GeometryCentroid.fromJson(json[r'centroid']),
|
|
interiorPoint: GeometryCentroid.fromJson(json[r'interiorPoint']),
|
|
pointOnSurface: GeometryCentroid.fromJson(json[r'pointOnSurface']),
|
|
envelope: MapAnnotationGeometry.fromJson(json[r'envelope']),
|
|
envelopeInternal:
|
|
GeometryEnvelopeInternal.fromJson(json[r'envelopeInternal']),
|
|
isRectangle: mapValueOfType<bool>(json, r'isRectangle'),
|
|
coordinateSequence:
|
|
PointAllOfCoordinateSequence.fromJson(json[r'coordinateSequence']),
|
|
coordinates: Coordinate.listFromJson(json[r'coordinates']),
|
|
numPoints: mapValueOfType<int>(json, r'numPoints'),
|
|
isEmpty: mapValueOfType<bool>(json, r'isEmpty'),
|
|
dimension: Dimension.fromJson(json[r'dimension']),
|
|
boundaryDimension: Dimension.fromJson(json[r'boundaryDimension']),
|
|
x: mapValueOfType<double>(json, r'x'),
|
|
y: mapValueOfType<double>(json, r'y'),
|
|
coordinate: PointAllOfCoordinate.fromJson(json[r'coordinate']),
|
|
geometryType: mapValueOfType<String>(json, r'geometryType'),
|
|
ogcGeometryType: OgcGeometryType.fromJson(json[r'ogcGeometryType']),
|
|
boundary: PointAllOfBoundary.fromJson(json[r'boundary']),
|
|
z: mapValueOfType<double>(json, r'z'),
|
|
m: mapValueOfType<double>(json, r'm'),
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
|
|
static List<GeometryCentroid> listFromJson(
|
|
dynamic json, {
|
|
bool growable = false,
|
|
}) {
|
|
final result = <GeometryCentroid>[];
|
|
if (json is List && json.isNotEmpty) {
|
|
for (final row in json) {
|
|
final value = GeometryCentroid.fromJson(row);
|
|
if (value != null) {
|
|
result.add(value);
|
|
}
|
|
}
|
|
}
|
|
return result.toList(growable: growable);
|
|
}
|
|
|
|
static Map<String, GeometryCentroid> mapFromJson(dynamic json) {
|
|
final map = <String, GeometryCentroid>{};
|
|
if (json is Map && json.isNotEmpty) {
|
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
|
for (final entry in json.entries) {
|
|
final value = GeometryCentroid.fromJson(entry.value);
|
|
if (value != null) {
|
|
map[entry.key] = value;
|
|
}
|
|
}
|
|
}
|
|
return map;
|
|
}
|
|
|
|
// maps a json object with a list of GeometryCentroid-objects as value to a dart map
|
|
static Map<String, List<GeometryCentroid>> mapListFromJson(
|
|
dynamic json, {
|
|
bool growable = false,
|
|
}) {
|
|
final map = <String, List<GeometryCentroid>>{};
|
|
if (json is Map && json.isNotEmpty) {
|
|
// ignore: parameter_assignments
|
|
json = json.cast<String, dynamic>();
|
|
for (final entry in json.entries) {
|
|
map[entry.key] = GeometryCentroid.listFromJson(
|
|
entry.value,
|
|
growable: growable,
|
|
);
|
|
}
|
|
}
|
|
return map;
|
|
}
|
|
|
|
/// The list of required keys that must be present in a JSON.
|
|
static const requiredKeys = <String>{};
|
|
}
|