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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. stadiamaps/__init__.py +32 -14
  2. stadiamaps/api/geocoding_api.py +976 -153
  3. stadiamaps/api/geospatial_api.py +7 -3
  4. stadiamaps/api/routing_api.py +22 -8
  5. stadiamaps/api_client.py +15 -6
  6. stadiamaps/configuration.py +156 -40
  7. stadiamaps/exceptions.py +18 -1
  8. stadiamaps/models/__init__.py +31 -13
  9. stadiamaps/models/access.py +1 -1
  10. stadiamaps/models/addendum_v2.py +143 -0
  11. stadiamaps/models/address_components_v2.py +134 -0
  12. stadiamaps/models/admin_region.py +1 -1
  13. stadiamaps/models/administrative.py +1 -1
  14. stadiamaps/models/annotation_filters.py +1 -1
  15. stadiamaps/models/auto_costing_options.py +1 -1
  16. stadiamaps/models/base_costing_options.py +1 -1
  17. stadiamaps/models/base_trace_request.py +4 -4
  18. stadiamaps/models/bicycle_costing_options.py +1 -1
  19. stadiamaps/models/bike_network.py +1 -1
  20. stadiamaps/models/bulk_request.py +1 -1
  21. stadiamaps/models/bulk_request_query.py +1 -1
  22. stadiamaps/models/bulk_search_response.py +4 -4
  23. stadiamaps/models/context.py +119 -0
  24. stadiamaps/models/contour.py +1 -1
  25. stadiamaps/models/coordinate.py +1 -1
  26. stadiamaps/models/costing_model.py +1 -1
  27. stadiamaps/models/costing_options.py +1 -1
  28. stadiamaps/models/directions_options.py +4 -4
  29. stadiamaps/models/distance_unit.py +1 -1
  30. stadiamaps/models/edge_sign.py +1 -1
  31. stadiamaps/models/edge_use.py +1 -1
  32. stadiamaps/models/end_node.py +1 -1
  33. stadiamaps/models/extended_directions_options.py +1 -1
  34. stadiamaps/models/feature_properties_v2.py +126 -0
  35. stadiamaps/models/feature_properties_v2_properties.py +184 -0
  36. stadiamaps/models/foursquare_addendum.py +113 -0
  37. stadiamaps/models/geo_attributes.py +1 -1
  38. stadiamaps/models/geo_json_geometry.py +1 -1
  39. stadiamaps/models/geo_json_geometry_base.py +1 -1
  40. stadiamaps/models/geo_json_line_string.py +1 -1
  41. stadiamaps/models/geo_json_point.py +1 -1
  42. stadiamaps/models/geo_json_polygon.py +1 -1
  43. stadiamaps/models/{pelias_response.py → geocode_response.py} +8 -8
  44. stadiamaps/models/geocode_response_envelope_properties_v2.py +125 -0
  45. stadiamaps/models/{pelias_geo_json_feature.py → geocoding_geo_json_feature.py} +8 -8
  46. stadiamaps/models/{pelias_geo_json_properties.py → geocoding_geo_json_properties.py} +43 -15
  47. stadiamaps/models/{pelias_geo_json_properties_addendum.py → geocoding_geo_json_properties_addendum.py} +7 -7
  48. stadiamaps/models/{pelias_geo_json_properties_addendum_osm.py → geocoding_geo_json_properties_addendum_osm.py} +5 -5
  49. stadiamaps/models/{pelias_layer.py → geocoding_layer.py} +3 -3
  50. stadiamaps/models/geocoding_meta.py +108 -0
  51. stadiamaps/models/geocoding_object.py +1 -1
  52. stadiamaps/models/{pelias_source.py → geocoding_source.py} +4 -3
  53. stadiamaps/models/geonames_addendum.py +101 -0
  54. stadiamaps/models/height_request.py +1 -1
  55. stadiamaps/models/height_response.py +1 -1
  56. stadiamaps/models/highway_classification.py +1 -1
  57. stadiamaps/models/intersecting_edge.py +1 -1
  58. stadiamaps/models/isochrone_costing_model.py +1 -1
  59. stadiamaps/models/isochrone_feature.py +1 -1
  60. stadiamaps/models/isochrone_properties.py +1 -1
  61. stadiamaps/models/isochrone_request.py +1 -1
  62. stadiamaps/models/isochrone_response.py +1 -1
  63. stadiamaps/models/layer_id.py +57 -0
  64. stadiamaps/models/locate_detailed_edge.py +1 -1
  65. stadiamaps/models/locate_edge.py +1 -1
  66. stadiamaps/models/locate_edge_info.py +1 -1
  67. stadiamaps/models/locate_node.py +1 -1
  68. stadiamaps/models/locate_object.py +1 -1
  69. stadiamaps/models/low_speed_vehicle_costing_options.py +1 -1
  70. stadiamaps/models/maneuver_sign.py +1 -1
  71. stadiamaps/models/maneuver_sign_element.py +1 -1
  72. stadiamaps/models/map_match_costing_model.py +1 -1
  73. stadiamaps/models/map_match_request.py +10 -8
  74. stadiamaps/models/map_match_route_response.py +1 -1
  75. stadiamaps/models/map_match_trace_options.py +1 -1
  76. stadiamaps/models/map_match_waypoint.py +3 -3
  77. stadiamaps/models/match_type.py +39 -0
  78. stadiamaps/models/matched_point.py +1 -1
  79. stadiamaps/models/matrix_costing_model.py +1 -1
  80. stadiamaps/models/matrix_distance.py +1 -1
  81. stadiamaps/models/matrix_request.py +4 -4
  82. stadiamaps/models/matrix_response.py +4 -4
  83. stadiamaps/models/matrix_waypoint.py +1 -1
  84. stadiamaps/models/motor_scooter_costing_options.py +1 -1
  85. stadiamaps/models/motorcycle_costing_options.py +1 -1
  86. stadiamaps/models/nearest_roads_request.py +4 -4
  87. stadiamaps/models/node_id.py +1 -1
  88. stadiamaps/models/node_type.py +1 -1
  89. stadiamaps/models/open_street_map_addendum.py +162 -0
  90. stadiamaps/models/optimized_route_request.py +10 -8
  91. stadiamaps/models/osrm_admin.py +1 -1
  92. stadiamaps/models/osrm_annotation.py +1 -1
  93. stadiamaps/models/osrm_banner_component.py +1 -1
  94. stadiamaps/models/osrm_banner_content.py +1 -1
  95. stadiamaps/models/osrm_banner_instruction.py +1 -1
  96. stadiamaps/models/osrm_base_api_response.py +1 -1
  97. stadiamaps/models/osrm_guidance_modifier.py +1 -1
  98. stadiamaps/models/osrm_intersection.py +1 -1
  99. stadiamaps/models/osrm_lane.py +1 -1
  100. stadiamaps/models/osrm_route.py +1 -1
  101. stadiamaps/models/osrm_route_leg.py +1 -1
  102. stadiamaps/models/osrm_route_response.py +1 -1
  103. stadiamaps/models/osrm_route_step.py +1 -1
  104. stadiamaps/models/osrm_speed_limit.py +1 -1
  105. stadiamaps/models/osrm_step_maneuver.py +1 -1
  106. stadiamaps/models/osrm_via_waypoint.py +1 -1
  107. stadiamaps/models/osrm_voice_instruction.py +1 -1
  108. stadiamaps/models/osrm_waypoint.py +1 -1
  109. stadiamaps/models/pedestrian_costing_options.py +8 -5
  110. stadiamaps/models/pedestrian_type.py +39 -0
  111. stadiamaps/models/point.py +104 -0
  112. stadiamaps/models/precision.py +38 -0
  113. stadiamaps/models/properties_v2.py +184 -0
  114. stadiamaps/models/restrictions.py +11 -11
  115. stadiamaps/models/road_class.py +1 -1
  116. stadiamaps/models/route200_response.py +1 -1
  117. stadiamaps/models/route_leg.py +1 -1
  118. stadiamaps/models/route_maneuver.py +1 -1
  119. stadiamaps/models/route_request.py +5 -5
  120. stadiamaps/models/route_response.py +1 -1
  121. stadiamaps/models/route_response_alternates_inner.py +1 -1
  122. stadiamaps/models/route_summary.py +1 -1
  123. stadiamaps/models/route_trip.py +7 -7
  124. stadiamaps/models/{valhalla_languages.py → routing_languages.py} +4 -4
  125. stadiamaps/models/{valhalla_long_units.py → routing_long_units.py} +4 -4
  126. stadiamaps/models/routing_response_waypoint.py +3 -3
  127. stadiamaps/models/routing_waypoint.py +3 -3
  128. stadiamaps/models/routing_waypoint_all_of_search_filter.py +1 -1
  129. stadiamaps/models/search_query.py +7 -7
  130. stadiamaps/models/search_structured_query.py +8 -8
  131. stadiamaps/models/simple_routing_waypoint.py +3 -3
  132. stadiamaps/models/source_attribution.py +110 -0
  133. stadiamaps/models/source_id.py +41 -0
  134. stadiamaps/models/speeds.py +1 -1
  135. stadiamaps/models/trace_attribute_filter_options.py +1 -1
  136. stadiamaps/models/trace_attribute_key.py +1 -1
  137. stadiamaps/models/trace_attributes_base_response.py +1 -1
  138. stadiamaps/models/trace_attributes_request.py +10 -8
  139. stadiamaps/models/trace_attributes_response.py +4 -9
  140. stadiamaps/models/trace_edge.py +2 -7
  141. stadiamaps/models/travel_mode.py +1 -1
  142. stadiamaps/models/traversability.py +1 -1
  143. stadiamaps/models/truck_costing_options.py +1 -1
  144. stadiamaps/models/tz_response.py +1 -1
  145. stadiamaps/models/warning.py +1 -1
  146. stadiamaps/models/whos_on_first_concordances.py +246 -0
  147. stadiamaps/models/wof_context.py +210 -0
  148. stadiamaps/models/wof_context_component.py +110 -0
  149. stadiamaps/rest.py +2 -2
  150. stadiamaps-6.0.0.dist-info/METADATA +117 -0
  151. stadiamaps-6.0.0.dist-info/RECORD +183 -0
  152. {stadiamaps-4.0.0.dist-info → stadiamaps-6.0.0.dist-info}/WHEEL +1 -1
  153. {stadiamaps-4.0.0.dist-info → stadiamaps-6.0.0.dist-info}/top_level.txt +1 -0
  154. test/integration/__init__.py +0 -0
  155. test/integration/test_eu_endpoint.py +21 -0
  156. test/integration/test_gecoding.py +112 -0
  157. test/integration/test_geospatial.py +43 -0
  158. test/integration/test_routing.py +282 -0
  159. stadiamaps/models/pelias_response_geocoding.py +0 -89
  160. stadiamaps/models/route_response_trip.py +0 -117
  161. stadiamaps/models/trace_attributes_response_all_of.py +0 -96
  162. stadiamaps-4.0.0.dist-info/METADATA +0 -79
  163. stadiamaps-4.0.0.dist-info/RECORD +0 -160
  164. {stadiamaps-4.0.0.dist-info → stadiamaps-6.0.0.dist-info/licenses}/LICENSE.txt +0 -0
@@ -5,7 +5,7 @@
5
5
 
6
6
  The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
7
7
 
8
- The version of the OpenAPI document: 7.0.0
8
+ The version of the OpenAPI document: 9.0.0
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -22,9 +22,12 @@ from typing import List, Optional, Union
22
22
  from typing_extensions import Annotated
23
23
  from stadiamaps.models.bulk_request import BulkRequest
24
24
  from stadiamaps.models.bulk_search_response import BulkSearchResponse
25
- from stadiamaps.models.pelias_layer import PeliasLayer
26
- from stadiamaps.models.pelias_response import PeliasResponse
27
- from stadiamaps.models.pelias_source import PeliasSource
25
+ from stadiamaps.models.geocode_response import GeocodeResponse
26
+ from stadiamaps.models.geocode_response_envelope_properties_v2 import GeocodeResponseEnvelopePropertiesV2
27
+ from stadiamaps.models.geocoding_layer import GeocodingLayer
28
+ from stadiamaps.models.geocoding_source import GeocodingSource
29
+ from stadiamaps.models.layer_id import LayerId
30
+ from stadiamaps.models.source_id import SourceId
28
31
 
29
32
  from stadiamaps.api_client import ApiClient, RequestSerialized
30
33
  from stadiamaps.api_response import ApiResponse
@@ -57,10 +60,10 @@ class GeocodingApi:
57
60
  boundary_circle_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`.")] = None,
58
61
  boundary_circle_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.")] = None,
59
62
  boundary_circle_radius: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.")] = None,
60
- boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.")] = None,
61
- boundary_gid: Annotated[Optional[StrictStr], Field(description="The Pelias GID of an area to limit the search to.")] = None,
62
- layers: Annotated[Optional[List[PeliasLayer]], Field(description="A list of layers to limit the search to.")] = None,
63
- sources: Annotated[Optional[List[PeliasSource]], Field(description="A list of sources to limit the search to.")] = None,
63
+ boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.")] = None,
64
+ boundary_gid: Annotated[Optional[StrictStr], Field(description="The GID of an area to limit the search to.")] = None,
65
+ layers: Annotated[Optional[List[GeocodingLayer]], Field(description="A list of layers to limit the search to.")] = None,
66
+ sources: Annotated[Optional[List[GeocodingSource]], Field(description="A list of sources to limit the search to.")] = None,
64
67
  size: Annotated[Optional[StrictInt], Field(description="The maximum number of results to return.")] = None,
65
68
  lang: Annotated[Optional[StrictStr], Field(description="A BCP47 language tag which specifies a preference for localization of results. By default, results are in the default locale of the source data, but specifying a language will attempt to localize the results. Note that while a `langtag` (in RFC 5646 terms) can contain script, region, etc., only the `language` portion, an ISO 639 code, will be considered. So `en-US` and `en-GB` will both be treated as English.")] = None,
66
69
  _request_timeout: Union[
@@ -75,7 +78,7 @@ class GeocodingApi:
75
78
  _content_type: Optional[StrictStr] = None,
76
79
  _headers: Optional[Dict[StrictStr, Any]] = None,
77
80
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
78
- ) -> PeliasResponse:
81
+ ) -> GeocodeResponse:
79
82
  """Search and geocode quickly based on partial input.
80
83
 
81
84
  Autocomplete enables interactive search-as-you-type user experiences, suggesting places as you type, along with information that will help your users find the correct place quickly.
@@ -100,14 +103,14 @@ class GeocodingApi:
100
103
  :type boundary_circle_lon: float
101
104
  :param boundary_circle_radius: The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.
102
105
  :type boundary_circle_radius: float
103
- :param boundary_country: A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.
106
+ :param boundary_country: A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.
104
107
  :type boundary_country: List[str]
105
- :param boundary_gid: The Pelias GID of an area to limit the search to.
108
+ :param boundary_gid: The GID of an area to limit the search to.
106
109
  :type boundary_gid: str
107
110
  :param layers: A list of layers to limit the search to.
108
- :type layers: List[PeliasLayer]
111
+ :type layers: List[GeocodingLayer]
109
112
  :param sources: A list of sources to limit the search to.
110
- :type sources: List[PeliasSource]
113
+ :type sources: List[GeocodingSource]
111
114
  :param size: The maximum number of results to return.
112
115
  :type size: int
113
116
  :param lang: A BCP47 language tag which specifies a preference for localization of results. By default, results are in the default locale of the source data, but specifying a language will attempt to localize the results. Note that while a `langtag` (in RFC 5646 terms) can contain script, region, etc., only the `language` portion, an ISO 639 code, will be considered. So `en-US` and `en-GB` will both be treated as English.
@@ -158,7 +161,7 @@ class GeocodingApi:
158
161
  )
159
162
 
160
163
  _response_types_map: Dict[str, Optional[str]] = {
161
- '200': "PeliasResponse",
164
+ '200': "GeocodeResponse",
162
165
  '400': None,
163
166
  }
164
167
  response_data = self.api_client.call_api(
@@ -185,10 +188,10 @@ class GeocodingApi:
185
188
  boundary_circle_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`.")] = None,
186
189
  boundary_circle_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.")] = None,
187
190
  boundary_circle_radius: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.")] = None,
188
- boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.")] = None,
189
- boundary_gid: Annotated[Optional[StrictStr], Field(description="The Pelias GID of an area to limit the search to.")] = None,
190
- layers: Annotated[Optional[List[PeliasLayer]], Field(description="A list of layers to limit the search to.")] = None,
191
- sources: Annotated[Optional[List[PeliasSource]], Field(description="A list of sources to limit the search to.")] = None,
191
+ boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.")] = None,
192
+ boundary_gid: Annotated[Optional[StrictStr], Field(description="The GID of an area to limit the search to.")] = None,
193
+ layers: Annotated[Optional[List[GeocodingLayer]], Field(description="A list of layers to limit the search to.")] = None,
194
+ sources: Annotated[Optional[List[GeocodingSource]], Field(description="A list of sources to limit the search to.")] = None,
192
195
  size: Annotated[Optional[StrictInt], Field(description="The maximum number of results to return.")] = None,
193
196
  lang: Annotated[Optional[StrictStr], Field(description="A BCP47 language tag which specifies a preference for localization of results. By default, results are in the default locale of the source data, but specifying a language will attempt to localize the results. Note that while a `langtag` (in RFC 5646 terms) can contain script, region, etc., only the `language` portion, an ISO 639 code, will be considered. So `en-US` and `en-GB` will both be treated as English.")] = None,
194
197
  _request_timeout: Union[
@@ -203,7 +206,7 @@ class GeocodingApi:
203
206
  _content_type: Optional[StrictStr] = None,
204
207
  _headers: Optional[Dict[StrictStr, Any]] = None,
205
208
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
206
- ) -> ApiResponse[PeliasResponse]:
209
+ ) -> ApiResponse[GeocodeResponse]:
207
210
  """Search and geocode quickly based on partial input.
208
211
 
209
212
  Autocomplete enables interactive search-as-you-type user experiences, suggesting places as you type, along with information that will help your users find the correct place quickly.
@@ -228,14 +231,14 @@ class GeocodingApi:
228
231
  :type boundary_circle_lon: float
229
232
  :param boundary_circle_radius: The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.
230
233
  :type boundary_circle_radius: float
231
- :param boundary_country: A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.
234
+ :param boundary_country: A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.
232
235
  :type boundary_country: List[str]
233
- :param boundary_gid: The Pelias GID of an area to limit the search to.
236
+ :param boundary_gid: The GID of an area to limit the search to.
234
237
  :type boundary_gid: str
235
238
  :param layers: A list of layers to limit the search to.
236
- :type layers: List[PeliasLayer]
239
+ :type layers: List[GeocodingLayer]
237
240
  :param sources: A list of sources to limit the search to.
238
- :type sources: List[PeliasSource]
241
+ :type sources: List[GeocodingSource]
239
242
  :param size: The maximum number of results to return.
240
243
  :type size: int
241
244
  :param lang: A BCP47 language tag which specifies a preference for localization of results. By default, results are in the default locale of the source data, but specifying a language will attempt to localize the results. Note that while a `langtag` (in RFC 5646 terms) can contain script, region, etc., only the `language` portion, an ISO 639 code, will be considered. So `en-US` and `en-GB` will both be treated as English.
@@ -286,7 +289,7 @@ class GeocodingApi:
286
289
  )
287
290
 
288
291
  _response_types_map: Dict[str, Optional[str]] = {
289
- '200': "PeliasResponse",
292
+ '200': "GeocodeResponse",
290
293
  '400': None,
291
294
  }
292
295
  response_data = self.api_client.call_api(
@@ -313,10 +316,10 @@ class GeocodingApi:
313
316
  boundary_circle_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`.")] = None,
314
317
  boundary_circle_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.")] = None,
315
318
  boundary_circle_radius: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.")] = None,
316
- boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.")] = None,
317
- boundary_gid: Annotated[Optional[StrictStr], Field(description="The Pelias GID of an area to limit the search to.")] = None,
318
- layers: Annotated[Optional[List[PeliasLayer]], Field(description="A list of layers to limit the search to.")] = None,
319
- sources: Annotated[Optional[List[PeliasSource]], Field(description="A list of sources to limit the search to.")] = None,
319
+ boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.")] = None,
320
+ boundary_gid: Annotated[Optional[StrictStr], Field(description="The GID of an area to limit the search to.")] = None,
321
+ layers: Annotated[Optional[List[GeocodingLayer]], Field(description="A list of layers to limit the search to.")] = None,
322
+ sources: Annotated[Optional[List[GeocodingSource]], Field(description="A list of sources to limit the search to.")] = None,
320
323
  size: Annotated[Optional[StrictInt], Field(description="The maximum number of results to return.")] = None,
321
324
  lang: Annotated[Optional[StrictStr], Field(description="A BCP47 language tag which specifies a preference for localization of results. By default, results are in the default locale of the source data, but specifying a language will attempt to localize the results. Note that while a `langtag` (in RFC 5646 terms) can contain script, region, etc., only the `language` portion, an ISO 639 code, will be considered. So `en-US` and `en-GB` will both be treated as English.")] = None,
322
325
  _request_timeout: Union[
@@ -356,14 +359,14 @@ class GeocodingApi:
356
359
  :type boundary_circle_lon: float
357
360
  :param boundary_circle_radius: The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.
358
361
  :type boundary_circle_radius: float
359
- :param boundary_country: A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.
362
+ :param boundary_country: A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.
360
363
  :type boundary_country: List[str]
361
- :param boundary_gid: The Pelias GID of an area to limit the search to.
364
+ :param boundary_gid: The GID of an area to limit the search to.
362
365
  :type boundary_gid: str
363
366
  :param layers: A list of layers to limit the search to.
364
- :type layers: List[PeliasLayer]
367
+ :type layers: List[GeocodingLayer]
365
368
  :param sources: A list of sources to limit the search to.
366
- :type sources: List[PeliasSource]
369
+ :type sources: List[GeocodingSource]
367
370
  :param size: The maximum number of results to return.
368
371
  :type size: int
369
372
  :param lang: A BCP47 language tag which specifies a preference for localization of results. By default, results are in the default locale of the source data, but specifying a language will attempt to localize the results. Note that while a `langtag` (in RFC 5646 terms) can contain script, region, etc., only the `language` portion, an ISO 639 code, will be considered. So `en-US` and `en-GB` will both be treated as English.
@@ -414,7 +417,7 @@ class GeocodingApi:
414
417
  )
415
418
 
416
419
  _response_types_map: Dict[str, Optional[str]] = {
417
- '200': "PeliasResponse",
420
+ '200': "GeocodeResponse",
418
421
  '400': None,
419
422
  }
420
423
  response_data = self.api_client.call_api(
@@ -460,7 +463,9 @@ class GeocodingApi:
460
463
  _query_params: List[Tuple[str, str]] = []
461
464
  _header_params: Dict[str, Optional[str]] = _headers or {}
462
465
  _form_params: List[Tuple[str, str]] = []
463
- _files: Dict[str, Union[str, bytes]] = {}
466
+ _files: Dict[
467
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
468
+ ] = {}
464
469
  _body_params: Optional[bytes] = None
465
470
 
466
471
  # process the path parameters
@@ -567,9 +572,533 @@ class GeocodingApi:
567
572
 
568
573
 
569
574
  @validate_call
570
- def place(
575
+ def autocomplete_v2(
571
576
  self,
572
- ids: Annotated[List[StrictStr], Field(description="A list of Pelias GIDs to search for.")],
577
+ text: Annotated[StrictStr, Field(description="The text to search for (the start of an address, place name, etc.).")],
578
+ focus_point_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of a focus point. If provided (along with longitude), the search results should be more locally relevant.")] = None,
579
+ focus_point_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of a focus point. If provided (along with longitude), the search results should be more locally relevant.")] = None,
580
+ layers: Annotated[Optional[List[LayerId]], Field(description="A list of layers to limit the search to.")] = None,
581
+ sources: Annotated[Optional[List[SourceId]], Field(description="A list of sources to limit the search to.")] = None,
582
+ boundary_gid: Annotated[Optional[StrictStr], Field(description="The GID of a region to limit the search to. Note: these are not stable for all datasets! For example, OSM features may be deleted and re-added with a new ID.")] = None,
583
+ boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of comma-separated country codes in ISO 3116-1 alpha-2 or alpha-3 format. The search will be limited to these countries.")] = None,
584
+ boundary_rect_min_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The minimum latitude component of a search bounding box. NOTE: Requires all other boundary.rect parameters to be specified.")] = None,
585
+ boundary_rect_min_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The minimum longitude component of a search bounding box. NOTE: Requires all other boundary.rect parameters to be specified.")] = None,
586
+ boundary_rect_max_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The maximum latitude component of a search bounding box. NOTE: Requires all other boundary.rect parameters to be specified.")] = None,
587
+ boundary_rect_max_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The maximum longitude component of a search bounding box. NOTE: Requires all other boundary.rect parameters to be specified.")] = None,
588
+ boundary_circle_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the center of a circle to limit the search to. NOTE: Requires boundary.circle.lon.")] = None,
589
+ boundary_circle_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the center of a circle to limit the search to. NOTE: Requires boundary.circle.lon.")] = None,
590
+ boundary_circle_radius: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="The radius of the circle (in kilometers) to limit the search to. NOTE: Requires the other boundary.circle parameters to take effect. Defaults to 50km if unspecified.")] = None,
591
+ size: Annotated[Optional[Annotated[int, Field(le=25, strict=True, ge=1)]], Field(description="The maximum number of items to return from a query.")] = None,
592
+ lang: Annotated[Optional[StrictStr], Field(description="A BCP47 language tag which specifies a preference for localization of results. There is no default value, so place names will be returned as-is, which is usually in the local language. NOTE: The Accept-Language header is also respected, and many user agents will set it automatically.")] = None,
593
+ _request_timeout: Union[
594
+ None,
595
+ Annotated[StrictFloat, Field(gt=0)],
596
+ Tuple[
597
+ Annotated[StrictFloat, Field(gt=0)],
598
+ Annotated[StrictFloat, Field(gt=0)]
599
+ ]
600
+ ] = None,
601
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
602
+ _content_type: Optional[StrictStr] = None,
603
+ _headers: Optional[Dict[StrictStr, Any]] = None,
604
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
605
+ ) -> GeocodeResponseEnvelopePropertiesV2:
606
+ """autocomplete_v2
607
+
608
+
609
+ :param text: The text to search for (the start of an address, place name, etc.). (required)
610
+ :type text: str
611
+ :param focus_point_lat: The latitude of a focus point. If provided (along with longitude), the search results should be more locally relevant.
612
+ :type focus_point_lat: float
613
+ :param focus_point_lon: The longitude of a focus point. If provided (along with longitude), the search results should be more locally relevant.
614
+ :type focus_point_lon: float
615
+ :param layers: A list of layers to limit the search to.
616
+ :type layers: List[LayerId]
617
+ :param sources: A list of sources to limit the search to.
618
+ :type sources: List[SourceId]
619
+ :param boundary_gid: The GID of a region to limit the search to. Note: these are not stable for all datasets! For example, OSM features may be deleted and re-added with a new ID.
620
+ :type boundary_gid: str
621
+ :param boundary_country: A list of comma-separated country codes in ISO 3116-1 alpha-2 or alpha-3 format. The search will be limited to these countries.
622
+ :type boundary_country: List[str]
623
+ :param boundary_rect_min_lat: The minimum latitude component of a search bounding box. NOTE: Requires all other boundary.rect parameters to be specified.
624
+ :type boundary_rect_min_lat: float
625
+ :param boundary_rect_min_lon: The minimum longitude component of a search bounding box. NOTE: Requires all other boundary.rect parameters to be specified.
626
+ :type boundary_rect_min_lon: float
627
+ :param boundary_rect_max_lat: The maximum latitude component of a search bounding box. NOTE: Requires all other boundary.rect parameters to be specified.
628
+ :type boundary_rect_max_lat: float
629
+ :param boundary_rect_max_lon: The maximum longitude component of a search bounding box. NOTE: Requires all other boundary.rect parameters to be specified.
630
+ :type boundary_rect_max_lon: float
631
+ :param boundary_circle_lat: The latitude of the center of a circle to limit the search to. NOTE: Requires boundary.circle.lon.
632
+ :type boundary_circle_lat: float
633
+ :param boundary_circle_lon: The longitude of the center of a circle to limit the search to. NOTE: Requires boundary.circle.lon.
634
+ :type boundary_circle_lon: float
635
+ :param boundary_circle_radius: The radius of the circle (in kilometers) to limit the search to. NOTE: Requires the other boundary.circle parameters to take effect. Defaults to 50km if unspecified.
636
+ :type boundary_circle_radius: int
637
+ :param size: The maximum number of items to return from a query.
638
+ :type size: int
639
+ :param lang: A BCP47 language tag which specifies a preference for localization of results. There is no default value, so place names will be returned as-is, which is usually in the local language. NOTE: The Accept-Language header is also respected, and many user agents will set it automatically.
640
+ :type lang: str
641
+ :param _request_timeout: timeout setting for this request. If one
642
+ number provided, it will be total request
643
+ timeout. It can also be a pair (tuple) of
644
+ (connection, read) timeouts.
645
+ :type _request_timeout: int, tuple(int, int), optional
646
+ :param _request_auth: set to override the auth_settings for an a single
647
+ request; this effectively ignores the
648
+ authentication in the spec for a single request.
649
+ :type _request_auth: dict, optional
650
+ :param _content_type: force content-type for the request.
651
+ :type _content_type: str, Optional
652
+ :param _headers: set to override the headers for a single
653
+ request; this effectively ignores the headers
654
+ in the spec for a single request.
655
+ :type _headers: dict, optional
656
+ :param _host_index: set to override the host_index for a single
657
+ request; this effectively ignores the host_index
658
+ in the spec for a single request.
659
+ :type _host_index: int, optional
660
+ :return: Returns the result object.
661
+ """ # noqa: E501
662
+
663
+ _param = self._autocomplete_v2_serialize(
664
+ text=text,
665
+ focus_point_lat=focus_point_lat,
666
+ focus_point_lon=focus_point_lon,
667
+ layers=layers,
668
+ sources=sources,
669
+ boundary_gid=boundary_gid,
670
+ boundary_country=boundary_country,
671
+ boundary_rect_min_lat=boundary_rect_min_lat,
672
+ boundary_rect_min_lon=boundary_rect_min_lon,
673
+ boundary_rect_max_lat=boundary_rect_max_lat,
674
+ boundary_rect_max_lon=boundary_rect_max_lon,
675
+ boundary_circle_lat=boundary_circle_lat,
676
+ boundary_circle_lon=boundary_circle_lon,
677
+ boundary_circle_radius=boundary_circle_radius,
678
+ size=size,
679
+ lang=lang,
680
+ _request_auth=_request_auth,
681
+ _content_type=_content_type,
682
+ _headers=_headers,
683
+ _host_index=_host_index
684
+ )
685
+
686
+ _response_types_map: Dict[str, Optional[str]] = {
687
+ '200': "GeocodeResponseEnvelopePropertiesV2",
688
+ '400': "GeocodeResponseEnvelopePropertiesV2",
689
+ '500': "GeocodeResponseEnvelopePropertiesV2",
690
+ }
691
+ response_data = self.api_client.call_api(
692
+ *_param,
693
+ _request_timeout=_request_timeout
694
+ )
695
+ response_data.read()
696
+ return self.api_client.response_deserialize(
697
+ response_data=response_data,
698
+ response_types_map=_response_types_map,
699
+ ).data
700
+
701
+
702
+ @validate_call
703
+ def autocomplete_v2_with_http_info(
704
+ self,
705
+ text: Annotated[StrictStr, Field(description="The text to search for (the start of an address, place name, etc.).")],
706
+ focus_point_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of a focus point. If provided (along with longitude), the search results should be more locally relevant.")] = None,
707
+ focus_point_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of a focus point. If provided (along with longitude), the search results should be more locally relevant.")] = None,
708
+ layers: Annotated[Optional[List[LayerId]], Field(description="A list of layers to limit the search to.")] = None,
709
+ sources: Annotated[Optional[List[SourceId]], Field(description="A list of sources to limit the search to.")] = None,
710
+ boundary_gid: Annotated[Optional[StrictStr], Field(description="The GID of a region to limit the search to. Note: these are not stable for all datasets! For example, OSM features may be deleted and re-added with a new ID.")] = None,
711
+ boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of comma-separated country codes in ISO 3116-1 alpha-2 or alpha-3 format. The search will be limited to these countries.")] = None,
712
+ boundary_rect_min_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The minimum latitude component of a search bounding box. NOTE: Requires all other boundary.rect parameters to be specified.")] = None,
713
+ boundary_rect_min_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The minimum longitude component of a search bounding box. NOTE: Requires all other boundary.rect parameters to be specified.")] = None,
714
+ boundary_rect_max_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The maximum latitude component of a search bounding box. NOTE: Requires all other boundary.rect parameters to be specified.")] = None,
715
+ boundary_rect_max_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The maximum longitude component of a search bounding box. NOTE: Requires all other boundary.rect parameters to be specified.")] = None,
716
+ boundary_circle_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the center of a circle to limit the search to. NOTE: Requires boundary.circle.lon.")] = None,
717
+ boundary_circle_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the center of a circle to limit the search to. NOTE: Requires boundary.circle.lon.")] = None,
718
+ boundary_circle_radius: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="The radius of the circle (in kilometers) to limit the search to. NOTE: Requires the other boundary.circle parameters to take effect. Defaults to 50km if unspecified.")] = None,
719
+ size: Annotated[Optional[Annotated[int, Field(le=25, strict=True, ge=1)]], Field(description="The maximum number of items to return from a query.")] = None,
720
+ lang: Annotated[Optional[StrictStr], Field(description="A BCP47 language tag which specifies a preference for localization of results. There is no default value, so place names will be returned as-is, which is usually in the local language. NOTE: The Accept-Language header is also respected, and many user agents will set it automatically.")] = None,
721
+ _request_timeout: Union[
722
+ None,
723
+ Annotated[StrictFloat, Field(gt=0)],
724
+ Tuple[
725
+ Annotated[StrictFloat, Field(gt=0)],
726
+ Annotated[StrictFloat, Field(gt=0)]
727
+ ]
728
+ ] = None,
729
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
730
+ _content_type: Optional[StrictStr] = None,
731
+ _headers: Optional[Dict[StrictStr, Any]] = None,
732
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
733
+ ) -> ApiResponse[GeocodeResponseEnvelopePropertiesV2]:
734
+ """autocomplete_v2
735
+
736
+
737
+ :param text: The text to search for (the start of an address, place name, etc.). (required)
738
+ :type text: str
739
+ :param focus_point_lat: The latitude of a focus point. If provided (along with longitude), the search results should be more locally relevant.
740
+ :type focus_point_lat: float
741
+ :param focus_point_lon: The longitude of a focus point. If provided (along with longitude), the search results should be more locally relevant.
742
+ :type focus_point_lon: float
743
+ :param layers: A list of layers to limit the search to.
744
+ :type layers: List[LayerId]
745
+ :param sources: A list of sources to limit the search to.
746
+ :type sources: List[SourceId]
747
+ :param boundary_gid: The GID of a region to limit the search to. Note: these are not stable for all datasets! For example, OSM features may be deleted and re-added with a new ID.
748
+ :type boundary_gid: str
749
+ :param boundary_country: A list of comma-separated country codes in ISO 3116-1 alpha-2 or alpha-3 format. The search will be limited to these countries.
750
+ :type boundary_country: List[str]
751
+ :param boundary_rect_min_lat: The minimum latitude component of a search bounding box. NOTE: Requires all other boundary.rect parameters to be specified.
752
+ :type boundary_rect_min_lat: float
753
+ :param boundary_rect_min_lon: The minimum longitude component of a search bounding box. NOTE: Requires all other boundary.rect parameters to be specified.
754
+ :type boundary_rect_min_lon: float
755
+ :param boundary_rect_max_lat: The maximum latitude component of a search bounding box. NOTE: Requires all other boundary.rect parameters to be specified.
756
+ :type boundary_rect_max_lat: float
757
+ :param boundary_rect_max_lon: The maximum longitude component of a search bounding box. NOTE: Requires all other boundary.rect parameters to be specified.
758
+ :type boundary_rect_max_lon: float
759
+ :param boundary_circle_lat: The latitude of the center of a circle to limit the search to. NOTE: Requires boundary.circle.lon.
760
+ :type boundary_circle_lat: float
761
+ :param boundary_circle_lon: The longitude of the center of a circle to limit the search to. NOTE: Requires boundary.circle.lon.
762
+ :type boundary_circle_lon: float
763
+ :param boundary_circle_radius: The radius of the circle (in kilometers) to limit the search to. NOTE: Requires the other boundary.circle parameters to take effect. Defaults to 50km if unspecified.
764
+ :type boundary_circle_radius: int
765
+ :param size: The maximum number of items to return from a query.
766
+ :type size: int
767
+ :param lang: A BCP47 language tag which specifies a preference for localization of results. There is no default value, so place names will be returned as-is, which is usually in the local language. NOTE: The Accept-Language header is also respected, and many user agents will set it automatically.
768
+ :type lang: str
769
+ :param _request_timeout: timeout setting for this request. If one
770
+ number provided, it will be total request
771
+ timeout. It can also be a pair (tuple) of
772
+ (connection, read) timeouts.
773
+ :type _request_timeout: int, tuple(int, int), optional
774
+ :param _request_auth: set to override the auth_settings for an a single
775
+ request; this effectively ignores the
776
+ authentication in the spec for a single request.
777
+ :type _request_auth: dict, optional
778
+ :param _content_type: force content-type for the request.
779
+ :type _content_type: str, Optional
780
+ :param _headers: set to override the headers for a single
781
+ request; this effectively ignores the headers
782
+ in the spec for a single request.
783
+ :type _headers: dict, optional
784
+ :param _host_index: set to override the host_index for a single
785
+ request; this effectively ignores the host_index
786
+ in the spec for a single request.
787
+ :type _host_index: int, optional
788
+ :return: Returns the result object.
789
+ """ # noqa: E501
790
+
791
+ _param = self._autocomplete_v2_serialize(
792
+ text=text,
793
+ focus_point_lat=focus_point_lat,
794
+ focus_point_lon=focus_point_lon,
795
+ layers=layers,
796
+ sources=sources,
797
+ boundary_gid=boundary_gid,
798
+ boundary_country=boundary_country,
799
+ boundary_rect_min_lat=boundary_rect_min_lat,
800
+ boundary_rect_min_lon=boundary_rect_min_lon,
801
+ boundary_rect_max_lat=boundary_rect_max_lat,
802
+ boundary_rect_max_lon=boundary_rect_max_lon,
803
+ boundary_circle_lat=boundary_circle_lat,
804
+ boundary_circle_lon=boundary_circle_lon,
805
+ boundary_circle_radius=boundary_circle_radius,
806
+ size=size,
807
+ lang=lang,
808
+ _request_auth=_request_auth,
809
+ _content_type=_content_type,
810
+ _headers=_headers,
811
+ _host_index=_host_index
812
+ )
813
+
814
+ _response_types_map: Dict[str, Optional[str]] = {
815
+ '200': "GeocodeResponseEnvelopePropertiesV2",
816
+ '400': "GeocodeResponseEnvelopePropertiesV2",
817
+ '500': "GeocodeResponseEnvelopePropertiesV2",
818
+ }
819
+ response_data = self.api_client.call_api(
820
+ *_param,
821
+ _request_timeout=_request_timeout
822
+ )
823
+ response_data.read()
824
+ return self.api_client.response_deserialize(
825
+ response_data=response_data,
826
+ response_types_map=_response_types_map,
827
+ )
828
+
829
+
830
+ @validate_call
831
+ def autocomplete_v2_without_preload_content(
832
+ self,
833
+ text: Annotated[StrictStr, Field(description="The text to search for (the start of an address, place name, etc.).")],
834
+ focus_point_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of a focus point. If provided (along with longitude), the search results should be more locally relevant.")] = None,
835
+ focus_point_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of a focus point. If provided (along with longitude), the search results should be more locally relevant.")] = None,
836
+ layers: Annotated[Optional[List[LayerId]], Field(description="A list of layers to limit the search to.")] = None,
837
+ sources: Annotated[Optional[List[SourceId]], Field(description="A list of sources to limit the search to.")] = None,
838
+ boundary_gid: Annotated[Optional[StrictStr], Field(description="The GID of a region to limit the search to. Note: these are not stable for all datasets! For example, OSM features may be deleted and re-added with a new ID.")] = None,
839
+ boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of comma-separated country codes in ISO 3116-1 alpha-2 or alpha-3 format. The search will be limited to these countries.")] = None,
840
+ boundary_rect_min_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The minimum latitude component of a search bounding box. NOTE: Requires all other boundary.rect parameters to be specified.")] = None,
841
+ boundary_rect_min_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The minimum longitude component of a search bounding box. NOTE: Requires all other boundary.rect parameters to be specified.")] = None,
842
+ boundary_rect_max_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The maximum latitude component of a search bounding box. NOTE: Requires all other boundary.rect parameters to be specified.")] = None,
843
+ boundary_rect_max_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The maximum longitude component of a search bounding box. NOTE: Requires all other boundary.rect parameters to be specified.")] = None,
844
+ boundary_circle_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the center of a circle to limit the search to. NOTE: Requires boundary.circle.lon.")] = None,
845
+ boundary_circle_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the center of a circle to limit the search to. NOTE: Requires boundary.circle.lon.")] = None,
846
+ boundary_circle_radius: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="The radius of the circle (in kilometers) to limit the search to. NOTE: Requires the other boundary.circle parameters to take effect. Defaults to 50km if unspecified.")] = None,
847
+ size: Annotated[Optional[Annotated[int, Field(le=25, strict=True, ge=1)]], Field(description="The maximum number of items to return from a query.")] = None,
848
+ lang: Annotated[Optional[StrictStr], Field(description="A BCP47 language tag which specifies a preference for localization of results. There is no default value, so place names will be returned as-is, which is usually in the local language. NOTE: The Accept-Language header is also respected, and many user agents will set it automatically.")] = None,
849
+ _request_timeout: Union[
850
+ None,
851
+ Annotated[StrictFloat, Field(gt=0)],
852
+ Tuple[
853
+ Annotated[StrictFloat, Field(gt=0)],
854
+ Annotated[StrictFloat, Field(gt=0)]
855
+ ]
856
+ ] = None,
857
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
858
+ _content_type: Optional[StrictStr] = None,
859
+ _headers: Optional[Dict[StrictStr, Any]] = None,
860
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
861
+ ) -> RESTResponseType:
862
+ """autocomplete_v2
863
+
864
+
865
+ :param text: The text to search for (the start of an address, place name, etc.). (required)
866
+ :type text: str
867
+ :param focus_point_lat: The latitude of a focus point. If provided (along with longitude), the search results should be more locally relevant.
868
+ :type focus_point_lat: float
869
+ :param focus_point_lon: The longitude of a focus point. If provided (along with longitude), the search results should be more locally relevant.
870
+ :type focus_point_lon: float
871
+ :param layers: A list of layers to limit the search to.
872
+ :type layers: List[LayerId]
873
+ :param sources: A list of sources to limit the search to.
874
+ :type sources: List[SourceId]
875
+ :param boundary_gid: The GID of a region to limit the search to. Note: these are not stable for all datasets! For example, OSM features may be deleted and re-added with a new ID.
876
+ :type boundary_gid: str
877
+ :param boundary_country: A list of comma-separated country codes in ISO 3116-1 alpha-2 or alpha-3 format. The search will be limited to these countries.
878
+ :type boundary_country: List[str]
879
+ :param boundary_rect_min_lat: The minimum latitude component of a search bounding box. NOTE: Requires all other boundary.rect parameters to be specified.
880
+ :type boundary_rect_min_lat: float
881
+ :param boundary_rect_min_lon: The minimum longitude component of a search bounding box. NOTE: Requires all other boundary.rect parameters to be specified.
882
+ :type boundary_rect_min_lon: float
883
+ :param boundary_rect_max_lat: The maximum latitude component of a search bounding box. NOTE: Requires all other boundary.rect parameters to be specified.
884
+ :type boundary_rect_max_lat: float
885
+ :param boundary_rect_max_lon: The maximum longitude component of a search bounding box. NOTE: Requires all other boundary.rect parameters to be specified.
886
+ :type boundary_rect_max_lon: float
887
+ :param boundary_circle_lat: The latitude of the center of a circle to limit the search to. NOTE: Requires boundary.circle.lon.
888
+ :type boundary_circle_lat: float
889
+ :param boundary_circle_lon: The longitude of the center of a circle to limit the search to. NOTE: Requires boundary.circle.lon.
890
+ :type boundary_circle_lon: float
891
+ :param boundary_circle_radius: The radius of the circle (in kilometers) to limit the search to. NOTE: Requires the other boundary.circle parameters to take effect. Defaults to 50km if unspecified.
892
+ :type boundary_circle_radius: int
893
+ :param size: The maximum number of items to return from a query.
894
+ :type size: int
895
+ :param lang: A BCP47 language tag which specifies a preference for localization of results. There is no default value, so place names will be returned as-is, which is usually in the local language. NOTE: The Accept-Language header is also respected, and many user agents will set it automatically.
896
+ :type lang: str
897
+ :param _request_timeout: timeout setting for this request. If one
898
+ number provided, it will be total request
899
+ timeout. It can also be a pair (tuple) of
900
+ (connection, read) timeouts.
901
+ :type _request_timeout: int, tuple(int, int), optional
902
+ :param _request_auth: set to override the auth_settings for an a single
903
+ request; this effectively ignores the
904
+ authentication in the spec for a single request.
905
+ :type _request_auth: dict, optional
906
+ :param _content_type: force content-type for the request.
907
+ :type _content_type: str, Optional
908
+ :param _headers: set to override the headers for a single
909
+ request; this effectively ignores the headers
910
+ in the spec for a single request.
911
+ :type _headers: dict, optional
912
+ :param _host_index: set to override the host_index for a single
913
+ request; this effectively ignores the host_index
914
+ in the spec for a single request.
915
+ :type _host_index: int, optional
916
+ :return: Returns the result object.
917
+ """ # noqa: E501
918
+
919
+ _param = self._autocomplete_v2_serialize(
920
+ text=text,
921
+ focus_point_lat=focus_point_lat,
922
+ focus_point_lon=focus_point_lon,
923
+ layers=layers,
924
+ sources=sources,
925
+ boundary_gid=boundary_gid,
926
+ boundary_country=boundary_country,
927
+ boundary_rect_min_lat=boundary_rect_min_lat,
928
+ boundary_rect_min_lon=boundary_rect_min_lon,
929
+ boundary_rect_max_lat=boundary_rect_max_lat,
930
+ boundary_rect_max_lon=boundary_rect_max_lon,
931
+ boundary_circle_lat=boundary_circle_lat,
932
+ boundary_circle_lon=boundary_circle_lon,
933
+ boundary_circle_radius=boundary_circle_radius,
934
+ size=size,
935
+ lang=lang,
936
+ _request_auth=_request_auth,
937
+ _content_type=_content_type,
938
+ _headers=_headers,
939
+ _host_index=_host_index
940
+ )
941
+
942
+ _response_types_map: Dict[str, Optional[str]] = {
943
+ '200': "GeocodeResponseEnvelopePropertiesV2",
944
+ '400': "GeocodeResponseEnvelopePropertiesV2",
945
+ '500': "GeocodeResponseEnvelopePropertiesV2",
946
+ }
947
+ response_data = self.api_client.call_api(
948
+ *_param,
949
+ _request_timeout=_request_timeout
950
+ )
951
+ return response_data.response
952
+
953
+
954
+ def _autocomplete_v2_serialize(
955
+ self,
956
+ text,
957
+ focus_point_lat,
958
+ focus_point_lon,
959
+ layers,
960
+ sources,
961
+ boundary_gid,
962
+ boundary_country,
963
+ boundary_rect_min_lat,
964
+ boundary_rect_min_lon,
965
+ boundary_rect_max_lat,
966
+ boundary_rect_max_lon,
967
+ boundary_circle_lat,
968
+ boundary_circle_lon,
969
+ boundary_circle_radius,
970
+ size,
971
+ lang,
972
+ _request_auth,
973
+ _content_type,
974
+ _headers,
975
+ _host_index,
976
+ ) -> RequestSerialized:
977
+
978
+ _host = None
979
+
980
+ _collection_formats: Dict[str, str] = {
981
+ 'layers': 'csv',
982
+ 'sources': 'csv',
983
+ 'boundary.country': 'csv',
984
+ }
985
+
986
+ _path_params: Dict[str, str] = {}
987
+ _query_params: List[Tuple[str, str]] = []
988
+ _header_params: Dict[str, Optional[str]] = _headers or {}
989
+ _form_params: List[Tuple[str, str]] = []
990
+ _files: Dict[
991
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
992
+ ] = {}
993
+ _body_params: Optional[bytes] = None
994
+
995
+ # process the path parameters
996
+ # process the query parameters
997
+ if text is not None:
998
+
999
+ _query_params.append(('text', text))
1000
+
1001
+ if focus_point_lat is not None:
1002
+
1003
+ _query_params.append(('focus.point.lat', focus_point_lat))
1004
+
1005
+ if focus_point_lon is not None:
1006
+
1007
+ _query_params.append(('focus.point.lon', focus_point_lon))
1008
+
1009
+ if layers is not None:
1010
+
1011
+ _query_params.append(('layers', layers))
1012
+
1013
+ if sources is not None:
1014
+
1015
+ _query_params.append(('sources', sources))
1016
+
1017
+ if boundary_gid is not None:
1018
+
1019
+ _query_params.append(('boundary.gid', boundary_gid))
1020
+
1021
+ if boundary_country is not None:
1022
+
1023
+ _query_params.append(('boundary.country', boundary_country))
1024
+
1025
+ if boundary_rect_min_lat is not None:
1026
+
1027
+ _query_params.append(('boundary.rect.min_lat', boundary_rect_min_lat))
1028
+
1029
+ if boundary_rect_min_lon is not None:
1030
+
1031
+ _query_params.append(('boundary.rect.min_lon', boundary_rect_min_lon))
1032
+
1033
+ if boundary_rect_max_lat is not None:
1034
+
1035
+ _query_params.append(('boundary.rect.max_lat', boundary_rect_max_lat))
1036
+
1037
+ if boundary_rect_max_lon is not None:
1038
+
1039
+ _query_params.append(('boundary.rect.max_lon', boundary_rect_max_lon))
1040
+
1041
+ if boundary_circle_lat is not None:
1042
+
1043
+ _query_params.append(('boundary.circle.lat', boundary_circle_lat))
1044
+
1045
+ if boundary_circle_lon is not None:
1046
+
1047
+ _query_params.append(('boundary.circle.lon', boundary_circle_lon))
1048
+
1049
+ if boundary_circle_radius is not None:
1050
+
1051
+ _query_params.append(('boundary.circle.radius', boundary_circle_radius))
1052
+
1053
+ if size is not None:
1054
+
1055
+ _query_params.append(('size', size))
1056
+
1057
+ if lang is not None:
1058
+
1059
+ _query_params.append(('lang', lang))
1060
+
1061
+ # process the header parameters
1062
+ # process the form parameters
1063
+ # process the body parameter
1064
+
1065
+
1066
+ # set the HTTP header `Accept`
1067
+ if 'Accept' not in _header_params:
1068
+ _header_params['Accept'] = self.api_client.select_header_accept(
1069
+ [
1070
+ 'application/json'
1071
+ ]
1072
+ )
1073
+
1074
+
1075
+ # authentication setting
1076
+ _auth_settings: List[str] = [
1077
+ 'ApiKeyAuth'
1078
+ ]
1079
+
1080
+ return self.api_client.param_serialize(
1081
+ method='GET',
1082
+ resource_path='/geocoding/v2/autocomplete',
1083
+ path_params=_path_params,
1084
+ query_params=_query_params,
1085
+ header_params=_header_params,
1086
+ body=_body_params,
1087
+ post_params=_form_params,
1088
+ files=_files,
1089
+ auth_settings=_auth_settings,
1090
+ collection_formats=_collection_formats,
1091
+ _host=_host,
1092
+ _request_auth=_request_auth
1093
+ )
1094
+
1095
+
1096
+
1097
+
1098
+ @validate_call
1099
+ def place_details(
1100
+ self,
1101
+ ids: Annotated[List[StrictStr], Field(description="A list of GIDs to search for.")],
573
1102
  lang: Annotated[Optional[StrictStr], Field(description="A BCP47 language tag which specifies a preference for localization of results. By default, results are in the default locale of the source data, but specifying a language will attempt to localize the results. Note that while a `langtag` (in RFC 5646 terms) can contain script, region, etc., only the `language` portion, an ISO 639 code, will be considered. So `en-US` and `en-GB` will both be treated as English.")] = None,
574
1103
  _request_timeout: Union[
575
1104
  None,
@@ -583,12 +1112,12 @@ class GeocodingApi:
583
1112
  _content_type: Optional[StrictStr] = None,
584
1113
  _headers: Optional[Dict[StrictStr, Any]] = None,
585
1114
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
586
- ) -> PeliasResponse:
1115
+ ) -> GeocodeResponse:
587
1116
  """Retrieve details of a place using its GID.
588
1117
 
589
- Many search result components include an associated GID field (for example, an address may have a `localadmin_gid`). The place endpoint lets you look up these places directly by ID. Note that these IDs are not stable for all sources. See the [online documentation](https://docs.stadiamaps.com/geocoding-search-autocomplete/place-lookup/) for details.
1118
+ Many search result components include an associated GID field (for example, an address may have a `localadmin_gid`). The place endpoint lets you look up these places directly by ID. Note that GIDs are not stable for all sources. See the [online documentation](https://docs.stadiamaps.com/geocoding-search-autocomplete/place-lookup/) for details.
590
1119
 
591
- :param ids: A list of Pelias GIDs to search for. (required)
1120
+ :param ids: A list of GIDs to search for. (required)
592
1121
  :type ids: List[str]
593
1122
  :param lang: A BCP47 language tag which specifies a preference for localization of results. By default, results are in the default locale of the source data, but specifying a language will attempt to localize the results. Note that while a `langtag` (in RFC 5646 terms) can contain script, region, etc., only the `language` portion, an ISO 639 code, will be considered. So `en-US` and `en-GB` will both be treated as English.
594
1123
  :type lang: str
@@ -614,7 +1143,7 @@ class GeocodingApi:
614
1143
  :return: Returns the result object.
615
1144
  """ # noqa: E501
616
1145
 
617
- _param = self._place_serialize(
1146
+ _param = self._place_details_serialize(
618
1147
  ids=ids,
619
1148
  lang=lang,
620
1149
  _request_auth=_request_auth,
@@ -624,7 +1153,7 @@ class GeocodingApi:
624
1153
  )
625
1154
 
626
1155
  _response_types_map: Dict[str, Optional[str]] = {
627
- '200': "PeliasResponse",
1156
+ '200': "GeocodeResponse",
628
1157
  '400': None,
629
1158
  }
630
1159
  response_data = self.api_client.call_api(
@@ -639,9 +1168,9 @@ class GeocodingApi:
639
1168
 
640
1169
 
641
1170
  @validate_call
642
- def place_with_http_info(
1171
+ def place_details_with_http_info(
643
1172
  self,
644
- ids: Annotated[List[StrictStr], Field(description="A list of Pelias GIDs to search for.")],
1173
+ ids: Annotated[List[StrictStr], Field(description="A list of GIDs to search for.")],
645
1174
  lang: Annotated[Optional[StrictStr], Field(description="A BCP47 language tag which specifies a preference for localization of results. By default, results are in the default locale of the source data, but specifying a language will attempt to localize the results. Note that while a `langtag` (in RFC 5646 terms) can contain script, region, etc., only the `language` portion, an ISO 639 code, will be considered. So `en-US` and `en-GB` will both be treated as English.")] = None,
646
1175
  _request_timeout: Union[
647
1176
  None,
@@ -655,12 +1184,12 @@ class GeocodingApi:
655
1184
  _content_type: Optional[StrictStr] = None,
656
1185
  _headers: Optional[Dict[StrictStr, Any]] = None,
657
1186
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
658
- ) -> ApiResponse[PeliasResponse]:
1187
+ ) -> ApiResponse[GeocodeResponse]:
659
1188
  """Retrieve details of a place using its GID.
660
1189
 
661
- Many search result components include an associated GID field (for example, an address may have a `localadmin_gid`). The place endpoint lets you look up these places directly by ID. Note that these IDs are not stable for all sources. See the [online documentation](https://docs.stadiamaps.com/geocoding-search-autocomplete/place-lookup/) for details.
1190
+ Many search result components include an associated GID field (for example, an address may have a `localadmin_gid`). The place endpoint lets you look up these places directly by ID. Note that GIDs are not stable for all sources. See the [online documentation](https://docs.stadiamaps.com/geocoding-search-autocomplete/place-lookup/) for details.
662
1191
 
663
- :param ids: A list of Pelias GIDs to search for. (required)
1192
+ :param ids: A list of GIDs to search for. (required)
664
1193
  :type ids: List[str]
665
1194
  :param lang: A BCP47 language tag which specifies a preference for localization of results. By default, results are in the default locale of the source data, but specifying a language will attempt to localize the results. Note that while a `langtag` (in RFC 5646 terms) can contain script, region, etc., only the `language` portion, an ISO 639 code, will be considered. So `en-US` and `en-GB` will both be treated as English.
666
1195
  :type lang: str
@@ -686,7 +1215,7 @@ class GeocodingApi:
686
1215
  :return: Returns the result object.
687
1216
  """ # noqa: E501
688
1217
 
689
- _param = self._place_serialize(
1218
+ _param = self._place_details_serialize(
690
1219
  ids=ids,
691
1220
  lang=lang,
692
1221
  _request_auth=_request_auth,
@@ -696,7 +1225,7 @@ class GeocodingApi:
696
1225
  )
697
1226
 
698
1227
  _response_types_map: Dict[str, Optional[str]] = {
699
- '200': "PeliasResponse",
1228
+ '200': "GeocodeResponse",
700
1229
  '400': None,
701
1230
  }
702
1231
  response_data = self.api_client.call_api(
@@ -711,9 +1240,9 @@ class GeocodingApi:
711
1240
 
712
1241
 
713
1242
  @validate_call
714
- def place_without_preload_content(
1243
+ def place_details_without_preload_content(
715
1244
  self,
716
- ids: Annotated[List[StrictStr], Field(description="A list of Pelias GIDs to search for.")],
1245
+ ids: Annotated[List[StrictStr], Field(description="A list of GIDs to search for.")],
717
1246
  lang: Annotated[Optional[StrictStr], Field(description="A BCP47 language tag which specifies a preference for localization of results. By default, results are in the default locale of the source data, but specifying a language will attempt to localize the results. Note that while a `langtag` (in RFC 5646 terms) can contain script, region, etc., only the `language` portion, an ISO 639 code, will be considered. So `en-US` and `en-GB` will both be treated as English.")] = None,
718
1247
  _request_timeout: Union[
719
1248
  None,
@@ -730,9 +1259,9 @@ class GeocodingApi:
730
1259
  ) -> RESTResponseType:
731
1260
  """Retrieve details of a place using its GID.
732
1261
 
733
- Many search result components include an associated GID field (for example, an address may have a `localadmin_gid`). The place endpoint lets you look up these places directly by ID. Note that these IDs are not stable for all sources. See the [online documentation](https://docs.stadiamaps.com/geocoding-search-autocomplete/place-lookup/) for details.
1262
+ Many search result components include an associated GID field (for example, an address may have a `localadmin_gid`). The place endpoint lets you look up these places directly by ID. Note that GIDs are not stable for all sources. See the [online documentation](https://docs.stadiamaps.com/geocoding-search-autocomplete/place-lookup/) for details.
734
1263
 
735
- :param ids: A list of Pelias GIDs to search for. (required)
1264
+ :param ids: A list of GIDs to search for. (required)
736
1265
  :type ids: List[str]
737
1266
  :param lang: A BCP47 language tag which specifies a preference for localization of results. By default, results are in the default locale of the source data, but specifying a language will attempt to localize the results. Note that while a `langtag` (in RFC 5646 terms) can contain script, region, etc., only the `language` portion, an ISO 639 code, will be considered. So `en-US` and `en-GB` will both be treated as English.
738
1267
  :type lang: str
@@ -758,7 +1287,7 @@ class GeocodingApi:
758
1287
  :return: Returns the result object.
759
1288
  """ # noqa: E501
760
1289
 
761
- _param = self._place_serialize(
1290
+ _param = self._place_details_serialize(
762
1291
  ids=ids,
763
1292
  lang=lang,
764
1293
  _request_auth=_request_auth,
@@ -768,7 +1297,7 @@ class GeocodingApi:
768
1297
  )
769
1298
 
770
1299
  _response_types_map: Dict[str, Optional[str]] = {
771
- '200': "PeliasResponse",
1300
+ '200': "GeocodeResponse",
772
1301
  '400': None,
773
1302
  }
774
1303
  response_data = self.api_client.call_api(
@@ -778,7 +1307,7 @@ class GeocodingApi:
778
1307
  return response_data.response
779
1308
 
780
1309
 
781
- def _place_serialize(
1310
+ def _place_details_serialize(
782
1311
  self,
783
1312
  ids,
784
1313
  lang,
@@ -798,7 +1327,9 @@ class GeocodingApi:
798
1327
  _query_params: List[Tuple[str, str]] = []
799
1328
  _header_params: Dict[str, Optional[str]] = _headers or {}
800
1329
  _form_params: List[Tuple[str, str]] = []
801
- _files: Dict[str, Union[str, bytes]] = {}
1330
+ _files: Dict[
1331
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1332
+ ] = {}
802
1333
  _body_params: Optional[bytes] = None
803
1334
 
804
1335
  # process the path parameters
@@ -848,16 +1379,300 @@ class GeocodingApi:
848
1379
 
849
1380
 
850
1381
 
1382
+ @validate_call
1383
+ def place_details_v2(
1384
+ self,
1385
+ ids: List[StrictStr],
1386
+ lang: Annotated[Optional[StrictStr], Field(description="A BCP47 language tag which specifies a preference for localization of results. There is no default value, so place names will be returned as-is, which is usually in the local language. NOTE: The Accept-Language header is also respected, and many user agents will set it automatically.")] = None,
1387
+ _request_timeout: Union[
1388
+ None,
1389
+ Annotated[StrictFloat, Field(gt=0)],
1390
+ Tuple[
1391
+ Annotated[StrictFloat, Field(gt=0)],
1392
+ Annotated[StrictFloat, Field(gt=0)]
1393
+ ]
1394
+ ] = None,
1395
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1396
+ _content_type: Optional[StrictStr] = None,
1397
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1398
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1399
+ ) -> GeocodeResponseEnvelopePropertiesV2:
1400
+ """place_details_v2
1401
+
1402
+
1403
+ :param ids: (required)
1404
+ :type ids: List[str]
1405
+ :param lang: A BCP47 language tag which specifies a preference for localization of results. There is no default value, so place names will be returned as-is, which is usually in the local language. NOTE: The Accept-Language header is also respected, and many user agents will set it automatically.
1406
+ :type lang: str
1407
+ :param _request_timeout: timeout setting for this request. If one
1408
+ number provided, it will be total request
1409
+ timeout. It can also be a pair (tuple) of
1410
+ (connection, read) timeouts.
1411
+ :type _request_timeout: int, tuple(int, int), optional
1412
+ :param _request_auth: set to override the auth_settings for an a single
1413
+ request; this effectively ignores the
1414
+ authentication in the spec for a single request.
1415
+ :type _request_auth: dict, optional
1416
+ :param _content_type: force content-type for the request.
1417
+ :type _content_type: str, Optional
1418
+ :param _headers: set to override the headers for a single
1419
+ request; this effectively ignores the headers
1420
+ in the spec for a single request.
1421
+ :type _headers: dict, optional
1422
+ :param _host_index: set to override the host_index for a single
1423
+ request; this effectively ignores the host_index
1424
+ in the spec for a single request.
1425
+ :type _host_index: int, optional
1426
+ :return: Returns the result object.
1427
+ """ # noqa: E501
1428
+
1429
+ _param = self._place_details_v2_serialize(
1430
+ ids=ids,
1431
+ lang=lang,
1432
+ _request_auth=_request_auth,
1433
+ _content_type=_content_type,
1434
+ _headers=_headers,
1435
+ _host_index=_host_index
1436
+ )
1437
+
1438
+ _response_types_map: Dict[str, Optional[str]] = {
1439
+ '200': "GeocodeResponseEnvelopePropertiesV2",
1440
+ '400': "GeocodeResponseEnvelopePropertiesV2",
1441
+ '500': "GeocodeResponseEnvelopePropertiesV2",
1442
+ }
1443
+ response_data = self.api_client.call_api(
1444
+ *_param,
1445
+ _request_timeout=_request_timeout
1446
+ )
1447
+ response_data.read()
1448
+ return self.api_client.response_deserialize(
1449
+ response_data=response_data,
1450
+ response_types_map=_response_types_map,
1451
+ ).data
1452
+
1453
+
1454
+ @validate_call
1455
+ def place_details_v2_with_http_info(
1456
+ self,
1457
+ ids: List[StrictStr],
1458
+ lang: Annotated[Optional[StrictStr], Field(description="A BCP47 language tag which specifies a preference for localization of results. There is no default value, so place names will be returned as-is, which is usually in the local language. NOTE: The Accept-Language header is also respected, and many user agents will set it automatically.")] = None,
1459
+ _request_timeout: Union[
1460
+ None,
1461
+ Annotated[StrictFloat, Field(gt=0)],
1462
+ Tuple[
1463
+ Annotated[StrictFloat, Field(gt=0)],
1464
+ Annotated[StrictFloat, Field(gt=0)]
1465
+ ]
1466
+ ] = None,
1467
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1468
+ _content_type: Optional[StrictStr] = None,
1469
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1470
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1471
+ ) -> ApiResponse[GeocodeResponseEnvelopePropertiesV2]:
1472
+ """place_details_v2
1473
+
1474
+
1475
+ :param ids: (required)
1476
+ :type ids: List[str]
1477
+ :param lang: A BCP47 language tag which specifies a preference for localization of results. There is no default value, so place names will be returned as-is, which is usually in the local language. NOTE: The Accept-Language header is also respected, and many user agents will set it automatically.
1478
+ :type lang: str
1479
+ :param _request_timeout: timeout setting for this request. If one
1480
+ number provided, it will be total request
1481
+ timeout. It can also be a pair (tuple) of
1482
+ (connection, read) timeouts.
1483
+ :type _request_timeout: int, tuple(int, int), optional
1484
+ :param _request_auth: set to override the auth_settings for an a single
1485
+ request; this effectively ignores the
1486
+ authentication in the spec for a single request.
1487
+ :type _request_auth: dict, optional
1488
+ :param _content_type: force content-type for the request.
1489
+ :type _content_type: str, Optional
1490
+ :param _headers: set to override the headers for a single
1491
+ request; this effectively ignores the headers
1492
+ in the spec for a single request.
1493
+ :type _headers: dict, optional
1494
+ :param _host_index: set to override the host_index for a single
1495
+ request; this effectively ignores the host_index
1496
+ in the spec for a single request.
1497
+ :type _host_index: int, optional
1498
+ :return: Returns the result object.
1499
+ """ # noqa: E501
1500
+
1501
+ _param = self._place_details_v2_serialize(
1502
+ ids=ids,
1503
+ lang=lang,
1504
+ _request_auth=_request_auth,
1505
+ _content_type=_content_type,
1506
+ _headers=_headers,
1507
+ _host_index=_host_index
1508
+ )
1509
+
1510
+ _response_types_map: Dict[str, Optional[str]] = {
1511
+ '200': "GeocodeResponseEnvelopePropertiesV2",
1512
+ '400': "GeocodeResponseEnvelopePropertiesV2",
1513
+ '500': "GeocodeResponseEnvelopePropertiesV2",
1514
+ }
1515
+ response_data = self.api_client.call_api(
1516
+ *_param,
1517
+ _request_timeout=_request_timeout
1518
+ )
1519
+ response_data.read()
1520
+ return self.api_client.response_deserialize(
1521
+ response_data=response_data,
1522
+ response_types_map=_response_types_map,
1523
+ )
1524
+
1525
+
1526
+ @validate_call
1527
+ def place_details_v2_without_preload_content(
1528
+ self,
1529
+ ids: List[StrictStr],
1530
+ lang: Annotated[Optional[StrictStr], Field(description="A BCP47 language tag which specifies a preference for localization of results. There is no default value, so place names will be returned as-is, which is usually in the local language. NOTE: The Accept-Language header is also respected, and many user agents will set it automatically.")] = None,
1531
+ _request_timeout: Union[
1532
+ None,
1533
+ Annotated[StrictFloat, Field(gt=0)],
1534
+ Tuple[
1535
+ Annotated[StrictFloat, Field(gt=0)],
1536
+ Annotated[StrictFloat, Field(gt=0)]
1537
+ ]
1538
+ ] = None,
1539
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1540
+ _content_type: Optional[StrictStr] = None,
1541
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1542
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1543
+ ) -> RESTResponseType:
1544
+ """place_details_v2
1545
+
1546
+
1547
+ :param ids: (required)
1548
+ :type ids: List[str]
1549
+ :param lang: A BCP47 language tag which specifies a preference for localization of results. There is no default value, so place names will be returned as-is, which is usually in the local language. NOTE: The Accept-Language header is also respected, and many user agents will set it automatically.
1550
+ :type lang: str
1551
+ :param _request_timeout: timeout setting for this request. If one
1552
+ number provided, it will be total request
1553
+ timeout. It can also be a pair (tuple) of
1554
+ (connection, read) timeouts.
1555
+ :type _request_timeout: int, tuple(int, int), optional
1556
+ :param _request_auth: set to override the auth_settings for an a single
1557
+ request; this effectively ignores the
1558
+ authentication in the spec for a single request.
1559
+ :type _request_auth: dict, optional
1560
+ :param _content_type: force content-type for the request.
1561
+ :type _content_type: str, Optional
1562
+ :param _headers: set to override the headers for a single
1563
+ request; this effectively ignores the headers
1564
+ in the spec for a single request.
1565
+ :type _headers: dict, optional
1566
+ :param _host_index: set to override the host_index for a single
1567
+ request; this effectively ignores the host_index
1568
+ in the spec for a single request.
1569
+ :type _host_index: int, optional
1570
+ :return: Returns the result object.
1571
+ """ # noqa: E501
1572
+
1573
+ _param = self._place_details_v2_serialize(
1574
+ ids=ids,
1575
+ lang=lang,
1576
+ _request_auth=_request_auth,
1577
+ _content_type=_content_type,
1578
+ _headers=_headers,
1579
+ _host_index=_host_index
1580
+ )
1581
+
1582
+ _response_types_map: Dict[str, Optional[str]] = {
1583
+ '200': "GeocodeResponseEnvelopePropertiesV2",
1584
+ '400': "GeocodeResponseEnvelopePropertiesV2",
1585
+ '500': "GeocodeResponseEnvelopePropertiesV2",
1586
+ }
1587
+ response_data = self.api_client.call_api(
1588
+ *_param,
1589
+ _request_timeout=_request_timeout
1590
+ )
1591
+ return response_data.response
1592
+
1593
+
1594
+ def _place_details_v2_serialize(
1595
+ self,
1596
+ ids,
1597
+ lang,
1598
+ _request_auth,
1599
+ _content_type,
1600
+ _headers,
1601
+ _host_index,
1602
+ ) -> RequestSerialized:
1603
+
1604
+ _host = None
1605
+
1606
+ _collection_formats: Dict[str, str] = {
1607
+ 'ids': 'csv',
1608
+ }
1609
+
1610
+ _path_params: Dict[str, str] = {}
1611
+ _query_params: List[Tuple[str, str]] = []
1612
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1613
+ _form_params: List[Tuple[str, str]] = []
1614
+ _files: Dict[
1615
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1616
+ ] = {}
1617
+ _body_params: Optional[bytes] = None
1618
+
1619
+ # process the path parameters
1620
+ # process the query parameters
1621
+ if ids is not None:
1622
+
1623
+ _query_params.append(('ids', ids))
1624
+
1625
+ if lang is not None:
1626
+
1627
+ _query_params.append(('lang', lang))
1628
+
1629
+ # process the header parameters
1630
+ # process the form parameters
1631
+ # process the body parameter
1632
+
1633
+
1634
+ # set the HTTP header `Accept`
1635
+ if 'Accept' not in _header_params:
1636
+ _header_params['Accept'] = self.api_client.select_header_accept(
1637
+ [
1638
+ 'application/json'
1639
+ ]
1640
+ )
1641
+
1642
+
1643
+ # authentication setting
1644
+ _auth_settings: List[str] = [
1645
+ 'ApiKeyAuth'
1646
+ ]
1647
+
1648
+ return self.api_client.param_serialize(
1649
+ method='GET',
1650
+ resource_path='/geocoding/v2/place_details',
1651
+ path_params=_path_params,
1652
+ query_params=_query_params,
1653
+ header_params=_header_params,
1654
+ body=_body_params,
1655
+ post_params=_form_params,
1656
+ files=_files,
1657
+ auth_settings=_auth_settings,
1658
+ collection_formats=_collection_formats,
1659
+ _host=_host,
1660
+ _request_auth=_request_auth
1661
+ )
1662
+
1663
+
1664
+
1665
+
851
1666
  @validate_call
852
1667
  def reverse(
853
1668
  self,
854
1669
  point_lat: Annotated[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]], Field(description="The latitude of the point at which to perform the search.")],
855
1670
  point_lon: Annotated[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]], Field(description="The longitude of the point at which to perform the search.")],
856
1671
  boundary_circle_radius: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.")] = None,
857
- layers: Annotated[Optional[List[PeliasLayer]], Field(description="A list of layers to limit the search to.")] = None,
858
- sources: Annotated[Optional[List[PeliasSource]], Field(description="A list of sources to limit the search to.")] = None,
859
- boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.")] = None,
860
- boundary_gid: Annotated[Optional[StrictStr], Field(description="The Pelias GID of an area to limit the search to.")] = None,
1672
+ layers: Annotated[Optional[List[GeocodingLayer]], Field(description="A list of layers to limit the search to.")] = None,
1673
+ sources: Annotated[Optional[List[GeocodingSource]], Field(description="A list of sources to limit the search to.")] = None,
1674
+ boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.")] = None,
1675
+ boundary_gid: Annotated[Optional[StrictStr], Field(description="The GID of an area to limit the search to.")] = None,
861
1676
  size: Annotated[Optional[StrictInt], Field(description="The maximum number of results to return.")] = None,
862
1677
  lang: Annotated[Optional[StrictStr], Field(description="A BCP47 language tag which specifies a preference for localization of results. By default, results are in the default locale of the source data, but specifying a language will attempt to localize the results. Note that while a `langtag` (in RFC 5646 terms) can contain script, region, etc., only the `language` portion, an ISO 639 code, will be considered. So `en-US` and `en-GB` will both be treated as English.")] = None,
863
1678
  _request_timeout: Union[
@@ -872,7 +1687,7 @@ class GeocodingApi:
872
1687
  _content_type: Optional[StrictStr] = None,
873
1688
  _headers: Optional[Dict[StrictStr, Any]] = None,
874
1689
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
875
- ) -> PeliasResponse:
1690
+ ) -> GeocodeResponse:
876
1691
  """Find places and addresses near geographic coordinates (reverse geocoding).
877
1692
 
878
1693
  Reverse geocoding and search finds places and addresses near any geographic coordinates.
@@ -884,12 +1699,12 @@ class GeocodingApi:
884
1699
  :param boundary_circle_radius: The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.
885
1700
  :type boundary_circle_radius: float
886
1701
  :param layers: A list of layers to limit the search to.
887
- :type layers: List[PeliasLayer]
1702
+ :type layers: List[GeocodingLayer]
888
1703
  :param sources: A list of sources to limit the search to.
889
- :type sources: List[PeliasSource]
890
- :param boundary_country: A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.
1704
+ :type sources: List[GeocodingSource]
1705
+ :param boundary_country: A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.
891
1706
  :type boundary_country: List[str]
892
- :param boundary_gid: The Pelias GID of an area to limit the search to.
1707
+ :param boundary_gid: The GID of an area to limit the search to.
893
1708
  :type boundary_gid: str
894
1709
  :param size: The maximum number of results to return.
895
1710
  :type size: int
@@ -934,7 +1749,7 @@ class GeocodingApi:
934
1749
  )
935
1750
 
936
1751
  _response_types_map: Dict[str, Optional[str]] = {
937
- '200': "PeliasResponse",
1752
+ '200': "GeocodeResponse",
938
1753
  '400': None,
939
1754
  }
940
1755
  response_data = self.api_client.call_api(
@@ -954,10 +1769,10 @@ class GeocodingApi:
954
1769
  point_lat: Annotated[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]], Field(description="The latitude of the point at which to perform the search.")],
955
1770
  point_lon: Annotated[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]], Field(description="The longitude of the point at which to perform the search.")],
956
1771
  boundary_circle_radius: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.")] = None,
957
- layers: Annotated[Optional[List[PeliasLayer]], Field(description="A list of layers to limit the search to.")] = None,
958
- sources: Annotated[Optional[List[PeliasSource]], Field(description="A list of sources to limit the search to.")] = None,
959
- boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.")] = None,
960
- boundary_gid: Annotated[Optional[StrictStr], Field(description="The Pelias GID of an area to limit the search to.")] = None,
1772
+ layers: Annotated[Optional[List[GeocodingLayer]], Field(description="A list of layers to limit the search to.")] = None,
1773
+ sources: Annotated[Optional[List[GeocodingSource]], Field(description="A list of sources to limit the search to.")] = None,
1774
+ boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.")] = None,
1775
+ boundary_gid: Annotated[Optional[StrictStr], Field(description="The GID of an area to limit the search to.")] = None,
961
1776
  size: Annotated[Optional[StrictInt], Field(description="The maximum number of results to return.")] = None,
962
1777
  lang: Annotated[Optional[StrictStr], Field(description="A BCP47 language tag which specifies a preference for localization of results. By default, results are in the default locale of the source data, but specifying a language will attempt to localize the results. Note that while a `langtag` (in RFC 5646 terms) can contain script, region, etc., only the `language` portion, an ISO 639 code, will be considered. So `en-US` and `en-GB` will both be treated as English.")] = None,
963
1778
  _request_timeout: Union[
@@ -972,7 +1787,7 @@ class GeocodingApi:
972
1787
  _content_type: Optional[StrictStr] = None,
973
1788
  _headers: Optional[Dict[StrictStr, Any]] = None,
974
1789
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
975
- ) -> ApiResponse[PeliasResponse]:
1790
+ ) -> ApiResponse[GeocodeResponse]:
976
1791
  """Find places and addresses near geographic coordinates (reverse geocoding).
977
1792
 
978
1793
  Reverse geocoding and search finds places and addresses near any geographic coordinates.
@@ -984,12 +1799,12 @@ class GeocodingApi:
984
1799
  :param boundary_circle_radius: The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.
985
1800
  :type boundary_circle_radius: float
986
1801
  :param layers: A list of layers to limit the search to.
987
- :type layers: List[PeliasLayer]
1802
+ :type layers: List[GeocodingLayer]
988
1803
  :param sources: A list of sources to limit the search to.
989
- :type sources: List[PeliasSource]
990
- :param boundary_country: A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.
1804
+ :type sources: List[GeocodingSource]
1805
+ :param boundary_country: A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.
991
1806
  :type boundary_country: List[str]
992
- :param boundary_gid: The Pelias GID of an area to limit the search to.
1807
+ :param boundary_gid: The GID of an area to limit the search to.
993
1808
  :type boundary_gid: str
994
1809
  :param size: The maximum number of results to return.
995
1810
  :type size: int
@@ -1034,7 +1849,7 @@ class GeocodingApi:
1034
1849
  )
1035
1850
 
1036
1851
  _response_types_map: Dict[str, Optional[str]] = {
1037
- '200': "PeliasResponse",
1852
+ '200': "GeocodeResponse",
1038
1853
  '400': None,
1039
1854
  }
1040
1855
  response_data = self.api_client.call_api(
@@ -1054,10 +1869,10 @@ class GeocodingApi:
1054
1869
  point_lat: Annotated[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]], Field(description="The latitude of the point at which to perform the search.")],
1055
1870
  point_lon: Annotated[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]], Field(description="The longitude of the point at which to perform the search.")],
1056
1871
  boundary_circle_radius: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.")] = None,
1057
- layers: Annotated[Optional[List[PeliasLayer]], Field(description="A list of layers to limit the search to.")] = None,
1058
- sources: Annotated[Optional[List[PeliasSource]], Field(description="A list of sources to limit the search to.")] = None,
1059
- boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.")] = None,
1060
- boundary_gid: Annotated[Optional[StrictStr], Field(description="The Pelias GID of an area to limit the search to.")] = None,
1872
+ layers: Annotated[Optional[List[GeocodingLayer]], Field(description="A list of layers to limit the search to.")] = None,
1873
+ sources: Annotated[Optional[List[GeocodingSource]], Field(description="A list of sources to limit the search to.")] = None,
1874
+ boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.")] = None,
1875
+ boundary_gid: Annotated[Optional[StrictStr], Field(description="The GID of an area to limit the search to.")] = None,
1061
1876
  size: Annotated[Optional[StrictInt], Field(description="The maximum number of results to return.")] = None,
1062
1877
  lang: Annotated[Optional[StrictStr], Field(description="A BCP47 language tag which specifies a preference for localization of results. By default, results are in the default locale of the source data, but specifying a language will attempt to localize the results. Note that while a `langtag` (in RFC 5646 terms) can contain script, region, etc., only the `language` portion, an ISO 639 code, will be considered. So `en-US` and `en-GB` will both be treated as English.")] = None,
1063
1878
  _request_timeout: Union[
@@ -1084,12 +1899,12 @@ class GeocodingApi:
1084
1899
  :param boundary_circle_radius: The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.
1085
1900
  :type boundary_circle_radius: float
1086
1901
  :param layers: A list of layers to limit the search to.
1087
- :type layers: List[PeliasLayer]
1902
+ :type layers: List[GeocodingLayer]
1088
1903
  :param sources: A list of sources to limit the search to.
1089
- :type sources: List[PeliasSource]
1090
- :param boundary_country: A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.
1904
+ :type sources: List[GeocodingSource]
1905
+ :param boundary_country: A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.
1091
1906
  :type boundary_country: List[str]
1092
- :param boundary_gid: The Pelias GID of an area to limit the search to.
1907
+ :param boundary_gid: The GID of an area to limit the search to.
1093
1908
  :type boundary_gid: str
1094
1909
  :param size: The maximum number of results to return.
1095
1910
  :type size: int
@@ -1134,7 +1949,7 @@ class GeocodingApi:
1134
1949
  )
1135
1950
 
1136
1951
  _response_types_map: Dict[str, Optional[str]] = {
1137
- '200': "PeliasResponse",
1952
+ '200': "GeocodeResponse",
1138
1953
  '400': None,
1139
1954
  }
1140
1955
  response_data = self.api_client.call_api(
@@ -1173,7 +1988,9 @@ class GeocodingApi:
1173
1988
  _query_params: List[Tuple[str, str]] = []
1174
1989
  _header_params: Dict[str, Optional[str]] = _headers or {}
1175
1990
  _form_params: List[Tuple[str, str]] = []
1176
- _files: Dict[str, Union[str, bytes]] = {}
1991
+ _files: Dict[
1992
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1993
+ ] = {}
1177
1994
  _body_params: Optional[bytes] = None
1178
1995
 
1179
1996
  # process the path parameters
@@ -1264,10 +2081,10 @@ class GeocodingApi:
1264
2081
  boundary_circle_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`.")] = None,
1265
2082
  boundary_circle_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.")] = None,
1266
2083
  boundary_circle_radius: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.")] = None,
1267
- boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.")] = None,
1268
- boundary_gid: Annotated[Optional[StrictStr], Field(description="The Pelias GID of an area to limit the search to.")] = None,
1269
- layers: Annotated[Optional[List[PeliasLayer]], Field(description="A list of layers to limit the search to.")] = None,
1270
- sources: Annotated[Optional[List[PeliasSource]], Field(description="A list of sources to limit the search to.")] = None,
2084
+ boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.")] = None,
2085
+ boundary_gid: Annotated[Optional[StrictStr], Field(description="The GID of an area to limit the search to.")] = None,
2086
+ layers: Annotated[Optional[List[GeocodingLayer]], Field(description="A list of layers to limit the search to.")] = None,
2087
+ sources: Annotated[Optional[List[GeocodingSource]], Field(description="A list of sources to limit the search to.")] = None,
1271
2088
  size: Annotated[Optional[StrictInt], Field(description="The maximum number of results to return.")] = None,
1272
2089
  lang: Annotated[Optional[StrictStr], Field(description="A BCP47 language tag which specifies a preference for localization of results. By default, results are in the default locale of the source data, but specifying a language will attempt to localize the results. Note that while a `langtag` (in RFC 5646 terms) can contain script, region, etc., only the `language` portion, an ISO 639 code, will be considered. So `en-US` and `en-GB` will both be treated as English.")] = None,
1273
2090
  _request_timeout: Union[
@@ -1282,7 +2099,7 @@ class GeocodingApi:
1282
2099
  _content_type: Optional[StrictStr] = None,
1283
2100
  _headers: Optional[Dict[StrictStr, Any]] = None,
1284
2101
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1285
- ) -> PeliasResponse:
2102
+ ) -> GeocodeResponse:
1286
2103
  """Search for location and other info using a place name or address (forward geocoding).
1287
2104
 
1288
2105
  The search endpoint lets you search for addresses, points of interest, and administrative areas. This is most commonly used for forward geocoding applications where you need to find the geographic coordinates of an address.
@@ -1307,14 +2124,14 @@ class GeocodingApi:
1307
2124
  :type boundary_circle_lon: float
1308
2125
  :param boundary_circle_radius: The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.
1309
2126
  :type boundary_circle_radius: float
1310
- :param boundary_country: A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.
2127
+ :param boundary_country: A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.
1311
2128
  :type boundary_country: List[str]
1312
- :param boundary_gid: The Pelias GID of an area to limit the search to.
2129
+ :param boundary_gid: The GID of an area to limit the search to.
1313
2130
  :type boundary_gid: str
1314
2131
  :param layers: A list of layers to limit the search to.
1315
- :type layers: List[PeliasLayer]
2132
+ :type layers: List[GeocodingLayer]
1316
2133
  :param sources: A list of sources to limit the search to.
1317
- :type sources: List[PeliasSource]
2134
+ :type sources: List[GeocodingSource]
1318
2135
  :param size: The maximum number of results to return.
1319
2136
  :type size: int
1320
2137
  :param lang: A BCP47 language tag which specifies a preference for localization of results. By default, results are in the default locale of the source data, but specifying a language will attempt to localize the results. Note that while a `langtag` (in RFC 5646 terms) can contain script, region, etc., only the `language` portion, an ISO 639 code, will be considered. So `en-US` and `en-GB` will both be treated as English.
@@ -1365,7 +2182,7 @@ class GeocodingApi:
1365
2182
  )
1366
2183
 
1367
2184
  _response_types_map: Dict[str, Optional[str]] = {
1368
- '200': "PeliasResponse",
2185
+ '200': "GeocodeResponse",
1369
2186
  '400': None,
1370
2187
  }
1371
2188
  response_data = self.api_client.call_api(
@@ -1392,10 +2209,10 @@ class GeocodingApi:
1392
2209
  boundary_circle_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`.")] = None,
1393
2210
  boundary_circle_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.")] = None,
1394
2211
  boundary_circle_radius: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.")] = None,
1395
- boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.")] = None,
1396
- boundary_gid: Annotated[Optional[StrictStr], Field(description="The Pelias GID of an area to limit the search to.")] = None,
1397
- layers: Annotated[Optional[List[PeliasLayer]], Field(description="A list of layers to limit the search to.")] = None,
1398
- sources: Annotated[Optional[List[PeliasSource]], Field(description="A list of sources to limit the search to.")] = None,
2212
+ boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.")] = None,
2213
+ boundary_gid: Annotated[Optional[StrictStr], Field(description="The GID of an area to limit the search to.")] = None,
2214
+ layers: Annotated[Optional[List[GeocodingLayer]], Field(description="A list of layers to limit the search to.")] = None,
2215
+ sources: Annotated[Optional[List[GeocodingSource]], Field(description="A list of sources to limit the search to.")] = None,
1399
2216
  size: Annotated[Optional[StrictInt], Field(description="The maximum number of results to return.")] = None,
1400
2217
  lang: Annotated[Optional[StrictStr], Field(description="A BCP47 language tag which specifies a preference for localization of results. By default, results are in the default locale of the source data, but specifying a language will attempt to localize the results. Note that while a `langtag` (in RFC 5646 terms) can contain script, region, etc., only the `language` portion, an ISO 639 code, will be considered. So `en-US` and `en-GB` will both be treated as English.")] = None,
1401
2218
  _request_timeout: Union[
@@ -1410,7 +2227,7 @@ class GeocodingApi:
1410
2227
  _content_type: Optional[StrictStr] = None,
1411
2228
  _headers: Optional[Dict[StrictStr, Any]] = None,
1412
2229
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1413
- ) -> ApiResponse[PeliasResponse]:
2230
+ ) -> ApiResponse[GeocodeResponse]:
1414
2231
  """Search for location and other info using a place name or address (forward geocoding).
1415
2232
 
1416
2233
  The search endpoint lets you search for addresses, points of interest, and administrative areas. This is most commonly used for forward geocoding applications where you need to find the geographic coordinates of an address.
@@ -1435,14 +2252,14 @@ class GeocodingApi:
1435
2252
  :type boundary_circle_lon: float
1436
2253
  :param boundary_circle_radius: The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.
1437
2254
  :type boundary_circle_radius: float
1438
- :param boundary_country: A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.
2255
+ :param boundary_country: A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.
1439
2256
  :type boundary_country: List[str]
1440
- :param boundary_gid: The Pelias GID of an area to limit the search to.
2257
+ :param boundary_gid: The GID of an area to limit the search to.
1441
2258
  :type boundary_gid: str
1442
2259
  :param layers: A list of layers to limit the search to.
1443
- :type layers: List[PeliasLayer]
2260
+ :type layers: List[GeocodingLayer]
1444
2261
  :param sources: A list of sources to limit the search to.
1445
- :type sources: List[PeliasSource]
2262
+ :type sources: List[GeocodingSource]
1446
2263
  :param size: The maximum number of results to return.
1447
2264
  :type size: int
1448
2265
  :param lang: A BCP47 language tag which specifies a preference for localization of results. By default, results are in the default locale of the source data, but specifying a language will attempt to localize the results. Note that while a `langtag` (in RFC 5646 terms) can contain script, region, etc., only the `language` portion, an ISO 639 code, will be considered. So `en-US` and `en-GB` will both be treated as English.
@@ -1493,7 +2310,7 @@ class GeocodingApi:
1493
2310
  )
1494
2311
 
1495
2312
  _response_types_map: Dict[str, Optional[str]] = {
1496
- '200': "PeliasResponse",
2313
+ '200': "GeocodeResponse",
1497
2314
  '400': None,
1498
2315
  }
1499
2316
  response_data = self.api_client.call_api(
@@ -1520,10 +2337,10 @@ class GeocodingApi:
1520
2337
  boundary_circle_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`.")] = None,
1521
2338
  boundary_circle_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.")] = None,
1522
2339
  boundary_circle_radius: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.")] = None,
1523
- boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.")] = None,
1524
- boundary_gid: Annotated[Optional[StrictStr], Field(description="The Pelias GID of an area to limit the search to.")] = None,
1525
- layers: Annotated[Optional[List[PeliasLayer]], Field(description="A list of layers to limit the search to.")] = None,
1526
- sources: Annotated[Optional[List[PeliasSource]], Field(description="A list of sources to limit the search to.")] = None,
2340
+ boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.")] = None,
2341
+ boundary_gid: Annotated[Optional[StrictStr], Field(description="The GID of an area to limit the search to.")] = None,
2342
+ layers: Annotated[Optional[List[GeocodingLayer]], Field(description="A list of layers to limit the search to.")] = None,
2343
+ sources: Annotated[Optional[List[GeocodingSource]], Field(description="A list of sources to limit the search to.")] = None,
1527
2344
  size: Annotated[Optional[StrictInt], Field(description="The maximum number of results to return.")] = None,
1528
2345
  lang: Annotated[Optional[StrictStr], Field(description="A BCP47 language tag which specifies a preference for localization of results. By default, results are in the default locale of the source data, but specifying a language will attempt to localize the results. Note that while a `langtag` (in RFC 5646 terms) can contain script, region, etc., only the `language` portion, an ISO 639 code, will be considered. So `en-US` and `en-GB` will both be treated as English.")] = None,
1529
2346
  _request_timeout: Union[
@@ -1563,14 +2380,14 @@ class GeocodingApi:
1563
2380
  :type boundary_circle_lon: float
1564
2381
  :param boundary_circle_radius: The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.
1565
2382
  :type boundary_circle_radius: float
1566
- :param boundary_country: A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.
2383
+ :param boundary_country: A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.
1567
2384
  :type boundary_country: List[str]
1568
- :param boundary_gid: The Pelias GID of an area to limit the search to.
2385
+ :param boundary_gid: The GID of an area to limit the search to.
1569
2386
  :type boundary_gid: str
1570
2387
  :param layers: A list of layers to limit the search to.
1571
- :type layers: List[PeliasLayer]
2388
+ :type layers: List[GeocodingLayer]
1572
2389
  :param sources: A list of sources to limit the search to.
1573
- :type sources: List[PeliasSource]
2390
+ :type sources: List[GeocodingSource]
1574
2391
  :param size: The maximum number of results to return.
1575
2392
  :type size: int
1576
2393
  :param lang: A BCP47 language tag which specifies a preference for localization of results. By default, results are in the default locale of the source data, but specifying a language will attempt to localize the results. Note that while a `langtag` (in RFC 5646 terms) can contain script, region, etc., only the `language` portion, an ISO 639 code, will be considered. So `en-US` and `en-GB` will both be treated as English.
@@ -1621,7 +2438,7 @@ class GeocodingApi:
1621
2438
  )
1622
2439
 
1623
2440
  _response_types_map: Dict[str, Optional[str]] = {
1624
- '200': "PeliasResponse",
2441
+ '200': "GeocodeResponse",
1625
2442
  '400': None,
1626
2443
  }
1627
2444
  response_data = self.api_client.call_api(
@@ -1667,7 +2484,9 @@ class GeocodingApi:
1667
2484
  _query_params: List[Tuple[str, str]] = []
1668
2485
  _header_params: Dict[str, Optional[str]] = _headers or {}
1669
2486
  _form_params: List[Tuple[str, str]] = []
1670
- _files: Dict[str, Union[str, bytes]] = {}
2487
+ _files: Dict[
2488
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2489
+ ] = {}
1671
2490
  _body_params: Optional[bytes] = None
1672
2491
 
1673
2492
  # process the path parameters
@@ -1992,7 +2811,9 @@ class GeocodingApi:
1992
2811
  _query_params: List[Tuple[str, str]] = []
1993
2812
  _header_params: Dict[str, Optional[str]] = _headers or {}
1994
2813
  _form_params: List[Tuple[str, str]] = []
1995
- _files: Dict[str, Union[str, bytes]] = {}
2814
+ _files: Dict[
2815
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2816
+ ] = {}
1996
2817
  _body_params: Optional[bytes] = None
1997
2818
 
1998
2819
  # process the path parameters
@@ -2059,7 +2880,7 @@ class GeocodingApi:
2059
2880
  county: Annotated[Optional[StrictStr], Field(description="Administrative divisions between localities and regions. Not commonly used as input to structured geocoding.")] = None,
2060
2881
  region: Annotated[Optional[StrictStr], Field(description="Typically the first administrative division within a country. For example, a US state or a Canadian province.")] = None,
2061
2882
  postalcode: Annotated[Optional[StrictStr], Field(description="A mail sorting code.")] = None,
2062
- country: Annotated[Optional[StrictStr], Field(description="A full name (ex: Canada), or a 2 or 3 character ISO code. Prefer ISO codes when possible.")] = None,
2883
+ country: Annotated[Optional[StrictStr], Field(description="A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.")] = None,
2063
2884
  focus_point_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lon`.")] = None,
2064
2885
  focus_point_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lat`.")] = None,
2065
2886
  boundary_rect_min_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="Defines the min latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
@@ -2069,10 +2890,10 @@ class GeocodingApi:
2069
2890
  boundary_circle_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`.")] = None,
2070
2891
  boundary_circle_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.")] = None,
2071
2892
  boundary_circle_radius: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.")] = None,
2072
- boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.")] = None,
2073
- boundary_gid: Annotated[Optional[StrictStr], Field(description="The Pelias GID of an area to limit the search to.")] = None,
2074
- layers: Annotated[Optional[List[PeliasLayer]], Field(description="A list of layers to limit the search to.")] = None,
2075
- sources: Annotated[Optional[List[PeliasSource]], Field(description="A list of sources to limit the search to.")] = None,
2893
+ boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.")] = None,
2894
+ boundary_gid: Annotated[Optional[StrictStr], Field(description="The GID of an area to limit the search to.")] = None,
2895
+ layers: Annotated[Optional[List[GeocodingLayer]], Field(description="A list of layers to limit the search to.")] = None,
2896
+ sources: Annotated[Optional[List[GeocodingSource]], Field(description="A list of sources to limit the search to.")] = None,
2076
2897
  size: Annotated[Optional[StrictInt], Field(description="The maximum number of results to return.")] = None,
2077
2898
  lang: Annotated[Optional[StrictStr], Field(description="A BCP47 language tag which specifies a preference for localization of results. By default, results are in the default locale of the source data, but specifying a language will attempt to localize the results. Note that while a `langtag` (in RFC 5646 terms) can contain script, region, etc., only the `language` portion, an ISO 639 code, will be considered. So `en-US` and `en-GB` will both be treated as English.")] = None,
2078
2899
  _request_timeout: Union[
@@ -2087,7 +2908,7 @@ class GeocodingApi:
2087
2908
  _content_type: Optional[StrictStr] = None,
2088
2909
  _headers: Optional[Dict[StrictStr, Any]] = None,
2089
2910
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2090
- ) -> PeliasResponse:
2911
+ ) -> GeocodeResponse:
2091
2912
  """Find locations matching components (structured forward geocoding).
2092
2913
 
2093
2914
  The structured search endpoint lets you search for addresses, points of interest, and administrative areas. Rather than a single string which the API must infer meaning from, the structured search endpoint allows you to specify the known components upfront, which is useful in many forward geocoding workflows.
@@ -2106,7 +2927,7 @@ class GeocodingApi:
2106
2927
  :type region: str
2107
2928
  :param postalcode: A mail sorting code.
2108
2929
  :type postalcode: str
2109
- :param country: A full name (ex: Canada), or a 2 or 3 character ISO code. Prefer ISO codes when possible.
2930
+ :param country: A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.
2110
2931
  :type country: str
2111
2932
  :param focus_point_lat: The latitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lon`.
2112
2933
  :type focus_point_lat: float
@@ -2126,14 +2947,14 @@ class GeocodingApi:
2126
2947
  :type boundary_circle_lon: float
2127
2948
  :param boundary_circle_radius: The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.
2128
2949
  :type boundary_circle_radius: float
2129
- :param boundary_country: A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.
2950
+ :param boundary_country: A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.
2130
2951
  :type boundary_country: List[str]
2131
- :param boundary_gid: The Pelias GID of an area to limit the search to.
2952
+ :param boundary_gid: The GID of an area to limit the search to.
2132
2953
  :type boundary_gid: str
2133
2954
  :param layers: A list of layers to limit the search to.
2134
- :type layers: List[PeliasLayer]
2955
+ :type layers: List[GeocodingLayer]
2135
2956
  :param sources: A list of sources to limit the search to.
2136
- :type sources: List[PeliasSource]
2957
+ :type sources: List[GeocodingSource]
2137
2958
  :param size: The maximum number of results to return.
2138
2959
  :type size: int
2139
2960
  :param lang: A BCP47 language tag which specifies a preference for localization of results. By default, results are in the default locale of the source data, but specifying a language will attempt to localize the results. Note that while a `langtag` (in RFC 5646 terms) can contain script, region, etc., only the `language` portion, an ISO 639 code, will be considered. So `en-US` and `en-GB` will both be treated as English.
@@ -2191,7 +3012,7 @@ class GeocodingApi:
2191
3012
  )
2192
3013
 
2193
3014
  _response_types_map: Dict[str, Optional[str]] = {
2194
- '200': "PeliasResponse",
3015
+ '200': "GeocodeResponse",
2195
3016
  '400': None,
2196
3017
  }
2197
3018
  response_data = self.api_client.call_api(
@@ -2215,7 +3036,7 @@ class GeocodingApi:
2215
3036
  county: Annotated[Optional[StrictStr], Field(description="Administrative divisions between localities and regions. Not commonly used as input to structured geocoding.")] = None,
2216
3037
  region: Annotated[Optional[StrictStr], Field(description="Typically the first administrative division within a country. For example, a US state or a Canadian province.")] = None,
2217
3038
  postalcode: Annotated[Optional[StrictStr], Field(description="A mail sorting code.")] = None,
2218
- country: Annotated[Optional[StrictStr], Field(description="A full name (ex: Canada), or a 2 or 3 character ISO code. Prefer ISO codes when possible.")] = None,
3039
+ country: Annotated[Optional[StrictStr], Field(description="A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.")] = None,
2219
3040
  focus_point_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lon`.")] = None,
2220
3041
  focus_point_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lat`.")] = None,
2221
3042
  boundary_rect_min_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="Defines the min latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
@@ -2225,10 +3046,10 @@ class GeocodingApi:
2225
3046
  boundary_circle_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`.")] = None,
2226
3047
  boundary_circle_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.")] = None,
2227
3048
  boundary_circle_radius: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.")] = None,
2228
- boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.")] = None,
2229
- boundary_gid: Annotated[Optional[StrictStr], Field(description="The Pelias GID of an area to limit the search to.")] = None,
2230
- layers: Annotated[Optional[List[PeliasLayer]], Field(description="A list of layers to limit the search to.")] = None,
2231
- sources: Annotated[Optional[List[PeliasSource]], Field(description="A list of sources to limit the search to.")] = None,
3049
+ boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.")] = None,
3050
+ boundary_gid: Annotated[Optional[StrictStr], Field(description="The GID of an area to limit the search to.")] = None,
3051
+ layers: Annotated[Optional[List[GeocodingLayer]], Field(description="A list of layers to limit the search to.")] = None,
3052
+ sources: Annotated[Optional[List[GeocodingSource]], Field(description="A list of sources to limit the search to.")] = None,
2232
3053
  size: Annotated[Optional[StrictInt], Field(description="The maximum number of results to return.")] = None,
2233
3054
  lang: Annotated[Optional[StrictStr], Field(description="A BCP47 language tag which specifies a preference for localization of results. By default, results are in the default locale of the source data, but specifying a language will attempt to localize the results. Note that while a `langtag` (in RFC 5646 terms) can contain script, region, etc., only the `language` portion, an ISO 639 code, will be considered. So `en-US` and `en-GB` will both be treated as English.")] = None,
2234
3055
  _request_timeout: Union[
@@ -2243,7 +3064,7 @@ class GeocodingApi:
2243
3064
  _content_type: Optional[StrictStr] = None,
2244
3065
  _headers: Optional[Dict[StrictStr, Any]] = None,
2245
3066
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2246
- ) -> ApiResponse[PeliasResponse]:
3067
+ ) -> ApiResponse[GeocodeResponse]:
2247
3068
  """Find locations matching components (structured forward geocoding).
2248
3069
 
2249
3070
  The structured search endpoint lets you search for addresses, points of interest, and administrative areas. Rather than a single string which the API must infer meaning from, the structured search endpoint allows you to specify the known components upfront, which is useful in many forward geocoding workflows.
@@ -2262,7 +3083,7 @@ class GeocodingApi:
2262
3083
  :type region: str
2263
3084
  :param postalcode: A mail sorting code.
2264
3085
  :type postalcode: str
2265
- :param country: A full name (ex: Canada), or a 2 or 3 character ISO code. Prefer ISO codes when possible.
3086
+ :param country: A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.
2266
3087
  :type country: str
2267
3088
  :param focus_point_lat: The latitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lon`.
2268
3089
  :type focus_point_lat: float
@@ -2282,14 +3103,14 @@ class GeocodingApi:
2282
3103
  :type boundary_circle_lon: float
2283
3104
  :param boundary_circle_radius: The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.
2284
3105
  :type boundary_circle_radius: float
2285
- :param boundary_country: A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.
3106
+ :param boundary_country: A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.
2286
3107
  :type boundary_country: List[str]
2287
- :param boundary_gid: The Pelias GID of an area to limit the search to.
3108
+ :param boundary_gid: The GID of an area to limit the search to.
2288
3109
  :type boundary_gid: str
2289
3110
  :param layers: A list of layers to limit the search to.
2290
- :type layers: List[PeliasLayer]
3111
+ :type layers: List[GeocodingLayer]
2291
3112
  :param sources: A list of sources to limit the search to.
2292
- :type sources: List[PeliasSource]
3113
+ :type sources: List[GeocodingSource]
2293
3114
  :param size: The maximum number of results to return.
2294
3115
  :type size: int
2295
3116
  :param lang: A BCP47 language tag which specifies a preference for localization of results. By default, results are in the default locale of the source data, but specifying a language will attempt to localize the results. Note that while a `langtag` (in RFC 5646 terms) can contain script, region, etc., only the `language` portion, an ISO 639 code, will be considered. So `en-US` and `en-GB` will both be treated as English.
@@ -2347,7 +3168,7 @@ class GeocodingApi:
2347
3168
  )
2348
3169
 
2349
3170
  _response_types_map: Dict[str, Optional[str]] = {
2350
- '200': "PeliasResponse",
3171
+ '200': "GeocodeResponse",
2351
3172
  '400': None,
2352
3173
  }
2353
3174
  response_data = self.api_client.call_api(
@@ -2371,7 +3192,7 @@ class GeocodingApi:
2371
3192
  county: Annotated[Optional[StrictStr], Field(description="Administrative divisions between localities and regions. Not commonly used as input to structured geocoding.")] = None,
2372
3193
  region: Annotated[Optional[StrictStr], Field(description="Typically the first administrative division within a country. For example, a US state or a Canadian province.")] = None,
2373
3194
  postalcode: Annotated[Optional[StrictStr], Field(description="A mail sorting code.")] = None,
2374
- country: Annotated[Optional[StrictStr], Field(description="A full name (ex: Canada), or a 2 or 3 character ISO code. Prefer ISO codes when possible.")] = None,
3195
+ country: Annotated[Optional[StrictStr], Field(description="A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.")] = None,
2375
3196
  focus_point_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lon`.")] = None,
2376
3197
  focus_point_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lat`.")] = None,
2377
3198
  boundary_rect_min_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="Defines the min latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None,
@@ -2381,10 +3202,10 @@ class GeocodingApi:
2381
3202
  boundary_circle_lat: Annotated[Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]], Field(description="The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`.")] = None,
2382
3203
  boundary_circle_lon: Annotated[Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]], Field(description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.")] = None,
2383
3204
  boundary_circle_radius: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.")] = None,
2384
- boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.")] = None,
2385
- boundary_gid: Annotated[Optional[StrictStr], Field(description="The Pelias GID of an area to limit the search to.")] = None,
2386
- layers: Annotated[Optional[List[PeliasLayer]], Field(description="A list of layers to limit the search to.")] = None,
2387
- sources: Annotated[Optional[List[PeliasSource]], Field(description="A list of sources to limit the search to.")] = None,
3205
+ boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.")] = None,
3206
+ boundary_gid: Annotated[Optional[StrictStr], Field(description="The GID of an area to limit the search to.")] = None,
3207
+ layers: Annotated[Optional[List[GeocodingLayer]], Field(description="A list of layers to limit the search to.")] = None,
3208
+ sources: Annotated[Optional[List[GeocodingSource]], Field(description="A list of sources to limit the search to.")] = None,
2388
3209
  size: Annotated[Optional[StrictInt], Field(description="The maximum number of results to return.")] = None,
2389
3210
  lang: Annotated[Optional[StrictStr], Field(description="A BCP47 language tag which specifies a preference for localization of results. By default, results are in the default locale of the source data, but specifying a language will attempt to localize the results. Note that while a `langtag` (in RFC 5646 terms) can contain script, region, etc., only the `language` portion, an ISO 639 code, will be considered. So `en-US` and `en-GB` will both be treated as English.")] = None,
2390
3211
  _request_timeout: Union[
@@ -2418,7 +3239,7 @@ class GeocodingApi:
2418
3239
  :type region: str
2419
3240
  :param postalcode: A mail sorting code.
2420
3241
  :type postalcode: str
2421
- :param country: A full name (ex: Canada), or a 2 or 3 character ISO code. Prefer ISO codes when possible.
3242
+ :param country: A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.
2422
3243
  :type country: str
2423
3244
  :param focus_point_lat: The latitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lon`.
2424
3245
  :type focus_point_lat: float
@@ -2438,14 +3259,14 @@ class GeocodingApi:
2438
3259
  :type boundary_circle_lon: float
2439
3260
  :param boundary_circle_radius: The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.
2440
3261
  :type boundary_circle_radius: float
2441
- :param boundary_country: A list of countries to limit the search to. These may be either full names (ex: Canada), or an ISO 3116-1 alpha-2 or alpha-3 code. Prefer ISO codes when possible.
3262
+ :param boundary_country: A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.
2442
3263
  :type boundary_country: List[str]
2443
- :param boundary_gid: The Pelias GID of an area to limit the search to.
3264
+ :param boundary_gid: The GID of an area to limit the search to.
2444
3265
  :type boundary_gid: str
2445
3266
  :param layers: A list of layers to limit the search to.
2446
- :type layers: List[PeliasLayer]
3267
+ :type layers: List[GeocodingLayer]
2447
3268
  :param sources: A list of sources to limit the search to.
2448
- :type sources: List[PeliasSource]
3269
+ :type sources: List[GeocodingSource]
2449
3270
  :param size: The maximum number of results to return.
2450
3271
  :type size: int
2451
3272
  :param lang: A BCP47 language tag which specifies a preference for localization of results. By default, results are in the default locale of the source data, but specifying a language will attempt to localize the results. Note that while a `langtag` (in RFC 5646 terms) can contain script, region, etc., only the `language` portion, an ISO 639 code, will be considered. So `en-US` and `en-GB` will both be treated as English.
@@ -2503,7 +3324,7 @@ class GeocodingApi:
2503
3324
  )
2504
3325
 
2505
3326
  _response_types_map: Dict[str, Optional[str]] = {
2506
- '200': "PeliasResponse",
3327
+ '200': "GeocodeResponse",
2507
3328
  '400': None,
2508
3329
  }
2509
3330
  response_data = self.api_client.call_api(
@@ -2556,7 +3377,9 @@ class GeocodingApi:
2556
3377
  _query_params: List[Tuple[str, str]] = []
2557
3378
  _header_params: Dict[str, Optional[str]] = _headers or {}
2558
3379
  _form_params: List[Tuple[str, str]] = []
2559
- _files: Dict[str, Union[str, bytes]] = {}
3380
+ _files: Dict[
3381
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3382
+ ] = {}
2560
3383
  _body_params: Optional[bytes] = None
2561
3384
 
2562
3385
  # process the path parameters