// // 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 CoordinateSequence { /// Returns a new [CoordinateSequence] instance. CoordinateSequence({ this.dimension, this.measures, this.spatial, this.ordinates, this.hasZ, this.hasM, this.zOrdinateIndex, this.mOrdinateIndex, this.first, this.last, this.count, }); /// /// 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? 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. /// int? measures; /// /// 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? spatial; /// /// 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. /// Ordinates? ordinates; /// /// 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? hasZ; /// /// 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? hasM; /// /// 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? zOrdinateIndex; /// /// 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? mOrdinateIndex; PointAllOfCoordinate? first; PointAllOfCoordinate? last; /// /// 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? count; @override bool operator ==(Object other) => identical(this, other) || other is CoordinateSequence && other.dimension == dimension && other.measures == measures && other.spatial == spatial && other.ordinates == ordinates && other.hasZ == hasZ && other.hasM == hasM && other.zOrdinateIndex == zOrdinateIndex && other.mOrdinateIndex == mOrdinateIndex && other.first == first && other.last == last && other.count == count; @override int get hashCode => // ignore: unnecessary_parenthesis (dimension == null ? 0 : dimension!.hashCode) + (measures == null ? 0 : measures!.hashCode) + (spatial == null ? 0 : spatial!.hashCode) + (ordinates == null ? 0 : ordinates!.hashCode) + (hasZ == null ? 0 : hasZ!.hashCode) + (hasM == null ? 0 : hasM!.hashCode) + (zOrdinateIndex == null ? 0 : zOrdinateIndex!.hashCode) + (mOrdinateIndex == null ? 0 : mOrdinateIndex!.hashCode) + (first == null ? 0 : first!.hashCode) + (last == null ? 0 : last!.hashCode) + (count == null ? 0 : count!.hashCode); @override String toString() => 'CoordinateSequence[dimension=$dimension, measures=$measures, spatial=$spatial, ordinates=$ordinates, hasZ=$hasZ, hasM=$hasM, zOrdinateIndex=$zOrdinateIndex, mOrdinateIndex=$mOrdinateIndex, first=$first, last=$last, count=$count]'; Map toJson() { final json = {}; if (this.dimension != null) { json[r'dimension'] = this.dimension; } else { json[r'dimension'] = null; } if (this.measures != null) { json[r'measures'] = this.measures; } else { json[r'measures'] = null; } if (this.spatial != null) { json[r'spatial'] = this.spatial; } else { json[r'spatial'] = null; } if (this.ordinates != null) { json[r'ordinates'] = this.ordinates; } else { json[r'ordinates'] = null; } if (this.hasZ != null) { json[r'hasZ'] = this.hasZ; } else { json[r'hasZ'] = null; } if (this.hasM != null) { json[r'hasM'] = this.hasM; } else { json[r'hasM'] = null; } if (this.zOrdinateIndex != null) { json[r'zOrdinateIndex'] = this.zOrdinateIndex; } else { json[r'zOrdinateIndex'] = null; } if (this.mOrdinateIndex != null) { json[r'mOrdinateIndex'] = this.mOrdinateIndex; } else { json[r'mOrdinateIndex'] = null; } if (this.first != null) { json[r'first'] = this.first; } else { json[r'first'] = null; } if (this.last != null) { json[r'last'] = this.last; } else { json[r'last'] = null; } if (this.count != null) { json[r'count'] = this.count; } else { json[r'count'] = null; } return json; } /// Returns a new [CoordinateSequence] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods static CoordinateSequence? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); // 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 "CoordinateSequence[$key]" is missing from JSON.'); assert(json[key] != null, 'Required key "CoordinateSequence[$key]" has a null value in JSON.'); }); return true; }()); return CoordinateSequence( dimension: mapValueOfType(json, r'dimension'), measures: mapValueOfType(json, r'measures'), spatial: mapValueOfType(json, r'spatial'), ordinates: Ordinates.fromJson(json[r'ordinates']), hasZ: mapValueOfType(json, r'hasZ'), hasM: mapValueOfType(json, r'hasM'), zOrdinateIndex: mapValueOfType(json, r'zOrdinateIndex'), mOrdinateIndex: mapValueOfType(json, r'mOrdinateIndex'), first: PointAllOfCoordinate.fromJson(json[r'first']), last: PointAllOfCoordinate.fromJson(json[r'last']), count: mapValueOfType(json, r'count'), ); } return null; } static List listFromJson( dynamic json, { bool growable = false, }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { final value = CoordinateSequence.fromJson(row); if (value != null) { result.add(value); } } } return result.toList(growable: growable); } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { json = json.cast(); // ignore: parameter_assignments for (final entry in json.entries) { final value = CoordinateSequence.fromJson(entry.value); if (value != null) { map[entry.key] = value; } } } return map; } // maps a json object with a list of CoordinateSequence-objects as value to a dart map static Map> mapListFromJson( dynamic json, { bool growable = false, }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { map[entry.key] = CoordinateSequence.listFromJson( entry.value, growable: growable, ); } } return map; } /// The list of required keys that must be present in a JSON. static const requiredKeys = {}; }