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.
- stadiamaps/__init__.py +6 -24
- stadiamaps/api/geocoding_api.py +1917 -760
- stadiamaps/api/geospatial_api.py +483 -221
- stadiamaps/api/routing_api.py +1615 -723
- stadiamaps/api_client.py +275 -272
- stadiamaps/api_response.py +12 -16
- stadiamaps/configuration.py +13 -11
- stadiamaps/exceptions.py +67 -30
- stadiamaps/models/__init__.py +5 -23
- stadiamaps/models/access.py +44 -26
- stadiamaps/models/admin_region.py +46 -28
- stadiamaps/models/administrative.py +48 -30
- stadiamaps/models/auto_costing_options.py +69 -48
- stadiamaps/models/auto_costing_options_all_of.py +1 -1
- stadiamaps/models/base_costing_options.py +52 -33
- stadiamaps/models/base_trace_request.py +70 -40
- stadiamaps/models/bicycle_costing_options.py +61 -42
- stadiamaps/models/bicycle_costing_options_all_of.py +1 -1
- stadiamaps/models/bike_network.py +42 -24
- stadiamaps/models/contour.py +45 -27
- stadiamaps/models/coordinate.py +45 -26
- stadiamaps/models/costing_model.py +10 -12
- stadiamaps/models/costing_options.py +51 -33
- stadiamaps/models/directions_options.py +45 -27
- stadiamaps/models/distance_unit.py +8 -11
- stadiamaps/models/edge_sign.py +46 -28
- stadiamaps/models/edge_use.py +8 -11
- stadiamaps/models/end_node.py +48 -30
- stadiamaps/models/geo_attributes.py +47 -29
- stadiamaps/models/geo_json_geometry.py +25 -25
- stadiamaps/models/geo_json_geometry_base.py +45 -27
- stadiamaps/models/geo_json_line_string.py +47 -28
- stadiamaps/models/geo_json_line_string_all_of.py +2 -2
- stadiamaps/models/geo_json_point.py +47 -28
- stadiamaps/models/geo_json_point_all_of.py +2 -2
- stadiamaps/models/geo_json_polygon.py +47 -28
- stadiamaps/models/geo_json_polygon_all_of.py +2 -2
- stadiamaps/models/geocoding_object.py +46 -28
- stadiamaps/models/height_request.py +55 -34
- stadiamaps/models/height_response.py +49 -30
- stadiamaps/models/highway_classification.py +52 -34
- stadiamaps/models/intersecting_edge.py +45 -27
- stadiamaps/models/isochrone_costing_model.py +8 -11
- stadiamaps/models/isochrone_feature.py +45 -27
- stadiamaps/models/isochrone_properties.py +48 -30
- stadiamaps/models/isochrone_request.py +54 -35
- stadiamaps/models/isochrone_response.py +47 -29
- stadiamaps/models/locate_detailed_edge.py +73 -55
- stadiamaps/models/locate_edge.py +56 -39
- stadiamaps/models/locate_edge_info.py +47 -29
- stadiamaps/models/locate_node.py +50 -31
- stadiamaps/models/locate_node_all_of.py +1 -1
- stadiamaps/models/locate_object.py +49 -31
- stadiamaps/models/maneuver_sign.py +50 -32
- stadiamaps/models/maneuver_sign_element.py +45 -27
- stadiamaps/models/map_match_costing_model.py +8 -11
- stadiamaps/models/map_match_request.py +74 -44
- stadiamaps/models/map_match_request_all_of.py +1 -1
- stadiamaps/models/map_match_route_response.py +57 -29
- stadiamaps/models/map_match_route_response_all_of.py +1 -1
- stadiamaps/models/map_match_trace_options.py +47 -29
- stadiamaps/models/map_match_waypoint.py +49 -30
- stadiamaps/models/map_match_waypoint_all_of.py +1 -1
- stadiamaps/models/matched_point.py +52 -34
- stadiamaps/models/matrix_costing_model.py +9 -12
- stadiamaps/models/matrix_distance.py +46 -28
- stadiamaps/models/matrix_request.py +70 -39
- stadiamaps/models/matrix_response.py +60 -36
- stadiamaps/models/motor_scooter_costing_options.py +70 -49
- stadiamaps/models/motor_scooter_costing_options_all_of.py +1 -1
- stadiamaps/models/motorcycle_costing_options.py +69 -48
- stadiamaps/models/motorcycle_costing_options_all_of.py +1 -1
- stadiamaps/models/nearest_roads_request.py +65 -34
- stadiamaps/models/node_id.py +42 -24
- stadiamaps/models/node_type.py +8 -11
- stadiamaps/models/optimized_route_request.py +66 -35
- stadiamaps/models/pedestrian_costing_options.py +59 -40
- stadiamaps/models/pelias_geo_json_feature.py +50 -31
- stadiamaps/models/pelias_geo_json_properties.py +54 -36
- stadiamaps/models/pelias_geo_json_properties_addendum.py +43 -25
- stadiamaps/models/pelias_geo_json_properties_addendum_osm.py +42 -24
- stadiamaps/models/pelias_layer.py +8 -11
- stadiamaps/models/pelias_response.py +49 -30
- stadiamaps/models/pelias_response_geocoding.py +1 -1
- stadiamaps/models/pelias_source.py +8 -11
- stadiamaps/models/restrictions.py +44 -26
- stadiamaps/models/road_class.py +8 -11
- stadiamaps/models/route_leg.py +48 -29
- stadiamaps/models/route_maneuver.py +73 -55
- stadiamaps/models/route_request.py +76 -43
- stadiamaps/models/route_response.py +56 -28
- stadiamaps/models/route_response_alternates_inner.py +105 -0
- stadiamaps/models/route_response_trip.py +1 -1
- stadiamaps/models/route_summary.py +48 -30
- stadiamaps/models/route_trip.py +135 -0
- stadiamaps/models/routing_response_waypoint.py +49 -30
- stadiamaps/models/routing_response_waypoint_all_of.py +1 -1
- stadiamaps/models/routing_waypoint.py +60 -41
- stadiamaps/models/routing_waypoint_all_of.py +1 -1
- stadiamaps/models/routing_waypoint_all_of_search_filter.py +48 -30
- stadiamaps/models/simple_routing_waypoint.py +48 -29
- stadiamaps/models/simple_routing_waypoint_all_of.py +1 -1
- stadiamaps/models/speeds.py +49 -31
- stadiamaps/models/trace_attribute_filter_options.py +47 -28
- stadiamaps/models/trace_attribute_key.py +8 -11
- stadiamaps/models/trace_attributes_base_response.py +51 -32
- stadiamaps/models/trace_attributes_request.py +72 -42
- stadiamaps/models/trace_attributes_request_all_of.py +1 -1
- stadiamaps/models/trace_attributes_request_all_of_filters.py +2 -2
- stadiamaps/models/trace_attributes_response.py +54 -35
- stadiamaps/models/trace_attributes_response_all_of.py +1 -1
- stadiamaps/models/trace_edge.py +88 -70
- stadiamaps/models/travel_mode.py +8 -11
- stadiamaps/models/traversability.py +8 -11
- stadiamaps/models/truck_costing_options.py +72 -51
- stadiamaps/models/truck_costing_options_all_of.py +1 -1
- stadiamaps/models/tz_response.py +45 -27
- stadiamaps/models/valhalla_languages.py +8 -11
- stadiamaps/models/valhalla_long_units.py +8 -11
- stadiamaps/models/warning.py +42 -24
- stadiamaps/py.typed +0 -0
- stadiamaps/rest.py +127 -172
- {stadiamaps-1.0.6.dist-info → stadiamaps-2.0.0.dist-info}/METADATA +4 -4
- stadiamaps-2.0.0.dist-info/RECORD +128 -0
- {stadiamaps-1.0.6.dist-info → stadiamaps-2.0.0.dist-info}/WHEEL +1 -1
- stadiamaps-1.0.6.dist-info/RECORD +0 -125
- {stadiamaps-1.0.6.dist-info → stadiamaps-2.0.0.dist-info}/LICENSE.txt +0 -0
- {stadiamaps-1.0.6.dist-info → stadiamaps-2.0.0.dist-info}/top_level.txt +0 -0
stadiamaps/api/routing_api.py
CHANGED
@@ -3,25 +3,21 @@
|
|
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.
|
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
|
+
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
|
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 typing import
|
24
|
-
|
20
|
+
from typing import Optional
|
25
21
|
from stadiamaps.models.isochrone_request import IsochroneRequest
|
26
22
|
from stadiamaps.models.isochrone_response import IsochroneResponse
|
27
23
|
from stadiamaps.models.locate_object import LocateObject
|
@@ -36,1050 +32,1946 @@ from stadiamaps.models.route_response import RouteResponse
|
|
36
32
|
from stadiamaps.models.trace_attributes_request import TraceAttributesRequest
|
37
33
|
from stadiamaps.models.trace_attributes_response import TraceAttributesResponse
|
38
34
|
|
39
|
-
from stadiamaps.api_client import ApiClient
|
35
|
+
from stadiamaps.api_client import ApiClient, RequestSerialized
|
40
36
|
from stadiamaps.api_response import ApiResponse
|
41
|
-
from stadiamaps.
|
42
|
-
ApiTypeError,
|
43
|
-
ApiValueError
|
44
|
-
)
|
37
|
+
from stadiamaps.rest import RESTResponseType
|
45
38
|
|
46
39
|
|
47
|
-
class RoutingApi
|
40
|
+
class RoutingApi:
|
48
41
|
"""NOTE: This class is auto generated by OpenAPI Generator
|
49
42
|
Ref: https://openapi-generator.tech
|
50
43
|
|
51
44
|
Do not edit the class manually.
|
52
45
|
"""
|
53
46
|
|
54
|
-
def __init__(self, api_client=None):
|
47
|
+
def __init__(self, api_client=None) -> None:
|
55
48
|
if api_client is None:
|
56
49
|
api_client = ApiClient.get_default()
|
57
50
|
self.api_client = api_client
|
58
51
|
|
59
|
-
@validate_arguments
|
60
|
-
def isochrone(self, isochrone_request : Optional[IsochroneRequest] = None, **kwargs) -> IsochroneResponse: # noqa: E501
|
61
|
-
"""Calculate areas of equal travel time from a location. # noqa: E501
|
62
52
|
|
63
|
-
|
64
|
-
|
65
|
-
|
53
|
+
@validate_call
|
54
|
+
def isochrone(
|
55
|
+
self,
|
56
|
+
isochrone_request: Optional[IsochroneRequest] = None,
|
57
|
+
_request_timeout: Union[
|
58
|
+
None,
|
59
|
+
Annotated[StrictFloat, Field(gt=0)],
|
60
|
+
Tuple[
|
61
|
+
Annotated[StrictFloat, Field(gt=0)],
|
62
|
+
Annotated[StrictFloat, Field(gt=0)]
|
63
|
+
]
|
64
|
+
] = None,
|
65
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
66
|
+
_content_type: Optional[StrictStr] = None,
|
67
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
68
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
69
|
+
) -> IsochroneResponse:
|
70
|
+
"""Calculate areas of equal travel time from a location.
|
66
71
|
|
67
|
-
|
68
|
-
>>> result = thread.get()
|
72
|
+
The isochrone API lets you compute or visualize areas of roughly equal travel time based on the routing graph. The resulting polygon can be rendered on a map and shaded much like elevation contours and used for exploring urban mobility.
|
69
73
|
|
70
74
|
:param isochrone_request:
|
71
75
|
:type isochrone_request: IsochroneRequest
|
72
|
-
:param async_req: Whether to execute the request asynchronously.
|
73
|
-
:type async_req: bool, optional
|
74
76
|
:param _request_timeout: timeout setting for this request. If one
|
75
77
|
number provided, it will be total request
|
76
78
|
timeout. It can also be a pair (tuple) of
|
77
79
|
(connection, read) timeouts.
|
80
|
+
:type _request_timeout: int, tuple(int, int), optional
|
81
|
+
:param _request_auth: set to override the auth_settings for an a single
|
82
|
+
request; this effectively ignores the
|
83
|
+
authentication in the spec for a single request.
|
84
|
+
:type _request_auth: dict, optional
|
85
|
+
:param _content_type: force content-type for the request.
|
86
|
+
:type _content_type: str, Optional
|
87
|
+
:param _headers: set to override the headers for a single
|
88
|
+
request; this effectively ignores the headers
|
89
|
+
in the spec for a single request.
|
90
|
+
:type _headers: dict, optional
|
91
|
+
:param _host_index: set to override the host_index for a single
|
92
|
+
request; this effectively ignores the host_index
|
93
|
+
in the spec for a single request.
|
94
|
+
:type _host_index: int, optional
|
78
95
|
:return: Returns the result object.
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
96
|
+
""" # noqa: E501
|
97
|
+
|
98
|
+
_param = self._isochrone_serialize(
|
99
|
+
isochrone_request=isochrone_request,
|
100
|
+
_request_auth=_request_auth,
|
101
|
+
_content_type=_content_type,
|
102
|
+
_headers=_headers,
|
103
|
+
_host_index=_host_index
|
104
|
+
)
|
105
|
+
|
106
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
107
|
+
'200': "IsochroneResponse",
|
108
|
+
'400': None,
|
109
|
+
}
|
110
|
+
response_data = self.api_client.call_api(
|
111
|
+
*_param,
|
112
|
+
_request_timeout=_request_timeout
|
113
|
+
)
|
114
|
+
response_data.read()
|
115
|
+
return self.api_client.response_deserialize(
|
116
|
+
response_data=response_data,
|
117
|
+
response_types_map=_response_types_map,
|
118
|
+
).data
|
119
|
+
|
120
|
+
|
121
|
+
@validate_call
|
122
|
+
def isochrone_with_http_info(
|
123
|
+
self,
|
124
|
+
isochrone_request: Optional[IsochroneRequest] = None,
|
125
|
+
_request_timeout: Union[
|
126
|
+
None,
|
127
|
+
Annotated[StrictFloat, Field(gt=0)],
|
128
|
+
Tuple[
|
129
|
+
Annotated[StrictFloat, Field(gt=0)],
|
130
|
+
Annotated[StrictFloat, Field(gt=0)]
|
131
|
+
]
|
132
|
+
] = None,
|
133
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
134
|
+
_content_type: Optional[StrictStr] = None,
|
135
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
136
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
137
|
+
) -> ApiResponse[IsochroneResponse]:
|
138
|
+
"""Calculate areas of equal travel time from a location.
|
139
|
+
|
140
|
+
The isochrone API lets you compute or visualize areas of roughly equal travel time based on the routing graph. The resulting polygon can be rendered on a map and shaded much like elevation contours and used for exploring urban mobility.
|
98
141
|
|
99
142
|
:param isochrone_request:
|
100
143
|
:type isochrone_request: IsochroneRequest
|
101
|
-
:param async_req: Whether to execute the request asynchronously.
|
102
|
-
:type async_req: bool, optional
|
103
|
-
:param _preload_content: if False, the ApiResponse.data will
|
104
|
-
be set to none and raw_data will store the
|
105
|
-
HTTP response body without reading/decoding.
|
106
|
-
Default is True.
|
107
|
-
:type _preload_content: bool, optional
|
108
|
-
:param _return_http_data_only: response data instead of ApiResponse
|
109
|
-
object with status code, headers, etc
|
110
|
-
:type _return_http_data_only: bool, optional
|
111
144
|
:param _request_timeout: timeout setting for this request. If one
|
112
145
|
number provided, it will be total request
|
113
146
|
timeout. It can also be a pair (tuple) of
|
114
147
|
(connection, read) timeouts.
|
148
|
+
:type _request_timeout: int, tuple(int, int), optional
|
115
149
|
:param _request_auth: set to override the auth_settings for an a single
|
116
|
-
request; this effectively ignores the
|
117
|
-
in the spec for a single request.
|
150
|
+
request; this effectively ignores the
|
151
|
+
authentication in the spec for a single request.
|
118
152
|
:type _request_auth: dict, optional
|
119
|
-
:
|
153
|
+
:param _content_type: force content-type for the request.
|
154
|
+
:type _content_type: str, Optional
|
155
|
+
:param _headers: set to override the headers for a single
|
156
|
+
request; this effectively ignores the headers
|
157
|
+
in the spec for a single request.
|
158
|
+
:type _headers: dict, optional
|
159
|
+
:param _host_index: set to override the host_index for a single
|
160
|
+
request; this effectively ignores the host_index
|
161
|
+
in the spec for a single request.
|
162
|
+
:type _host_index: int, optional
|
120
163
|
:return: Returns the result object.
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
164
|
+
""" # noqa: E501
|
165
|
+
|
166
|
+
_param = self._isochrone_serialize(
|
167
|
+
isochrone_request=isochrone_request,
|
168
|
+
_request_auth=_request_auth,
|
169
|
+
_content_type=_content_type,
|
170
|
+
_headers=_headers,
|
171
|
+
_host_index=_host_index
|
172
|
+
)
|
125
173
|
|
126
|
-
|
174
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
175
|
+
'200': "IsochroneResponse",
|
176
|
+
'400': None,
|
177
|
+
}
|
178
|
+
response_data = self.api_client.call_api(
|
179
|
+
*_param,
|
180
|
+
_request_timeout=_request_timeout
|
181
|
+
)
|
182
|
+
response_data.read()
|
183
|
+
return self.api_client.response_deserialize(
|
184
|
+
response_data=response_data,
|
185
|
+
response_types_map=_response_types_map,
|
186
|
+
)
|
127
187
|
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
'_headers'
|
188
|
+
|
189
|
+
@validate_call
|
190
|
+
def isochrone_without_preload_content(
|
191
|
+
self,
|
192
|
+
isochrone_request: Optional[IsochroneRequest] = None,
|
193
|
+
_request_timeout: Union[
|
194
|
+
None,
|
195
|
+
Annotated[StrictFloat, Field(gt=0)],
|
196
|
+
Tuple[
|
197
|
+
Annotated[StrictFloat, Field(gt=0)],
|
198
|
+
Annotated[StrictFloat, Field(gt=0)]
|
140
199
|
]
|
200
|
+
] = None,
|
201
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
202
|
+
_content_type: Optional[StrictStr] = None,
|
203
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
204
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
205
|
+
) -> RESTResponseType:
|
206
|
+
"""Calculate areas of equal travel time from a location.
|
207
|
+
|
208
|
+
The isochrone API lets you compute or visualize areas of roughly equal travel time based on the routing graph. The resulting polygon can be rendered on a map and shaded much like elevation contours and used for exploring urban mobility.
|
209
|
+
|
210
|
+
:param isochrone_request:
|
211
|
+
:type isochrone_request: IsochroneRequest
|
212
|
+
:param _request_timeout: timeout setting for this request. If one
|
213
|
+
number provided, it will be total request
|
214
|
+
timeout. It can also be a pair (tuple) of
|
215
|
+
(connection, read) timeouts.
|
216
|
+
:type _request_timeout: int, tuple(int, int), optional
|
217
|
+
:param _request_auth: set to override the auth_settings for an a single
|
218
|
+
request; this effectively ignores the
|
219
|
+
authentication in the spec for a single request.
|
220
|
+
:type _request_auth: dict, optional
|
221
|
+
:param _content_type: force content-type for the request.
|
222
|
+
:type _content_type: str, Optional
|
223
|
+
:param _headers: set to override the headers for a single
|
224
|
+
request; this effectively ignores the headers
|
225
|
+
in the spec for a single request.
|
226
|
+
:type _headers: dict, optional
|
227
|
+
:param _host_index: set to override the host_index for a single
|
228
|
+
request; this effectively ignores the host_index
|
229
|
+
in the spec for a single request.
|
230
|
+
:type _host_index: int, optional
|
231
|
+
:return: Returns the result object.
|
232
|
+
""" # noqa: E501
|
233
|
+
|
234
|
+
_param = self._isochrone_serialize(
|
235
|
+
isochrone_request=isochrone_request,
|
236
|
+
_request_auth=_request_auth,
|
237
|
+
_content_type=_content_type,
|
238
|
+
_headers=_headers,
|
239
|
+
_host_index=_host_index
|
141
240
|
)
|
142
241
|
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
242
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
243
|
+
'200': "IsochroneResponse",
|
244
|
+
'400': None,
|
245
|
+
}
|
246
|
+
response_data = self.api_client.call_api(
|
247
|
+
*_param,
|
248
|
+
_request_timeout=_request_timeout
|
249
|
+
)
|
250
|
+
return response_data.response
|
152
251
|
|
153
|
-
_collection_formats = {}
|
154
252
|
|
155
|
-
|
156
|
-
|
253
|
+
def _isochrone_serialize(
|
254
|
+
self,
|
255
|
+
isochrone_request,
|
256
|
+
_request_auth,
|
257
|
+
_content_type,
|
258
|
+
_headers,
|
259
|
+
_host_index,
|
260
|
+
) -> RequestSerialized:
|
261
|
+
|
262
|
+
_host = None
|
263
|
+
|
264
|
+
_collection_formats: Dict[str, str] = {
|
265
|
+
}
|
266
|
+
|
267
|
+
_path_params: Dict[str, str] = {}
|
268
|
+
_query_params: List[Tuple[str, str]] = []
|
269
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
270
|
+
_form_params: List[Tuple[str, str]] = []
|
271
|
+
_files: Dict[str, str] = {}
|
272
|
+
_body_params: Optional[bytes] = None
|
157
273
|
|
274
|
+
# process the path parameters
|
158
275
|
# process the query parameters
|
159
|
-
_query_params = []
|
160
276
|
# process the header parameters
|
161
|
-
_header_params = dict(_params.get('_headers', {}))
|
162
277
|
# process the form parameters
|
163
|
-
_form_params = []
|
164
|
-
_files = {}
|
165
278
|
# process the body parameter
|
166
|
-
|
167
|
-
|
168
|
-
|
279
|
+
if isochrone_request is not None:
|
280
|
+
_body_params = isochrone_request
|
281
|
+
|
169
282
|
|
170
283
|
# set the HTTP header `Accept`
|
171
284
|
_header_params['Accept'] = self.api_client.select_header_accept(
|
172
|
-
[
|
285
|
+
[
|
286
|
+
'application/json'
|
287
|
+
]
|
288
|
+
)
|
173
289
|
|
174
290
|
# set the HTTP header `Content-Type`
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
291
|
+
if _content_type:
|
292
|
+
_header_params['Content-Type'] = _content_type
|
293
|
+
else:
|
294
|
+
_default_content_type = (
|
295
|
+
self.api_client.select_header_content_type(
|
296
|
+
[
|
297
|
+
'application/json'
|
298
|
+
]
|
299
|
+
)
|
300
|
+
)
|
301
|
+
if _default_content_type is not None:
|
302
|
+
_header_params['Content-Type'] = _default_content_type
|
180
303
|
|
181
304
|
# authentication setting
|
182
|
-
_auth_settings
|
183
|
-
|
184
|
-
|
185
|
-
'200': "IsochroneResponse",
|
186
|
-
}
|
305
|
+
_auth_settings: List[str] = [
|
306
|
+
'ApiKeyAuth'
|
307
|
+
]
|
187
308
|
|
188
|
-
return self.api_client.
|
189
|
-
'
|
190
|
-
|
191
|
-
|
192
|
-
|
309
|
+
return self.api_client.param_serialize(
|
310
|
+
method='POST',
|
311
|
+
resource_path='/isochrone/v1',
|
312
|
+
path_params=_path_params,
|
313
|
+
query_params=_query_params,
|
314
|
+
header_params=_header_params,
|
193
315
|
body=_body_params,
|
194
316
|
post_params=_form_params,
|
195
317
|
files=_files,
|
196
|
-
response_types_map=_response_types_map,
|
197
318
|
auth_settings=_auth_settings,
|
198
|
-
async_req=_params.get('async_req'),
|
199
|
-
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
200
|
-
_preload_content=_params.get('_preload_content', True),
|
201
|
-
_request_timeout=_params.get('_request_timeout'),
|
202
319
|
collection_formats=_collection_formats,
|
203
|
-
|
320
|
+
_host=_host,
|
321
|
+
_request_auth=_request_auth
|
322
|
+
)
|
204
323
|
|
205
|
-
@validate_arguments
|
206
|
-
def map_match(self, map_match_request : Optional[MapMatchRequest] = None, **kwargs) -> MapMatchRouteResponse: # noqa: E501
|
207
|
-
"""Match a recorded route to the road network. # noqa: E501
|
208
324
|
|
209
|
-
The map matching API transforms a recorded route into navigation instructions like you would get from the `route` endpoint. The input can be in the form of either an encoded polyline, or (optionally) timestamped coordinates. # noqa: E501
|
210
|
-
This method makes a synchronous HTTP request by default. To make an
|
211
|
-
asynchronous HTTP request, please pass async_req=True
|
212
325
|
|
213
|
-
|
214
|
-
|
326
|
+
|
327
|
+
@validate_call
|
328
|
+
def map_match(
|
329
|
+
self,
|
330
|
+
map_match_request: Optional[MapMatchRequest] = None,
|
331
|
+
_request_timeout: Union[
|
332
|
+
None,
|
333
|
+
Annotated[StrictFloat, Field(gt=0)],
|
334
|
+
Tuple[
|
335
|
+
Annotated[StrictFloat, Field(gt=0)],
|
336
|
+
Annotated[StrictFloat, Field(gt=0)]
|
337
|
+
]
|
338
|
+
] = None,
|
339
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
340
|
+
_content_type: Optional[StrictStr] = None,
|
341
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
342
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
343
|
+
) -> MapMatchRouteResponse:
|
344
|
+
"""Match a recorded route to the road network.
|
345
|
+
|
346
|
+
The map matching API transforms a recorded route into navigation instructions like you would get from the `route` endpoint. The input can be in the form of either an encoded polyline, or (optionally) timestamped coordinates.
|
215
347
|
|
216
348
|
:param map_match_request:
|
217
349
|
:type map_match_request: MapMatchRequest
|
218
|
-
:param async_req: Whether to execute the request asynchronously.
|
219
|
-
:type async_req: bool, optional
|
220
350
|
:param _request_timeout: timeout setting for this request. If one
|
221
351
|
number provided, it will be total request
|
222
352
|
timeout. It can also be a pair (tuple) of
|
223
353
|
(connection, read) timeouts.
|
354
|
+
:type _request_timeout: int, tuple(int, int), optional
|
355
|
+
:param _request_auth: set to override the auth_settings for an a single
|
356
|
+
request; this effectively ignores the
|
357
|
+
authentication in the spec for a single request.
|
358
|
+
:type _request_auth: dict, optional
|
359
|
+
:param _content_type: force content-type for the request.
|
360
|
+
:type _content_type: str, Optional
|
361
|
+
:param _headers: set to override the headers for a single
|
362
|
+
request; this effectively ignores the headers
|
363
|
+
in the spec for a single request.
|
364
|
+
:type _headers: dict, optional
|
365
|
+
:param _host_index: set to override the host_index for a single
|
366
|
+
request; this effectively ignores the host_index
|
367
|
+
in the spec for a single request.
|
368
|
+
:type _host_index: int, optional
|
224
369
|
:return: Returns the result object.
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
370
|
+
""" # noqa: E501
|
371
|
+
|
372
|
+
_param = self._map_match_serialize(
|
373
|
+
map_match_request=map_match_request,
|
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': "MapMatchRouteResponse",
|
382
|
+
'400': None,
|
383
|
+
'500': None,
|
384
|
+
}
|
385
|
+
response_data = self.api_client.call_api(
|
386
|
+
*_param,
|
387
|
+
_request_timeout=_request_timeout
|
388
|
+
)
|
389
|
+
response_data.read()
|
390
|
+
return self.api_client.response_deserialize(
|
391
|
+
response_data=response_data,
|
392
|
+
response_types_map=_response_types_map,
|
393
|
+
).data
|
394
|
+
|
395
|
+
|
396
|
+
@validate_call
|
397
|
+
def map_match_with_http_info(
|
398
|
+
self,
|
399
|
+
map_match_request: Optional[MapMatchRequest] = None,
|
400
|
+
_request_timeout: Union[
|
401
|
+
None,
|
402
|
+
Annotated[StrictFloat, Field(gt=0)],
|
403
|
+
Tuple[
|
404
|
+
Annotated[StrictFloat, Field(gt=0)],
|
405
|
+
Annotated[StrictFloat, Field(gt=0)]
|
406
|
+
]
|
407
|
+
] = None,
|
408
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
409
|
+
_content_type: Optional[StrictStr] = None,
|
410
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
411
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
412
|
+
) -> ApiResponse[MapMatchRouteResponse]:
|
413
|
+
"""Match a recorded route to the road network.
|
414
|
+
|
415
|
+
The map matching API transforms a recorded route into navigation instructions like you would get from the `route` endpoint. The input can be in the form of either an encoded polyline, or (optionally) timestamped coordinates.
|
244
416
|
|
245
417
|
:param map_match_request:
|
246
418
|
:type map_match_request: MapMatchRequest
|
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
419
|
:param _request_timeout: timeout setting for this request. If one
|
258
420
|
number provided, it will be total request
|
259
421
|
timeout. It can also be a pair (tuple) of
|
260
422
|
(connection, read) timeouts.
|
423
|
+
:type _request_timeout: int, tuple(int, int), optional
|
261
424
|
:param _request_auth: set to override the auth_settings for an a single
|
262
|
-
request; this effectively ignores the
|
263
|
-
in the spec for a single request.
|
425
|
+
request; this effectively ignores the
|
426
|
+
authentication in the spec for a single request.
|
264
427
|
:type _request_auth: dict, optional
|
265
|
-
:
|
428
|
+
:param _content_type: force content-type for the request.
|
429
|
+
:type _content_type: str, Optional
|
430
|
+
:param _headers: set to override the headers for a single
|
431
|
+
request; this effectively ignores the headers
|
432
|
+
in the spec for a single request.
|
433
|
+
:type _headers: dict, optional
|
434
|
+
:param _host_index: set to override the host_index for a single
|
435
|
+
request; this effectively ignores the host_index
|
436
|
+
in the spec for a single request.
|
437
|
+
:type _host_index: int, optional
|
266
438
|
:return: Returns the result object.
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
439
|
+
""" # noqa: E501
|
440
|
+
|
441
|
+
_param = self._map_match_serialize(
|
442
|
+
map_match_request=map_match_request,
|
443
|
+
_request_auth=_request_auth,
|
444
|
+
_content_type=_content_type,
|
445
|
+
_headers=_headers,
|
446
|
+
_host_index=_host_index
|
447
|
+
)
|
448
|
+
|
449
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
450
|
+
'200': "MapMatchRouteResponse",
|
451
|
+
'400': None,
|
452
|
+
'500': None,
|
453
|
+
}
|
454
|
+
response_data = self.api_client.call_api(
|
455
|
+
*_param,
|
456
|
+
_request_timeout=_request_timeout
|
457
|
+
)
|
458
|
+
response_data.read()
|
459
|
+
return self.api_client.response_deserialize(
|
460
|
+
response_data=response_data,
|
461
|
+
response_types_map=_response_types_map,
|
462
|
+
)
|
271
463
|
|
272
|
-
_params = locals()
|
273
464
|
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
'_content_type',
|
285
|
-
'_headers'
|
465
|
+
@validate_call
|
466
|
+
def map_match_without_preload_content(
|
467
|
+
self,
|
468
|
+
map_match_request: Optional[MapMatchRequest] = None,
|
469
|
+
_request_timeout: Union[
|
470
|
+
None,
|
471
|
+
Annotated[StrictFloat, Field(gt=0)],
|
472
|
+
Tuple[
|
473
|
+
Annotated[StrictFloat, Field(gt=0)],
|
474
|
+
Annotated[StrictFloat, Field(gt=0)]
|
286
475
|
]
|
476
|
+
] = None,
|
477
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
478
|
+
_content_type: Optional[StrictStr] = None,
|
479
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
480
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
481
|
+
) -> RESTResponseType:
|
482
|
+
"""Match a recorded route to the road network.
|
483
|
+
|
484
|
+
The map matching API transforms a recorded route into navigation instructions like you would get from the `route` endpoint. The input can be in the form of either an encoded polyline, or (optionally) timestamped coordinates.
|
485
|
+
|
486
|
+
:param map_match_request:
|
487
|
+
:type map_match_request: MapMatchRequest
|
488
|
+
:param _request_timeout: timeout setting for this request. If one
|
489
|
+
number provided, it will be total request
|
490
|
+
timeout. It can also be a pair (tuple) of
|
491
|
+
(connection, read) timeouts.
|
492
|
+
:type _request_timeout: int, tuple(int, int), optional
|
493
|
+
:param _request_auth: set to override the auth_settings for an a single
|
494
|
+
request; this effectively ignores the
|
495
|
+
authentication in the spec for a single request.
|
496
|
+
:type _request_auth: dict, optional
|
497
|
+
:param _content_type: force content-type for the request.
|
498
|
+
:type _content_type: str, Optional
|
499
|
+
:param _headers: set to override the headers for a single
|
500
|
+
request; this effectively ignores the headers
|
501
|
+
in the spec for a single request.
|
502
|
+
:type _headers: dict, optional
|
503
|
+
:param _host_index: set to override the host_index for a single
|
504
|
+
request; this effectively ignores the host_index
|
505
|
+
in the spec for a single request.
|
506
|
+
:type _host_index: int, optional
|
507
|
+
:return: Returns the result object.
|
508
|
+
""" # noqa: E501
|
509
|
+
|
510
|
+
_param = self._map_match_serialize(
|
511
|
+
map_match_request=map_match_request,
|
512
|
+
_request_auth=_request_auth,
|
513
|
+
_content_type=_content_type,
|
514
|
+
_headers=_headers,
|
515
|
+
_host_index=_host_index
|
287
516
|
)
|
288
517
|
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
518
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
519
|
+
'200': "MapMatchRouteResponse",
|
520
|
+
'400': None,
|
521
|
+
'500': None,
|
522
|
+
}
|
523
|
+
response_data = self.api_client.call_api(
|
524
|
+
*_param,
|
525
|
+
_request_timeout=_request_timeout
|
526
|
+
)
|
527
|
+
return response_data.response
|
298
528
|
|
299
|
-
_collection_formats = {}
|
300
529
|
|
301
|
-
|
302
|
-
|
530
|
+
def _map_match_serialize(
|
531
|
+
self,
|
532
|
+
map_match_request,
|
533
|
+
_request_auth,
|
534
|
+
_content_type,
|
535
|
+
_headers,
|
536
|
+
_host_index,
|
537
|
+
) -> RequestSerialized:
|
538
|
+
|
539
|
+
_host = None
|
303
540
|
|
541
|
+
_collection_formats: Dict[str, str] = {
|
542
|
+
}
|
543
|
+
|
544
|
+
_path_params: Dict[str, str] = {}
|
545
|
+
_query_params: List[Tuple[str, str]] = []
|
546
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
547
|
+
_form_params: List[Tuple[str, str]] = []
|
548
|
+
_files: Dict[str, str] = {}
|
549
|
+
_body_params: Optional[bytes] = None
|
550
|
+
|
551
|
+
# process the path parameters
|
304
552
|
# process the query parameters
|
305
|
-
_query_params = []
|
306
553
|
# process the header parameters
|
307
|
-
_header_params = dict(_params.get('_headers', {}))
|
308
554
|
# process the form parameters
|
309
|
-
_form_params = []
|
310
|
-
_files = {}
|
311
555
|
# process the body parameter
|
312
|
-
|
313
|
-
|
314
|
-
|
556
|
+
if map_match_request is not None:
|
557
|
+
_body_params = map_match_request
|
558
|
+
|
315
559
|
|
316
560
|
# set the HTTP header `Accept`
|
317
561
|
_header_params['Accept'] = self.api_client.select_header_accept(
|
318
|
-
[
|
562
|
+
[
|
563
|
+
'application/json'
|
564
|
+
]
|
565
|
+
)
|
319
566
|
|
320
567
|
# set the HTTP header `Content-Type`
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
568
|
+
if _content_type:
|
569
|
+
_header_params['Content-Type'] = _content_type
|
570
|
+
else:
|
571
|
+
_default_content_type = (
|
572
|
+
self.api_client.select_header_content_type(
|
573
|
+
[
|
574
|
+
'application/json'
|
575
|
+
]
|
576
|
+
)
|
577
|
+
)
|
578
|
+
if _default_content_type is not None:
|
579
|
+
_header_params['Content-Type'] = _default_content_type
|
326
580
|
|
327
581
|
# authentication setting
|
328
|
-
_auth_settings
|
329
|
-
|
330
|
-
|
331
|
-
'200': "MapMatchRouteResponse",
|
332
|
-
'400': None,
|
333
|
-
'500': None,
|
334
|
-
}
|
582
|
+
_auth_settings: List[str] = [
|
583
|
+
'ApiKeyAuth'
|
584
|
+
]
|
335
585
|
|
336
|
-
return self.api_client.
|
337
|
-
'
|
338
|
-
|
339
|
-
|
340
|
-
|
586
|
+
return self.api_client.param_serialize(
|
587
|
+
method='POST',
|
588
|
+
resource_path='/map_match/v1',
|
589
|
+
path_params=_path_params,
|
590
|
+
query_params=_query_params,
|
591
|
+
header_params=_header_params,
|
341
592
|
body=_body_params,
|
342
593
|
post_params=_form_params,
|
343
594
|
files=_files,
|
344
|
-
response_types_map=_response_types_map,
|
345
595
|
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
596
|
collection_formats=_collection_formats,
|
351
|
-
|
597
|
+
_host=_host,
|
598
|
+
_request_auth=_request_auth
|
599
|
+
)
|
352
600
|
|
353
|
-
@validate_arguments
|
354
|
-
def nearest_roads(self, nearest_roads_request : Optional[NearestRoadsRequest] = None, **kwargs) -> List[LocateObject]: # noqa: E501
|
355
|
-
"""Find the nearest roads to the set of input locations. # noqa: E501
|
356
601
|
|
357
|
-
The nearest roads API allows you query for detailed information about streets and intersections near the input locations. # noqa: E501
|
358
|
-
This method makes a synchronous HTTP request by default. To make an
|
359
|
-
asynchronous HTTP request, please pass async_req=True
|
360
602
|
|
361
|
-
|
362
|
-
|
603
|
+
|
604
|
+
@validate_call
|
605
|
+
def nearest_roads(
|
606
|
+
self,
|
607
|
+
nearest_roads_request: Optional[NearestRoadsRequest] = None,
|
608
|
+
_request_timeout: Union[
|
609
|
+
None,
|
610
|
+
Annotated[StrictFloat, Field(gt=0)],
|
611
|
+
Tuple[
|
612
|
+
Annotated[StrictFloat, Field(gt=0)],
|
613
|
+
Annotated[StrictFloat, Field(gt=0)]
|
614
|
+
]
|
615
|
+
] = None,
|
616
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
617
|
+
_content_type: Optional[StrictStr] = None,
|
618
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
619
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
620
|
+
) -> List[LocateObject]:
|
621
|
+
"""Find the nearest roads to the set of input locations.
|
622
|
+
|
623
|
+
The nearest roads API allows you query for detailed information about streets and intersections near the input locations.
|
363
624
|
|
364
625
|
:param nearest_roads_request:
|
365
626
|
:type nearest_roads_request: NearestRoadsRequest
|
366
|
-
:param async_req: Whether to execute the request asynchronously.
|
367
|
-
:type async_req: bool, optional
|
368
627
|
:param _request_timeout: timeout setting for this request. If one
|
369
628
|
number provided, it will be total request
|
370
629
|
timeout. It can also be a pair (tuple) of
|
371
630
|
(connection, read) timeouts.
|
631
|
+
:type _request_timeout: int, tuple(int, int), optional
|
632
|
+
:param _request_auth: set to override the auth_settings for an a single
|
633
|
+
request; this effectively ignores the
|
634
|
+
authentication in the spec for a single request.
|
635
|
+
:type _request_auth: dict, optional
|
636
|
+
:param _content_type: force content-type for the request.
|
637
|
+
:type _content_type: str, Optional
|
638
|
+
:param _headers: set to override the headers for a single
|
639
|
+
request; this effectively ignores the headers
|
640
|
+
in the spec for a single request.
|
641
|
+
:type _headers: dict, optional
|
642
|
+
:param _host_index: set to override the host_index for a single
|
643
|
+
request; this effectively ignores the host_index
|
644
|
+
in the spec for a single request.
|
645
|
+
:type _host_index: int, optional
|
372
646
|
:return: Returns the result object.
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
647
|
+
""" # noqa: E501
|
648
|
+
|
649
|
+
_param = self._nearest_roads_serialize(
|
650
|
+
nearest_roads_request=nearest_roads_request,
|
651
|
+
_request_auth=_request_auth,
|
652
|
+
_content_type=_content_type,
|
653
|
+
_headers=_headers,
|
654
|
+
_host_index=_host_index
|
655
|
+
)
|
656
|
+
|
657
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
658
|
+
'200': "List[LocateObject]",
|
659
|
+
'400': None,
|
660
|
+
}
|
661
|
+
response_data = self.api_client.call_api(
|
662
|
+
*_param,
|
663
|
+
_request_timeout=_request_timeout
|
664
|
+
)
|
665
|
+
response_data.read()
|
666
|
+
return self.api_client.response_deserialize(
|
667
|
+
response_data=response_data,
|
668
|
+
response_types_map=_response_types_map,
|
669
|
+
).data
|
670
|
+
|
671
|
+
|
672
|
+
@validate_call
|
673
|
+
def nearest_roads_with_http_info(
|
674
|
+
self,
|
675
|
+
nearest_roads_request: Optional[NearestRoadsRequest] = None,
|
676
|
+
_request_timeout: Union[
|
677
|
+
None,
|
678
|
+
Annotated[StrictFloat, Field(gt=0)],
|
679
|
+
Tuple[
|
680
|
+
Annotated[StrictFloat, Field(gt=0)],
|
681
|
+
Annotated[StrictFloat, Field(gt=0)]
|
682
|
+
]
|
683
|
+
] = None,
|
684
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
685
|
+
_content_type: Optional[StrictStr] = None,
|
686
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
687
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
688
|
+
) -> ApiResponse[List[LocateObject]]:
|
689
|
+
"""Find the nearest roads to the set of input locations.
|
690
|
+
|
691
|
+
The nearest roads API allows you query for detailed information about streets and intersections near the input locations.
|
392
692
|
|
393
693
|
:param nearest_roads_request:
|
394
694
|
:type nearest_roads_request: NearestRoadsRequest
|
395
|
-
:param async_req: Whether to execute the request asynchronously.
|
396
|
-
:type async_req: bool, optional
|
397
|
-
:param _preload_content: if False, the ApiResponse.data will
|
398
|
-
be set to none and raw_data will store the
|
399
|
-
HTTP response body without reading/decoding.
|
400
|
-
Default is True.
|
401
|
-
:type _preload_content: bool, optional
|
402
|
-
:param _return_http_data_only: response data instead of ApiResponse
|
403
|
-
object with status code, headers, etc
|
404
|
-
:type _return_http_data_only: bool, optional
|
405
695
|
:param _request_timeout: timeout setting for this request. If one
|
406
696
|
number provided, it will be total request
|
407
697
|
timeout. It can also be a pair (tuple) of
|
408
698
|
(connection, read) timeouts.
|
699
|
+
:type _request_timeout: int, tuple(int, int), optional
|
409
700
|
:param _request_auth: set to override the auth_settings for an a single
|
410
|
-
request; this effectively ignores the
|
411
|
-
in the spec for a single request.
|
701
|
+
request; this effectively ignores the
|
702
|
+
authentication in the spec for a single request.
|
412
703
|
:type _request_auth: dict, optional
|
413
|
-
:
|
704
|
+
:param _content_type: force content-type for the request.
|
705
|
+
:type _content_type: str, Optional
|
706
|
+
:param _headers: set to override the headers for a single
|
707
|
+
request; this effectively ignores the headers
|
708
|
+
in the spec for a single request.
|
709
|
+
:type _headers: dict, optional
|
710
|
+
:param _host_index: set to override the host_index for a single
|
711
|
+
request; this effectively ignores the host_index
|
712
|
+
in the spec for a single request.
|
713
|
+
:type _host_index: int, optional
|
414
714
|
:return: Returns the result object.
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
715
|
+
""" # noqa: E501
|
716
|
+
|
717
|
+
_param = self._nearest_roads_serialize(
|
718
|
+
nearest_roads_request=nearest_roads_request,
|
719
|
+
_request_auth=_request_auth,
|
720
|
+
_content_type=_content_type,
|
721
|
+
_headers=_headers,
|
722
|
+
_host_index=_host_index
|
723
|
+
)
|
419
724
|
|
420
|
-
|
725
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
726
|
+
'200': "List[LocateObject]",
|
727
|
+
'400': None,
|
728
|
+
}
|
729
|
+
response_data = self.api_client.call_api(
|
730
|
+
*_param,
|
731
|
+
_request_timeout=_request_timeout
|
732
|
+
)
|
733
|
+
response_data.read()
|
734
|
+
return self.api_client.response_deserialize(
|
735
|
+
response_data=response_data,
|
736
|
+
response_types_map=_response_types_map,
|
737
|
+
)
|
421
738
|
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
'_headers'
|
739
|
+
|
740
|
+
@validate_call
|
741
|
+
def nearest_roads_without_preload_content(
|
742
|
+
self,
|
743
|
+
nearest_roads_request: Optional[NearestRoadsRequest] = None,
|
744
|
+
_request_timeout: Union[
|
745
|
+
None,
|
746
|
+
Annotated[StrictFloat, Field(gt=0)],
|
747
|
+
Tuple[
|
748
|
+
Annotated[StrictFloat, Field(gt=0)],
|
749
|
+
Annotated[StrictFloat, Field(gt=0)]
|
434
750
|
]
|
751
|
+
] = None,
|
752
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
753
|
+
_content_type: Optional[StrictStr] = None,
|
754
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
755
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
756
|
+
) -> RESTResponseType:
|
757
|
+
"""Find the nearest roads to the set of input locations.
|
758
|
+
|
759
|
+
The nearest roads API allows you query for detailed information about streets and intersections near the input locations.
|
760
|
+
|
761
|
+
:param nearest_roads_request:
|
762
|
+
:type nearest_roads_request: NearestRoadsRequest
|
763
|
+
:param _request_timeout: timeout setting for this request. If one
|
764
|
+
number provided, it will be total request
|
765
|
+
timeout. It can also be a pair (tuple) of
|
766
|
+
(connection, read) timeouts.
|
767
|
+
:type _request_timeout: int, tuple(int, int), optional
|
768
|
+
:param _request_auth: set to override the auth_settings for an a single
|
769
|
+
request; this effectively ignores the
|
770
|
+
authentication in the spec for a single request.
|
771
|
+
:type _request_auth: dict, optional
|
772
|
+
:param _content_type: force content-type for the request.
|
773
|
+
:type _content_type: str, Optional
|
774
|
+
:param _headers: set to override the headers for a single
|
775
|
+
request; this effectively ignores the headers
|
776
|
+
in the spec for a single request.
|
777
|
+
:type _headers: dict, optional
|
778
|
+
:param _host_index: set to override the host_index for a single
|
779
|
+
request; this effectively ignores the host_index
|
780
|
+
in the spec for a single request.
|
781
|
+
:type _host_index: int, optional
|
782
|
+
:return: Returns the result object.
|
783
|
+
""" # noqa: E501
|
784
|
+
|
785
|
+
_param = self._nearest_roads_serialize(
|
786
|
+
nearest_roads_request=nearest_roads_request,
|
787
|
+
_request_auth=_request_auth,
|
788
|
+
_content_type=_content_type,
|
789
|
+
_headers=_headers,
|
790
|
+
_host_index=_host_index
|
435
791
|
)
|
436
792
|
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
793
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
794
|
+
'200': "List[LocateObject]",
|
795
|
+
'400': None,
|
796
|
+
}
|
797
|
+
response_data = self.api_client.call_api(
|
798
|
+
*_param,
|
799
|
+
_request_timeout=_request_timeout
|
800
|
+
)
|
801
|
+
return response_data.response
|
446
802
|
|
447
|
-
_collection_formats = {}
|
448
803
|
|
449
|
-
|
450
|
-
|
804
|
+
def _nearest_roads_serialize(
|
805
|
+
self,
|
806
|
+
nearest_roads_request,
|
807
|
+
_request_auth,
|
808
|
+
_content_type,
|
809
|
+
_headers,
|
810
|
+
_host_index,
|
811
|
+
) -> RequestSerialized:
|
812
|
+
|
813
|
+
_host = None
|
451
814
|
|
815
|
+
_collection_formats: Dict[str, str] = {
|
816
|
+
}
|
817
|
+
|
818
|
+
_path_params: Dict[str, str] = {}
|
819
|
+
_query_params: List[Tuple[str, str]] = []
|
820
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
821
|
+
_form_params: List[Tuple[str, str]] = []
|
822
|
+
_files: Dict[str, str] = {}
|
823
|
+
_body_params: Optional[bytes] = None
|
824
|
+
|
825
|
+
# process the path parameters
|
452
826
|
# process the query parameters
|
453
|
-
_query_params = []
|
454
827
|
# process the header parameters
|
455
|
-
_header_params = dict(_params.get('_headers', {}))
|
456
828
|
# process the form parameters
|
457
|
-
_form_params = []
|
458
|
-
_files = {}
|
459
829
|
# process the body parameter
|
460
|
-
|
461
|
-
|
462
|
-
|
830
|
+
if nearest_roads_request is not None:
|
831
|
+
_body_params = nearest_roads_request
|
832
|
+
|
463
833
|
|
464
834
|
# set the HTTP header `Accept`
|
465
835
|
_header_params['Accept'] = self.api_client.select_header_accept(
|
466
|
-
[
|
836
|
+
[
|
837
|
+
'application/json'
|
838
|
+
]
|
839
|
+
)
|
467
840
|
|
468
841
|
# set the HTTP header `Content-Type`
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
842
|
+
if _content_type:
|
843
|
+
_header_params['Content-Type'] = _content_type
|
844
|
+
else:
|
845
|
+
_default_content_type = (
|
846
|
+
self.api_client.select_header_content_type(
|
847
|
+
[
|
848
|
+
'application/json'
|
849
|
+
]
|
850
|
+
)
|
851
|
+
)
|
852
|
+
if _default_content_type is not None:
|
853
|
+
_header_params['Content-Type'] = _default_content_type
|
474
854
|
|
475
855
|
# authentication setting
|
476
|
-
_auth_settings
|
477
|
-
|
478
|
-
|
479
|
-
'200': "List[LocateObject]",
|
480
|
-
}
|
856
|
+
_auth_settings: List[str] = [
|
857
|
+
'ApiKeyAuth'
|
858
|
+
]
|
481
859
|
|
482
|
-
return self.api_client.
|
483
|
-
'
|
484
|
-
|
485
|
-
|
486
|
-
|
860
|
+
return self.api_client.param_serialize(
|
861
|
+
method='POST',
|
862
|
+
resource_path='/nearest_roads/v1',
|
863
|
+
path_params=_path_params,
|
864
|
+
query_params=_query_params,
|
865
|
+
header_params=_header_params,
|
487
866
|
body=_body_params,
|
488
867
|
post_params=_form_params,
|
489
868
|
files=_files,
|
490
|
-
response_types_map=_response_types_map,
|
491
869
|
auth_settings=_auth_settings,
|
492
|
-
async_req=_params.get('async_req'),
|
493
|
-
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
494
|
-
_preload_content=_params.get('_preload_content', True),
|
495
|
-
_request_timeout=_params.get('_request_timeout'),
|
496
870
|
collection_formats=_collection_formats,
|
497
|
-
|
871
|
+
_host=_host,
|
872
|
+
_request_auth=_request_auth
|
873
|
+
)
|
874
|
+
|
875
|
+
|
498
876
|
|
499
|
-
@validate_arguments
|
500
|
-
def optimized_route(self, optimized_route_request : Optional[OptimizedRouteRequest] = None, **kwargs) -> RouteResponse: # noqa: E501
|
501
|
-
"""Calculate an optimized route between a known start and end point. # noqa: E501
|
502
877
|
|
503
|
-
|
504
|
-
|
505
|
-
|
878
|
+
@validate_call
|
879
|
+
def optimized_route(
|
880
|
+
self,
|
881
|
+
optimized_route_request: Optional[OptimizedRouteRequest] = None,
|
882
|
+
_request_timeout: Union[
|
883
|
+
None,
|
884
|
+
Annotated[StrictFloat, Field(gt=0)],
|
885
|
+
Tuple[
|
886
|
+
Annotated[StrictFloat, Field(gt=0)],
|
887
|
+
Annotated[StrictFloat, Field(gt=0)]
|
888
|
+
]
|
889
|
+
] = None,
|
890
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
891
|
+
_content_type: Optional[StrictStr] = None,
|
892
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
893
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
894
|
+
) -> RouteResponse:
|
895
|
+
"""Calculate an optimized route between a known start and end point.
|
506
896
|
|
507
|
-
|
508
|
-
>>> result = thread.get()
|
897
|
+
The optimized route API is a mix of the matrix and normal route API. For an optimized route, the start and end point are fixed, but the intermediate points will be re-ordered to form an optimal route visiting all nodes once.
|
509
898
|
|
510
899
|
:param optimized_route_request:
|
511
900
|
:type optimized_route_request: OptimizedRouteRequest
|
512
|
-
:param async_req: Whether to execute the request asynchronously.
|
513
|
-
:type async_req: bool, optional
|
514
901
|
:param _request_timeout: timeout setting for this request. If one
|
515
902
|
number provided, it will be total request
|
516
903
|
timeout. It can also be a pair (tuple) of
|
517
904
|
(connection, read) timeouts.
|
905
|
+
:type _request_timeout: int, tuple(int, int), optional
|
906
|
+
:param _request_auth: set to override the auth_settings for an a single
|
907
|
+
request; this effectively ignores the
|
908
|
+
authentication in the spec for a single request.
|
909
|
+
:type _request_auth: dict, optional
|
910
|
+
:param _content_type: force content-type for the request.
|
911
|
+
:type _content_type: str, Optional
|
912
|
+
:param _headers: set to override the headers for a single
|
913
|
+
request; this effectively ignores the headers
|
914
|
+
in the spec for a single request.
|
915
|
+
:type _headers: dict, optional
|
916
|
+
:param _host_index: set to override the host_index for a single
|
917
|
+
request; this effectively ignores the host_index
|
918
|
+
in the spec for a single request.
|
919
|
+
:type _host_index: int, optional
|
518
920
|
:return: Returns the result object.
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
921
|
+
""" # noqa: E501
|
922
|
+
|
923
|
+
_param = self._optimized_route_serialize(
|
924
|
+
optimized_route_request=optimized_route_request,
|
925
|
+
_request_auth=_request_auth,
|
926
|
+
_content_type=_content_type,
|
927
|
+
_headers=_headers,
|
928
|
+
_host_index=_host_index
|
929
|
+
)
|
930
|
+
|
931
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
932
|
+
'200': "RouteResponse",
|
933
|
+
'400': None,
|
934
|
+
'500': None,
|
935
|
+
}
|
936
|
+
response_data = self.api_client.call_api(
|
937
|
+
*_param,
|
938
|
+
_request_timeout=_request_timeout
|
939
|
+
)
|
940
|
+
response_data.read()
|
941
|
+
return self.api_client.response_deserialize(
|
942
|
+
response_data=response_data,
|
943
|
+
response_types_map=_response_types_map,
|
944
|
+
).data
|
945
|
+
|
946
|
+
|
947
|
+
@validate_call
|
948
|
+
def optimized_route_with_http_info(
|
949
|
+
self,
|
950
|
+
optimized_route_request: Optional[OptimizedRouteRequest] = None,
|
951
|
+
_request_timeout: Union[
|
952
|
+
None,
|
953
|
+
Annotated[StrictFloat, Field(gt=0)],
|
954
|
+
Tuple[
|
955
|
+
Annotated[StrictFloat, Field(gt=0)],
|
956
|
+
Annotated[StrictFloat, Field(gt=0)]
|
957
|
+
]
|
958
|
+
] = None,
|
959
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
960
|
+
_content_type: Optional[StrictStr] = None,
|
961
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
962
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
963
|
+
) -> ApiResponse[RouteResponse]:
|
964
|
+
"""Calculate an optimized route between a known start and end point.
|
965
|
+
|
966
|
+
The optimized route API is a mix of the matrix and normal route API. For an optimized route, the start and end point are fixed, but the intermediate points will be re-ordered to form an optimal route visiting all nodes once.
|
538
967
|
|
539
968
|
:param optimized_route_request:
|
540
969
|
:type optimized_route_request: OptimizedRouteRequest
|
541
|
-
:param async_req: Whether to execute the request asynchronously.
|
542
|
-
:type async_req: bool, optional
|
543
|
-
:param _preload_content: if False, the ApiResponse.data will
|
544
|
-
be set to none and raw_data will store the
|
545
|
-
HTTP response body without reading/decoding.
|
546
|
-
Default is True.
|
547
|
-
:type _preload_content: bool, optional
|
548
|
-
:param _return_http_data_only: response data instead of ApiResponse
|
549
|
-
object with status code, headers, etc
|
550
|
-
:type _return_http_data_only: bool, optional
|
551
970
|
:param _request_timeout: timeout setting for this request. If one
|
552
971
|
number provided, it will be total request
|
553
972
|
timeout. It can also be a pair (tuple) of
|
554
973
|
(connection, read) timeouts.
|
974
|
+
:type _request_timeout: int, tuple(int, int), optional
|
555
975
|
:param _request_auth: set to override the auth_settings for an a single
|
556
|
-
request; this effectively ignores the
|
557
|
-
in the spec for a single request.
|
976
|
+
request; this effectively ignores the
|
977
|
+
authentication in the spec for a single request.
|
558
978
|
:type _request_auth: dict, optional
|
559
|
-
:
|
979
|
+
:param _content_type: force content-type for the request.
|
980
|
+
:type _content_type: str, Optional
|
981
|
+
:param _headers: set to override the headers for a single
|
982
|
+
request; this effectively ignores the headers
|
983
|
+
in the spec for a single request.
|
984
|
+
:type _headers: dict, optional
|
985
|
+
:param _host_index: set to override the host_index for a single
|
986
|
+
request; this effectively ignores the host_index
|
987
|
+
in the spec for a single request.
|
988
|
+
:type _host_index: int, optional
|
560
989
|
:return: Returns the result object.
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
990
|
+
""" # noqa: E501
|
991
|
+
|
992
|
+
_param = self._optimized_route_serialize(
|
993
|
+
optimized_route_request=optimized_route_request,
|
994
|
+
_request_auth=_request_auth,
|
995
|
+
_content_type=_content_type,
|
996
|
+
_headers=_headers,
|
997
|
+
_host_index=_host_index
|
998
|
+
)
|
999
|
+
|
1000
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1001
|
+
'200': "RouteResponse",
|
1002
|
+
'400': None,
|
1003
|
+
'500': None,
|
1004
|
+
}
|
1005
|
+
response_data = self.api_client.call_api(
|
1006
|
+
*_param,
|
1007
|
+
_request_timeout=_request_timeout
|
1008
|
+
)
|
1009
|
+
response_data.read()
|
1010
|
+
return self.api_client.response_deserialize(
|
1011
|
+
response_data=response_data,
|
1012
|
+
response_types_map=_response_types_map,
|
1013
|
+
)
|
565
1014
|
|
566
|
-
_params = locals()
|
567
1015
|
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
'_content_type',
|
579
|
-
'_headers'
|
1016
|
+
@validate_call
|
1017
|
+
def optimized_route_without_preload_content(
|
1018
|
+
self,
|
1019
|
+
optimized_route_request: Optional[OptimizedRouteRequest] = None,
|
1020
|
+
_request_timeout: Union[
|
1021
|
+
None,
|
1022
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1023
|
+
Tuple[
|
1024
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1025
|
+
Annotated[StrictFloat, Field(gt=0)]
|
580
1026
|
]
|
1027
|
+
] = None,
|
1028
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1029
|
+
_content_type: Optional[StrictStr] = None,
|
1030
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1031
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1032
|
+
) -> RESTResponseType:
|
1033
|
+
"""Calculate an optimized route between a known start and end point.
|
1034
|
+
|
1035
|
+
The optimized route API is a mix of the matrix and normal route API. For an optimized route, the start and end point are fixed, but the intermediate points will be re-ordered to form an optimal route visiting all nodes once.
|
1036
|
+
|
1037
|
+
:param optimized_route_request:
|
1038
|
+
:type optimized_route_request: OptimizedRouteRequest
|
1039
|
+
:param _request_timeout: timeout setting for this request. If one
|
1040
|
+
number provided, it will be total request
|
1041
|
+
timeout. It can also be a pair (tuple) of
|
1042
|
+
(connection, read) timeouts.
|
1043
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1044
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1045
|
+
request; this effectively ignores the
|
1046
|
+
authentication in the spec for a single request.
|
1047
|
+
:type _request_auth: dict, optional
|
1048
|
+
:param _content_type: force content-type for the request.
|
1049
|
+
:type _content_type: str, Optional
|
1050
|
+
:param _headers: set to override the headers for a single
|
1051
|
+
request; this effectively ignores the headers
|
1052
|
+
in the spec for a single request.
|
1053
|
+
:type _headers: dict, optional
|
1054
|
+
:param _host_index: set to override the host_index for a single
|
1055
|
+
request; this effectively ignores the host_index
|
1056
|
+
in the spec for a single request.
|
1057
|
+
:type _host_index: int, optional
|
1058
|
+
:return: Returns the result object.
|
1059
|
+
""" # noqa: E501
|
1060
|
+
|
1061
|
+
_param = self._optimized_route_serialize(
|
1062
|
+
optimized_route_request=optimized_route_request,
|
1063
|
+
_request_auth=_request_auth,
|
1064
|
+
_content_type=_content_type,
|
1065
|
+
_headers=_headers,
|
1066
|
+
_host_index=_host_index
|
581
1067
|
)
|
582
1068
|
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
1069
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1070
|
+
'200': "RouteResponse",
|
1071
|
+
'400': None,
|
1072
|
+
'500': None,
|
1073
|
+
}
|
1074
|
+
response_data = self.api_client.call_api(
|
1075
|
+
*_param,
|
1076
|
+
_request_timeout=_request_timeout
|
1077
|
+
)
|
1078
|
+
return response_data.response
|
592
1079
|
|
593
|
-
_collection_formats = {}
|
594
1080
|
|
595
|
-
|
596
|
-
|
1081
|
+
def _optimized_route_serialize(
|
1082
|
+
self,
|
1083
|
+
optimized_route_request,
|
1084
|
+
_request_auth,
|
1085
|
+
_content_type,
|
1086
|
+
_headers,
|
1087
|
+
_host_index,
|
1088
|
+
) -> RequestSerialized:
|
1089
|
+
|
1090
|
+
_host = None
|
597
1091
|
|
1092
|
+
_collection_formats: Dict[str, str] = {
|
1093
|
+
}
|
1094
|
+
|
1095
|
+
_path_params: Dict[str, str] = {}
|
1096
|
+
_query_params: List[Tuple[str, str]] = []
|
1097
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1098
|
+
_form_params: List[Tuple[str, str]] = []
|
1099
|
+
_files: Dict[str, str] = {}
|
1100
|
+
_body_params: Optional[bytes] = None
|
1101
|
+
|
1102
|
+
# process the path parameters
|
598
1103
|
# process the query parameters
|
599
|
-
_query_params = []
|
600
1104
|
# process the header parameters
|
601
|
-
_header_params = dict(_params.get('_headers', {}))
|
602
1105
|
# process the form parameters
|
603
|
-
_form_params = []
|
604
|
-
_files = {}
|
605
1106
|
# process the body parameter
|
606
|
-
|
607
|
-
|
608
|
-
|
1107
|
+
if optimized_route_request is not None:
|
1108
|
+
_body_params = optimized_route_request
|
1109
|
+
|
609
1110
|
|
610
1111
|
# set the HTTP header `Accept`
|
611
1112
|
_header_params['Accept'] = self.api_client.select_header_accept(
|
612
|
-
[
|
1113
|
+
[
|
1114
|
+
'application/json'
|
1115
|
+
]
|
1116
|
+
)
|
613
1117
|
|
614
1118
|
# set the HTTP header `Content-Type`
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
1119
|
+
if _content_type:
|
1120
|
+
_header_params['Content-Type'] = _content_type
|
1121
|
+
else:
|
1122
|
+
_default_content_type = (
|
1123
|
+
self.api_client.select_header_content_type(
|
1124
|
+
[
|
1125
|
+
'application/json'
|
1126
|
+
]
|
1127
|
+
)
|
1128
|
+
)
|
1129
|
+
if _default_content_type is not None:
|
1130
|
+
_header_params['Content-Type'] = _default_content_type
|
620
1131
|
|
621
1132
|
# authentication setting
|
622
|
-
_auth_settings
|
623
|
-
|
624
|
-
|
625
|
-
'200': "RouteResponse",
|
626
|
-
'400': None,
|
627
|
-
'500': None,
|
628
|
-
}
|
1133
|
+
_auth_settings: List[str] = [
|
1134
|
+
'ApiKeyAuth'
|
1135
|
+
]
|
629
1136
|
|
630
|
-
return self.api_client.
|
631
|
-
'
|
632
|
-
|
633
|
-
|
634
|
-
|
1137
|
+
return self.api_client.param_serialize(
|
1138
|
+
method='POST',
|
1139
|
+
resource_path='/optimized_route/v1',
|
1140
|
+
path_params=_path_params,
|
1141
|
+
query_params=_query_params,
|
1142
|
+
header_params=_header_params,
|
635
1143
|
body=_body_params,
|
636
1144
|
post_params=_form_params,
|
637
1145
|
files=_files,
|
638
|
-
response_types_map=_response_types_map,
|
639
1146
|
auth_settings=_auth_settings,
|
640
|
-
async_req=_params.get('async_req'),
|
641
|
-
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
642
|
-
_preload_content=_params.get('_preload_content', True),
|
643
|
-
_request_timeout=_params.get('_request_timeout'),
|
644
1147
|
collection_formats=_collection_formats,
|
645
|
-
|
1148
|
+
_host=_host,
|
1149
|
+
_request_auth=_request_auth
|
1150
|
+
)
|
646
1151
|
|
647
|
-
@validate_arguments
|
648
|
-
def route(self, route_request : Optional[RouteRequest] = None, **kwargs) -> RouteResponse: # noqa: E501
|
649
|
-
"""Get turn by turn routing instructions between two or more locations. # noqa: E501
|
650
1152
|
|
651
|
-
The route (turn-by-turn) API computes routes between two or more locations. It supports a variety of tunable costing methods, and supports routing through intermediate waypoints and discontinuous multi-leg routes. # noqa: E501
|
652
|
-
This method makes a synchronous HTTP request by default. To make an
|
653
|
-
asynchronous HTTP request, please pass async_req=True
|
654
1153
|
|
655
|
-
|
656
|
-
|
1154
|
+
|
1155
|
+
@validate_call
|
1156
|
+
def route(
|
1157
|
+
self,
|
1158
|
+
route_request: Optional[RouteRequest] = None,
|
1159
|
+
_request_timeout: Union[
|
1160
|
+
None,
|
1161
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1162
|
+
Tuple[
|
1163
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1164
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1165
|
+
]
|
1166
|
+
] = None,
|
1167
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1168
|
+
_content_type: Optional[StrictStr] = None,
|
1169
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1170
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1171
|
+
) -> RouteResponse:
|
1172
|
+
"""Get turn by turn routing instructions between two or more locations.
|
1173
|
+
|
1174
|
+
The route (turn-by-turn) API computes routes between two or more locations. It supports a variety of tunable costing methods, and supports routing through intermediate waypoints and discontinuous multi-leg routes.
|
657
1175
|
|
658
1176
|
:param route_request:
|
659
1177
|
:type route_request: RouteRequest
|
660
|
-
:param async_req: Whether to execute the request asynchronously.
|
661
|
-
:type async_req: bool, optional
|
662
1178
|
:param _request_timeout: timeout setting for this request. If one
|
663
1179
|
number provided, it will be total request
|
664
1180
|
timeout. It can also be a pair (tuple) of
|
665
1181
|
(connection, read) timeouts.
|
1182
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1183
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1184
|
+
request; this effectively ignores the
|
1185
|
+
authentication in the spec for a single request.
|
1186
|
+
:type _request_auth: dict, optional
|
1187
|
+
:param _content_type: force content-type for the request.
|
1188
|
+
:type _content_type: str, Optional
|
1189
|
+
:param _headers: set to override the headers for a single
|
1190
|
+
request; this effectively ignores the headers
|
1191
|
+
in the spec for a single request.
|
1192
|
+
:type _headers: dict, optional
|
1193
|
+
:param _host_index: set to override the host_index for a single
|
1194
|
+
request; this effectively ignores the host_index
|
1195
|
+
in the spec for a single request.
|
1196
|
+
:type _host_index: int, optional
|
666
1197
|
:return: Returns the result object.
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
1198
|
+
""" # noqa: E501
|
1199
|
+
|
1200
|
+
_param = self._route_serialize(
|
1201
|
+
route_request=route_request,
|
1202
|
+
_request_auth=_request_auth,
|
1203
|
+
_content_type=_content_type,
|
1204
|
+
_headers=_headers,
|
1205
|
+
_host_index=_host_index
|
1206
|
+
)
|
1207
|
+
|
1208
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1209
|
+
'200': "RouteResponse",
|
1210
|
+
'400': None,
|
1211
|
+
'500': None,
|
1212
|
+
}
|
1213
|
+
response_data = self.api_client.call_api(
|
1214
|
+
*_param,
|
1215
|
+
_request_timeout=_request_timeout
|
1216
|
+
)
|
1217
|
+
response_data.read()
|
1218
|
+
return self.api_client.response_deserialize(
|
1219
|
+
response_data=response_data,
|
1220
|
+
response_types_map=_response_types_map,
|
1221
|
+
).data
|
1222
|
+
|
1223
|
+
|
1224
|
+
@validate_call
|
1225
|
+
def route_with_http_info(
|
1226
|
+
self,
|
1227
|
+
route_request: Optional[RouteRequest] = None,
|
1228
|
+
_request_timeout: Union[
|
1229
|
+
None,
|
1230
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1231
|
+
Tuple[
|
1232
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1233
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1234
|
+
]
|
1235
|
+
] = None,
|
1236
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1237
|
+
_content_type: Optional[StrictStr] = None,
|
1238
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1239
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1240
|
+
) -> ApiResponse[RouteResponse]:
|
1241
|
+
"""Get turn by turn routing instructions between two or more locations.
|
1242
|
+
|
1243
|
+
The route (turn-by-turn) API computes routes between two or more locations. It supports a variety of tunable costing methods, and supports routing through intermediate waypoints and discontinuous multi-leg routes.
|
686
1244
|
|
687
1245
|
:param route_request:
|
688
1246
|
:type route_request: RouteRequest
|
689
|
-
:param async_req: Whether to execute the request asynchronously.
|
690
|
-
:type async_req: bool, optional
|
691
|
-
:param _preload_content: if False, the ApiResponse.data will
|
692
|
-
be set to none and raw_data will store the
|
693
|
-
HTTP response body without reading/decoding.
|
694
|
-
Default is True.
|
695
|
-
:type _preload_content: bool, optional
|
696
|
-
:param _return_http_data_only: response data instead of ApiResponse
|
697
|
-
object with status code, headers, etc
|
698
|
-
:type _return_http_data_only: bool, optional
|
699
1247
|
:param _request_timeout: timeout setting for this request. If one
|
700
1248
|
number provided, it will be total request
|
701
1249
|
timeout. It can also be a pair (tuple) of
|
702
1250
|
(connection, read) timeouts.
|
1251
|
+
:type _request_timeout: int, tuple(int, int), optional
|
703
1252
|
:param _request_auth: set to override the auth_settings for an a single
|
704
|
-
request; this effectively ignores the
|
705
|
-
in the spec for a single request.
|
1253
|
+
request; this effectively ignores the
|
1254
|
+
authentication in the spec for a single request.
|
706
1255
|
:type _request_auth: dict, optional
|
707
|
-
:
|
1256
|
+
:param _content_type: force content-type for the request.
|
1257
|
+
:type _content_type: str, Optional
|
1258
|
+
:param _headers: set to override the headers for a single
|
1259
|
+
request; this effectively ignores the headers
|
1260
|
+
in the spec for a single request.
|
1261
|
+
:type _headers: dict, optional
|
1262
|
+
:param _host_index: set to override the host_index for a single
|
1263
|
+
request; this effectively ignores the host_index
|
1264
|
+
in the spec for a single request.
|
1265
|
+
:type _host_index: int, optional
|
708
1266
|
:return: Returns the result object.
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
1267
|
+
""" # noqa: E501
|
1268
|
+
|
1269
|
+
_param = self._route_serialize(
|
1270
|
+
route_request=route_request,
|
1271
|
+
_request_auth=_request_auth,
|
1272
|
+
_content_type=_content_type,
|
1273
|
+
_headers=_headers,
|
1274
|
+
_host_index=_host_index
|
1275
|
+
)
|
713
1276
|
|
714
|
-
|
1277
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1278
|
+
'200': "RouteResponse",
|
1279
|
+
'400': None,
|
1280
|
+
'500': None,
|
1281
|
+
}
|
1282
|
+
response_data = self.api_client.call_api(
|
1283
|
+
*_param,
|
1284
|
+
_request_timeout=_request_timeout
|
1285
|
+
)
|
1286
|
+
response_data.read()
|
1287
|
+
return self.api_client.response_deserialize(
|
1288
|
+
response_data=response_data,
|
1289
|
+
response_types_map=_response_types_map,
|
1290
|
+
)
|
715
1291
|
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
'_headers'
|
1292
|
+
|
1293
|
+
@validate_call
|
1294
|
+
def route_without_preload_content(
|
1295
|
+
self,
|
1296
|
+
route_request: Optional[RouteRequest] = None,
|
1297
|
+
_request_timeout: Union[
|
1298
|
+
None,
|
1299
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1300
|
+
Tuple[
|
1301
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1302
|
+
Annotated[StrictFloat, Field(gt=0)]
|
728
1303
|
]
|
1304
|
+
] = None,
|
1305
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1306
|
+
_content_type: Optional[StrictStr] = None,
|
1307
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1308
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1309
|
+
) -> RESTResponseType:
|
1310
|
+
"""Get turn by turn routing instructions between two or more locations.
|
1311
|
+
|
1312
|
+
The route (turn-by-turn) API computes routes between two or more locations. It supports a variety of tunable costing methods, and supports routing through intermediate waypoints and discontinuous multi-leg routes.
|
1313
|
+
|
1314
|
+
:param route_request:
|
1315
|
+
:type route_request: RouteRequest
|
1316
|
+
:param _request_timeout: timeout setting for this request. If one
|
1317
|
+
number provided, it will be total request
|
1318
|
+
timeout. It can also be a pair (tuple) of
|
1319
|
+
(connection, read) timeouts.
|
1320
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1321
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1322
|
+
request; this effectively ignores the
|
1323
|
+
authentication in the spec for a single request.
|
1324
|
+
:type _request_auth: dict, optional
|
1325
|
+
:param _content_type: force content-type for the request.
|
1326
|
+
:type _content_type: str, Optional
|
1327
|
+
:param _headers: set to override the headers for a single
|
1328
|
+
request; this effectively ignores the headers
|
1329
|
+
in the spec for a single request.
|
1330
|
+
:type _headers: dict, optional
|
1331
|
+
:param _host_index: set to override the host_index for a single
|
1332
|
+
request; this effectively ignores the host_index
|
1333
|
+
in the spec for a single request.
|
1334
|
+
:type _host_index: int, optional
|
1335
|
+
:return: Returns the result object.
|
1336
|
+
""" # noqa: E501
|
1337
|
+
|
1338
|
+
_param = self._route_serialize(
|
1339
|
+
route_request=route_request,
|
1340
|
+
_request_auth=_request_auth,
|
1341
|
+
_content_type=_content_type,
|
1342
|
+
_headers=_headers,
|
1343
|
+
_host_index=_host_index
|
729
1344
|
)
|
730
1345
|
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
1346
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1347
|
+
'200': "RouteResponse",
|
1348
|
+
'400': None,
|
1349
|
+
'500': None,
|
1350
|
+
}
|
1351
|
+
response_data = self.api_client.call_api(
|
1352
|
+
*_param,
|
1353
|
+
_request_timeout=_request_timeout
|
1354
|
+
)
|
1355
|
+
return response_data.response
|
740
1356
|
|
741
|
-
_collection_formats = {}
|
742
1357
|
|
743
|
-
|
744
|
-
|
1358
|
+
def _route_serialize(
|
1359
|
+
self,
|
1360
|
+
route_request,
|
1361
|
+
_request_auth,
|
1362
|
+
_content_type,
|
1363
|
+
_headers,
|
1364
|
+
_host_index,
|
1365
|
+
) -> RequestSerialized:
|
1366
|
+
|
1367
|
+
_host = None
|
1368
|
+
|
1369
|
+
_collection_formats: Dict[str, str] = {
|
1370
|
+
}
|
1371
|
+
|
1372
|
+
_path_params: Dict[str, str] = {}
|
1373
|
+
_query_params: List[Tuple[str, str]] = []
|
1374
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1375
|
+
_form_params: List[Tuple[str, str]] = []
|
1376
|
+
_files: Dict[str, str] = {}
|
1377
|
+
_body_params: Optional[bytes] = None
|
745
1378
|
|
1379
|
+
# process the path parameters
|
746
1380
|
# process the query parameters
|
747
|
-
_query_params = []
|
748
1381
|
# process the header parameters
|
749
|
-
_header_params = dict(_params.get('_headers', {}))
|
750
1382
|
# process the form parameters
|
751
|
-
_form_params = []
|
752
|
-
_files = {}
|
753
1383
|
# process the body parameter
|
754
|
-
|
755
|
-
|
756
|
-
|
1384
|
+
if route_request is not None:
|
1385
|
+
_body_params = route_request
|
1386
|
+
|
757
1387
|
|
758
1388
|
# set the HTTP header `Accept`
|
759
1389
|
_header_params['Accept'] = self.api_client.select_header_accept(
|
760
|
-
[
|
1390
|
+
[
|
1391
|
+
'application/json'
|
1392
|
+
]
|
1393
|
+
)
|
761
1394
|
|
762
1395
|
# set the HTTP header `Content-Type`
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
1396
|
+
if _content_type:
|
1397
|
+
_header_params['Content-Type'] = _content_type
|
1398
|
+
else:
|
1399
|
+
_default_content_type = (
|
1400
|
+
self.api_client.select_header_content_type(
|
1401
|
+
[
|
1402
|
+
'application/json'
|
1403
|
+
]
|
1404
|
+
)
|
1405
|
+
)
|
1406
|
+
if _default_content_type is not None:
|
1407
|
+
_header_params['Content-Type'] = _default_content_type
|
768
1408
|
|
769
1409
|
# authentication setting
|
770
|
-
_auth_settings
|
771
|
-
|
772
|
-
|
773
|
-
'200': "RouteResponse",
|
774
|
-
'400': None,
|
775
|
-
'500': None,
|
776
|
-
}
|
1410
|
+
_auth_settings: List[str] = [
|
1411
|
+
'ApiKeyAuth'
|
1412
|
+
]
|
777
1413
|
|
778
|
-
return self.api_client.
|
779
|
-
'
|
780
|
-
|
781
|
-
|
782
|
-
|
1414
|
+
return self.api_client.param_serialize(
|
1415
|
+
method='POST',
|
1416
|
+
resource_path='/route/v1',
|
1417
|
+
path_params=_path_params,
|
1418
|
+
query_params=_query_params,
|
1419
|
+
header_params=_header_params,
|
783
1420
|
body=_body_params,
|
784
1421
|
post_params=_form_params,
|
785
1422
|
files=_files,
|
786
|
-
response_types_map=_response_types_map,
|
787
1423
|
auth_settings=_auth_settings,
|
788
|
-
async_req=_params.get('async_req'),
|
789
|
-
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
790
|
-
_preload_content=_params.get('_preload_content', True),
|
791
|
-
_request_timeout=_params.get('_request_timeout'),
|
792
1424
|
collection_formats=_collection_formats,
|
793
|
-
|
1425
|
+
_host=_host,
|
1426
|
+
_request_auth=_request_auth
|
1427
|
+
)
|
1428
|
+
|
794
1429
|
|
795
|
-
@validate_arguments
|
796
|
-
def time_distance_matrix(self, matrix_request : Optional[MatrixRequest] = None, **kwargs) -> MatrixResponse: # noqa: E501
|
797
|
-
"""Calculate a time distance matrix for a grid of start and end points. # noqa: E501
|
798
1430
|
|
799
|
-
The time distance matrix API lets you compare travel times between a set of possible start and end points. Note that all matrix endpoints have a limit of 1000 elements, regardless of the costing/mode of travel. A matrix request with 3 inputs and 5 outputs has 3 x 5 = 15 elements. This means you could send a 100 x 10 or 20 x 50 matrix request (each having 1000 elements), but not 40 x 30 as it has 1200 elements. # noqa: E501
|
800
|
-
This method makes a synchronous HTTP request by default. To make an
|
801
|
-
asynchronous HTTP request, please pass async_req=True
|
802
1431
|
|
803
|
-
|
804
|
-
|
1432
|
+
@validate_call
|
1433
|
+
def time_distance_matrix(
|
1434
|
+
self,
|
1435
|
+
matrix_request: Optional[MatrixRequest] = None,
|
1436
|
+
_request_timeout: Union[
|
1437
|
+
None,
|
1438
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1439
|
+
Tuple[
|
1440
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1441
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1442
|
+
]
|
1443
|
+
] = None,
|
1444
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1445
|
+
_content_type: Optional[StrictStr] = None,
|
1446
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1447
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1448
|
+
) -> MatrixResponse:
|
1449
|
+
"""Calculate a time distance matrix for use in an optimizer.
|
1450
|
+
|
1451
|
+
The time distance matrix API lets you compare travel times between a set of possible start and end points. Note that this endpoint has a limit of 22,500 elements, regardless of the costing/mode of travel. A matrix request with 3 inputs and 5 outputs has 3 x 5 = 15 elements. For example, a matrix request with 3 inputs and 5 outputs has 3 x 5 = 15 elements. This means you could send a 150 x 150 or 30 x 750 matrix request (each having 22,500 elements), but not a 500 x 500 matrix (250,000 elements).
|
805
1452
|
|
806
1453
|
:param matrix_request:
|
807
1454
|
:type matrix_request: MatrixRequest
|
808
|
-
:param async_req: Whether to execute the request asynchronously.
|
809
|
-
:type async_req: bool, optional
|
810
1455
|
:param _request_timeout: timeout setting for this request. If one
|
811
1456
|
number provided, it will be total request
|
812
1457
|
timeout. It can also be a pair (tuple) of
|
813
1458
|
(connection, read) timeouts.
|
1459
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1460
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1461
|
+
request; this effectively ignores the
|
1462
|
+
authentication in the spec for a single request.
|
1463
|
+
:type _request_auth: dict, optional
|
1464
|
+
:param _content_type: force content-type for the request.
|
1465
|
+
:type _content_type: str, Optional
|
1466
|
+
:param _headers: set to override the headers for a single
|
1467
|
+
request; this effectively ignores the headers
|
1468
|
+
in the spec for a single request.
|
1469
|
+
:type _headers: dict, optional
|
1470
|
+
:param _host_index: set to override the host_index for a single
|
1471
|
+
request; this effectively ignores the host_index
|
1472
|
+
in the spec for a single request.
|
1473
|
+
:type _host_index: int, optional
|
814
1474
|
:return: Returns the result object.
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
1475
|
+
""" # noqa: E501
|
1476
|
+
|
1477
|
+
_param = self._time_distance_matrix_serialize(
|
1478
|
+
matrix_request=matrix_request,
|
1479
|
+
_request_auth=_request_auth,
|
1480
|
+
_content_type=_content_type,
|
1481
|
+
_headers=_headers,
|
1482
|
+
_host_index=_host_index
|
1483
|
+
)
|
1484
|
+
|
1485
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1486
|
+
'200': "MatrixResponse",
|
1487
|
+
'400': None,
|
1488
|
+
}
|
1489
|
+
response_data = self.api_client.call_api(
|
1490
|
+
*_param,
|
1491
|
+
_request_timeout=_request_timeout
|
1492
|
+
)
|
1493
|
+
response_data.read()
|
1494
|
+
return self.api_client.response_deserialize(
|
1495
|
+
response_data=response_data,
|
1496
|
+
response_types_map=_response_types_map,
|
1497
|
+
).data
|
1498
|
+
|
1499
|
+
|
1500
|
+
@validate_call
|
1501
|
+
def time_distance_matrix_with_http_info(
|
1502
|
+
self,
|
1503
|
+
matrix_request: Optional[MatrixRequest] = None,
|
1504
|
+
_request_timeout: Union[
|
1505
|
+
None,
|
1506
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1507
|
+
Tuple[
|
1508
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1509
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1510
|
+
]
|
1511
|
+
] = None,
|
1512
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1513
|
+
_content_type: Optional[StrictStr] = None,
|
1514
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1515
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1516
|
+
) -> ApiResponse[MatrixResponse]:
|
1517
|
+
"""Calculate a time distance matrix for use in an optimizer.
|
1518
|
+
|
1519
|
+
The time distance matrix API lets you compare travel times between a set of possible start and end points. Note that this endpoint has a limit of 22,500 elements, regardless of the costing/mode of travel. A matrix request with 3 inputs and 5 outputs has 3 x 5 = 15 elements. For example, a matrix request with 3 inputs and 5 outputs has 3 x 5 = 15 elements. This means you could send a 150 x 150 or 30 x 750 matrix request (each having 22,500 elements), but not a 500 x 500 matrix (250,000 elements).
|
834
1520
|
|
835
1521
|
:param matrix_request:
|
836
1522
|
:type matrix_request: MatrixRequest
|
837
|
-
:param async_req: Whether to execute the request asynchronously.
|
838
|
-
:type async_req: bool, optional
|
839
|
-
:param _preload_content: if False, the ApiResponse.data will
|
840
|
-
be set to none and raw_data will store the
|
841
|
-
HTTP response body without reading/decoding.
|
842
|
-
Default is True.
|
843
|
-
:type _preload_content: bool, optional
|
844
|
-
:param _return_http_data_only: response data instead of ApiResponse
|
845
|
-
object with status code, headers, etc
|
846
|
-
:type _return_http_data_only: bool, optional
|
847
1523
|
:param _request_timeout: timeout setting for this request. If one
|
848
1524
|
number provided, it will be total request
|
849
1525
|
timeout. It can also be a pair (tuple) of
|
850
1526
|
(connection, read) timeouts.
|
1527
|
+
:type _request_timeout: int, tuple(int, int), optional
|
851
1528
|
:param _request_auth: set to override the auth_settings for an a single
|
852
|
-
request; this effectively ignores the
|
853
|
-
in the spec for a single request.
|
1529
|
+
request; this effectively ignores the
|
1530
|
+
authentication in the spec for a single request.
|
854
1531
|
:type _request_auth: dict, optional
|
855
|
-
:
|
1532
|
+
:param _content_type: force content-type for the request.
|
1533
|
+
:type _content_type: str, Optional
|
1534
|
+
:param _headers: set to override the headers for a single
|
1535
|
+
request; this effectively ignores the headers
|
1536
|
+
in the spec for a single request.
|
1537
|
+
:type _headers: dict, optional
|
1538
|
+
:param _host_index: set to override the host_index for a single
|
1539
|
+
request; this effectively ignores the host_index
|
1540
|
+
in the spec for a single request.
|
1541
|
+
:type _host_index: int, optional
|
856
1542
|
:return: Returns the result object.
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
1543
|
+
""" # noqa: E501
|
1544
|
+
|
1545
|
+
_param = self._time_distance_matrix_serialize(
|
1546
|
+
matrix_request=matrix_request,
|
1547
|
+
_request_auth=_request_auth,
|
1548
|
+
_content_type=_content_type,
|
1549
|
+
_headers=_headers,
|
1550
|
+
_host_index=_host_index
|
1551
|
+
)
|
861
1552
|
|
862
|
-
|
1553
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1554
|
+
'200': "MatrixResponse",
|
1555
|
+
'400': None,
|
1556
|
+
}
|
1557
|
+
response_data = self.api_client.call_api(
|
1558
|
+
*_param,
|
1559
|
+
_request_timeout=_request_timeout
|
1560
|
+
)
|
1561
|
+
response_data.read()
|
1562
|
+
return self.api_client.response_deserialize(
|
1563
|
+
response_data=response_data,
|
1564
|
+
response_types_map=_response_types_map,
|
1565
|
+
)
|
863
1566
|
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
'_headers'
|
1567
|
+
|
1568
|
+
@validate_call
|
1569
|
+
def time_distance_matrix_without_preload_content(
|
1570
|
+
self,
|
1571
|
+
matrix_request: Optional[MatrixRequest] = None,
|
1572
|
+
_request_timeout: Union[
|
1573
|
+
None,
|
1574
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1575
|
+
Tuple[
|
1576
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1577
|
+
Annotated[StrictFloat, Field(gt=0)]
|
876
1578
|
]
|
1579
|
+
] = None,
|
1580
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1581
|
+
_content_type: Optional[StrictStr] = None,
|
1582
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1583
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1584
|
+
) -> RESTResponseType:
|
1585
|
+
"""Calculate a time distance matrix for use in an optimizer.
|
1586
|
+
|
1587
|
+
The time distance matrix API lets you compare travel times between a set of possible start and end points. Note that this endpoint has a limit of 22,500 elements, regardless of the costing/mode of travel. A matrix request with 3 inputs and 5 outputs has 3 x 5 = 15 elements. For example, a matrix request with 3 inputs and 5 outputs has 3 x 5 = 15 elements. This means you could send a 150 x 150 or 30 x 750 matrix request (each having 22,500 elements), but not a 500 x 500 matrix (250,000 elements).
|
1588
|
+
|
1589
|
+
:param matrix_request:
|
1590
|
+
:type matrix_request: MatrixRequest
|
1591
|
+
:param _request_timeout: timeout setting for this request. If one
|
1592
|
+
number provided, it will be total request
|
1593
|
+
timeout. It can also be a pair (tuple) of
|
1594
|
+
(connection, read) timeouts.
|
1595
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1596
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1597
|
+
request; this effectively ignores the
|
1598
|
+
authentication in the spec for a single request.
|
1599
|
+
:type _request_auth: dict, optional
|
1600
|
+
:param _content_type: force content-type for the request.
|
1601
|
+
:type _content_type: str, Optional
|
1602
|
+
:param _headers: set to override the headers for a single
|
1603
|
+
request; this effectively ignores the headers
|
1604
|
+
in the spec for a single request.
|
1605
|
+
:type _headers: dict, optional
|
1606
|
+
:param _host_index: set to override the host_index for a single
|
1607
|
+
request; this effectively ignores the host_index
|
1608
|
+
in the spec for a single request.
|
1609
|
+
:type _host_index: int, optional
|
1610
|
+
:return: Returns the result object.
|
1611
|
+
""" # noqa: E501
|
1612
|
+
|
1613
|
+
_param = self._time_distance_matrix_serialize(
|
1614
|
+
matrix_request=matrix_request,
|
1615
|
+
_request_auth=_request_auth,
|
1616
|
+
_content_type=_content_type,
|
1617
|
+
_headers=_headers,
|
1618
|
+
_host_index=_host_index
|
877
1619
|
)
|
878
1620
|
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
1621
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1622
|
+
'200': "MatrixResponse",
|
1623
|
+
'400': None,
|
1624
|
+
}
|
1625
|
+
response_data = self.api_client.call_api(
|
1626
|
+
*_param,
|
1627
|
+
_request_timeout=_request_timeout
|
1628
|
+
)
|
1629
|
+
return response_data.response
|
888
1630
|
|
889
|
-
_collection_formats = {}
|
890
1631
|
|
891
|
-
|
892
|
-
|
1632
|
+
def _time_distance_matrix_serialize(
|
1633
|
+
self,
|
1634
|
+
matrix_request,
|
1635
|
+
_request_auth,
|
1636
|
+
_content_type,
|
1637
|
+
_headers,
|
1638
|
+
_host_index,
|
1639
|
+
) -> RequestSerialized:
|
1640
|
+
|
1641
|
+
_host = None
|
1642
|
+
|
1643
|
+
_collection_formats: Dict[str, str] = {
|
1644
|
+
}
|
1645
|
+
|
1646
|
+
_path_params: Dict[str, str] = {}
|
1647
|
+
_query_params: List[Tuple[str, str]] = []
|
1648
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1649
|
+
_form_params: List[Tuple[str, str]] = []
|
1650
|
+
_files: Dict[str, str] = {}
|
1651
|
+
_body_params: Optional[bytes] = None
|
893
1652
|
|
1653
|
+
# process the path parameters
|
894
1654
|
# process the query parameters
|
895
|
-
_query_params = []
|
896
1655
|
# process the header parameters
|
897
|
-
_header_params = dict(_params.get('_headers', {}))
|
898
1656
|
# process the form parameters
|
899
|
-
_form_params = []
|
900
|
-
_files = {}
|
901
1657
|
# process the body parameter
|
902
|
-
|
903
|
-
|
904
|
-
|
1658
|
+
if matrix_request is not None:
|
1659
|
+
_body_params = matrix_request
|
1660
|
+
|
905
1661
|
|
906
1662
|
# set the HTTP header `Accept`
|
907
1663
|
_header_params['Accept'] = self.api_client.select_header_accept(
|
908
|
-
[
|
1664
|
+
[
|
1665
|
+
'application/json'
|
1666
|
+
]
|
1667
|
+
)
|
909
1668
|
|
910
1669
|
# set the HTTP header `Content-Type`
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
1670
|
+
if _content_type:
|
1671
|
+
_header_params['Content-Type'] = _content_type
|
1672
|
+
else:
|
1673
|
+
_default_content_type = (
|
1674
|
+
self.api_client.select_header_content_type(
|
1675
|
+
[
|
1676
|
+
'application/json'
|
1677
|
+
]
|
1678
|
+
)
|
1679
|
+
)
|
1680
|
+
if _default_content_type is not None:
|
1681
|
+
_header_params['Content-Type'] = _default_content_type
|
916
1682
|
|
917
1683
|
# authentication setting
|
918
|
-
_auth_settings
|
919
|
-
|
920
|
-
|
921
|
-
'200': "MatrixResponse",
|
922
|
-
}
|
1684
|
+
_auth_settings: List[str] = [
|
1685
|
+
'ApiKeyAuth'
|
1686
|
+
]
|
923
1687
|
|
924
|
-
return self.api_client.
|
925
|
-
'
|
926
|
-
|
927
|
-
|
928
|
-
|
1688
|
+
return self.api_client.param_serialize(
|
1689
|
+
method='POST',
|
1690
|
+
resource_path='/matrix/v1',
|
1691
|
+
path_params=_path_params,
|
1692
|
+
query_params=_query_params,
|
1693
|
+
header_params=_header_params,
|
929
1694
|
body=_body_params,
|
930
1695
|
post_params=_form_params,
|
931
1696
|
files=_files,
|
932
|
-
response_types_map=_response_types_map,
|
933
1697
|
auth_settings=_auth_settings,
|
934
|
-
async_req=_params.get('async_req'),
|
935
|
-
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
936
|
-
_preload_content=_params.get('_preload_content', True),
|
937
|
-
_request_timeout=_params.get('_request_timeout'),
|
938
1698
|
collection_formats=_collection_formats,
|
939
|
-
|
1699
|
+
_host=_host,
|
1700
|
+
_request_auth=_request_auth
|
1701
|
+
)
|
940
1702
|
|
941
|
-
@validate_arguments
|
942
|
-
def trace_attributes(self, trace_attributes_request : Optional[TraceAttributesRequest] = None, **kwargs) -> TraceAttributesResponse: # noqa: E501
|
943
|
-
"""Trace the attributes of roads visited on a route. # noqa: E501
|
944
1703
|
|
945
|
-
The trace attributes endpoint retrieves detailed information along a route, returning details for each section along the path, as well as any intersections encountered. In addition to tracing a recording route, this is great for providing just-in-time info to navigation applications, enabling them to conserve resources by omitting info like speed limits upfront that may be irrelevant if the user goes off-route. # noqa: E501
|
946
|
-
This method makes a synchronous HTTP request by default. To make an
|
947
|
-
asynchronous HTTP request, please pass async_req=True
|
948
1704
|
|
949
|
-
|
950
|
-
|
1705
|
+
|
1706
|
+
@validate_call
|
1707
|
+
def trace_attributes(
|
1708
|
+
self,
|
1709
|
+
trace_attributes_request: Optional[TraceAttributesRequest] = None,
|
1710
|
+
_request_timeout: Union[
|
1711
|
+
None,
|
1712
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1713
|
+
Tuple[
|
1714
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1715
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1716
|
+
]
|
1717
|
+
] = None,
|
1718
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1719
|
+
_content_type: Optional[StrictStr] = None,
|
1720
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1721
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1722
|
+
) -> TraceAttributesResponse:
|
1723
|
+
"""Trace the attributes of roads visited on a route.
|
1724
|
+
|
1725
|
+
The trace attributes endpoint retrieves detailed information along a route, returning details for each section along the path, as well as any intersections encountered. In addition to tracing a recording route, this is great for providing just-in-time info to navigation applications, enabling them to conserve resources by omitting info like speed limits upfront that may be irrelevant if the user goes off-route.
|
951
1726
|
|
952
1727
|
:param trace_attributes_request:
|
953
1728
|
:type trace_attributes_request: TraceAttributesRequest
|
954
|
-
:param async_req: Whether to execute the request asynchronously.
|
955
|
-
:type async_req: bool, optional
|
956
1729
|
:param _request_timeout: timeout setting for this request. If one
|
957
1730
|
number provided, it will be total request
|
958
1731
|
timeout. It can also be a pair (tuple) of
|
959
1732
|
(connection, read) timeouts.
|
1733
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1734
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1735
|
+
request; this effectively ignores the
|
1736
|
+
authentication in the spec for a single request.
|
1737
|
+
:type _request_auth: dict, optional
|
1738
|
+
:param _content_type: force content-type for the request.
|
1739
|
+
:type _content_type: str, Optional
|
1740
|
+
:param _headers: set to override the headers for a single
|
1741
|
+
request; this effectively ignores the headers
|
1742
|
+
in the spec for a single request.
|
1743
|
+
:type _headers: dict, optional
|
1744
|
+
:param _host_index: set to override the host_index for a single
|
1745
|
+
request; this effectively ignores the host_index
|
1746
|
+
in the spec for a single request.
|
1747
|
+
:type _host_index: int, optional
|
960
1748
|
:return: Returns the result object.
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
1749
|
+
""" # noqa: E501
|
1750
|
+
|
1751
|
+
_param = self._trace_attributes_serialize(
|
1752
|
+
trace_attributes_request=trace_attributes_request,
|
1753
|
+
_request_auth=_request_auth,
|
1754
|
+
_content_type=_content_type,
|
1755
|
+
_headers=_headers,
|
1756
|
+
_host_index=_host_index
|
1757
|
+
)
|
1758
|
+
|
1759
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1760
|
+
'200': "TraceAttributesResponse",
|
1761
|
+
'400': None,
|
1762
|
+
}
|
1763
|
+
response_data = self.api_client.call_api(
|
1764
|
+
*_param,
|
1765
|
+
_request_timeout=_request_timeout
|
1766
|
+
)
|
1767
|
+
response_data.read()
|
1768
|
+
return self.api_client.response_deserialize(
|
1769
|
+
response_data=response_data,
|
1770
|
+
response_types_map=_response_types_map,
|
1771
|
+
).data
|
1772
|
+
|
1773
|
+
|
1774
|
+
@validate_call
|
1775
|
+
def trace_attributes_with_http_info(
|
1776
|
+
self,
|
1777
|
+
trace_attributes_request: Optional[TraceAttributesRequest] = None,
|
1778
|
+
_request_timeout: Union[
|
1779
|
+
None,
|
1780
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1781
|
+
Tuple[
|
1782
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1783
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1784
|
+
]
|
1785
|
+
] = None,
|
1786
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1787
|
+
_content_type: Optional[StrictStr] = None,
|
1788
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1789
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1790
|
+
) -> ApiResponse[TraceAttributesResponse]:
|
1791
|
+
"""Trace the attributes of roads visited on a route.
|
1792
|
+
|
1793
|
+
The trace attributes endpoint retrieves detailed information along a route, returning details for each section along the path, as well as any intersections encountered. In addition to tracing a recording route, this is great for providing just-in-time info to navigation applications, enabling them to conserve resources by omitting info like speed limits upfront that may be irrelevant if the user goes off-route.
|
980
1794
|
|
981
1795
|
:param trace_attributes_request:
|
982
1796
|
:type trace_attributes_request: TraceAttributesRequest
|
983
|
-
:param async_req: Whether to execute the request asynchronously.
|
984
|
-
:type async_req: bool, optional
|
985
|
-
:param _preload_content: if False, the ApiResponse.data will
|
986
|
-
be set to none and raw_data will store the
|
987
|
-
HTTP response body without reading/decoding.
|
988
|
-
Default is True.
|
989
|
-
:type _preload_content: bool, optional
|
990
|
-
:param _return_http_data_only: response data instead of ApiResponse
|
991
|
-
object with status code, headers, etc
|
992
|
-
:type _return_http_data_only: bool, optional
|
993
1797
|
:param _request_timeout: timeout setting for this request. If one
|
994
1798
|
number provided, it will be total request
|
995
1799
|
timeout. It can also be a pair (tuple) of
|
996
1800
|
(connection, read) timeouts.
|
1801
|
+
:type _request_timeout: int, tuple(int, int), optional
|
997
1802
|
:param _request_auth: set to override the auth_settings for an a single
|
998
|
-
request; this effectively ignores the
|
999
|
-
in the spec for a single request.
|
1803
|
+
request; this effectively ignores the
|
1804
|
+
authentication in the spec for a single request.
|
1000
1805
|
:type _request_auth: dict, optional
|
1001
|
-
:
|
1806
|
+
:param _content_type: force content-type for the request.
|
1807
|
+
:type _content_type: str, Optional
|
1808
|
+
:param _headers: set to override the headers for a single
|
1809
|
+
request; this effectively ignores the headers
|
1810
|
+
in the spec for a single request.
|
1811
|
+
:type _headers: dict, optional
|
1812
|
+
:param _host_index: set to override the host_index for a single
|
1813
|
+
request; this effectively ignores the host_index
|
1814
|
+
in the spec for a single request.
|
1815
|
+
:type _host_index: int, optional
|
1002
1816
|
:return: Returns the result object.
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1817
|
+
""" # noqa: E501
|
1818
|
+
|
1819
|
+
_param = self._trace_attributes_serialize(
|
1820
|
+
trace_attributes_request=trace_attributes_request,
|
1821
|
+
_request_auth=_request_auth,
|
1822
|
+
_content_type=_content_type,
|
1823
|
+
_headers=_headers,
|
1824
|
+
_host_index=_host_index
|
1825
|
+
)
|
1826
|
+
|
1827
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1828
|
+
'200': "TraceAttributesResponse",
|
1829
|
+
'400': None,
|
1830
|
+
}
|
1831
|
+
response_data = self.api_client.call_api(
|
1832
|
+
*_param,
|
1833
|
+
_request_timeout=_request_timeout
|
1834
|
+
)
|
1835
|
+
response_data.read()
|
1836
|
+
return self.api_client.response_deserialize(
|
1837
|
+
response_data=response_data,
|
1838
|
+
response_types_map=_response_types_map,
|
1839
|
+
)
|
1007
1840
|
|
1008
|
-
_params = locals()
|
1009
1841
|
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
'_content_type',
|
1021
|
-
'_headers'
|
1842
|
+
@validate_call
|
1843
|
+
def trace_attributes_without_preload_content(
|
1844
|
+
self,
|
1845
|
+
trace_attributes_request: Optional[TraceAttributesRequest] = None,
|
1846
|
+
_request_timeout: Union[
|
1847
|
+
None,
|
1848
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1849
|
+
Tuple[
|
1850
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1851
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1022
1852
|
]
|
1853
|
+
] = None,
|
1854
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1855
|
+
_content_type: Optional[StrictStr] = None,
|
1856
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1857
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1858
|
+
) -> RESTResponseType:
|
1859
|
+
"""Trace the attributes of roads visited on a route.
|
1860
|
+
|
1861
|
+
The trace attributes endpoint retrieves detailed information along a route, returning details for each section along the path, as well as any intersections encountered. In addition to tracing a recording route, this is great for providing just-in-time info to navigation applications, enabling them to conserve resources by omitting info like speed limits upfront that may be irrelevant if the user goes off-route.
|
1862
|
+
|
1863
|
+
:param trace_attributes_request:
|
1864
|
+
:type trace_attributes_request: TraceAttributesRequest
|
1865
|
+
:param _request_timeout: timeout setting for this request. If one
|
1866
|
+
number provided, it will be total request
|
1867
|
+
timeout. It can also be a pair (tuple) of
|
1868
|
+
(connection, read) timeouts.
|
1869
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1870
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1871
|
+
request; this effectively ignores the
|
1872
|
+
authentication in the spec for a single request.
|
1873
|
+
:type _request_auth: dict, optional
|
1874
|
+
:param _content_type: force content-type for the request.
|
1875
|
+
:type _content_type: str, Optional
|
1876
|
+
:param _headers: set to override the headers for a single
|
1877
|
+
request; this effectively ignores the headers
|
1878
|
+
in the spec for a single request.
|
1879
|
+
:type _headers: dict, optional
|
1880
|
+
:param _host_index: set to override the host_index for a single
|
1881
|
+
request; this effectively ignores the host_index
|
1882
|
+
in the spec for a single request.
|
1883
|
+
:type _host_index: int, optional
|
1884
|
+
:return: Returns the result object.
|
1885
|
+
""" # noqa: E501
|
1886
|
+
|
1887
|
+
_param = self._trace_attributes_serialize(
|
1888
|
+
trace_attributes_request=trace_attributes_request,
|
1889
|
+
_request_auth=_request_auth,
|
1890
|
+
_content_type=_content_type,
|
1891
|
+
_headers=_headers,
|
1892
|
+
_host_index=_host_index
|
1023
1893
|
)
|
1024
1894
|
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1895
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1896
|
+
'200': "TraceAttributesResponse",
|
1897
|
+
'400': None,
|
1898
|
+
}
|
1899
|
+
response_data = self.api_client.call_api(
|
1900
|
+
*_param,
|
1901
|
+
_request_timeout=_request_timeout
|
1902
|
+
)
|
1903
|
+
return response_data.response
|
1034
1904
|
|
1035
|
-
_collection_formats = {}
|
1036
1905
|
|
1037
|
-
|
1038
|
-
|
1906
|
+
def _trace_attributes_serialize(
|
1907
|
+
self,
|
1908
|
+
trace_attributes_request,
|
1909
|
+
_request_auth,
|
1910
|
+
_content_type,
|
1911
|
+
_headers,
|
1912
|
+
_host_index,
|
1913
|
+
) -> RequestSerialized:
|
1914
|
+
|
1915
|
+
_host = None
|
1916
|
+
|
1917
|
+
_collection_formats: Dict[str, str] = {
|
1918
|
+
}
|
1919
|
+
|
1920
|
+
_path_params: Dict[str, str] = {}
|
1921
|
+
_query_params: List[Tuple[str, str]] = []
|
1922
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1923
|
+
_form_params: List[Tuple[str, str]] = []
|
1924
|
+
_files: Dict[str, str] = {}
|
1925
|
+
_body_params: Optional[bytes] = None
|
1039
1926
|
|
1927
|
+
# process the path parameters
|
1040
1928
|
# process the query parameters
|
1041
|
-
_query_params = []
|
1042
1929
|
# process the header parameters
|
1043
|
-
_header_params = dict(_params.get('_headers', {}))
|
1044
1930
|
# process the form parameters
|
1045
|
-
_form_params = []
|
1046
|
-
_files = {}
|
1047
1931
|
# process the body parameter
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1932
|
+
if trace_attributes_request is not None:
|
1933
|
+
_body_params = trace_attributes_request
|
1934
|
+
|
1051
1935
|
|
1052
1936
|
# set the HTTP header `Accept`
|
1053
1937
|
_header_params['Accept'] = self.api_client.select_header_accept(
|
1054
|
-
[
|
1938
|
+
[
|
1939
|
+
'application/json'
|
1940
|
+
]
|
1941
|
+
)
|
1055
1942
|
|
1056
1943
|
# set the HTTP header `Content-Type`
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1944
|
+
if _content_type:
|
1945
|
+
_header_params['Content-Type'] = _content_type
|
1946
|
+
else:
|
1947
|
+
_default_content_type = (
|
1948
|
+
self.api_client.select_header_content_type(
|
1949
|
+
[
|
1950
|
+
'application/json'
|
1951
|
+
]
|
1952
|
+
)
|
1953
|
+
)
|
1954
|
+
if _default_content_type is not None:
|
1955
|
+
_header_params['Content-Type'] = _default_content_type
|
1062
1956
|
|
1063
1957
|
# authentication setting
|
1064
|
-
_auth_settings
|
1065
|
-
|
1066
|
-
|
1067
|
-
'200': "TraceAttributesResponse",
|
1068
|
-
}
|
1958
|
+
_auth_settings: List[str] = [
|
1959
|
+
'ApiKeyAuth'
|
1960
|
+
]
|
1069
1961
|
|
1070
|
-
return self.api_client.
|
1071
|
-
'
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1962
|
+
return self.api_client.param_serialize(
|
1963
|
+
method='POST',
|
1964
|
+
resource_path='/trace_attributes/v1',
|
1965
|
+
path_params=_path_params,
|
1966
|
+
query_params=_query_params,
|
1967
|
+
header_params=_header_params,
|
1075
1968
|
body=_body_params,
|
1076
1969
|
post_params=_form_params,
|
1077
1970
|
files=_files,
|
1078
|
-
response_types_map=_response_types_map,
|
1079
1971
|
auth_settings=_auth_settings,
|
1080
|
-
async_req=_params.get('async_req'),
|
1081
|
-
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
1082
|
-
_preload_content=_params.get('_preload_content', True),
|
1083
|
-
_request_timeout=_params.get('_request_timeout'),
|
1084
1972
|
collection_formats=_collection_formats,
|
1085
|
-
|
1973
|
+
_host=_host,
|
1974
|
+
_request_auth=_request_auth
|
1975
|
+
)
|
1976
|
+
|
1977
|
+
|