// // 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 NtsGeometryServices { /// Returns a new [NtsGeometryServices] instance. NtsGeometryServices({ this.geometryOverlay, this.coordinateEqualityComparer, this.defaultSRID, this.defaultCoordinateSequenceFactory, this.defaultPrecisionModel, }); NtsGeometryServicesGeometryOverlay? geometryOverlay; NtsGeometryServicesCoordinateEqualityComparer? coordinateEqualityComparer; /// /// 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? defaultSRID; GeometryFactoryCoordinateSequenceFactory? defaultCoordinateSequenceFactory; GeometryPrecisionModel? defaultPrecisionModel; @override bool operator ==(Object other) => identical(this, other) || other is NtsGeometryServices && other.geometryOverlay == geometryOverlay && other.coordinateEqualityComparer == coordinateEqualityComparer && other.defaultSRID == defaultSRID && other.defaultCoordinateSequenceFactory == defaultCoordinateSequenceFactory && other.defaultPrecisionModel == defaultPrecisionModel; @override int get hashCode => // ignore: unnecessary_parenthesis (geometryOverlay == null ? 0 : geometryOverlay!.hashCode) + (coordinateEqualityComparer == null ? 0 : coordinateEqualityComparer!.hashCode) + (defaultSRID == null ? 0 : defaultSRID!.hashCode) + (defaultCoordinateSequenceFactory == null ? 0 : defaultCoordinateSequenceFactory!.hashCode) + (defaultPrecisionModel == null ? 0 : defaultPrecisionModel!.hashCode); @override String toString() => 'NtsGeometryServices[geometryOverlay=$geometryOverlay, coordinateEqualityComparer=$coordinateEqualityComparer, defaultSRID=$defaultSRID, defaultCoordinateSequenceFactory=$defaultCoordinateSequenceFactory, defaultPrecisionModel=$defaultPrecisionModel]'; Map toJson() { final json = {}; if (this.geometryOverlay != null) { json[r'geometryOverlay'] = this.geometryOverlay; } else { json[r'geometryOverlay'] = null; } if (this.coordinateEqualityComparer != null) { json[r'coordinateEqualityComparer'] = this.coordinateEqualityComparer; } else { json[r'coordinateEqualityComparer'] = null; } if (this.defaultSRID != null) { json[r'defaultSRID'] = this.defaultSRID; } else { json[r'defaultSRID'] = null; } if (this.defaultCoordinateSequenceFactory != null) { json[r'defaultCoordinateSequenceFactory'] = this.defaultCoordinateSequenceFactory; } else { json[r'defaultCoordinateSequenceFactory'] = null; } if (this.defaultPrecisionModel != null) { json[r'defaultPrecisionModel'] = this.defaultPrecisionModel; } else { json[r'defaultPrecisionModel'] = null; } return json; } /// Returns a new [NtsGeometryServices] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods static NtsGeometryServices? 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 "NtsGeometryServices[$key]" is missing from JSON.'); assert(json[key] != null, 'Required key "NtsGeometryServices[$key]" has a null value in JSON.'); }); return true; }()); return NtsGeometryServices( geometryOverlay: NtsGeometryServicesGeometryOverlay.fromJson( json[r'geometryOverlay']), coordinateEqualityComparer: NtsGeometryServicesCoordinateEqualityComparer.fromJson( json[r'coordinateEqualityComparer']), defaultSRID: mapValueOfType(json, r'defaultSRID'), defaultCoordinateSequenceFactory: GeometryFactoryCoordinateSequenceFactory.fromJson( json[r'defaultCoordinateSequenceFactory']), defaultPrecisionModel: GeometryPrecisionModel.fromJson(json[r'defaultPrecisionModel']), ); } 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 = NtsGeometryServices.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 = NtsGeometryServices.fromJson(entry.value); if (value != null) { map[entry.key] = value; } } } return map; } // maps a json object with a list of NtsGeometryServices-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] = NtsGeometryServices.listFromJson( entry.value, growable: growable, ); } } return map; } /// The list of required keys that must be present in a JSON. static const requiredKeys = {}; }