stadiamaps 5.0.0__py3-none-any.whl → 6.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. stadiamaps/__init__.py +23 -5
  2. stadiamaps/api/geocoding_api.py +1388 -138
  3. stadiamaps/api/geospatial_api.py +1 -1
  4. stadiamaps/api/routing_api.py +1 -1
  5. stadiamaps/api_client.py +3 -3
  6. stadiamaps/configuration.py +5 -5
  7. stadiamaps/exceptions.py +18 -1
  8. stadiamaps/models/__init__.py +22 -4
  9. stadiamaps/models/access.py +1 -1
  10. stadiamaps/models/addendum_v2.py +143 -0
  11. stadiamaps/models/address_components_v2.py +134 -0
  12. stadiamaps/models/admin_region.py +1 -1
  13. stadiamaps/models/administrative.py +1 -1
  14. stadiamaps/models/annotation_filters.py +1 -1
  15. stadiamaps/models/auto_costing_options.py +1 -1
  16. stadiamaps/models/base_costing_options.py +1 -1
  17. stadiamaps/models/base_trace_request.py +1 -1
  18. stadiamaps/models/bicycle_costing_options.py +1 -1
  19. stadiamaps/models/bike_network.py +1 -1
  20. stadiamaps/models/bulk_request.py +1 -1
  21. stadiamaps/models/bulk_request_query.py +1 -1
  22. stadiamaps/models/bulk_search_response.py +1 -1
  23. stadiamaps/models/context.py +119 -0
  24. stadiamaps/models/contour.py +1 -1
  25. stadiamaps/models/coordinate.py +1 -1
  26. stadiamaps/models/costing_model.py +1 -1
  27. stadiamaps/models/costing_options.py +1 -1
  28. stadiamaps/models/directions_options.py +1 -1
  29. stadiamaps/models/distance_unit.py +1 -1
  30. stadiamaps/models/edge_sign.py +1 -1
  31. stadiamaps/models/edge_use.py +1 -1
  32. stadiamaps/models/end_node.py +1 -1
  33. stadiamaps/models/extended_directions_options.py +1 -1
  34. stadiamaps/models/feature_properties_v2.py +126 -0
  35. stadiamaps/models/feature_properties_v2_properties.py +184 -0
  36. stadiamaps/models/foursquare_addendum.py +113 -0
  37. stadiamaps/models/geo_attributes.py +1 -1
  38. stadiamaps/models/geo_json_geometry_base.py +1 -1
  39. stadiamaps/models/geo_json_point.py +1 -1
  40. stadiamaps/models/geocode_response.py +1 -1
  41. stadiamaps/models/geocode_response_envelope_properties_v2.py +125 -0
  42. stadiamaps/models/geocoding_geo_json_feature.py +1 -1
  43. stadiamaps/models/geocoding_geo_json_properties.py +8 -6
  44. stadiamaps/models/geocoding_geo_json_properties_addendum.py +1 -1
  45. stadiamaps/models/geocoding_geo_json_properties_addendum_osm.py +1 -1
  46. stadiamaps/models/geocoding_layer.py +1 -1
  47. stadiamaps/models/geocoding_meta.py +108 -0
  48. stadiamaps/models/geocoding_object.py +1 -1
  49. stadiamaps/models/geocoding_source.py +1 -1
  50. stadiamaps/models/geonames_addendum.py +101 -0
  51. stadiamaps/models/height_request.py +1 -1
  52. stadiamaps/models/height_response.py +1 -1
  53. stadiamaps/models/highway_classification.py +1 -1
  54. stadiamaps/models/intersecting_edge.py +1 -1
  55. stadiamaps/models/isochrone_costing_model.py +1 -1
  56. stadiamaps/models/isochrone_feature.py +1 -1
  57. stadiamaps/models/isochrone_properties.py +1 -1
  58. stadiamaps/models/isochrone_request.py +1 -1
  59. stadiamaps/models/isochrone_response.py +1 -1
  60. stadiamaps/models/layer_id.py +57 -0
  61. stadiamaps/models/locate_detailed_edge.py +1 -1
  62. stadiamaps/models/locate_edge.py +1 -1
  63. stadiamaps/models/locate_edge_info.py +1 -1
  64. stadiamaps/models/locate_node.py +1 -1
  65. stadiamaps/models/locate_object.py +1 -1
  66. stadiamaps/models/low_speed_vehicle_costing_options.py +1 -1
  67. stadiamaps/models/maneuver_sign.py +1 -1
  68. stadiamaps/models/maneuver_sign_element.py +1 -1
  69. stadiamaps/models/map_match_costing_model.py +1 -1
  70. stadiamaps/models/map_match_request.py +1 -1
  71. stadiamaps/models/map_match_route_response.py +1 -1
  72. stadiamaps/models/map_match_trace_options.py +1 -1
  73. stadiamaps/models/map_match_waypoint.py +3 -3
  74. stadiamaps/models/match_type.py +39 -0
  75. stadiamaps/models/matched_point.py +1 -1
  76. stadiamaps/models/matrix_costing_model.py +1 -1
  77. stadiamaps/models/matrix_distance.py +1 -1
  78. stadiamaps/models/matrix_request.py +1 -1
  79. stadiamaps/models/matrix_response.py +1 -1
  80. stadiamaps/models/matrix_waypoint.py +1 -1
  81. stadiamaps/models/motor_scooter_costing_options.py +1 -1
  82. stadiamaps/models/motorcycle_costing_options.py +1 -1
  83. stadiamaps/models/nearest_roads_request.py +1 -1
  84. stadiamaps/models/node_id.py +1 -1
  85. stadiamaps/models/node_type.py +1 -1
  86. stadiamaps/models/open_street_map_addendum.py +169 -0
  87. stadiamaps/models/optimized_route_request.py +1 -1
  88. stadiamaps/models/osrm_admin.py +1 -1
  89. stadiamaps/models/osrm_annotation.py +1 -1
  90. stadiamaps/models/osrm_banner_component.py +1 -1
  91. stadiamaps/models/osrm_banner_content.py +1 -1
  92. stadiamaps/models/osrm_banner_instruction.py +1 -1
  93. stadiamaps/models/osrm_base_api_response.py +1 -1
  94. stadiamaps/models/osrm_guidance_modifier.py +1 -1
  95. stadiamaps/models/osrm_intersection.py +1 -1
  96. stadiamaps/models/osrm_lane.py +1 -1
  97. stadiamaps/models/osrm_route.py +1 -1
  98. stadiamaps/models/osrm_route_leg.py +1 -1
  99. stadiamaps/models/osrm_route_response.py +1 -1
  100. stadiamaps/models/osrm_route_step.py +1 -1
  101. stadiamaps/models/osrm_speed_limit.py +1 -1
  102. stadiamaps/models/osrm_step_maneuver.py +1 -1
  103. stadiamaps/models/osrm_via_waypoint.py +1 -1
  104. stadiamaps/models/osrm_voice_instruction.py +1 -1
  105. stadiamaps/models/osrm_waypoint.py +1 -1
  106. stadiamaps/models/pedestrian_costing_options.py +8 -5
  107. stadiamaps/models/pedestrian_type.py +39 -0
  108. stadiamaps/models/point.py +104 -0
  109. stadiamaps/models/precision.py +38 -0
  110. stadiamaps/models/properties_v2.py +184 -0
  111. stadiamaps/models/restrictions.py +11 -11
  112. stadiamaps/models/road_class.py +1 -1
  113. stadiamaps/models/route200_response.py +1 -1
  114. stadiamaps/models/route_leg.py +1 -1
  115. stadiamaps/models/route_maneuver.py +1 -1
  116. stadiamaps/models/route_request.py +1 -1
  117. stadiamaps/models/route_response.py +1 -1
  118. stadiamaps/models/route_response_alternates_inner.py +1 -1
  119. stadiamaps/models/route_summary.py +1 -1
  120. stadiamaps/models/route_trip.py +1 -1
  121. stadiamaps/models/routing_languages.py +1 -1
  122. stadiamaps/models/routing_long_units.py +1 -1
  123. stadiamaps/models/routing_response_waypoint.py +3 -3
  124. stadiamaps/models/routing_waypoint.py +3 -3
  125. stadiamaps/models/routing_waypoint_all_of_search_filter.py +1 -1
  126. stadiamaps/models/search_query.py +2 -2
  127. stadiamaps/models/search_structured_query.py +3 -3
  128. stadiamaps/models/simple_routing_waypoint.py +3 -3
  129. stadiamaps/models/source_attribution.py +110 -0
  130. stadiamaps/models/source_id.py +41 -0
  131. stadiamaps/models/speeds.py +1 -1
  132. stadiamaps/models/trace_attribute_filter_options.py +1 -1
  133. stadiamaps/models/trace_attribute_key.py +1 -1
  134. stadiamaps/models/trace_attributes_base_response.py +1 -1
  135. stadiamaps/models/trace_attributes_request.py +1 -1
  136. stadiamaps/models/trace_attributes_response.py +1 -6
  137. stadiamaps/models/trace_edge.py +2 -7
  138. stadiamaps/models/travel_mode.py +1 -1
  139. stadiamaps/models/traversability.py +1 -1
  140. stadiamaps/models/truck_costing_options.py +1 -1
  141. stadiamaps/models/tz_response.py +1 -1
  142. stadiamaps/models/warning.py +1 -1
  143. stadiamaps/models/whos_on_first_concordances.py +246 -0
  144. stadiamaps/models/wof_context.py +210 -0
  145. stadiamaps/models/wof_context_component.py +110 -0
  146. stadiamaps/rest.py +1 -1
  147. stadiamaps-6.1.0.dist-info/METADATA +117 -0
  148. stadiamaps-6.1.0.dist-info/RECORD +183 -0
  149. {stadiamaps-5.0.0.dist-info → stadiamaps-6.1.0.dist-info}/WHEEL +1 -1
  150. {stadiamaps-5.0.0.dist-info → stadiamaps-6.1.0.dist-info}/top_level.txt +1 -0
  151. test/integration/__init__.py +0 -0
  152. test/integration/test_eu_endpoint.py +21 -0
  153. test/integration/test_gecoding.py +136 -0
  154. test/integration/test_geospatial.py +43 -0
  155. test/integration/test_routing.py +282 -0
  156. stadiamaps-5.0.0.dist-info/METADATA +0 -87
  157. stadiamaps-5.0.0.dist-info/RECORD +0 -157
  158. {stadiamaps-5.0.0.dist-info → stadiamaps-6.1.0.dist-info/licenses}/LICENSE.txt +0 -0
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 8.0.0
8
+ The version of the OpenAPI document: 9.1.1
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 8.0.0
8
+ The version of the OpenAPI document: 9.1.1
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -40,7 +40,7 @@ class SearchQuery(BaseModel):
40
40
  boundary_circle_lat: Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]] = Field(default=None, description="The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`.", alias="boundary.circle.lat")
41
41
  boundary_circle_lon: Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]] = Field(default=None, description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.", alias="boundary.circle.lon")
42
42
  boundary_circle_radius: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.", alias="boundary.circle.radius")
43
- boundary_country: Optional[List[StrictStr]] = Field(default=None, description="A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.", alias="boundary.country")
43
+ boundary_country: Optional[List[StrictStr]] = Field(default=None, description="A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.", alias="boundary.country")
44
44
  boundary_gid: Optional[StrictStr] = Field(default=None, description="The GID of an area to limit the search to.", alias="boundary.gid")
45
45
  layers: Optional[List[GeocodingLayer]] = Field(default=None, description="A list of layers to limit the search to.")
46
46
  sources: Optional[List[GeocodingSource]] = Field(default=None, description="A list of sources to limit the search to.")
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 8.0.0
8
+ The version of the OpenAPI document: 9.1.1
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -37,7 +37,7 @@ class SearchStructuredQuery(BaseModel):
37
37
  county: Optional[StrictStr] = Field(default=None, description="Administrative divisions between localities and regions. Not commonly used as input to structured geocoding.")
38
38
  region: Optional[StrictStr] = Field(default=None, description="Typically the first administrative division within a country. For example, a US state or a Canadian province.")
39
39
  postal_code: Optional[StrictStr] = Field(default=None, description="A mail sorting code.", alias="postalCode")
40
- country: Optional[StrictStr] = Field(default=None, description="A full name (ex: Canada), or a 2 or 3 character ISO code. Prefer ISO codes when possible.")
40
+ country: Optional[StrictStr] = Field(default=None, description="A country code in ISO 3116-1 alpha-2 or alpha-3 format.")
41
41
  focus_point_lat: Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]] = Field(default=None, description="The latitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lon`.", alias="focus.point.lat")
42
42
  focus_point_lon: Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]] = Field(default=None, description="The longitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lat`.", alias="focus.point.lon")
43
43
  boundary_rect_min_lat: Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]] = Field(default=None, description="Defines the min latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.", alias="boundary.rect.min_lat")
@@ -47,7 +47,7 @@ class SearchStructuredQuery(BaseModel):
47
47
  boundary_circle_lat: Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]] = Field(default=None, description="The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`.", alias="boundary.circle.lat")
48
48
  boundary_circle_lon: Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]] = Field(default=None, description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.", alias="boundary.circle.lon")
49
49
  boundary_circle_radius: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.", alias="boundary.circle.radius")
50
- boundary_country: Optional[List[StrictStr]] = Field(default=None, description="A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.", alias="boundary.country")
50
+ boundary_country: Optional[List[StrictStr]] = Field(default=None, description="A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.", alias="boundary.country")
51
51
  boundary_gid: Optional[StrictStr] = Field(default=None, description="The GID of an area to limit the search to.", alias="boundary.gid")
52
52
  layers: Optional[List[GeocodingLayer]] = Field(default=None, description="A list of layers to limit the search to.")
53
53
  sources: Optional[List[GeocodingSource]] = Field(default=None, description="A list of sources to limit the search to.")
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 8.0.0
8
+ The version of the OpenAPI document: 9.1.1
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -30,7 +30,7 @@ class SimpleRoutingWaypoint(BaseModel):
30
30
  """ # noqa: E501
31
31
  lat: Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]] = Field(description="The latitude of a point in the shape.")
32
32
  lon: Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]] = Field(description="The longitude of a point in the shape.")
33
- type: Optional[StrictStr] = Field(default='break', description="A `break` represents the start or end of a leg, and allows reversals. A `through` location is an intermediate waypoint that must be visited between `break`s, but at which reversals are not allowed. A `via` is similar to a `through` except that reversals are allowed. A `break_through` is similar to a `break` in that it can be the start/end of a leg, but does not allow reversals.")
33
+ type: Optional[StrictStr] = Field(default=None, description="A `break` represents the start or end of a leg, and allows reversals. A `through` location is an intermediate waypoint that must be visited between `break`s, but at which reversals are not allowed. A `via` is similar to a `through` except that reversals are allowed. A `break_through` is similar to a `break` in that it can be the start/end of a leg, but does not allow reversals. Defaults to `break`.")
34
34
  additional_properties: Dict[str, Any] = {}
35
35
  __properties: ClassVar[List[str]] = ["lat", "lon", "type"]
36
36
 
@@ -104,7 +104,7 @@ class SimpleRoutingWaypoint(BaseModel):
104
104
  _obj = cls.model_validate({
105
105
  "lat": obj.get("lat"),
106
106
  "lon": obj.get("lon"),
107
- "type": obj.get("type") if obj.get("type") is not None else 'break'
107
+ "type": obj.get("type")
108
108
  })
109
109
  # store additional fields in additional_properties
110
110
  for _key in obj.keys():
@@ -0,0 +1,110 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Stadia Maps Geospatial APIs
5
+
6
+ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
+
8
+ The version of the OpenAPI document: 9.1.1
9
+ Contact: support@stadiamaps.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from pydantic import BaseModel, ConfigDict, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class SourceAttribution(BaseModel):
27
+ """
28
+ SourceAttribution
29
+ """ # noqa: E501
30
+ fixit_url: Optional[StrictStr] = None
31
+ source: StrictStr
32
+ source_id: StrictStr
33
+ additional_properties: Dict[str, Any] = {}
34
+ __properties: ClassVar[List[str]] = ["fixit_url", "source", "source_id"]
35
+
36
+ model_config = ConfigDict(
37
+ populate_by_name=True,
38
+ validate_assignment=True,
39
+ protected_namespaces=(),
40
+ )
41
+
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
+ return json.dumps(self.to_dict())
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Optional[Self]:
54
+ """Create an instance of SourceAttribution from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self) -> Dict[str, Any]:
58
+ """Return the dictionary representation of the model using alias.
59
+
60
+ This has the following differences from calling pydantic's
61
+ `self.model_dump(by_alias=True)`:
62
+
63
+ * `None` is only added to the output dict for nullable fields that
64
+ were set at model initialization. Other fields with value `None`
65
+ are ignored.
66
+ * Fields in `self.additional_properties` are added to the output dict.
67
+ """
68
+ excluded_fields: Set[str] = set([
69
+ "additional_properties",
70
+ ])
71
+
72
+ _dict = self.model_dump(
73
+ by_alias=True,
74
+ exclude=excluded_fields,
75
+ exclude_none=True,
76
+ )
77
+ # puts key-value pairs in additional_properties in the top level
78
+ if self.additional_properties is not None:
79
+ for _key, _value in self.additional_properties.items():
80
+ _dict[_key] = _value
81
+
82
+ # set to None if fixit_url (nullable) is None
83
+ # and model_fields_set contains the field
84
+ if self.fixit_url is None and "fixit_url" in self.model_fields_set:
85
+ _dict['fixit_url'] = None
86
+
87
+ return _dict
88
+
89
+ @classmethod
90
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
91
+ """Create an instance of SourceAttribution from a dict"""
92
+ if obj is None:
93
+ return None
94
+
95
+ if not isinstance(obj, dict):
96
+ return cls.model_validate(obj)
97
+
98
+ _obj = cls.model_validate({
99
+ "fixit_url": obj.get("fixit_url"),
100
+ "source": obj.get("source"),
101
+ "source_id": obj.get("source_id")
102
+ })
103
+ # store additional fields in additional_properties
104
+ for _key in obj.keys():
105
+ if _key not in cls.__properties:
106
+ _obj.additional_properties[_key] = obj.get(_key)
107
+
108
+ return _obj
109
+
110
+
@@ -0,0 +1,41 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Stadia Maps Geospatial APIs
5
+
6
+ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
+
8
+ The version of the OpenAPI document: 9.1.1
9
+ Contact: support@stadiamaps.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import json
18
+ from enum import Enum
19
+ from typing_extensions import Self
20
+
21
+
22
+ class SourceId(str, Enum):
23
+ """
24
+ Canonical geocoding source IDs.
25
+ """
26
+
27
+ """
28
+ allowed enum values
29
+ """
30
+ OPENSTREETMAP = 'openstreetmap'
31
+ OPENADDRESSES = 'openaddresses'
32
+ WHOSONFIRST = 'whosonfirst'
33
+ GEONAMES = 'geonames'
34
+ FOURSQUARE = 'foursquare'
35
+
36
+ @classmethod
37
+ def from_json(cls, json_str: str) -> Self:
38
+ """Create an instance of SourceId from a JSON string"""
39
+ return cls(json.loads(json_str))
40
+
41
+
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 8.0.0
8
+ The version of the OpenAPI document: 9.1.1
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 8.0.0
8
+ The version of the OpenAPI document: 9.1.1
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 8.0.0
8
+ The version of the OpenAPI document: 9.1.1
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 8.0.0
8
+ The version of the OpenAPI document: 9.1.1
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 8.0.0
8
+ The version of the OpenAPI document: 9.1.1
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 8.0.0
8
+ The version of the OpenAPI document: 9.1.1
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -119,11 +119,6 @@ class TraceAttributesResponse(BaseModel):
119
119
  for _key, _value in self.additional_properties.items():
120
120
  _dict[_key] = _value
121
121
 
122
- # set to None if edges (nullable) is None
123
- # and model_fields_set contains the field
124
- if self.edges is None and "edges" in self.model_fields_set:
125
- _dict['edges'] = None
126
-
127
122
  return _dict
128
123
 
129
124
  @classmethod
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 8.0.0
8
+ The version of the OpenAPI document: 9.1.1
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -69,7 +69,7 @@ class TraceEdge(BaseModel):
69
69
  sac_scale: Optional[StrictInt] = Field(default=None, description="The difficulty of the hiking trail according to the SAC scale. 0 - No Sac Scale 1 - Hiking 2 - Mountain hiking 3 - Demanding mountain hiking 4 - Alpine hiking 5 - Demanding alpine hiking 6 - Difficult alpine hiking")
70
70
  sidewalk: Optional[StrictStr] = None
71
71
  density: Optional[StrictInt] = None
72
- speed_limit: Optional[Any] = Field(default=None, description="The speed limit along the edge measured in `units`/hr. This may be either an integer or the string \"unlimited\" if speed limit data is available. If absent, there is no speed limit data available.")
72
+ speed_limit: Optional[StrictInt] = Field(default=None, description="The speed limit along the edge measured in `units`/hr. This may be either an integer or the string \"unlimited\" if speed limit data is available. If absent, there is no speed limit data available.")
73
73
  truck_speed: Optional[StrictInt] = Field(default=None, description="The truck speed of this edge in `units`/hr, in terms of average/free-flow speed for routing purposes. This is affected by any number of factors such as the road service, vehicle type, etc. and not just the posted speed limits.")
74
74
  truck_route: Optional[StrictBool] = Field(default=None, description="True if the edge is part of a truck route/network.")
75
75
  end_node: Optional[EndNode] = None
@@ -198,11 +198,6 @@ class TraceEdge(BaseModel):
198
198
  for _key, _value in self.additional_properties.items():
199
199
  _dict[_key] = _value
200
200
 
201
- # set to None if speed_limit (nullable) is None
202
- # and model_fields_set contains the field
203
- if self.speed_limit is None and "speed_limit" in self.model_fields_set:
204
- _dict['speed_limit'] = None
205
-
206
201
  return _dict
207
202
 
208
203
  @classmethod
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 8.0.0
8
+ The version of the OpenAPI document: 9.1.1
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 8.0.0
8
+ The version of the OpenAPI document: 9.1.1
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 8.0.0
8
+ The version of the OpenAPI document: 9.1.1
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 8.0.0
8
+ The version of the OpenAPI document: 9.1.1
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 8.0.0
8
+ The version of the OpenAPI document: 9.1.1
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -0,0 +1,246 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Stadia Maps Geospatial APIs
5
+
6
+ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
+
8
+ The version of the OpenAPI document: 9.1.1
9
+ Contact: support@stadiamaps.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class WhosOnFirstConcordances(BaseModel):
27
+ """
28
+ WhosOnFirstConcordances
29
+ """ # noqa: E501
30
+ eurographics_gisco_id: Optional[StrictStr] = None
31
+ faa_code: Optional[StrictStr] = None
32
+ factual_id: Optional[StrictStr] = None
33
+ fifa_id: Optional[StrictStr] = None
34
+ fips_code: Optional[StrictStr] = None
35
+ fr_gov_epci_code: Optional[StrictInt] = Field(default=None, description="An Open Data France EPCI code.")
36
+ fra_insee_code: Optional[StrictInt] = Field(default=None, description="Institut national de la statistique et des études économiques (Insee) code")
37
+ geonames_id: Optional[StrictInt] = None
38
+ geoplanet_id: Optional[StrictInt] = None
39
+ hasc_id: Optional[StrictStr] = Field(default=None, description="A Statoids HASC ID.")
40
+ iata_code: Optional[StrictStr] = None
41
+ icao_code: Optional[StrictStr] = None
42
+ itu_id: Optional[StrictStr] = None
43
+ karmashapes_id: Optional[StrictStr] = None
44
+ natural_earth_id: Optional[StrictInt] = None
45
+ nuts_2021_id: Optional[StrictStr] = Field(default=None, description="A Eurostat NUTS 2021 ID")
46
+ quattroshapes_id: Optional[StrictInt] = None
47
+ quattroshapes_pg_id: Optional[StrictInt] = Field(default=None, description="A Quattroshapes Point Gazetteer ID.")
48
+ us_census_geo_id: Optional[StrictInt] = None
49
+ wikidata_id: Optional[StrictStr] = None
50
+ wikipedia_page: Optional[StrictStr] = None
51
+ additional_properties: Dict[str, Any] = {}
52
+ __properties: ClassVar[List[str]] = ["eurographics_gisco_id", "faa_code", "factual_id", "fifa_id", "fips_code", "fr_gov_epci_code", "fra_insee_code", "geonames_id", "geoplanet_id", "hasc_id", "iata_code", "icao_code", "itu_id", "karmashapes_id", "natural_earth_id", "nuts_2021_id", "quattroshapes_id", "quattroshapes_pg_id", "us_census_geo_id", "wikidata_id", "wikipedia_page"]
53
+
54
+ model_config = ConfigDict(
55
+ populate_by_name=True,
56
+ validate_assignment=True,
57
+ protected_namespaces=(),
58
+ )
59
+
60
+
61
+ def to_str(self) -> str:
62
+ """Returns the string representation of the model using alias"""
63
+ return pprint.pformat(self.model_dump(by_alias=True))
64
+
65
+ def to_json(self) -> str:
66
+ """Returns the JSON representation of the model using alias"""
67
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
68
+ return json.dumps(self.to_dict())
69
+
70
+ @classmethod
71
+ def from_json(cls, json_str: str) -> Optional[Self]:
72
+ """Create an instance of WhosOnFirstConcordances from a JSON string"""
73
+ return cls.from_dict(json.loads(json_str))
74
+
75
+ def to_dict(self) -> Dict[str, Any]:
76
+ """Return the dictionary representation of the model using alias.
77
+
78
+ This has the following differences from calling pydantic's
79
+ `self.model_dump(by_alias=True)`:
80
+
81
+ * `None` is only added to the output dict for nullable fields that
82
+ were set at model initialization. Other fields with value `None`
83
+ are ignored.
84
+ * Fields in `self.additional_properties` are added to the output dict.
85
+ """
86
+ excluded_fields: Set[str] = set([
87
+ "additional_properties",
88
+ ])
89
+
90
+ _dict = self.model_dump(
91
+ by_alias=True,
92
+ exclude=excluded_fields,
93
+ exclude_none=True,
94
+ )
95
+ # puts key-value pairs in additional_properties in the top level
96
+ if self.additional_properties is not None:
97
+ for _key, _value in self.additional_properties.items():
98
+ _dict[_key] = _value
99
+
100
+ # set to None if eurographics_gisco_id (nullable) is None
101
+ # and model_fields_set contains the field
102
+ if self.eurographics_gisco_id is None and "eurographics_gisco_id" in self.model_fields_set:
103
+ _dict['eurographics_gisco_id'] = None
104
+
105
+ # set to None if faa_code (nullable) is None
106
+ # and model_fields_set contains the field
107
+ if self.faa_code is None and "faa_code" in self.model_fields_set:
108
+ _dict['faa_code'] = None
109
+
110
+ # set to None if factual_id (nullable) is None
111
+ # and model_fields_set contains the field
112
+ if self.factual_id is None and "factual_id" in self.model_fields_set:
113
+ _dict['factual_id'] = None
114
+
115
+ # set to None if fifa_id (nullable) is None
116
+ # and model_fields_set contains the field
117
+ if self.fifa_id is None and "fifa_id" in self.model_fields_set:
118
+ _dict['fifa_id'] = None
119
+
120
+ # set to None if fips_code (nullable) is None
121
+ # and model_fields_set contains the field
122
+ if self.fips_code is None and "fips_code" in self.model_fields_set:
123
+ _dict['fips_code'] = None
124
+
125
+ # set to None if fr_gov_epci_code (nullable) is None
126
+ # and model_fields_set contains the field
127
+ if self.fr_gov_epci_code is None and "fr_gov_epci_code" in self.model_fields_set:
128
+ _dict['fr_gov_epci_code'] = None
129
+
130
+ # set to None if fra_insee_code (nullable) is None
131
+ # and model_fields_set contains the field
132
+ if self.fra_insee_code is None and "fra_insee_code" in self.model_fields_set:
133
+ _dict['fra_insee_code'] = None
134
+
135
+ # set to None if geonames_id (nullable) is None
136
+ # and model_fields_set contains the field
137
+ if self.geonames_id is None and "geonames_id" in self.model_fields_set:
138
+ _dict['geonames_id'] = None
139
+
140
+ # set to None if geoplanet_id (nullable) is None
141
+ # and model_fields_set contains the field
142
+ if self.geoplanet_id is None and "geoplanet_id" in self.model_fields_set:
143
+ _dict['geoplanet_id'] = None
144
+
145
+ # set to None if hasc_id (nullable) is None
146
+ # and model_fields_set contains the field
147
+ if self.hasc_id is None and "hasc_id" in self.model_fields_set:
148
+ _dict['hasc_id'] = None
149
+
150
+ # set to None if iata_code (nullable) is None
151
+ # and model_fields_set contains the field
152
+ if self.iata_code is None and "iata_code" in self.model_fields_set:
153
+ _dict['iata_code'] = None
154
+
155
+ # set to None if icao_code (nullable) is None
156
+ # and model_fields_set contains the field
157
+ if self.icao_code is None and "icao_code" in self.model_fields_set:
158
+ _dict['icao_code'] = None
159
+
160
+ # set to None if itu_id (nullable) is None
161
+ # and model_fields_set contains the field
162
+ if self.itu_id is None and "itu_id" in self.model_fields_set:
163
+ _dict['itu_id'] = None
164
+
165
+ # set to None if karmashapes_id (nullable) is None
166
+ # and model_fields_set contains the field
167
+ if self.karmashapes_id is None and "karmashapes_id" in self.model_fields_set:
168
+ _dict['karmashapes_id'] = None
169
+
170
+ # set to None if natural_earth_id (nullable) is None
171
+ # and model_fields_set contains the field
172
+ if self.natural_earth_id is None and "natural_earth_id" in self.model_fields_set:
173
+ _dict['natural_earth_id'] = None
174
+
175
+ # set to None if nuts_2021_id (nullable) is None
176
+ # and model_fields_set contains the field
177
+ if self.nuts_2021_id is None and "nuts_2021_id" in self.model_fields_set:
178
+ _dict['nuts_2021_id'] = None
179
+
180
+ # set to None if quattroshapes_id (nullable) is None
181
+ # and model_fields_set contains the field
182
+ if self.quattroshapes_id is None and "quattroshapes_id" in self.model_fields_set:
183
+ _dict['quattroshapes_id'] = None
184
+
185
+ # set to None if quattroshapes_pg_id (nullable) is None
186
+ # and model_fields_set contains the field
187
+ if self.quattroshapes_pg_id is None and "quattroshapes_pg_id" in self.model_fields_set:
188
+ _dict['quattroshapes_pg_id'] = None
189
+
190
+ # set to None if us_census_geo_id (nullable) is None
191
+ # and model_fields_set contains the field
192
+ if self.us_census_geo_id is None and "us_census_geo_id" in self.model_fields_set:
193
+ _dict['us_census_geo_id'] = None
194
+
195
+ # set to None if wikidata_id (nullable) is None
196
+ # and model_fields_set contains the field
197
+ if self.wikidata_id is None and "wikidata_id" in self.model_fields_set:
198
+ _dict['wikidata_id'] = None
199
+
200
+ # set to None if wikipedia_page (nullable) is None
201
+ # and model_fields_set contains the field
202
+ if self.wikipedia_page is None and "wikipedia_page" in self.model_fields_set:
203
+ _dict['wikipedia_page'] = None
204
+
205
+ return _dict
206
+
207
+ @classmethod
208
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
209
+ """Create an instance of WhosOnFirstConcordances from a dict"""
210
+ if obj is None:
211
+ return None
212
+
213
+ if not isinstance(obj, dict):
214
+ return cls.model_validate(obj)
215
+
216
+ _obj = cls.model_validate({
217
+ "eurographics_gisco_id": obj.get("eurographics_gisco_id"),
218
+ "faa_code": obj.get("faa_code"),
219
+ "factual_id": obj.get("factual_id"),
220
+ "fifa_id": obj.get("fifa_id"),
221
+ "fips_code": obj.get("fips_code"),
222
+ "fr_gov_epci_code": obj.get("fr_gov_epci_code"),
223
+ "fra_insee_code": obj.get("fra_insee_code"),
224
+ "geonames_id": obj.get("geonames_id"),
225
+ "geoplanet_id": obj.get("geoplanet_id"),
226
+ "hasc_id": obj.get("hasc_id"),
227
+ "iata_code": obj.get("iata_code"),
228
+ "icao_code": obj.get("icao_code"),
229
+ "itu_id": obj.get("itu_id"),
230
+ "karmashapes_id": obj.get("karmashapes_id"),
231
+ "natural_earth_id": obj.get("natural_earth_id"),
232
+ "nuts_2021_id": obj.get("nuts_2021_id"),
233
+ "quattroshapes_id": obj.get("quattroshapes_id"),
234
+ "quattroshapes_pg_id": obj.get("quattroshapes_pg_id"),
235
+ "us_census_geo_id": obj.get("us_census_geo_id"),
236
+ "wikidata_id": obj.get("wikidata_id"),
237
+ "wikipedia_page": obj.get("wikipedia_page")
238
+ })
239
+ # store additional fields in additional_properties
240
+ for _key in obj.keys():
241
+ if _key not in cls.__properties:
242
+ _obj.additional_properties[_key] = obj.get(_key)
243
+
244
+ return _obj
245
+
246
+