stadiamaps 1.0.6__py3-none-any.whl → 2.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 (128) hide show
  1. stadiamaps/__init__.py +6 -24
  2. stadiamaps/api/geocoding_api.py +1917 -760
  3. stadiamaps/api/geospatial_api.py +483 -221
  4. stadiamaps/api/routing_api.py +1615 -723
  5. stadiamaps/api_client.py +275 -272
  6. stadiamaps/api_response.py +12 -16
  7. stadiamaps/configuration.py +13 -11
  8. stadiamaps/exceptions.py +67 -30
  9. stadiamaps/models/__init__.py +5 -23
  10. stadiamaps/models/access.py +44 -26
  11. stadiamaps/models/admin_region.py +46 -28
  12. stadiamaps/models/administrative.py +48 -30
  13. stadiamaps/models/auto_costing_options.py +69 -48
  14. stadiamaps/models/auto_costing_options_all_of.py +1 -1
  15. stadiamaps/models/base_costing_options.py +52 -33
  16. stadiamaps/models/base_trace_request.py +70 -40
  17. stadiamaps/models/bicycle_costing_options.py +61 -42
  18. stadiamaps/models/bicycle_costing_options_all_of.py +1 -1
  19. stadiamaps/models/bike_network.py +42 -24
  20. stadiamaps/models/contour.py +45 -27
  21. stadiamaps/models/coordinate.py +45 -26
  22. stadiamaps/models/costing_model.py +10 -12
  23. stadiamaps/models/costing_options.py +51 -33
  24. stadiamaps/models/directions_options.py +45 -27
  25. stadiamaps/models/distance_unit.py +8 -11
  26. stadiamaps/models/edge_sign.py +46 -28
  27. stadiamaps/models/edge_use.py +8 -11
  28. stadiamaps/models/end_node.py +48 -30
  29. stadiamaps/models/geo_attributes.py +47 -29
  30. stadiamaps/models/geo_json_geometry.py +25 -25
  31. stadiamaps/models/geo_json_geometry_base.py +45 -27
  32. stadiamaps/models/geo_json_line_string.py +47 -28
  33. stadiamaps/models/geo_json_line_string_all_of.py +2 -2
  34. stadiamaps/models/geo_json_point.py +47 -28
  35. stadiamaps/models/geo_json_point_all_of.py +2 -2
  36. stadiamaps/models/geo_json_polygon.py +47 -28
  37. stadiamaps/models/geo_json_polygon_all_of.py +2 -2
  38. stadiamaps/models/geocoding_object.py +46 -28
  39. stadiamaps/models/height_request.py +55 -34
  40. stadiamaps/models/height_response.py +49 -30
  41. stadiamaps/models/highway_classification.py +52 -34
  42. stadiamaps/models/intersecting_edge.py +45 -27
  43. stadiamaps/models/isochrone_costing_model.py +8 -11
  44. stadiamaps/models/isochrone_feature.py +45 -27
  45. stadiamaps/models/isochrone_properties.py +48 -30
  46. stadiamaps/models/isochrone_request.py +54 -35
  47. stadiamaps/models/isochrone_response.py +47 -29
  48. stadiamaps/models/locate_detailed_edge.py +73 -55
  49. stadiamaps/models/locate_edge.py +56 -39
  50. stadiamaps/models/locate_edge_info.py +47 -29
  51. stadiamaps/models/locate_node.py +50 -31
  52. stadiamaps/models/locate_node_all_of.py +1 -1
  53. stadiamaps/models/locate_object.py +49 -31
  54. stadiamaps/models/maneuver_sign.py +50 -32
  55. stadiamaps/models/maneuver_sign_element.py +45 -27
  56. stadiamaps/models/map_match_costing_model.py +8 -11
  57. stadiamaps/models/map_match_request.py +74 -44
  58. stadiamaps/models/map_match_request_all_of.py +1 -1
  59. stadiamaps/models/map_match_route_response.py +57 -29
  60. stadiamaps/models/map_match_route_response_all_of.py +1 -1
  61. stadiamaps/models/map_match_trace_options.py +47 -29
  62. stadiamaps/models/map_match_waypoint.py +49 -30
  63. stadiamaps/models/map_match_waypoint_all_of.py +1 -1
  64. stadiamaps/models/matched_point.py +52 -34
  65. stadiamaps/models/matrix_costing_model.py +9 -12
  66. stadiamaps/models/matrix_distance.py +46 -28
  67. stadiamaps/models/matrix_request.py +70 -39
  68. stadiamaps/models/matrix_response.py +60 -36
  69. stadiamaps/models/motor_scooter_costing_options.py +70 -49
  70. stadiamaps/models/motor_scooter_costing_options_all_of.py +1 -1
  71. stadiamaps/models/motorcycle_costing_options.py +69 -48
  72. stadiamaps/models/motorcycle_costing_options_all_of.py +1 -1
  73. stadiamaps/models/nearest_roads_request.py +65 -34
  74. stadiamaps/models/node_id.py +42 -24
  75. stadiamaps/models/node_type.py +8 -11
  76. stadiamaps/models/optimized_route_request.py +66 -35
  77. stadiamaps/models/pedestrian_costing_options.py +59 -40
  78. stadiamaps/models/pelias_geo_json_feature.py +50 -31
  79. stadiamaps/models/pelias_geo_json_properties.py +54 -36
  80. stadiamaps/models/pelias_geo_json_properties_addendum.py +43 -25
  81. stadiamaps/models/pelias_geo_json_properties_addendum_osm.py +42 -24
  82. stadiamaps/models/pelias_layer.py +8 -11
  83. stadiamaps/models/pelias_response.py +49 -30
  84. stadiamaps/models/pelias_response_geocoding.py +1 -1
  85. stadiamaps/models/pelias_source.py +8 -11
  86. stadiamaps/models/restrictions.py +44 -26
  87. stadiamaps/models/road_class.py +8 -11
  88. stadiamaps/models/route_leg.py +48 -29
  89. stadiamaps/models/route_maneuver.py +73 -55
  90. stadiamaps/models/route_request.py +76 -43
  91. stadiamaps/models/route_response.py +56 -28
  92. stadiamaps/models/route_response_alternates_inner.py +105 -0
  93. stadiamaps/models/route_response_trip.py +1 -1
  94. stadiamaps/models/route_summary.py +48 -30
  95. stadiamaps/models/route_trip.py +135 -0
  96. stadiamaps/models/routing_response_waypoint.py +49 -30
  97. stadiamaps/models/routing_response_waypoint_all_of.py +1 -1
  98. stadiamaps/models/routing_waypoint.py +60 -41
  99. stadiamaps/models/routing_waypoint_all_of.py +1 -1
  100. stadiamaps/models/routing_waypoint_all_of_search_filter.py +48 -30
  101. stadiamaps/models/simple_routing_waypoint.py +48 -29
  102. stadiamaps/models/simple_routing_waypoint_all_of.py +1 -1
  103. stadiamaps/models/speeds.py +49 -31
  104. stadiamaps/models/trace_attribute_filter_options.py +47 -28
  105. stadiamaps/models/trace_attribute_key.py +8 -11
  106. stadiamaps/models/trace_attributes_base_response.py +51 -32
  107. stadiamaps/models/trace_attributes_request.py +72 -42
  108. stadiamaps/models/trace_attributes_request_all_of.py +1 -1
  109. stadiamaps/models/trace_attributes_request_all_of_filters.py +2 -2
  110. stadiamaps/models/trace_attributes_response.py +54 -35
  111. stadiamaps/models/trace_attributes_response_all_of.py +1 -1
  112. stadiamaps/models/trace_edge.py +88 -70
  113. stadiamaps/models/travel_mode.py +8 -11
  114. stadiamaps/models/traversability.py +8 -11
  115. stadiamaps/models/truck_costing_options.py +72 -51
  116. stadiamaps/models/truck_costing_options_all_of.py +1 -1
  117. stadiamaps/models/tz_response.py +45 -27
  118. stadiamaps/models/valhalla_languages.py +8 -11
  119. stadiamaps/models/valhalla_long_units.py +8 -11
  120. stadiamaps/models/warning.py +42 -24
  121. stadiamaps/py.typed +0 -0
  122. stadiamaps/rest.py +127 -172
  123. {stadiamaps-1.0.6.dist-info → stadiamaps-2.0.0.dist-info}/METADATA +4 -4
  124. stadiamaps-2.0.0.dist-info/RECORD +128 -0
  125. {stadiamaps-1.0.6.dist-info → stadiamaps-2.0.0.dist-info}/WHEEL +1 -1
  126. stadiamaps-1.0.6.dist-info/RECORD +0 -125
  127. {stadiamaps-1.0.6.dist-info → stadiamaps-2.0.0.dist-info}/LICENSE.txt +0 -0
  128. {stadiamaps-1.0.6.dist-info → stadiamaps-2.0.0.dist-info}/top_level.txt +0 -0
@@ -3,207 +3,341 @@
3
3
  """
4
4
  Stadia Maps Geospatial APIs
5
5
 
6
- The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. # noqa: E501
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: 5.0.5
8
+ The version of the OpenAPI document: 6.0.0
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
12
12
  Do not edit the class manually.
13
- """
14
-
13
+ """ # noqa: E501
15
14
 
16
- import re # noqa: F401
17
- import io
18
15
  import warnings
19
-
20
- from pydantic import validate_arguments, ValidationError
16
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
17
+ from typing import Any, Dict, List, Optional, Tuple, Union
21
18
  from typing_extensions import Annotated
22
19
 
23
- from pydantic import Field, confloat, conint
24
-
20
+ from pydantic import Field
25
21
  from typing import Optional, Union
26
-
22
+ from typing_extensions import Annotated
27
23
  from stadiamaps.models.height_request import HeightRequest
28
24
  from stadiamaps.models.height_response import HeightResponse
29
25
  from stadiamaps.models.tz_response import TzResponse
30
26
 
31
- from stadiamaps.api_client import ApiClient
27
+ from stadiamaps.api_client import ApiClient, RequestSerialized
32
28
  from stadiamaps.api_response import ApiResponse
33
- from stadiamaps.exceptions import ( # noqa: F401
34
- ApiTypeError,
35
- ApiValueError
36
- )
29
+ from stadiamaps.rest import RESTResponseType
37
30
 
38
31
 
39
- class GeospatialApi(object):
32
+ class GeospatialApi:
40
33
  """NOTE: This class is auto generated by OpenAPI Generator
41
34
  Ref: https://openapi-generator.tech
42
35
 
43
36
  Do not edit the class manually.
44
37
  """
45
38
 
46
- def __init__(self, api_client=None):
39
+ def __init__(self, api_client=None) -> None:
47
40
  if api_client is None:
48
41
  api_client = ApiClient.get_default()
49
42
  self.api_client = api_client
50
43
 
51
- @validate_arguments
52
- def elevation(self, height_request : Optional[HeightRequest] = None, **kwargs) -> HeightResponse: # noqa: E501
53
- """Get the elevation profile along a polyline or at a point. # noqa: E501
54
44
 
55
- The Stadia elevation API allows you to get the elevation of any point on earth. You can pass either a simple set of points or a Google encoded polyline string. This pairs well with our routing APIs, so you can generate an elevation profile for your next bike or run. # noqa: E501
56
- This method makes a synchronous HTTP request by default. To make an
57
- asynchronous HTTP request, please pass async_req=True
45
+ @validate_call
46
+ def elevation(
47
+ self,
48
+ height_request: Optional[HeightRequest] = None,
49
+ _request_timeout: Union[
50
+ None,
51
+ Annotated[StrictFloat, Field(gt=0)],
52
+ Tuple[
53
+ Annotated[StrictFloat, Field(gt=0)],
54
+ Annotated[StrictFloat, Field(gt=0)]
55
+ ]
56
+ ] = None,
57
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
58
+ _content_type: Optional[StrictStr] = None,
59
+ _headers: Optional[Dict[StrictStr, Any]] = None,
60
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
61
+ ) -> HeightResponse:
62
+ """Get the elevation profile along a polyline or at a point.
58
63
 
59
- >>> thread = api.elevation(height_request, async_req=True)
60
- >>> result = thread.get()
64
+ The Stadia elevation API allows you to get the elevation of any point on earth. You can pass either a simple set of points or a Google encoded polyline string. This pairs well with our routing APIs, so you can generate an elevation profile for your next bike or run.
61
65
 
62
66
  :param height_request:
63
67
  :type height_request: HeightRequest
64
- :param async_req: Whether to execute the request asynchronously.
65
- :type async_req: bool, optional
66
68
  :param _request_timeout: timeout setting for this request. If one
67
69
  number provided, it will be total request
68
70
  timeout. It can also be a pair (tuple) of
69
71
  (connection, read) timeouts.
72
+ :type _request_timeout: int, tuple(int, int), optional
73
+ :param _request_auth: set to override the auth_settings for an a single
74
+ request; this effectively ignores the
75
+ authentication in the spec for a single request.
76
+ :type _request_auth: dict, optional
77
+ :param _content_type: force content-type for the request.
78
+ :type _content_type: str, Optional
79
+ :param _headers: set to override the headers for a single
80
+ request; this effectively ignores the headers
81
+ in the spec for a single request.
82
+ :type _headers: dict, optional
83
+ :param _host_index: set to override the host_index for a single
84
+ request; this effectively ignores the host_index
85
+ in the spec for a single request.
86
+ :type _host_index: int, optional
70
87
  :return: Returns the result object.
71
- If the method is called asynchronously,
72
- returns the request thread.
73
- :rtype: HeightResponse
74
- """
75
- kwargs['_return_http_data_only'] = True
76
- if '_preload_content' in kwargs:
77
- raise ValueError("Error! Please call the elevation_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
78
- return self.elevation_with_http_info(height_request, **kwargs) # noqa: E501
79
-
80
- @validate_arguments
81
- def elevation_with_http_info(self, height_request : Optional[HeightRequest] = None, **kwargs) -> ApiResponse: # noqa: E501
82
- """Get the elevation profile along a polyline or at a point. # noqa: E501
83
-
84
- The Stadia elevation API allows you to get the elevation of any point on earth. You can pass either a simple set of points or a Google encoded polyline string. This pairs well with our routing APIs, so you can generate an elevation profile for your next bike or run. # noqa: E501
85
- This method makes a synchronous HTTP request by default. To make an
86
- asynchronous HTTP request, please pass async_req=True
87
-
88
- >>> thread = api.elevation_with_http_info(height_request, async_req=True)
89
- >>> result = thread.get()
88
+ """ # noqa: E501
89
+
90
+ _param = self._elevation_serialize(
91
+ height_request=height_request,
92
+ _request_auth=_request_auth,
93
+ _content_type=_content_type,
94
+ _headers=_headers,
95
+ _host_index=_host_index
96
+ )
97
+
98
+ _response_types_map: Dict[str, Optional[str]] = {
99
+ '200': "HeightResponse",
100
+ '400': None,
101
+ }
102
+ response_data = self.api_client.call_api(
103
+ *_param,
104
+ _request_timeout=_request_timeout
105
+ )
106
+ response_data.read()
107
+ return self.api_client.response_deserialize(
108
+ response_data=response_data,
109
+ response_types_map=_response_types_map,
110
+ ).data
111
+
112
+
113
+ @validate_call
114
+ def elevation_with_http_info(
115
+ self,
116
+ height_request: Optional[HeightRequest] = None,
117
+ _request_timeout: Union[
118
+ None,
119
+ Annotated[StrictFloat, Field(gt=0)],
120
+ Tuple[
121
+ Annotated[StrictFloat, Field(gt=0)],
122
+ Annotated[StrictFloat, Field(gt=0)]
123
+ ]
124
+ ] = None,
125
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
126
+ _content_type: Optional[StrictStr] = None,
127
+ _headers: Optional[Dict[StrictStr, Any]] = None,
128
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
129
+ ) -> ApiResponse[HeightResponse]:
130
+ """Get the elevation profile along a polyline or at a point.
131
+
132
+ The Stadia elevation API allows you to get the elevation of any point on earth. You can pass either a simple set of points or a Google encoded polyline string. This pairs well with our routing APIs, so you can generate an elevation profile for your next bike or run.
90
133
 
91
134
  :param height_request:
92
135
  :type height_request: HeightRequest
93
- :param async_req: Whether to execute the request asynchronously.
94
- :type async_req: bool, optional
95
- :param _preload_content: if False, the ApiResponse.data will
96
- be set to none and raw_data will store the
97
- HTTP response body without reading/decoding.
98
- Default is True.
99
- :type _preload_content: bool, optional
100
- :param _return_http_data_only: response data instead of ApiResponse
101
- object with status code, headers, etc
102
- :type _return_http_data_only: bool, optional
103
136
  :param _request_timeout: timeout setting for this request. If one
104
137
  number provided, it will be total request
105
138
  timeout. It can also be a pair (tuple) of
106
139
  (connection, read) timeouts.
140
+ :type _request_timeout: int, tuple(int, int), optional
107
141
  :param _request_auth: set to override the auth_settings for an a single
108
- request; this effectively ignores the authentication
109
- in the spec for a single request.
142
+ request; this effectively ignores the
143
+ authentication in the spec for a single request.
110
144
  :type _request_auth: dict, optional
111
- :type _content_type: string, optional: force content-type for the request
145
+ :param _content_type: force content-type for the request.
146
+ :type _content_type: str, Optional
147
+ :param _headers: set to override the headers for a single
148
+ request; this effectively ignores the headers
149
+ in the spec for a single request.
150
+ :type _headers: dict, optional
151
+ :param _host_index: set to override the host_index for a single
152
+ request; this effectively ignores the host_index
153
+ in the spec for a single request.
154
+ :type _host_index: int, optional
112
155
  :return: Returns the result object.
113
- If the method is called asynchronously,
114
- returns the request thread.
115
- :rtype: tuple(HeightResponse, status_code(int), headers(HTTPHeaderDict))
116
- """
156
+ """ # noqa: E501
157
+
158
+ _param = self._elevation_serialize(
159
+ height_request=height_request,
160
+ _request_auth=_request_auth,
161
+ _content_type=_content_type,
162
+ _headers=_headers,
163
+ _host_index=_host_index
164
+ )
117
165
 
118
- _params = locals()
166
+ _response_types_map: Dict[str, Optional[str]] = {
167
+ '200': "HeightResponse",
168
+ '400': None,
169
+ }
170
+ response_data = self.api_client.call_api(
171
+ *_param,
172
+ _request_timeout=_request_timeout
173
+ )
174
+ response_data.read()
175
+ return self.api_client.response_deserialize(
176
+ response_data=response_data,
177
+ response_types_map=_response_types_map,
178
+ )
119
179
 
120
- _all_params = [
121
- 'height_request'
122
- ]
123
- _all_params.extend(
124
- [
125
- 'async_req',
126
- '_return_http_data_only',
127
- '_preload_content',
128
- '_request_timeout',
129
- '_request_auth',
130
- '_content_type',
131
- '_headers'
180
+
181
+ @validate_call
182
+ def elevation_without_preload_content(
183
+ self,
184
+ height_request: Optional[HeightRequest] = None,
185
+ _request_timeout: Union[
186
+ None,
187
+ Annotated[StrictFloat, Field(gt=0)],
188
+ Tuple[
189
+ Annotated[StrictFloat, Field(gt=0)],
190
+ Annotated[StrictFloat, Field(gt=0)]
132
191
  ]
192
+ ] = None,
193
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
194
+ _content_type: Optional[StrictStr] = None,
195
+ _headers: Optional[Dict[StrictStr, Any]] = None,
196
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
197
+ ) -> RESTResponseType:
198
+ """Get the elevation profile along a polyline or at a point.
199
+
200
+ The Stadia elevation API allows you to get the elevation of any point on earth. You can pass either a simple set of points or a Google encoded polyline string. This pairs well with our routing APIs, so you can generate an elevation profile for your next bike or run.
201
+
202
+ :param height_request:
203
+ :type height_request: HeightRequest
204
+ :param _request_timeout: timeout setting for this request. If one
205
+ number provided, it will be total request
206
+ timeout. It can also be a pair (tuple) of
207
+ (connection, read) timeouts.
208
+ :type _request_timeout: int, tuple(int, int), optional
209
+ :param _request_auth: set to override the auth_settings for an a single
210
+ request; this effectively ignores the
211
+ authentication in the spec for a single request.
212
+ :type _request_auth: dict, optional
213
+ :param _content_type: force content-type for the request.
214
+ :type _content_type: str, Optional
215
+ :param _headers: set to override the headers for a single
216
+ request; this effectively ignores the headers
217
+ in the spec for a single request.
218
+ :type _headers: dict, optional
219
+ :param _host_index: set to override the host_index for a single
220
+ request; this effectively ignores the host_index
221
+ in the spec for a single request.
222
+ :type _host_index: int, optional
223
+ :return: Returns the result object.
224
+ """ # noqa: E501
225
+
226
+ _param = self._elevation_serialize(
227
+ height_request=height_request,
228
+ _request_auth=_request_auth,
229
+ _content_type=_content_type,
230
+ _headers=_headers,
231
+ _host_index=_host_index
133
232
  )
134
233
 
135
- # validate the arguments
136
- for _key, _val in _params['kwargs'].items():
137
- if _key not in _all_params:
138
- raise ApiTypeError(
139
- "Got an unexpected keyword argument '%s'"
140
- " to method elevation" % _key
141
- )
142
- _params[_key] = _val
143
- del _params['kwargs']
234
+ _response_types_map: Dict[str, Optional[str]] = {
235
+ '200': "HeightResponse",
236
+ '400': None,
237
+ }
238
+ response_data = self.api_client.call_api(
239
+ *_param,
240
+ _request_timeout=_request_timeout
241
+ )
242
+ return response_data.response
144
243
 
145
- _collection_formats = {}
146
244
 
147
- # process the path parameters
148
- _path_params = {}
245
+ def _elevation_serialize(
246
+ self,
247
+ height_request,
248
+ _request_auth,
249
+ _content_type,
250
+ _headers,
251
+ _host_index,
252
+ ) -> RequestSerialized:
253
+
254
+ _host = None
255
+
256
+ _collection_formats: Dict[str, str] = {
257
+ }
258
+
259
+ _path_params: Dict[str, str] = {}
260
+ _query_params: List[Tuple[str, str]] = []
261
+ _header_params: Dict[str, Optional[str]] = _headers or {}
262
+ _form_params: List[Tuple[str, str]] = []
263
+ _files: Dict[str, str] = {}
264
+ _body_params: Optional[bytes] = None
149
265
 
266
+ # process the path parameters
150
267
  # process the query parameters
151
- _query_params = []
152
268
  # process the header parameters
153
- _header_params = dict(_params.get('_headers', {}))
154
269
  # process the form parameters
155
- _form_params = []
156
- _files = {}
157
270
  # process the body parameter
158
- _body_params = None
159
- if _params['height_request'] is not None:
160
- _body_params = _params['height_request']
271
+ if height_request is not None:
272
+ _body_params = height_request
273
+
161
274
 
162
275
  # set the HTTP header `Accept`
163
276
  _header_params['Accept'] = self.api_client.select_header_accept(
164
- ['application/json']) # noqa: E501
277
+ [
278
+ 'application/json'
279
+ ]
280
+ )
165
281
 
166
282
  # set the HTTP header `Content-Type`
167
- _content_types_list = _params.get('_content_type',
168
- self.api_client.select_header_content_type(
169
- ['application/json']))
170
- if _content_types_list:
171
- _header_params['Content-Type'] = _content_types_list
283
+ if _content_type:
284
+ _header_params['Content-Type'] = _content_type
285
+ else:
286
+ _default_content_type = (
287
+ self.api_client.select_header_content_type(
288
+ [
289
+ 'application/json'
290
+ ]
291
+ )
292
+ )
293
+ if _default_content_type is not None:
294
+ _header_params['Content-Type'] = _default_content_type
172
295
 
173
296
  # authentication setting
174
- _auth_settings = ['ApiKeyAuth'] # noqa: E501
175
-
176
- _response_types_map = {
177
- '200': "HeightResponse",
178
- }
297
+ _auth_settings: List[str] = [
298
+ 'ApiKeyAuth'
299
+ ]
179
300
 
180
- return self.api_client.call_api(
181
- '/elevation/v1', 'POST',
182
- _path_params,
183
- _query_params,
184
- _header_params,
301
+ return self.api_client.param_serialize(
302
+ method='POST',
303
+ resource_path='/elevation/v1',
304
+ path_params=_path_params,
305
+ query_params=_query_params,
306
+ header_params=_header_params,
185
307
  body=_body_params,
186
308
  post_params=_form_params,
187
309
  files=_files,
188
- response_types_map=_response_types_map,
189
310
  auth_settings=_auth_settings,
190
- async_req=_params.get('async_req'),
191
- _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
192
- _preload_content=_params.get('_preload_content', True),
193
- _request_timeout=_params.get('_request_timeout'),
194
311
  collection_formats=_collection_formats,
195
- _request_auth=_params.get('_request_auth'))
312
+ _host=_host,
313
+ _request_auth=_request_auth
314
+ )
196
315
 
197
- @validate_arguments
198
- def tz_lookup(self, lat : Annotated[Union[confloat(le=90, ge=-90, strict=True), conint(le=90.0, ge=-90.0, strict=True)], Field(..., description="The latitude of the point you are interested in.")], lng : Annotated[Union[confloat(le=180, ge=-180, strict=True), conint(le=180.0, ge=-180.0, strict=True)], Field(..., description="The longitude of the point you are interested in.")], timestamp : Annotated[Optional[conint(strict=True, le=8200290900000, ge=0)], Field(description="The UNIX timestamp at which the UTC and DST offsets will be calculated. This defaults to the present time. This endpoint is not necessarily guaranteed to be accurate for timestamps that occurred in the past. Time zone geographic boundaries change over time, so if the point you are querying for was previously in a different time zone, historical results will not be accurate. If, however, the point has been in the same geographic time zone for a very long time (ex: `America/New_York`), the historical data may be accurate for 100+ years in the past (depending on how far back the IANA TZDB rules have been specified).")] = None, **kwargs) -> TzResponse: # noqa: E501
199
- """Get the current time zone information for any point on earth. # noqa: E501
200
316
 
201
- The Stadia TZ API provides time zone information, as well as information about any special offset (such as DST) in effect based on the latest IANA TZDB. Note that this API may not be accurate for timestamps in the past and does not claim to report precise nautical times in the open ocean beyond territorial waters. # noqa: E501
202
- This method makes a synchronous HTTP request by default. To make an
203
- asynchronous HTTP request, please pass async_req=True
204
317
 
205
- >>> thread = api.tz_lookup(lat, lng, timestamp, async_req=True)
206
- >>> result = thread.get()
318
+
319
+ @validate_call
320
+ def tz_lookup(
321
+ self,
322
+ lat: Annotated[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]], Field(description="The latitude of the point you are interested in.")],
323
+ lng: Annotated[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]], Field(description="The longitude of the point you are interested in.")],
324
+ timestamp: Annotated[Optional[Annotated[int, Field(le=8200290900000, strict=True, ge=0)]], Field(description="The UNIX timestamp at which the UTC and DST offsets will be calculated. This defaults to the present time. This endpoint is not necessarily guaranteed to be accurate for timestamps that occurred in the past. Time zone geographic boundaries change over time, so if the point you are querying for was previously in a different time zone, historical results will not be accurate. If, however, the point has been in the same geographic time zone for a very long time (ex: `America/New_York`), the historical data may be accurate for 100+ years in the past (depending on how far back the IANA TZDB rules have been specified).")] = None,
325
+ _request_timeout: Union[
326
+ None,
327
+ Annotated[StrictFloat, Field(gt=0)],
328
+ Tuple[
329
+ Annotated[StrictFloat, Field(gt=0)],
330
+ Annotated[StrictFloat, Field(gt=0)]
331
+ ]
332
+ ] = None,
333
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
334
+ _content_type: Optional[StrictStr] = None,
335
+ _headers: Optional[Dict[StrictStr, Any]] = None,
336
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
337
+ ) -> TzResponse:
338
+ """Get the current time zone information for any point on earth.
339
+
340
+ The Stadia TZ API provides time zone information, as well as information about any special offset (such as DST) in effect based on the latest IANA TZDB. Note that this API may not be accurate for timestamps in the past and does not claim to report precise nautical times in the open ocean beyond territorial waters.
207
341
 
208
342
  :param lat: The latitude of the point you are interested in. (required)
209
343
  :type lat: float
@@ -211,32 +345,75 @@ class GeospatialApi(object):
211
345
  :type lng: float
212
346
  :param timestamp: The UNIX timestamp at which the UTC and DST offsets will be calculated. This defaults to the present time. This endpoint is not necessarily guaranteed to be accurate for timestamps that occurred in the past. Time zone geographic boundaries change over time, so if the point you are querying for was previously in a different time zone, historical results will not be accurate. If, however, the point has been in the same geographic time zone for a very long time (ex: `America/New_York`), the historical data may be accurate for 100+ years in the past (depending on how far back the IANA TZDB rules have been specified).
213
347
  :type timestamp: int
214
- :param async_req: Whether to execute the request asynchronously.
215
- :type async_req: bool, optional
216
348
  :param _request_timeout: timeout setting for this request. If one
217
349
  number provided, it will be total request
218
350
  timeout. It can also be a pair (tuple) of
219
351
  (connection, read) timeouts.
352
+ :type _request_timeout: int, tuple(int, int), optional
353
+ :param _request_auth: set to override the auth_settings for an a single
354
+ request; this effectively ignores the
355
+ authentication in the spec for a single request.
356
+ :type _request_auth: dict, optional
357
+ :param _content_type: force content-type for the request.
358
+ :type _content_type: str, Optional
359
+ :param _headers: set to override the headers for a single
360
+ request; this effectively ignores the headers
361
+ in the spec for a single request.
362
+ :type _headers: dict, optional
363
+ :param _host_index: set to override the host_index for a single
364
+ request; this effectively ignores the host_index
365
+ in the spec for a single request.
366
+ :type _host_index: int, optional
220
367
  :return: Returns the result object.
221
- If the method is called asynchronously,
222
- returns the request thread.
223
- :rtype: TzResponse
224
- """
225
- kwargs['_return_http_data_only'] = True
226
- if '_preload_content' in kwargs:
227
- raise ValueError("Error! Please call the tz_lookup_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
228
- return self.tz_lookup_with_http_info(lat, lng, timestamp, **kwargs) # noqa: E501
229
-
230
- @validate_arguments
231
- def tz_lookup_with_http_info(self, lat : Annotated[Union[confloat(le=90, ge=-90, strict=True), conint(le=90.0, ge=-90.0, strict=True)], Field(..., description="The latitude of the point you are interested in.")], lng : Annotated[Union[confloat(le=180, ge=-180, strict=True), conint(le=180.0, ge=-180.0, strict=True)], Field(..., description="The longitude of the point you are interested in.")], timestamp : Annotated[Optional[conint(strict=True, le=8200290900000, ge=0)], Field(description="The UNIX timestamp at which the UTC and DST offsets will be calculated. This defaults to the present time. This endpoint is not necessarily guaranteed to be accurate for timestamps that occurred in the past. Time zone geographic boundaries change over time, so if the point you are querying for was previously in a different time zone, historical results will not be accurate. If, however, the point has been in the same geographic time zone for a very long time (ex: `America/New_York`), the historical data may be accurate for 100+ years in the past (depending on how far back the IANA TZDB rules have been specified).")] = None, **kwargs) -> ApiResponse: # noqa: E501
232
- """Get the current time zone information for any point on earth. # noqa: E501
233
-
234
- The Stadia TZ API provides time zone information, as well as information about any special offset (such as DST) in effect based on the latest IANA TZDB. Note that this API may not be accurate for timestamps in the past and does not claim to report precise nautical times in the open ocean beyond territorial waters. # noqa: E501
235
- This method makes a synchronous HTTP request by default. To make an
236
- asynchronous HTTP request, please pass async_req=True
237
-
238
- >>> thread = api.tz_lookup_with_http_info(lat, lng, timestamp, async_req=True)
239
- >>> result = thread.get()
368
+ """ # noqa: E501
369
+
370
+ _param = self._tz_lookup_serialize(
371
+ lat=lat,
372
+ lng=lng,
373
+ timestamp=timestamp,
374
+ _request_auth=_request_auth,
375
+ _content_type=_content_type,
376
+ _headers=_headers,
377
+ _host_index=_host_index
378
+ )
379
+
380
+ _response_types_map: Dict[str, Optional[str]] = {
381
+ '200': "TzResponse",
382
+ '404': None,
383
+ }
384
+ response_data = self.api_client.call_api(
385
+ *_param,
386
+ _request_timeout=_request_timeout
387
+ )
388
+ response_data.read()
389
+ return self.api_client.response_deserialize(
390
+ response_data=response_data,
391
+ response_types_map=_response_types_map,
392
+ ).data
393
+
394
+
395
+ @validate_call
396
+ def tz_lookup_with_http_info(
397
+ self,
398
+ lat: Annotated[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]], Field(description="The latitude of the point you are interested in.")],
399
+ lng: Annotated[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]], Field(description="The longitude of the point you are interested in.")],
400
+ timestamp: Annotated[Optional[Annotated[int, Field(le=8200290900000, strict=True, ge=0)]], Field(description="The UNIX timestamp at which the UTC and DST offsets will be calculated. This defaults to the present time. This endpoint is not necessarily guaranteed to be accurate for timestamps that occurred in the past. Time zone geographic boundaries change over time, so if the point you are querying for was previously in a different time zone, historical results will not be accurate. If, however, the point has been in the same geographic time zone for a very long time (ex: `America/New_York`), the historical data may be accurate for 100+ years in the past (depending on how far back the IANA TZDB rules have been specified).")] = None,
401
+ _request_timeout: Union[
402
+ None,
403
+ Annotated[StrictFloat, Field(gt=0)],
404
+ Tuple[
405
+ Annotated[StrictFloat, Field(gt=0)],
406
+ Annotated[StrictFloat, Field(gt=0)]
407
+ ]
408
+ ] = None,
409
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
410
+ _content_type: Optional[StrictStr] = None,
411
+ _headers: Optional[Dict[StrictStr, Any]] = None,
412
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
413
+ ) -> ApiResponse[TzResponse]:
414
+ """Get the current time zone information for any point on earth.
415
+
416
+ The Stadia TZ API provides time zone information, as well as information about any special offset (such as DST) in effect based on the latest IANA TZDB. Note that this API may not be accurate for timestamps in the past and does not claim to report precise nautical times in the open ocean beyond territorial waters.
240
417
 
241
418
  :param lat: The latitude of the point you are interested in. (required)
242
419
  :type lat: float
@@ -244,108 +421,193 @@ class GeospatialApi(object):
244
421
  :type lng: float
245
422
  :param timestamp: The UNIX timestamp at which the UTC and DST offsets will be calculated. This defaults to the present time. This endpoint is not necessarily guaranteed to be accurate for timestamps that occurred in the past. Time zone geographic boundaries change over time, so if the point you are querying for was previously in a different time zone, historical results will not be accurate. If, however, the point has been in the same geographic time zone for a very long time (ex: `America/New_York`), the historical data may be accurate for 100+ years in the past (depending on how far back the IANA TZDB rules have been specified).
246
423
  :type timestamp: int
247
- :param async_req: Whether to execute the request asynchronously.
248
- :type async_req: bool, optional
249
- :param _preload_content: if False, the ApiResponse.data will
250
- be set to none and raw_data will store the
251
- HTTP response body without reading/decoding.
252
- Default is True.
253
- :type _preload_content: bool, optional
254
- :param _return_http_data_only: response data instead of ApiResponse
255
- object with status code, headers, etc
256
- :type _return_http_data_only: bool, optional
257
424
  :param _request_timeout: timeout setting for this request. If one
258
425
  number provided, it will be total request
259
426
  timeout. It can also be a pair (tuple) of
260
427
  (connection, read) timeouts.
428
+ :type _request_timeout: int, tuple(int, int), optional
261
429
  :param _request_auth: set to override the auth_settings for an a single
262
- request; this effectively ignores the authentication
263
- in the spec for a single request.
430
+ request; this effectively ignores the
431
+ authentication in the spec for a single request.
264
432
  :type _request_auth: dict, optional
265
- :type _content_type: string, optional: force content-type for the request
433
+ :param _content_type: force content-type for the request.
434
+ :type _content_type: str, Optional
435
+ :param _headers: set to override the headers for a single
436
+ request; this effectively ignores the headers
437
+ in the spec for a single request.
438
+ :type _headers: dict, optional
439
+ :param _host_index: set to override the host_index for a single
440
+ request; this effectively ignores the host_index
441
+ in the spec for a single request.
442
+ :type _host_index: int, optional
266
443
  :return: Returns the result object.
267
- If the method is called asynchronously,
268
- returns the request thread.
269
- :rtype: tuple(TzResponse, status_code(int), headers(HTTPHeaderDict))
270
- """
444
+ """ # noqa: E501
445
+
446
+ _param = self._tz_lookup_serialize(
447
+ lat=lat,
448
+ lng=lng,
449
+ timestamp=timestamp,
450
+ _request_auth=_request_auth,
451
+ _content_type=_content_type,
452
+ _headers=_headers,
453
+ _host_index=_host_index
454
+ )
271
455
 
272
- _params = locals()
456
+ _response_types_map: Dict[str, Optional[str]] = {
457
+ '200': "TzResponse",
458
+ '404': None,
459
+ }
460
+ response_data = self.api_client.call_api(
461
+ *_param,
462
+ _request_timeout=_request_timeout
463
+ )
464
+ response_data.read()
465
+ return self.api_client.response_deserialize(
466
+ response_data=response_data,
467
+ response_types_map=_response_types_map,
468
+ )
273
469
 
274
- _all_params = [
275
- 'lat',
276
- 'lng',
277
- 'timestamp'
278
- ]
279
- _all_params.extend(
280
- [
281
- 'async_req',
282
- '_return_http_data_only',
283
- '_preload_content',
284
- '_request_timeout',
285
- '_request_auth',
286
- '_content_type',
287
- '_headers'
470
+
471
+ @validate_call
472
+ def tz_lookup_without_preload_content(
473
+ self,
474
+ lat: Annotated[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]], Field(description="The latitude of the point you are interested in.")],
475
+ lng: Annotated[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]], Field(description="The longitude of the point you are interested in.")],
476
+ timestamp: Annotated[Optional[Annotated[int, Field(le=8200290900000, strict=True, ge=0)]], Field(description="The UNIX timestamp at which the UTC and DST offsets will be calculated. This defaults to the present time. This endpoint is not necessarily guaranteed to be accurate for timestamps that occurred in the past. Time zone geographic boundaries change over time, so if the point you are querying for was previously in a different time zone, historical results will not be accurate. If, however, the point has been in the same geographic time zone for a very long time (ex: `America/New_York`), the historical data may be accurate for 100+ years in the past (depending on how far back the IANA TZDB rules have been specified).")] = None,
477
+ _request_timeout: Union[
478
+ None,
479
+ Annotated[StrictFloat, Field(gt=0)],
480
+ Tuple[
481
+ Annotated[StrictFloat, Field(gt=0)],
482
+ Annotated[StrictFloat, Field(gt=0)]
288
483
  ]
484
+ ] = None,
485
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
486
+ _content_type: Optional[StrictStr] = None,
487
+ _headers: Optional[Dict[StrictStr, Any]] = None,
488
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
489
+ ) -> RESTResponseType:
490
+ """Get the current time zone information for any point on earth.
491
+
492
+ The Stadia TZ API provides time zone information, as well as information about any special offset (such as DST) in effect based on the latest IANA TZDB. Note that this API may not be accurate for timestamps in the past and does not claim to report precise nautical times in the open ocean beyond territorial waters.
493
+
494
+ :param lat: The latitude of the point you are interested in. (required)
495
+ :type lat: float
496
+ :param lng: The longitude of the point you are interested in. (required)
497
+ :type lng: float
498
+ :param timestamp: The UNIX timestamp at which the UTC and DST offsets will be calculated. This defaults to the present time. This endpoint is not necessarily guaranteed to be accurate for timestamps that occurred in the past. Time zone geographic boundaries change over time, so if the point you are querying for was previously in a different time zone, historical results will not be accurate. If, however, the point has been in the same geographic time zone for a very long time (ex: `America/New_York`), the historical data may be accurate for 100+ years in the past (depending on how far back the IANA TZDB rules have been specified).
499
+ :type timestamp: int
500
+ :param _request_timeout: timeout setting for this request. If one
501
+ number provided, it will be total request
502
+ timeout. It can also be a pair (tuple) of
503
+ (connection, read) timeouts.
504
+ :type _request_timeout: int, tuple(int, int), optional
505
+ :param _request_auth: set to override the auth_settings for an a single
506
+ request; this effectively ignores the
507
+ authentication in the spec for a single request.
508
+ :type _request_auth: dict, optional
509
+ :param _content_type: force content-type for the request.
510
+ :type _content_type: str, Optional
511
+ :param _headers: set to override the headers for a single
512
+ request; this effectively ignores the headers
513
+ in the spec for a single request.
514
+ :type _headers: dict, optional
515
+ :param _host_index: set to override the host_index for a single
516
+ request; this effectively ignores the host_index
517
+ in the spec for a single request.
518
+ :type _host_index: int, optional
519
+ :return: Returns the result object.
520
+ """ # noqa: E501
521
+
522
+ _param = self._tz_lookup_serialize(
523
+ lat=lat,
524
+ lng=lng,
525
+ timestamp=timestamp,
526
+ _request_auth=_request_auth,
527
+ _content_type=_content_type,
528
+ _headers=_headers,
529
+ _host_index=_host_index
289
530
  )
290
531
 
291
- # validate the arguments
292
- for _key, _val in _params['kwargs'].items():
293
- if _key not in _all_params:
294
- raise ApiTypeError(
295
- "Got an unexpected keyword argument '%s'"
296
- " to method tz_lookup" % _key
297
- )
298
- _params[_key] = _val
299
- del _params['kwargs']
532
+ _response_types_map: Dict[str, Optional[str]] = {
533
+ '200': "TzResponse",
534
+ '404': None,
535
+ }
536
+ response_data = self.api_client.call_api(
537
+ *_param,
538
+ _request_timeout=_request_timeout
539
+ )
540
+ return response_data.response
300
541
 
301
- _collection_formats = {}
302
542
 
303
- # process the path parameters
304
- _path_params = {}
543
+ def _tz_lookup_serialize(
544
+ self,
545
+ lat,
546
+ lng,
547
+ timestamp,
548
+ _request_auth,
549
+ _content_type,
550
+ _headers,
551
+ _host_index,
552
+ ) -> RequestSerialized:
305
553
 
306
- # process the query parameters
307
- _query_params = []
308
- if _params.get('lat') is not None: # noqa: E501
309
- _query_params.append(('lat', _params['lat']))
554
+ _host = None
310
555
 
311
- if _params.get('lng') is not None: # noqa: E501
312
- _query_params.append(('lng', _params['lng']))
556
+ _collection_formats: Dict[str, str] = {
557
+ }
313
558
 
314
- if _params.get('timestamp') is not None: # noqa: E501
315
- _query_params.append(('timestamp', _params['timestamp']))
559
+ _path_params: Dict[str, str] = {}
560
+ _query_params: List[Tuple[str, str]] = []
561
+ _header_params: Dict[str, Optional[str]] = _headers or {}
562
+ _form_params: List[Tuple[str, str]] = []
563
+ _files: Dict[str, str] = {}
564
+ _body_params: Optional[bytes] = None
316
565
 
566
+ # process the path parameters
567
+ # process the query parameters
568
+ if lat is not None:
569
+
570
+ _query_params.append(('lat', lat))
571
+
572
+ if lng is not None:
573
+
574
+ _query_params.append(('lng', lng))
575
+
576
+ if timestamp is not None:
577
+
578
+ _query_params.append(('timestamp', timestamp))
579
+
317
580
  # process the header parameters
318
- _header_params = dict(_params.get('_headers', {}))
319
581
  # process the form parameters
320
- _form_params = []
321
- _files = {}
322
582
  # process the body parameter
323
- _body_params = None
583
+
584
+
324
585
  # set the HTTP header `Accept`
325
586
  _header_params['Accept'] = self.api_client.select_header_accept(
326
- ['application/json']) # noqa: E501
587
+ [
588
+ 'application/json'
589
+ ]
590
+ )
327
591
 
328
- # authentication setting
329
- _auth_settings = ['ApiKeyAuth'] # noqa: E501
330
592
 
331
- _response_types_map = {
332
- '200': "TzResponse",
333
- '404': None,
334
- }
593
+ # authentication setting
594
+ _auth_settings: List[str] = [
595
+ 'ApiKeyAuth'
596
+ ]
335
597
 
336
- return self.api_client.call_api(
337
- '/tz/lookup/v1', 'GET',
338
- _path_params,
339
- _query_params,
340
- _header_params,
598
+ return self.api_client.param_serialize(
599
+ method='GET',
600
+ resource_path='/tz/lookup/v1',
601
+ path_params=_path_params,
602
+ query_params=_query_params,
603
+ header_params=_header_params,
341
604
  body=_body_params,
342
605
  post_params=_form_params,
343
606
  files=_files,
344
- response_types_map=_response_types_map,
345
607
  auth_settings=_auth_settings,
346
- async_req=_params.get('async_req'),
347
- _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
348
- _preload_content=_params.get('_preload_content', True),
349
- _request_timeout=_params.get('_request_timeout'),
350
608
  collection_formats=_collection_formats,
351
- _request_auth=_params.get('_request_auth'))
609
+ _host=_host,
610
+ _request_auth=_request_auth
611
+ )
612
+
613
+