stadiamaps 4.0.0__py3-none-any.whl → 6.0.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 (164) hide show
  1. stadiamaps/__init__.py +32 -14
  2. stadiamaps/api/geocoding_api.py +976 -153
  3. stadiamaps/api/geospatial_api.py +7 -3
  4. stadiamaps/api/routing_api.py +22 -8
  5. stadiamaps/api_client.py +15 -6
  6. stadiamaps/configuration.py +156 -40
  7. stadiamaps/exceptions.py +18 -1
  8. stadiamaps/models/__init__.py +31 -13
  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 +4 -4
  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 +4 -4
  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 +4 -4
  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.py +1 -1
  39. stadiamaps/models/geo_json_geometry_base.py +1 -1
  40. stadiamaps/models/geo_json_line_string.py +1 -1
  41. stadiamaps/models/geo_json_point.py +1 -1
  42. stadiamaps/models/geo_json_polygon.py +1 -1
  43. stadiamaps/models/{pelias_response.py → geocode_response.py} +8 -8
  44. stadiamaps/models/geocode_response_envelope_properties_v2.py +125 -0
  45. stadiamaps/models/{pelias_geo_json_feature.py → geocoding_geo_json_feature.py} +8 -8
  46. stadiamaps/models/{pelias_geo_json_properties.py → geocoding_geo_json_properties.py} +43 -15
  47. stadiamaps/models/{pelias_geo_json_properties_addendum.py → geocoding_geo_json_properties_addendum.py} +7 -7
  48. stadiamaps/models/{pelias_geo_json_properties_addendum_osm.py → geocoding_geo_json_properties_addendum_osm.py} +5 -5
  49. stadiamaps/models/{pelias_layer.py → geocoding_layer.py} +3 -3
  50. stadiamaps/models/geocoding_meta.py +108 -0
  51. stadiamaps/models/geocoding_object.py +1 -1
  52. stadiamaps/models/{pelias_source.py → geocoding_source.py} +4 -3
  53. stadiamaps/models/geonames_addendum.py +101 -0
  54. stadiamaps/models/height_request.py +1 -1
  55. stadiamaps/models/height_response.py +1 -1
  56. stadiamaps/models/highway_classification.py +1 -1
  57. stadiamaps/models/intersecting_edge.py +1 -1
  58. stadiamaps/models/isochrone_costing_model.py +1 -1
  59. stadiamaps/models/isochrone_feature.py +1 -1
  60. stadiamaps/models/isochrone_properties.py +1 -1
  61. stadiamaps/models/isochrone_request.py +1 -1
  62. stadiamaps/models/isochrone_response.py +1 -1
  63. stadiamaps/models/layer_id.py +57 -0
  64. stadiamaps/models/locate_detailed_edge.py +1 -1
  65. stadiamaps/models/locate_edge.py +1 -1
  66. stadiamaps/models/locate_edge_info.py +1 -1
  67. stadiamaps/models/locate_node.py +1 -1
  68. stadiamaps/models/locate_object.py +1 -1
  69. stadiamaps/models/low_speed_vehicle_costing_options.py +1 -1
  70. stadiamaps/models/maneuver_sign.py +1 -1
  71. stadiamaps/models/maneuver_sign_element.py +1 -1
  72. stadiamaps/models/map_match_costing_model.py +1 -1
  73. stadiamaps/models/map_match_request.py +10 -8
  74. stadiamaps/models/map_match_route_response.py +1 -1
  75. stadiamaps/models/map_match_trace_options.py +1 -1
  76. stadiamaps/models/map_match_waypoint.py +3 -3
  77. stadiamaps/models/match_type.py +39 -0
  78. stadiamaps/models/matched_point.py +1 -1
  79. stadiamaps/models/matrix_costing_model.py +1 -1
  80. stadiamaps/models/matrix_distance.py +1 -1
  81. stadiamaps/models/matrix_request.py +4 -4
  82. stadiamaps/models/matrix_response.py +4 -4
  83. stadiamaps/models/matrix_waypoint.py +1 -1
  84. stadiamaps/models/motor_scooter_costing_options.py +1 -1
  85. stadiamaps/models/motorcycle_costing_options.py +1 -1
  86. stadiamaps/models/nearest_roads_request.py +4 -4
  87. stadiamaps/models/node_id.py +1 -1
  88. stadiamaps/models/node_type.py +1 -1
  89. stadiamaps/models/open_street_map_addendum.py +162 -0
  90. stadiamaps/models/optimized_route_request.py +10 -8
  91. stadiamaps/models/osrm_admin.py +1 -1
  92. stadiamaps/models/osrm_annotation.py +1 -1
  93. stadiamaps/models/osrm_banner_component.py +1 -1
  94. stadiamaps/models/osrm_banner_content.py +1 -1
  95. stadiamaps/models/osrm_banner_instruction.py +1 -1
  96. stadiamaps/models/osrm_base_api_response.py +1 -1
  97. stadiamaps/models/osrm_guidance_modifier.py +1 -1
  98. stadiamaps/models/osrm_intersection.py +1 -1
  99. stadiamaps/models/osrm_lane.py +1 -1
  100. stadiamaps/models/osrm_route.py +1 -1
  101. stadiamaps/models/osrm_route_leg.py +1 -1
  102. stadiamaps/models/osrm_route_response.py +1 -1
  103. stadiamaps/models/osrm_route_step.py +1 -1
  104. stadiamaps/models/osrm_speed_limit.py +1 -1
  105. stadiamaps/models/osrm_step_maneuver.py +1 -1
  106. stadiamaps/models/osrm_via_waypoint.py +1 -1
  107. stadiamaps/models/osrm_voice_instruction.py +1 -1
  108. stadiamaps/models/osrm_waypoint.py +1 -1
  109. stadiamaps/models/pedestrian_costing_options.py +8 -5
  110. stadiamaps/models/pedestrian_type.py +39 -0
  111. stadiamaps/models/point.py +104 -0
  112. stadiamaps/models/precision.py +38 -0
  113. stadiamaps/models/properties_v2.py +184 -0
  114. stadiamaps/models/restrictions.py +11 -11
  115. stadiamaps/models/road_class.py +1 -1
  116. stadiamaps/models/route200_response.py +1 -1
  117. stadiamaps/models/route_leg.py +1 -1
  118. stadiamaps/models/route_maneuver.py +1 -1
  119. stadiamaps/models/route_request.py +5 -5
  120. stadiamaps/models/route_response.py +1 -1
  121. stadiamaps/models/route_response_alternates_inner.py +1 -1
  122. stadiamaps/models/route_summary.py +1 -1
  123. stadiamaps/models/route_trip.py +7 -7
  124. stadiamaps/models/{valhalla_languages.py → routing_languages.py} +4 -4
  125. stadiamaps/models/{valhalla_long_units.py → routing_long_units.py} +4 -4
  126. stadiamaps/models/routing_response_waypoint.py +3 -3
  127. stadiamaps/models/routing_waypoint.py +3 -3
  128. stadiamaps/models/routing_waypoint_all_of_search_filter.py +1 -1
  129. stadiamaps/models/search_query.py +7 -7
  130. stadiamaps/models/search_structured_query.py +8 -8
  131. stadiamaps/models/simple_routing_waypoint.py +3 -3
  132. stadiamaps/models/source_attribution.py +110 -0
  133. stadiamaps/models/source_id.py +41 -0
  134. stadiamaps/models/speeds.py +1 -1
  135. stadiamaps/models/trace_attribute_filter_options.py +1 -1
  136. stadiamaps/models/trace_attribute_key.py +1 -1
  137. stadiamaps/models/trace_attributes_base_response.py +1 -1
  138. stadiamaps/models/trace_attributes_request.py +10 -8
  139. stadiamaps/models/trace_attributes_response.py +4 -9
  140. stadiamaps/models/trace_edge.py +2 -7
  141. stadiamaps/models/travel_mode.py +1 -1
  142. stadiamaps/models/traversability.py +1 -1
  143. stadiamaps/models/truck_costing_options.py +1 -1
  144. stadiamaps/models/tz_response.py +1 -1
  145. stadiamaps/models/warning.py +1 -1
  146. stadiamaps/models/whos_on_first_concordances.py +246 -0
  147. stadiamaps/models/wof_context.py +210 -0
  148. stadiamaps/models/wof_context_component.py +110 -0
  149. stadiamaps/rest.py +2 -2
  150. stadiamaps-6.0.0.dist-info/METADATA +117 -0
  151. stadiamaps-6.0.0.dist-info/RECORD +183 -0
  152. {stadiamaps-4.0.0.dist-info → stadiamaps-6.0.0.dist-info}/WHEEL +1 -1
  153. {stadiamaps-4.0.0.dist-info → stadiamaps-6.0.0.dist-info}/top_level.txt +1 -0
  154. test/integration/__init__.py +0 -0
  155. test/integration/test_eu_endpoint.py +21 -0
  156. test/integration/test_gecoding.py +112 -0
  157. test/integration/test_geospatial.py +43 -0
  158. test/integration/test_routing.py +282 -0
  159. stadiamaps/models/pelias_response_geocoding.py +0 -89
  160. stadiamaps/models/route_response_trip.py +0 -117
  161. stadiamaps/models/trace_attributes_response_all_of.py +0 -96
  162. stadiamaps-4.0.0.dist-info/METADATA +0 -79
  163. stadiamaps-4.0.0.dist-info/RECORD +0 -160
  164. {stadiamaps-4.0.0.dist-info → stadiamaps-6.0.0.dist-info/licenses}/LICENSE.txt +0 -0
@@ -0,0 +1,108 @@
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.0.0
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, 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 GeocodingMeta(BaseModel):
27
+ """
28
+ GeocodingMeta
29
+ """ # noqa: E501
30
+ attribution: StrictStr
31
+ error: Optional[StrictStr] = Field(default=None, description="Errors encountered serving the request (if any).")
32
+ additional_properties: Dict[str, Any] = {}
33
+ __properties: ClassVar[List[str]] = ["attribution", "error"]
34
+
35
+ model_config = ConfigDict(
36
+ populate_by_name=True,
37
+ validate_assignment=True,
38
+ protected_namespaces=(),
39
+ )
40
+
41
+
42
+ def to_str(self) -> str:
43
+ """Returns the string representation of the model using alias"""
44
+ return pprint.pformat(self.model_dump(by_alias=True))
45
+
46
+ def to_json(self) -> str:
47
+ """Returns the JSON representation of the model using alias"""
48
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
49
+ return json.dumps(self.to_dict())
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> Optional[Self]:
53
+ """Create an instance of GeocodingMeta from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self) -> Dict[str, Any]:
57
+ """Return the dictionary representation of the model using alias.
58
+
59
+ This has the following differences from calling pydantic's
60
+ `self.model_dump(by_alias=True)`:
61
+
62
+ * `None` is only added to the output dict for nullable fields that
63
+ were set at model initialization. Other fields with value `None`
64
+ are ignored.
65
+ * Fields in `self.additional_properties` are added to the output dict.
66
+ """
67
+ excluded_fields: Set[str] = set([
68
+ "additional_properties",
69
+ ])
70
+
71
+ _dict = self.model_dump(
72
+ by_alias=True,
73
+ exclude=excluded_fields,
74
+ exclude_none=True,
75
+ )
76
+ # puts key-value pairs in additional_properties in the top level
77
+ if self.additional_properties is not None:
78
+ for _key, _value in self.additional_properties.items():
79
+ _dict[_key] = _value
80
+
81
+ # set to None if error (nullable) is None
82
+ # and model_fields_set contains the field
83
+ if self.error is None and "error" in self.model_fields_set:
84
+ _dict['error'] = None
85
+
86
+ return _dict
87
+
88
+ @classmethod
89
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
90
+ """Create an instance of GeocodingMeta from a dict"""
91
+ if obj is None:
92
+ return None
93
+
94
+ if not isinstance(obj, dict):
95
+ return cls.model_validate(obj)
96
+
97
+ _obj = cls.model_validate({
98
+ "attribution": obj.get("attribution"),
99
+ "error": obj.get("error")
100
+ })
101
+ # store additional fields in additional_properties
102
+ for _key in obj.keys():
103
+ if _key not in cls.__properties:
104
+ _obj.additional_properties[_key] = obj.get(_key)
105
+
106
+ return _obj
107
+
108
+
@@ -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: 7.0.0
8
+ The version of the OpenAPI document: 9.0.0
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: 7.0.0
8
+ The version of the OpenAPI document: 9.0.0
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -19,7 +19,7 @@ from enum import Enum
19
19
  from typing_extensions import Self
20
20
 
21
21
 
22
- class PeliasSource(str, Enum):
22
+ class GeocodingSource(str, Enum):
23
23
  """
24
24
  Our database contains info from multiple sources. These identifiers can be used to either limit search results or to determine the relevance of a result.
25
25
  """
@@ -31,10 +31,11 @@ class PeliasSource(str, Enum):
31
31
  OPENADDRESSES = 'openaddresses'
32
32
  WHOSONFIRST = 'whosonfirst'
33
33
  GEONAMES = 'geonames'
34
+ FOURSQUARE = 'foursquare'
34
35
 
35
36
  @classmethod
36
37
  def from_json(cls, json_str: str) -> Self:
37
- """Create an instance of PeliasSource from a JSON string"""
38
+ """Create an instance of GeocodingSource from a JSON string"""
38
39
  return cls(json.loads(json_str))
39
40
 
40
41
 
@@ -0,0 +1,101 @@
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.0.0
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, StrictStr
22
+ from typing import Any, ClassVar, Dict, List
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class GeonamesAddendum(BaseModel):
27
+ """
28
+ GeonamesAddendum
29
+ """ # noqa: E501
30
+ feature_code: StrictStr = Field(description="The GeoNames feature code (for GeoNames results only).")
31
+ additional_properties: Dict[str, Any] = {}
32
+ __properties: ClassVar[List[str]] = ["feature_code"]
33
+
34
+ model_config = ConfigDict(
35
+ populate_by_name=True,
36
+ validate_assignment=True,
37
+ protected_namespaces=(),
38
+ )
39
+
40
+
41
+ def to_str(self) -> str:
42
+ """Returns the string representation of the model using alias"""
43
+ return pprint.pformat(self.model_dump(by_alias=True))
44
+
45
+ def to_json(self) -> str:
46
+ """Returns the JSON representation of the model using alias"""
47
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48
+ return json.dumps(self.to_dict())
49
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> Optional[Self]:
52
+ """Create an instance of GeonamesAddendum from a JSON string"""
53
+ return cls.from_dict(json.loads(json_str))
54
+
55
+ def to_dict(self) -> Dict[str, Any]:
56
+ """Return the dictionary representation of the model using alias.
57
+
58
+ This has the following differences from calling pydantic's
59
+ `self.model_dump(by_alias=True)`:
60
+
61
+ * `None` is only added to the output dict for nullable fields that
62
+ were set at model initialization. Other fields with value `None`
63
+ are ignored.
64
+ * Fields in `self.additional_properties` are added to the output dict.
65
+ """
66
+ excluded_fields: Set[str] = set([
67
+ "additional_properties",
68
+ ])
69
+
70
+ _dict = self.model_dump(
71
+ by_alias=True,
72
+ exclude=excluded_fields,
73
+ exclude_none=True,
74
+ )
75
+ # puts key-value pairs in additional_properties in the top level
76
+ if self.additional_properties is not None:
77
+ for _key, _value in self.additional_properties.items():
78
+ _dict[_key] = _value
79
+
80
+ return _dict
81
+
82
+ @classmethod
83
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
84
+ """Create an instance of GeonamesAddendum from a dict"""
85
+ if obj is None:
86
+ return None
87
+
88
+ if not isinstance(obj, dict):
89
+ return cls.model_validate(obj)
90
+
91
+ _obj = cls.model_validate({
92
+ "feature_code": obj.get("feature_code")
93
+ })
94
+ # store additional fields in additional_properties
95
+ for _key in obj.keys():
96
+ if _key not in cls.__properties:
97
+ _obj.additional_properties[_key] = obj.get(_key)
98
+
99
+ return _obj
100
+
101
+
@@ -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: 7.0.0
8
+ The version of the OpenAPI document: 9.0.0
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: 7.0.0
8
+ The version of the OpenAPI document: 9.0.0
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: 7.0.0
8
+ The version of the OpenAPI document: 9.0.0
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: 7.0.0
8
+ The version of the OpenAPI document: 9.0.0
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: 7.0.0
8
+ The version of the OpenAPI document: 9.0.0
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: 7.0.0
8
+ The version of the OpenAPI document: 9.0.0
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: 7.0.0
8
+ The version of the OpenAPI document: 9.0.0
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: 7.0.0
8
+ The version of the OpenAPI document: 9.0.0
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: 7.0.0
8
+ The version of the OpenAPI document: 9.0.0
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -0,0 +1,57 @@
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.0.0
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 LayerId(str, Enum):
23
+ """
24
+ Canonical geocoding layer IDs for querying.
25
+ """
26
+
27
+ """
28
+ allowed enum values
29
+ """
30
+ POI = 'poi'
31
+ ADDRESS = 'address'
32
+ STREET = 'street'
33
+ COUNTRY = 'country'
34
+ MACROREGION = 'macroregion'
35
+ REGION = 'region'
36
+ MACROCOUNTY = 'macrocounty'
37
+ COUNTY = 'county'
38
+ LOCALITY = 'locality'
39
+ LOCALADMIN = 'localadmin'
40
+ BOROUGH = 'borough'
41
+ NEIGHBOURHOOD = 'neighbourhood'
42
+ POSTALCODE = 'postalcode'
43
+ DEPENDENCY = 'dependency'
44
+ MACROHOOD = 'macrohood'
45
+ MARINEAREA = 'marinearea'
46
+ DISPUTED = 'disputed'
47
+ EMPIRE = 'empire'
48
+ CONTINENT = 'continent'
49
+ OCEAN = 'ocean'
50
+ COARSE = 'coarse'
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Self:
54
+ """Create an instance of LayerId from a JSON string"""
55
+ return cls(json.loads(json_str))
56
+
57
+
@@ -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: 7.0.0
8
+ The version of the OpenAPI document: 9.0.0
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: 7.0.0
8
+ The version of the OpenAPI document: 9.0.0
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: 7.0.0
8
+ The version of the OpenAPI document: 9.0.0
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: 7.0.0
8
+ The version of the OpenAPI document: 9.0.0
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: 7.0.0
8
+ The version of the OpenAPI document: 9.0.0
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: 7.0.0
8
+ The version of the OpenAPI document: 9.0.0
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: 7.0.0
8
+ The version of the OpenAPI document: 9.0.0
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: 7.0.0
8
+ The version of the OpenAPI document: 9.0.0
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: 7.0.0
8
+ The version of the OpenAPI document: 9.0.0
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: 7.0.0
8
+ The version of the OpenAPI document: 9.0.0
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -18,15 +18,15 @@ import pprint
18
18
  import re # noqa: F401
19
19
  import json
20
20
 
21
- from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
22
- from typing import Any, ClassVar, Dict, List, Optional
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator
22
+ from typing import Any, ClassVar, Dict, List, Optional, Union
23
23
  from stadiamaps.models.annotation_filters import AnnotationFilters
24
24
  from stadiamaps.models.costing_options import CostingOptions
25
25
  from stadiamaps.models.distance_unit import DistanceUnit
26
26
  from stadiamaps.models.map_match_costing_model import MapMatchCostingModel
27
27
  from stadiamaps.models.map_match_trace_options import MapMatchTraceOptions
28
28
  from stadiamaps.models.map_match_waypoint import MapMatchWaypoint
29
- from stadiamaps.models.valhalla_languages import ValhallaLanguages
29
+ from stadiamaps.models.routing_languages import RoutingLanguages
30
30
  from typing import Optional, Set
31
31
  from typing_extensions import Self
32
32
 
@@ -41,7 +41,7 @@ class MapMatchRequest(BaseModel):
41
41
  costing_options: Optional[CostingOptions] = None
42
42
  shape_match: Optional[StrictStr] = Field(default=None, description="Three snapping modes provide some control over how the map matching occurs. `edge_walk` is fast, but requires extremely precise data that matches the route graph almost perfectly. `map_snap` can handle significantly noisier data, but is very expensive. `walk_or_snap`, the default, tries to use edge walking first and falls back to map matching if edge walking fails. In general, you should not need to change this parameter unless you want to trace a multi-leg route with multiple `break` locations in the `shape`.")
43
43
  units: Optional[DistanceUnit] = DistanceUnit.KM
44
- language: Optional[ValhallaLanguages] = ValhallaLanguages.EN_MINUS_US
44
+ language: Optional[RoutingLanguages] = RoutingLanguages.EN_MINUS_US
45
45
  directions_type: Optional[StrictStr] = Field(default='instructions', description="The level of directional narrative to include. Locations and times will always be returned, but narrative generation verbosity can be controlled with this parameter.")
46
46
  format: Optional[StrictStr] = Field(default=None, description="The output response format. The default JSON format is extremely compact and ideal for web or data-constrained use cases where you want to fetch additional attributes on demand in small chunks. The OSRM format is much richer and is configurable with significantly more info for turn-by-turn navigation use cases.")
47
47
  banner_instructions: Optional[StrictBool] = Field(default=None, description="Optionally includes helpful banners with timing information for turn-by-turn navigation. This is only available in the OSRM format.")
@@ -52,8 +52,9 @@ class MapMatchRequest(BaseModel):
52
52
  use_timestamps: Optional[StrictBool] = Field(default=False, description="If true, the input timestamps or durations should be used when computing elapsed time for each edge along the matched path rather than the routing algorithm estimates.")
53
53
  trace_options: Optional[MapMatchTraceOptions] = None
54
54
  linear_references: Optional[StrictBool] = Field(default=False, description="If true, the response will include a `linear_references` value that contains an array of base64-encoded [OpenLR location references](https://www.openlr-association.com/fileadmin/user_upload/openlr-whitepaper_v1.5.pdf), one for each graph edge of the road network matched by the trace.")
55
+ elevation_interval: Optional[Union[StrictFloat, StrictInt]] = Field(default=0.0, description="If greater than zero, attempts to include elevation along the route at regular intervals. The \"native\" internal resolution is 30m, so we recommend you use this when possible. This number is interpreted as either meters or feet depending on the unit parameter. Elevation for route sections containing a bridge or tunnel is interpolated linearly. This doesn't always match the true elevation of the bridge/tunnel, but it prevents sharp artifacts from the surrounding terrain. This functionality is unique to the routing endpoints and is not available via the elevation API. NOTE: This has no effect on the OSRM response format.")
55
56
  additional_properties: Dict[str, Any] = {}
56
- __properties: ClassVar[List[str]] = ["id", "shape", "encoded_polyline", "costing", "costing_options", "shape_match", "units", "language", "directions_type", "format", "banner_instructions", "voice_instructions", "filters", "begin_time", "durations", "use_timestamps", "trace_options", "linear_references"]
57
+ __properties: ClassVar[List[str]] = ["id", "shape", "encoded_polyline", "costing", "costing_options", "shape_match", "units", "language", "directions_type", "format", "banner_instructions", "voice_instructions", "filters", "begin_time", "durations", "use_timestamps", "trace_options", "linear_references", "elevation_interval"]
57
58
 
58
59
  @field_validator('shape_match')
59
60
  def shape_match_validate_enum(cls, value):
@@ -166,7 +167,7 @@ class MapMatchRequest(BaseModel):
166
167
  "costing_options": CostingOptions.from_dict(obj["costing_options"]) if obj.get("costing_options") is not None else None,
167
168
  "shape_match": obj.get("shape_match"),
168
169
  "units": obj.get("units") if obj.get("units") is not None else DistanceUnit.KM,
169
- "language": obj.get("language") if obj.get("language") is not None else ValhallaLanguages.EN_MINUS_US,
170
+ "language": obj.get("language") if obj.get("language") is not None else RoutingLanguages.EN_MINUS_US,
170
171
  "directions_type": obj.get("directions_type") if obj.get("directions_type") is not None else 'instructions',
171
172
  "format": obj.get("format"),
172
173
  "banner_instructions": obj.get("banner_instructions"),
@@ -176,7 +177,8 @@ class MapMatchRequest(BaseModel):
176
177
  "durations": obj.get("durations"),
177
178
  "use_timestamps": obj.get("use_timestamps") if obj.get("use_timestamps") is not None else False,
178
179
  "trace_options": MapMatchTraceOptions.from_dict(obj["trace_options"]) if obj.get("trace_options") is not None else None,
179
- "linear_references": obj.get("linear_references") if obj.get("linear_references") is not None else False
180
+ "linear_references": obj.get("linear_references") if obj.get("linear_references") is not None else False,
181
+ "elevation_interval": obj.get("elevation_interval") if obj.get("elevation_interval") is not None else 0.0
180
182
  })
181
183
  # store additional fields in additional_properties
182
184
  for _key in obj.keys():
@@ -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: 7.0.0
8
+ The version of the OpenAPI document: 9.0.0
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: 7.0.0
8
+ The version of the OpenAPI document: 9.0.0
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: 7.0.0
8
+ The version of the OpenAPI document: 9.0.0
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -30,7 +30,7 @@ class MapMatchWaypoint(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
  time: Optional[StrictInt] = Field(default=None, description="The timestamp of the waypoint, in seconds. This can inform the map matching algorithm about when the point was measured. A UNIX timestamp, or any increasing integer sequence measuring seconds from some reference point can be used.")
35
35
  additional_properties: Dict[str, Any] = {}
36
36
  __properties: ClassVar[List[str]] = ["lat", "lon", "type", "time"]
@@ -105,7 +105,7 @@ class MapMatchWaypoint(BaseModel):
105
105
  _obj = cls.model_validate({
106
106
  "lat": obj.get("lat"),
107
107
  "lon": obj.get("lon"),
108
- "type": obj.get("type") if obj.get("type") is not None else 'break',
108
+ "type": obj.get("type"),
109
109
  "time": obj.get("time")
110
110
  })
111
111
  # store additional fields in additional_properties
@@ -0,0 +1,39 @@
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.0.0
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 MatchType(str, Enum):
23
+ """
24
+ MatchType
25
+ """
26
+
27
+ """
28
+ allowed enum values
29
+ """
30
+ EXACT = 'exact'
31
+ INTERPOLATED = 'interpolated'
32
+ FALLBACK = 'fallback'
33
+
34
+ @classmethod
35
+ def from_json(cls, json_str: str) -> Self:
36
+ """Create an instance of MatchType from a JSON string"""
37
+ return cls(json.loads(json_str))
38
+
39
+
@@ -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: 7.0.0
8
+ The version of the OpenAPI document: 9.0.0
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11