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