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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. stadiamaps/__init__.py +11 -11
  2. stadiamaps/api/geocoding_api.py +128 -116
  3. stadiamaps/api/geospatial_api.py +7 -3
  4. stadiamaps/api/routing_api.py +22 -8
  5. stadiamaps/api_client.py +14 -5
  6. stadiamaps/configuration.py +156 -40
  7. stadiamaps/exceptions.py +1 -1
  8. stadiamaps/models/__init__.py +10 -10
  9. stadiamaps/models/access.py +1 -1
  10. stadiamaps/models/admin_region.py +1 -1
  11. stadiamaps/models/administrative.py +1 -1
  12. stadiamaps/models/annotation_filters.py +1 -1
  13. stadiamaps/models/auto_costing_options.py +1 -1
  14. stadiamaps/models/base_costing_options.py +1 -1
  15. stadiamaps/models/base_trace_request.py +4 -4
  16. stadiamaps/models/bicycle_costing_options.py +1 -1
  17. stadiamaps/models/bike_network.py +1 -1
  18. stadiamaps/models/bulk_request.py +1 -1
  19. stadiamaps/models/bulk_request_query.py +1 -1
  20. stadiamaps/models/bulk_search_response.py +4 -4
  21. stadiamaps/models/contour.py +1 -1
  22. stadiamaps/models/coordinate.py +1 -1
  23. stadiamaps/models/costing_model.py +1 -1
  24. stadiamaps/models/costing_options.py +1 -1
  25. stadiamaps/models/directions_options.py +4 -4
  26. stadiamaps/models/distance_unit.py +1 -1
  27. stadiamaps/models/edge_sign.py +1 -1
  28. stadiamaps/models/edge_use.py +1 -1
  29. stadiamaps/models/end_node.py +1 -1
  30. stadiamaps/models/extended_directions_options.py +1 -1
  31. stadiamaps/models/geo_attributes.py +1 -1
  32. stadiamaps/models/geo_json_geometry.py +1 -1
  33. stadiamaps/models/geo_json_geometry_base.py +1 -1
  34. stadiamaps/models/geo_json_line_string.py +1 -1
  35. stadiamaps/models/geo_json_point.py +1 -1
  36. stadiamaps/models/geo_json_polygon.py +1 -1
  37. stadiamaps/models/{pelias_response.py → geocode_response.py} +8 -8
  38. stadiamaps/models/{pelias_geo_json_feature.py → geocoding_geo_json_feature.py} +8 -8
  39. stadiamaps/models/{pelias_geo_json_properties.py → geocoding_geo_json_properties.py} +40 -14
  40. stadiamaps/models/{pelias_geo_json_properties_addendum.py → geocoding_geo_json_properties_addendum.py} +7 -7
  41. stadiamaps/models/{pelias_geo_json_properties_addendum_osm.py → geocoding_geo_json_properties_addendum_osm.py} +5 -5
  42. stadiamaps/models/{pelias_layer.py → geocoding_layer.py} +3 -3
  43. stadiamaps/models/geocoding_object.py +1 -1
  44. stadiamaps/models/{pelias_source.py → geocoding_source.py} +4 -3
  45. stadiamaps/models/height_request.py +1 -1
  46. stadiamaps/models/height_response.py +1 -1
  47. stadiamaps/models/highway_classification.py +1 -1
  48. stadiamaps/models/intersecting_edge.py +1 -1
  49. stadiamaps/models/isochrone_costing_model.py +1 -1
  50. stadiamaps/models/isochrone_feature.py +1 -1
  51. stadiamaps/models/isochrone_properties.py +1 -1
  52. stadiamaps/models/isochrone_request.py +1 -1
  53. stadiamaps/models/isochrone_response.py +1 -1
  54. stadiamaps/models/locate_detailed_edge.py +1 -1
  55. stadiamaps/models/locate_edge.py +1 -1
  56. stadiamaps/models/locate_edge_info.py +1 -1
  57. stadiamaps/models/locate_node.py +1 -1
  58. stadiamaps/models/locate_object.py +1 -1
  59. stadiamaps/models/low_speed_vehicle_costing_options.py +1 -1
  60. stadiamaps/models/maneuver_sign.py +1 -1
  61. stadiamaps/models/maneuver_sign_element.py +1 -1
  62. stadiamaps/models/map_match_costing_model.py +1 -1
  63. stadiamaps/models/map_match_request.py +10 -8
  64. stadiamaps/models/map_match_route_response.py +1 -1
  65. stadiamaps/models/map_match_trace_options.py +1 -1
  66. stadiamaps/models/map_match_waypoint.py +1 -1
  67. stadiamaps/models/matched_point.py +1 -1
  68. stadiamaps/models/matrix_costing_model.py +1 -1
  69. stadiamaps/models/matrix_distance.py +1 -1
  70. stadiamaps/models/matrix_request.py +4 -4
  71. stadiamaps/models/matrix_response.py +4 -4
  72. stadiamaps/models/matrix_waypoint.py +1 -1
  73. stadiamaps/models/motor_scooter_costing_options.py +1 -1
  74. stadiamaps/models/motorcycle_costing_options.py +1 -1
  75. stadiamaps/models/nearest_roads_request.py +4 -4
  76. stadiamaps/models/node_id.py +1 -1
  77. stadiamaps/models/node_type.py +1 -1
  78. stadiamaps/models/optimized_route_request.py +10 -8
  79. stadiamaps/models/osrm_admin.py +1 -1
  80. stadiamaps/models/osrm_annotation.py +1 -1
  81. stadiamaps/models/osrm_banner_component.py +1 -1
  82. stadiamaps/models/osrm_banner_content.py +1 -1
  83. stadiamaps/models/osrm_banner_instruction.py +1 -1
  84. stadiamaps/models/osrm_base_api_response.py +1 -1
  85. stadiamaps/models/osrm_guidance_modifier.py +1 -1
  86. stadiamaps/models/osrm_intersection.py +1 -1
  87. stadiamaps/models/osrm_lane.py +1 -1
  88. stadiamaps/models/osrm_route.py +1 -1
  89. stadiamaps/models/osrm_route_leg.py +1 -1
  90. stadiamaps/models/osrm_route_response.py +1 -1
  91. stadiamaps/models/osrm_route_step.py +1 -1
  92. stadiamaps/models/osrm_speed_limit.py +1 -1
  93. stadiamaps/models/osrm_step_maneuver.py +1 -1
  94. stadiamaps/models/osrm_via_waypoint.py +1 -1
  95. stadiamaps/models/osrm_voice_instruction.py +1 -1
  96. stadiamaps/models/osrm_waypoint.py +1 -1
  97. stadiamaps/models/pedestrian_costing_options.py +1 -1
  98. stadiamaps/models/restrictions.py +1 -1
  99. stadiamaps/models/road_class.py +1 -1
  100. stadiamaps/models/route200_response.py +1 -1
  101. stadiamaps/models/route_leg.py +1 -1
  102. stadiamaps/models/route_maneuver.py +1 -1
  103. stadiamaps/models/route_request.py +5 -5
  104. stadiamaps/models/route_response.py +1 -1
  105. stadiamaps/models/route_response_alternates_inner.py +1 -1
  106. stadiamaps/models/route_summary.py +1 -1
  107. stadiamaps/models/route_trip.py +7 -7
  108. stadiamaps/models/{valhalla_languages.py → routing_languages.py} +4 -4
  109. stadiamaps/models/{valhalla_long_units.py → routing_long_units.py} +4 -4
  110. stadiamaps/models/routing_response_waypoint.py +1 -1
  111. stadiamaps/models/routing_waypoint.py +1 -1
  112. stadiamaps/models/routing_waypoint_all_of_search_filter.py +1 -1
  113. stadiamaps/models/search_query.py +6 -6
  114. stadiamaps/models/search_structured_query.py +6 -6
  115. stadiamaps/models/simple_routing_waypoint.py +1 -1
  116. stadiamaps/models/speeds.py +1 -1
  117. stadiamaps/models/trace_attribute_filter_options.py +1 -1
  118. stadiamaps/models/trace_attribute_key.py +1 -1
  119. stadiamaps/models/trace_attributes_base_response.py +1 -1
  120. stadiamaps/models/trace_attributes_request.py +10 -8
  121. stadiamaps/models/trace_attributes_response.py +4 -4
  122. stadiamaps/models/trace_edge.py +1 -1
  123. stadiamaps/models/travel_mode.py +1 -1
  124. stadiamaps/models/traversability.py +1 -1
  125. stadiamaps/models/truck_costing_options.py +1 -1
  126. stadiamaps/models/tz_response.py +1 -1
  127. stadiamaps/models/warning.py +1 -1
  128. stadiamaps/rest.py +2 -2
  129. {stadiamaps-4.0.0.dist-info → stadiamaps-5.0.0.dist-info}/METADATA +14 -6
  130. stadiamaps-5.0.0.dist-info/RECORD +157 -0
  131. {stadiamaps-4.0.0.dist-info → stadiamaps-5.0.0.dist-info}/WHEEL +1 -1
  132. stadiamaps/models/pelias_response_geocoding.py +0 -89
  133. stadiamaps/models/route_response_trip.py +0 -117
  134. stadiamaps/models/trace_attributes_response_all_of.py +0 -96
  135. stadiamaps-4.0.0.dist-info/RECORD +0 -160
  136. {stadiamaps-4.0.0.dist-info → stadiamaps-5.0.0.dist-info}/LICENSE.txt +0 -0
  137. {stadiamaps-4.0.0.dist-info → stadiamaps-5.0.0.dist-info}/top_level.txt +0 -0
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 7.0.0
8
+ The version of the OpenAPI document: 8.0.0
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -260,7 +260,9 @@ class GeospatialApi:
260
260
  _query_params: List[Tuple[str, str]] = []
261
261
  _header_params: Dict[str, Optional[str]] = _headers or {}
262
262
  _form_params: List[Tuple[str, str]] = []
263
- _files: Dict[str, Union[str, bytes]] = {}
263
+ _files: Dict[
264
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
265
+ ] = {}
264
266
  _body_params: Optional[bytes] = None
265
267
 
266
268
  # process the path parameters
@@ -561,7 +563,9 @@ class GeospatialApi:
561
563
  _query_params: List[Tuple[str, str]] = []
562
564
  _header_params: Dict[str, Optional[str]] = _headers or {}
563
565
  _form_params: List[Tuple[str, str]] = []
564
- _files: Dict[str, Union[str, bytes]] = {}
566
+ _files: Dict[
567
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
568
+ ] = {}
565
569
  _body_params: Optional[bytes] = None
566
570
 
567
571
  # process the path parameters
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 7.0.0
8
+ The version of the OpenAPI document: 8.0.0
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -268,7 +268,9 @@ class RoutingApi:
268
268
  _query_params: List[Tuple[str, str]] = []
269
269
  _header_params: Dict[str, Optional[str]] = _headers or {}
270
270
  _form_params: List[Tuple[str, str]] = []
271
- _files: Dict[str, Union[str, bytes]] = {}
271
+ _files: Dict[
272
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
273
+ ] = {}
272
274
  _body_params: Optional[bytes] = None
273
275
 
274
276
  # process the path parameters
@@ -546,7 +548,9 @@ class RoutingApi:
546
548
  _query_params: List[Tuple[str, str]] = []
547
549
  _header_params: Dict[str, Optional[str]] = _headers or {}
548
550
  _form_params: List[Tuple[str, str]] = []
549
- _files: Dict[str, Union[str, bytes]] = {}
551
+ _files: Dict[
552
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
553
+ ] = {}
550
554
  _body_params: Optional[bytes] = None
551
555
 
552
556
  # process the path parameters
@@ -821,7 +825,9 @@ class RoutingApi:
821
825
  _query_params: List[Tuple[str, str]] = []
822
826
  _header_params: Dict[str, Optional[str]] = _headers or {}
823
827
  _form_params: List[Tuple[str, str]] = []
824
- _files: Dict[str, Union[str, bytes]] = {}
828
+ _files: Dict[
829
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
830
+ ] = {}
825
831
  _body_params: Optional[bytes] = None
826
832
 
827
833
  # process the path parameters
@@ -1099,7 +1105,9 @@ class RoutingApi:
1099
1105
  _query_params: List[Tuple[str, str]] = []
1100
1106
  _header_params: Dict[str, Optional[str]] = _headers or {}
1101
1107
  _form_params: List[Tuple[str, str]] = []
1102
- _files: Dict[str, Union[str, bytes]] = {}
1108
+ _files: Dict[
1109
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1110
+ ] = {}
1103
1111
  _body_params: Optional[bytes] = None
1104
1112
 
1105
1113
  # process the path parameters
@@ -1377,7 +1385,9 @@ class RoutingApi:
1377
1385
  _query_params: List[Tuple[str, str]] = []
1378
1386
  _header_params: Dict[str, Optional[str]] = _headers or {}
1379
1387
  _form_params: List[Tuple[str, str]] = []
1380
- _files: Dict[str, Union[str, bytes]] = {}
1388
+ _files: Dict[
1389
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1390
+ ] = {}
1381
1391
  _body_params: Optional[bytes] = None
1382
1392
 
1383
1393
  # process the path parameters
@@ -1652,7 +1662,9 @@ class RoutingApi:
1652
1662
  _query_params: List[Tuple[str, str]] = []
1653
1663
  _header_params: Dict[str, Optional[str]] = _headers or {}
1654
1664
  _form_params: List[Tuple[str, str]] = []
1655
- _files: Dict[str, Union[str, bytes]] = {}
1665
+ _files: Dict[
1666
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1667
+ ] = {}
1656
1668
  _body_params: Optional[bytes] = None
1657
1669
 
1658
1670
  # process the path parameters
@@ -1927,7 +1939,9 @@ class RoutingApi:
1927
1939
  _query_params: List[Tuple[str, str]] = []
1928
1940
  _header_params: Dict[str, Optional[str]] = _headers or {}
1929
1941
  _form_params: List[Tuple[str, str]] = []
1930
- _files: Dict[str, Union[str, bytes]] = {}
1942
+ _files: Dict[
1943
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1944
+ ] = {}
1931
1945
  _body_params: Optional[bytes] = None
1932
1946
 
1933
1947
  # process the path parameters
stadiamaps/api_client.py CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 7.0.0
8
+ The version of the OpenAPI document: 8.0.0
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -91,7 +91,7 @@ class ApiClient:
91
91
  self.default_headers[header_name] = header_value
92
92
  self.cookie = cookie
93
93
  # Set default User-Agent.
94
- self.user_agent = 'OpenAPI-Generator/4.0.0/python'
94
+ self.user_agent = 'OpenAPI-Generator/5.0.0/python'
95
95
  self.client_side_validation = configuration.client_side_validation
96
96
 
97
97
  def __enter__(self):
@@ -405,12 +405,12 @@ class ApiClient:
405
405
  data = json.loads(response_text)
406
406
  except ValueError:
407
407
  data = response_text
408
- elif content_type.startswith("application/json"):
408
+ elif re.match(r'^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE):
409
409
  if response_text == "":
410
410
  data = ""
411
411
  else:
412
412
  data = json.loads(response_text)
413
- elif content_type.startswith("text/plain"):
413
+ elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE):
414
414
  data = response_text
415
415
  else:
416
416
  raise ApiException(
@@ -536,7 +536,10 @@ class ApiClient:
536
536
 
537
537
  return "&".join(["=".join(map(str, item)) for item in new_params])
538
538
 
539
- def files_parameters(self, files: Dict[str, Union[str, bytes]]):
539
+ def files_parameters(
540
+ self,
541
+ files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]],
542
+ ):
540
543
  """Builds form parameters.
541
544
 
542
545
  :param files: File parameters.
@@ -551,6 +554,12 @@ class ApiClient:
551
554
  elif isinstance(v, bytes):
552
555
  filename = k
553
556
  filedata = v
557
+ elif isinstance(v, tuple):
558
+ filename, filedata = v
559
+ elif isinstance(v, list):
560
+ for file_param in v:
561
+ params.extend(self.files_parameters({k: file_param}))
562
+ continue
554
563
  else:
555
564
  raise ValueError("Unsupported file value")
556
565
  mimetype = (
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 7.0.0
8
+ The version of the OpenAPI document: 8.0.0
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -14,14 +14,16 @@
14
14
 
15
15
 
16
16
  import copy
17
+ import http.client as httplib
17
18
  import logging
18
19
  from logging import FileHandler
19
20
  import multiprocessing
20
21
  import sys
21
- from typing import Optional
22
+ from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict
23
+ from typing_extensions import NotRequired, Self
24
+
22
25
  import urllib3
23
26
 
24
- import http.client as httplib
25
27
 
26
28
  JSON_SCHEMA_VALIDATION_KEYWORDS = {
27
29
  'multipleOf', 'maximum', 'exclusiveMaximum',
@@ -29,6 +31,107 @@ JSON_SCHEMA_VALIDATION_KEYWORDS = {
29
31
  'minLength', 'pattern', 'maxItems', 'minItems'
30
32
  }
31
33
 
34
+ ServerVariablesT = Dict[str, str]
35
+
36
+ GenericAuthSetting = TypedDict(
37
+ "GenericAuthSetting",
38
+ {
39
+ "type": str,
40
+ "in": str,
41
+ "key": str,
42
+ "value": str,
43
+ },
44
+ )
45
+
46
+
47
+ OAuth2AuthSetting = TypedDict(
48
+ "OAuth2AuthSetting",
49
+ {
50
+ "type": Literal["oauth2"],
51
+ "in": Literal["header"],
52
+ "key": Literal["Authorization"],
53
+ "value": str,
54
+ },
55
+ )
56
+
57
+
58
+ APIKeyAuthSetting = TypedDict(
59
+ "APIKeyAuthSetting",
60
+ {
61
+ "type": Literal["api_key"],
62
+ "in": str,
63
+ "key": str,
64
+ "value": Optional[str],
65
+ },
66
+ )
67
+
68
+
69
+ BasicAuthSetting = TypedDict(
70
+ "BasicAuthSetting",
71
+ {
72
+ "type": Literal["basic"],
73
+ "in": Literal["header"],
74
+ "key": Literal["Authorization"],
75
+ "value": Optional[str],
76
+ },
77
+ )
78
+
79
+
80
+ BearerFormatAuthSetting = TypedDict(
81
+ "BearerFormatAuthSetting",
82
+ {
83
+ "type": Literal["bearer"],
84
+ "in": Literal["header"],
85
+ "format": Literal["JWT"],
86
+ "key": Literal["Authorization"],
87
+ "value": str,
88
+ },
89
+ )
90
+
91
+
92
+ BearerAuthSetting = TypedDict(
93
+ "BearerAuthSetting",
94
+ {
95
+ "type": Literal["bearer"],
96
+ "in": Literal["header"],
97
+ "key": Literal["Authorization"],
98
+ "value": str,
99
+ },
100
+ )
101
+
102
+
103
+ HTTPSignatureAuthSetting = TypedDict(
104
+ "HTTPSignatureAuthSetting",
105
+ {
106
+ "type": Literal["http-signature"],
107
+ "in": Literal["header"],
108
+ "key": Literal["Authorization"],
109
+ "value": None,
110
+ },
111
+ )
112
+
113
+
114
+ AuthSettings = TypedDict(
115
+ "AuthSettings",
116
+ {
117
+ "ApiKeyAuth": APIKeyAuthSetting,
118
+ },
119
+ total=False,
120
+ )
121
+
122
+
123
+ class HostSettingVariable(TypedDict):
124
+ description: str
125
+ default_value: str
126
+ enum_values: List[str]
127
+
128
+
129
+ class HostSetting(TypedDict):
130
+ url: str
131
+ description: str
132
+ variables: NotRequired[Dict[str, HostSettingVariable]]
133
+
134
+
32
135
  class Configuration:
33
136
  """This class contains various settings of the API client.
34
137
 
@@ -82,20 +185,26 @@ conf = stadiamaps.Configuration(
82
185
  Cookie: JSESSIONID abc123
83
186
  """
84
187
 
85
- _default = None
86
-
87
- def __init__(self, host=None,
88
- api_key=None, api_key_prefix=None,
89
- username=None, password=None,
90
- access_token=None,
91
- server_index=None, server_variables=None,
92
- server_operation_index=None, server_operation_variables=None,
93
- ignore_operation_servers=False,
94
- ssl_ca_cert=None,
95
- retries=None,
96
- *,
97
- debug: Optional[bool] = None
98
- ) -> None:
188
+ _default: ClassVar[Optional[Self]] = None
189
+
190
+ def __init__(
191
+ self,
192
+ host: Optional[str]=None,
193
+ api_key: Optional[Dict[str, str]]=None,
194
+ api_key_prefix: Optional[Dict[str, str]]=None,
195
+ username: Optional[str]=None,
196
+ password: Optional[str]=None,
197
+ access_token: Optional[str]=None,
198
+ server_index: Optional[int]=None,
199
+ server_variables: Optional[ServerVariablesT]=None,
200
+ server_operation_index: Optional[Dict[int, int]]=None,
201
+ server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None,
202
+ ignore_operation_servers: bool=False,
203
+ ssl_ca_cert: Optional[str]=None,
204
+ retries: Optional[int] = None,
205
+ *,
206
+ debug: Optional[bool] = None,
207
+ ) -> None:
99
208
  """Constructor
100
209
  """
101
210
  self._base_path = "https://api.stadiamaps.com" if host is None else host
@@ -219,7 +328,7 @@ conf = stadiamaps.Configuration(
219
328
  """date format
220
329
  """
221
330
 
222
- def __deepcopy__(self, memo):
331
+ def __deepcopy__(self, memo: Dict[int, Any]) -> Self:
223
332
  cls = self.__class__
224
333
  result = cls.__new__(cls)
225
334
  memo[id(self)] = result
@@ -233,11 +342,11 @@ conf = stadiamaps.Configuration(
233
342
  result.debug = self.debug
234
343
  return result
235
344
 
236
- def __setattr__(self, name, value):
345
+ def __setattr__(self, name: str, value: Any) -> None:
237
346
  object.__setattr__(self, name, value)
238
347
 
239
348
  @classmethod
240
- def set_default(cls, default):
349
+ def set_default(cls, default: Optional[Self]) -> None:
241
350
  """Set default instance of configuration.
242
351
 
243
352
  It stores default configuration, which can be
@@ -248,7 +357,7 @@ conf = stadiamaps.Configuration(
248
357
  cls._default = default
249
358
 
250
359
  @classmethod
251
- def get_default_copy(cls):
360
+ def get_default_copy(cls) -> Self:
252
361
  """Deprecated. Please use `get_default` instead.
253
362
 
254
363
  Deprecated. Please use `get_default` instead.
@@ -258,7 +367,7 @@ conf = stadiamaps.Configuration(
258
367
  return cls.get_default()
259
368
 
260
369
  @classmethod
261
- def get_default(cls):
370
+ def get_default(cls) -> Self:
262
371
  """Return the default configuration.
263
372
 
264
373
  This method returns newly created, based on default constructor,
@@ -268,11 +377,11 @@ conf = stadiamaps.Configuration(
268
377
  :return: The configuration object.
269
378
  """
270
379
  if cls._default is None:
271
- cls._default = Configuration()
380
+ cls._default = cls()
272
381
  return cls._default
273
382
 
274
383
  @property
275
- def logger_file(self):
384
+ def logger_file(self) -> Optional[str]:
276
385
  """The logger file.
277
386
 
278
387
  If the logger_file is None, then add stream handler and remove file
@@ -284,7 +393,7 @@ conf = stadiamaps.Configuration(
284
393
  return self.__logger_file
285
394
 
286
395
  @logger_file.setter
287
- def logger_file(self, value):
396
+ def logger_file(self, value: Optional[str]) -> None:
288
397
  """The logger file.
289
398
 
290
399
  If the logger_file is None, then add stream handler and remove file
@@ -303,7 +412,7 @@ conf = stadiamaps.Configuration(
303
412
  logger.addHandler(self.logger_file_handler)
304
413
 
305
414
  @property
306
- def debug(self):
415
+ def debug(self) -> bool:
307
416
  """Debug status
308
417
 
309
418
  :param value: The debug status, True or False.
@@ -312,7 +421,7 @@ conf = stadiamaps.Configuration(
312
421
  return self.__debug
313
422
 
314
423
  @debug.setter
315
- def debug(self, value):
424
+ def debug(self, value: bool) -> None:
316
425
  """Debug status
317
426
 
318
427
  :param value: The debug status, True or False.
@@ -334,7 +443,7 @@ conf = stadiamaps.Configuration(
334
443
  httplib.HTTPConnection.debuglevel = 0
335
444
 
336
445
  @property
337
- def logger_format(self):
446
+ def logger_format(self) -> str:
338
447
  """The logger format.
339
448
 
340
449
  The logger_formatter will be updated when sets logger_format.
@@ -345,7 +454,7 @@ conf = stadiamaps.Configuration(
345
454
  return self.__logger_format
346
455
 
347
456
  @logger_format.setter
348
- def logger_format(self, value):
457
+ def logger_format(self, value: str) -> None:
349
458
  """The logger format.
350
459
 
351
460
  The logger_formatter will be updated when sets logger_format.
@@ -356,7 +465,7 @@ conf = stadiamaps.Configuration(
356
465
  self.__logger_format = value
357
466
  self.logger_formatter = logging.Formatter(self.__logger_format)
358
467
 
359
- def get_api_key_with_prefix(self, identifier, alias=None):
468
+ def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]:
360
469
  """Gets API key (with prefix if set).
361
470
 
362
471
  :param identifier: The identifier of apiKey.
@@ -373,7 +482,9 @@ conf = stadiamaps.Configuration(
373
482
  else:
374
483
  return key
375
484
 
376
- def get_basic_auth_token(self):
485
+ return None
486
+
487
+ def get_basic_auth_token(self) -> Optional[str]:
377
488
  """Gets HTTP basic authentication header (string).
378
489
 
379
490
  :return: The token for basic HTTP authentication.
@@ -388,12 +499,12 @@ conf = stadiamaps.Configuration(
388
499
  basic_auth=username + ':' + password
389
500
  ).get('authorization')
390
501
 
391
- def auth_settings(self):
502
+ def auth_settings(self)-> AuthSettings:
392
503
  """Gets Auth Settings dict for api client.
393
504
 
394
505
  :return: The Auth Settings information dict.
395
506
  """
396
- auth = {}
507
+ auth: AuthSettings = {}
397
508
  if 'ApiKeyAuth' in self.api_key:
398
509
  auth['ApiKeyAuth'] = {
399
510
  'type': 'api_key',
@@ -405,7 +516,7 @@ conf = stadiamaps.Configuration(
405
516
  }
406
517
  return auth
407
518
 
408
- def to_debug_report(self):
519
+ def to_debug_report(self) -> str:
409
520
  """Gets the essential information for debugging.
410
521
 
411
522
  :return: The report for debugging.
@@ -413,11 +524,11 @@ conf = stadiamaps.Configuration(
413
524
  return "Python SDK Debug Report:\n"\
414
525
  "OS: {env}\n"\
415
526
  "Python Version: {pyversion}\n"\
416
- "Version of the API: 7.0.0\n"\
417
- "SDK Package Version: 4.0.0".\
527
+ "Version of the API: 8.0.0\n"\
528
+ "SDK Package Version: 5.0.0".\
418
529
  format(env=sys.platform, pyversion=sys.version)
419
530
 
420
- def get_host_settings(self):
531
+ def get_host_settings(self) -> List[HostSetting]:
421
532
  """Gets an array of host settings
422
533
 
423
534
  :return: An array of host settings
@@ -433,7 +544,12 @@ conf = stadiamaps.Configuration(
433
544
  }
434
545
  ]
435
546
 
436
- def get_host_from_settings(self, index, variables=None, servers=None):
547
+ def get_host_from_settings(
548
+ self,
549
+ index: Optional[int],
550
+ variables: Optional[ServerVariablesT]=None,
551
+ servers: Optional[List[HostSetting]]=None,
552
+ ) -> str:
437
553
  """Gets host URL based on the index and variables
438
554
  :param index: array index of the host settings
439
555
  :param variables: hash of variable and the corresponding value
@@ -473,12 +589,12 @@ conf = stadiamaps.Configuration(
473
589
  return url
474
590
 
475
591
  @property
476
- def host(self):
592
+ def host(self) -> str:
477
593
  """Return generated host."""
478
594
  return self.get_host_from_settings(self.server_index, variables=self.server_variables)
479
595
 
480
596
  @host.setter
481
- def host(self, value):
597
+ def host(self, value: str) -> None:
482
598
  """Fix base path."""
483
599
  self._base_path = value
484
600
  self.server_index = None
stadiamaps/exceptions.py CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 7.0.0
8
+ The version of the OpenAPI document: 8.0.0
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
8
8
 
9
- The version of the OpenAPI document: 7.0.0
9
+ The version of the OpenAPI document: 8.0.0
10
10
  Contact: support@stadiamaps.com
11
11
  Generated by OpenAPI Generator (https://openapi-generator.tech)
12
12
 
@@ -43,7 +43,14 @@ from stadiamaps.models.geo_json_geometry_base import GeoJSONGeometryBase
43
43
  from stadiamaps.models.geo_json_line_string import GeoJSONLineString
44
44
  from stadiamaps.models.geo_json_point import GeoJSONPoint
45
45
  from stadiamaps.models.geo_json_polygon import GeoJSONPolygon
46
+ from stadiamaps.models.geocode_response import GeocodeResponse
47
+ from stadiamaps.models.geocoding_geo_json_feature import GeocodingGeoJSONFeature
48
+ from stadiamaps.models.geocoding_geo_json_properties import GeocodingGeoJSONProperties
49
+ from stadiamaps.models.geocoding_geo_json_properties_addendum import GeocodingGeoJSONPropertiesAddendum
50
+ from stadiamaps.models.geocoding_geo_json_properties_addendum_osm import GeocodingGeoJSONPropertiesAddendumOsm
51
+ from stadiamaps.models.geocoding_layer import GeocodingLayer
46
52
  from stadiamaps.models.geocoding_object import GeocodingObject
53
+ from stadiamaps.models.geocoding_source import GeocodingSource
47
54
  from stadiamaps.models.height_request import HeightRequest
48
55
  from stadiamaps.models.height_response import HeightResponse
49
56
  from stadiamaps.models.highway_classification import HighwayClassification
@@ -97,13 +104,6 @@ from stadiamaps.models.osrm_via_waypoint import OsrmViaWaypoint
97
104
  from stadiamaps.models.osrm_voice_instruction import OsrmVoiceInstruction
98
105
  from stadiamaps.models.osrm_waypoint import OsrmWaypoint
99
106
  from stadiamaps.models.pedestrian_costing_options import PedestrianCostingOptions
100
- from stadiamaps.models.pelias_geo_json_feature import PeliasGeoJSONFeature
101
- from stadiamaps.models.pelias_geo_json_properties import PeliasGeoJSONProperties
102
- from stadiamaps.models.pelias_geo_json_properties_addendum import PeliasGeoJSONPropertiesAddendum
103
- from stadiamaps.models.pelias_geo_json_properties_addendum_osm import PeliasGeoJSONPropertiesAddendumOsm
104
- from stadiamaps.models.pelias_layer import PeliasLayer
105
- from stadiamaps.models.pelias_response import PeliasResponse
106
- from stadiamaps.models.pelias_source import PeliasSource
107
107
  from stadiamaps.models.restrictions import Restrictions
108
108
  from stadiamaps.models.road_class import RoadClass
109
109
  from stadiamaps.models.route200_response import Route200Response
@@ -114,6 +114,8 @@ from stadiamaps.models.route_response import RouteResponse
114
114
  from stadiamaps.models.route_response_alternates_inner import RouteResponseAlternatesInner
115
115
  from stadiamaps.models.route_summary import RouteSummary
116
116
  from stadiamaps.models.route_trip import RouteTrip
117
+ from stadiamaps.models.routing_languages import RoutingLanguages
118
+ from stadiamaps.models.routing_long_units import RoutingLongUnits
117
119
  from stadiamaps.models.routing_response_waypoint import RoutingResponseWaypoint
118
120
  from stadiamaps.models.routing_waypoint import RoutingWaypoint
119
121
  from stadiamaps.models.routing_waypoint_all_of_search_filter import RoutingWaypointAllOfSearchFilter
@@ -131,6 +133,4 @@ from stadiamaps.models.travel_mode import TravelMode
131
133
  from stadiamaps.models.traversability import Traversability
132
134
  from stadiamaps.models.truck_costing_options import TruckCostingOptions
133
135
  from stadiamaps.models.tz_response import TzResponse
134
- from stadiamaps.models.valhalla_languages import ValhallaLanguages
135
- from stadiamaps.models.valhalla_long_units import ValhallaLongUnits
136
136
  from stadiamaps.models.warning import Warning
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 7.0.0
8
+ The version of the OpenAPI document: 8.0.0
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 7.0.0
8
+ The version of the OpenAPI document: 8.0.0
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 7.0.0
8
+ The version of the OpenAPI document: 8.0.0
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 7.0.0
8
+ The version of the OpenAPI document: 8.0.0
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 7.0.0
8
+ The version of the OpenAPI document: 8.0.0
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 7.0.0
8
+ The version of the OpenAPI document: 8.0.0
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11