stadiamaps 5.0.0__py3-none-any.whl → 6.1.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 (158) hide show
  1. stadiamaps/__init__.py +23 -5
  2. stadiamaps/api/geocoding_api.py +1388 -138
  3. stadiamaps/api/geospatial_api.py +1 -1
  4. stadiamaps/api/routing_api.py +1 -1
  5. stadiamaps/api_client.py +3 -3
  6. stadiamaps/configuration.py +5 -5
  7. stadiamaps/exceptions.py +18 -1
  8. stadiamaps/models/__init__.py +22 -4
  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 +1 -1
  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 +1 -1
  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 +1 -1
  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_base.py +1 -1
  39. stadiamaps/models/geo_json_point.py +1 -1
  40. stadiamaps/models/geocode_response.py +1 -1
  41. stadiamaps/models/geocode_response_envelope_properties_v2.py +125 -0
  42. stadiamaps/models/geocoding_geo_json_feature.py +1 -1
  43. stadiamaps/models/geocoding_geo_json_properties.py +8 -6
  44. stadiamaps/models/geocoding_geo_json_properties_addendum.py +1 -1
  45. stadiamaps/models/geocoding_geo_json_properties_addendum_osm.py +1 -1
  46. stadiamaps/models/geocoding_layer.py +1 -1
  47. stadiamaps/models/geocoding_meta.py +108 -0
  48. stadiamaps/models/geocoding_object.py +1 -1
  49. stadiamaps/models/geocoding_source.py +1 -1
  50. stadiamaps/models/geonames_addendum.py +101 -0
  51. stadiamaps/models/height_request.py +1 -1
  52. stadiamaps/models/height_response.py +1 -1
  53. stadiamaps/models/highway_classification.py +1 -1
  54. stadiamaps/models/intersecting_edge.py +1 -1
  55. stadiamaps/models/isochrone_costing_model.py +1 -1
  56. stadiamaps/models/isochrone_feature.py +1 -1
  57. stadiamaps/models/isochrone_properties.py +1 -1
  58. stadiamaps/models/isochrone_request.py +1 -1
  59. stadiamaps/models/isochrone_response.py +1 -1
  60. stadiamaps/models/layer_id.py +57 -0
  61. stadiamaps/models/locate_detailed_edge.py +1 -1
  62. stadiamaps/models/locate_edge.py +1 -1
  63. stadiamaps/models/locate_edge_info.py +1 -1
  64. stadiamaps/models/locate_node.py +1 -1
  65. stadiamaps/models/locate_object.py +1 -1
  66. stadiamaps/models/low_speed_vehicle_costing_options.py +1 -1
  67. stadiamaps/models/maneuver_sign.py +1 -1
  68. stadiamaps/models/maneuver_sign_element.py +1 -1
  69. stadiamaps/models/map_match_costing_model.py +1 -1
  70. stadiamaps/models/map_match_request.py +1 -1
  71. stadiamaps/models/map_match_route_response.py +1 -1
  72. stadiamaps/models/map_match_trace_options.py +1 -1
  73. stadiamaps/models/map_match_waypoint.py +3 -3
  74. stadiamaps/models/match_type.py +39 -0
  75. stadiamaps/models/matched_point.py +1 -1
  76. stadiamaps/models/matrix_costing_model.py +1 -1
  77. stadiamaps/models/matrix_distance.py +1 -1
  78. stadiamaps/models/matrix_request.py +1 -1
  79. stadiamaps/models/matrix_response.py +1 -1
  80. stadiamaps/models/matrix_waypoint.py +1 -1
  81. stadiamaps/models/motor_scooter_costing_options.py +1 -1
  82. stadiamaps/models/motorcycle_costing_options.py +1 -1
  83. stadiamaps/models/nearest_roads_request.py +1 -1
  84. stadiamaps/models/node_id.py +1 -1
  85. stadiamaps/models/node_type.py +1 -1
  86. stadiamaps/models/open_street_map_addendum.py +169 -0
  87. stadiamaps/models/optimized_route_request.py +1 -1
  88. stadiamaps/models/osrm_admin.py +1 -1
  89. stadiamaps/models/osrm_annotation.py +1 -1
  90. stadiamaps/models/osrm_banner_component.py +1 -1
  91. stadiamaps/models/osrm_banner_content.py +1 -1
  92. stadiamaps/models/osrm_banner_instruction.py +1 -1
  93. stadiamaps/models/osrm_base_api_response.py +1 -1
  94. stadiamaps/models/osrm_guidance_modifier.py +1 -1
  95. stadiamaps/models/osrm_intersection.py +1 -1
  96. stadiamaps/models/osrm_lane.py +1 -1
  97. stadiamaps/models/osrm_route.py +1 -1
  98. stadiamaps/models/osrm_route_leg.py +1 -1
  99. stadiamaps/models/osrm_route_response.py +1 -1
  100. stadiamaps/models/osrm_route_step.py +1 -1
  101. stadiamaps/models/osrm_speed_limit.py +1 -1
  102. stadiamaps/models/osrm_step_maneuver.py +1 -1
  103. stadiamaps/models/osrm_via_waypoint.py +1 -1
  104. stadiamaps/models/osrm_voice_instruction.py +1 -1
  105. stadiamaps/models/osrm_waypoint.py +1 -1
  106. stadiamaps/models/pedestrian_costing_options.py +8 -5
  107. stadiamaps/models/pedestrian_type.py +39 -0
  108. stadiamaps/models/point.py +104 -0
  109. stadiamaps/models/precision.py +38 -0
  110. stadiamaps/models/properties_v2.py +184 -0
  111. stadiamaps/models/restrictions.py +11 -11
  112. stadiamaps/models/road_class.py +1 -1
  113. stadiamaps/models/route200_response.py +1 -1
  114. stadiamaps/models/route_leg.py +1 -1
  115. stadiamaps/models/route_maneuver.py +1 -1
  116. stadiamaps/models/route_request.py +1 -1
  117. stadiamaps/models/route_response.py +1 -1
  118. stadiamaps/models/route_response_alternates_inner.py +1 -1
  119. stadiamaps/models/route_summary.py +1 -1
  120. stadiamaps/models/route_trip.py +1 -1
  121. stadiamaps/models/routing_languages.py +1 -1
  122. stadiamaps/models/routing_long_units.py +1 -1
  123. stadiamaps/models/routing_response_waypoint.py +3 -3
  124. stadiamaps/models/routing_waypoint.py +3 -3
  125. stadiamaps/models/routing_waypoint_all_of_search_filter.py +1 -1
  126. stadiamaps/models/search_query.py +2 -2
  127. stadiamaps/models/search_structured_query.py +3 -3
  128. stadiamaps/models/simple_routing_waypoint.py +3 -3
  129. stadiamaps/models/source_attribution.py +110 -0
  130. stadiamaps/models/source_id.py +41 -0
  131. stadiamaps/models/speeds.py +1 -1
  132. stadiamaps/models/trace_attribute_filter_options.py +1 -1
  133. stadiamaps/models/trace_attribute_key.py +1 -1
  134. stadiamaps/models/trace_attributes_base_response.py +1 -1
  135. stadiamaps/models/trace_attributes_request.py +1 -1
  136. stadiamaps/models/trace_attributes_response.py +1 -6
  137. stadiamaps/models/trace_edge.py +2 -7
  138. stadiamaps/models/travel_mode.py +1 -1
  139. stadiamaps/models/traversability.py +1 -1
  140. stadiamaps/models/truck_costing_options.py +1 -1
  141. stadiamaps/models/tz_response.py +1 -1
  142. stadiamaps/models/warning.py +1 -1
  143. stadiamaps/models/whos_on_first_concordances.py +246 -0
  144. stadiamaps/models/wof_context.py +210 -0
  145. stadiamaps/models/wof_context_component.py +110 -0
  146. stadiamaps/rest.py +1 -1
  147. stadiamaps-6.1.0.dist-info/METADATA +117 -0
  148. stadiamaps-6.1.0.dist-info/RECORD +183 -0
  149. {stadiamaps-5.0.0.dist-info → stadiamaps-6.1.0.dist-info}/WHEEL +1 -1
  150. {stadiamaps-5.0.0.dist-info → stadiamaps-6.1.0.dist-info}/top_level.txt +1 -0
  151. test/integration/__init__.py +0 -0
  152. test/integration/test_eu_endpoint.py +21 -0
  153. test/integration/test_gecoding.py +136 -0
  154. test/integration/test_geospatial.py +43 -0
  155. test/integration/test_routing.py +282 -0
  156. stadiamaps-5.0.0.dist-info/METADATA +0 -87
  157. stadiamaps-5.0.0.dist-info/RECORD +0 -157
  158. {stadiamaps-5.0.0.dist-info → stadiamaps-6.1.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: 8.0.0
8
+ The version of the OpenAPI document: 9.1.1
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -23,8 +23,11 @@ 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
25
  from stadiamaps.models.geocode_response import GeocodeResponse
26
+ from stadiamaps.models.geocode_response_envelope_properties_v2 import GeocodeResponseEnvelopePropertiesV2
26
27
  from stadiamaps.models.geocoding_layer import GeocodingLayer
27
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,7 +60,7 @@ 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,
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,
61
64
  boundary_gid: Annotated[Optional[StrictStr], Field(description="The GID of an area to limit the search to.")] = None,
62
65
  layers: Annotated[Optional[List[GeocodingLayer]], Field(description="A list of layers to limit the search to.")] = None,
63
66
  sources: Annotated[Optional[List[GeocodingSource]], Field(description="A list of sources to limit the search to.")] = None,
@@ -100,7 +103,7 @@ 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
108
  :param boundary_gid: The GID of an area to limit the search to.
106
109
  :type boundary_gid: str
@@ -185,7 +188,7 @@ 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,
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,
189
192
  boundary_gid: Annotated[Optional[StrictStr], Field(description="The GID of an area to limit the search to.")] = None,
190
193
  layers: Annotated[Optional[List[GeocodingLayer]], Field(description="A list of layers to limit the search to.")] = None,
191
194
  sources: Annotated[Optional[List[GeocodingSource]], Field(description="A list of sources to limit the search to.")] = None,
@@ -228,7 +231,7 @@ 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
236
  :param boundary_gid: The GID of an area to limit the search to.
234
237
  :type boundary_gid: str
@@ -313,7 +316,7 @@ 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,
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,
317
320
  boundary_gid: Annotated[Optional[StrictStr], Field(description="The GID of an area to limit the search to.")] = None,
318
321
  layers: Annotated[Optional[List[GeocodingLayer]], Field(description="A list of layers to limit the search to.")] = None,
319
322
  sources: Annotated[Optional[List[GeocodingSource]], Field(description="A list of sources to limit the search to.")] = None,
@@ -356,7 +359,7 @@ 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
364
  :param boundary_gid: The GID of an area to limit the search to.
362
365
  :type boundary_gid: str
@@ -569,7 +572,675 @@ class GeocodingApi:
569
572
 
570
573
 
571
574
  @validate_call
572
- def place(
575
+ def autocomplete_v2(
576
+ self,
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.")],
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,
1103
+ _request_timeout: Union[
1104
+ None,
1105
+ Annotated[StrictFloat, Field(gt=0)],
1106
+ Tuple[
1107
+ Annotated[StrictFloat, Field(gt=0)],
1108
+ Annotated[StrictFloat, Field(gt=0)]
1109
+ ]
1110
+ ] = None,
1111
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1112
+ _content_type: Optional[StrictStr] = None,
1113
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1114
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1115
+ ) -> GeocodeResponse:
1116
+ """Retrieve details of a place using its GID.
1117
+
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.
1119
+
1120
+ :param ids: A list of GIDs to search for. (required)
1121
+ :type ids: List[str]
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.
1123
+ :type lang: str
1124
+ :param _request_timeout: timeout setting for this request. If one
1125
+ number provided, it will be total request
1126
+ timeout. It can also be a pair (tuple) of
1127
+ (connection, read) timeouts.
1128
+ :type _request_timeout: int, tuple(int, int), optional
1129
+ :param _request_auth: set to override the auth_settings for an a single
1130
+ request; this effectively ignores the
1131
+ authentication in the spec for a single request.
1132
+ :type _request_auth: dict, optional
1133
+ :param _content_type: force content-type for the request.
1134
+ :type _content_type: str, Optional
1135
+ :param _headers: set to override the headers for a single
1136
+ request; this effectively ignores the headers
1137
+ in the spec for a single request.
1138
+ :type _headers: dict, optional
1139
+ :param _host_index: set to override the host_index for a single
1140
+ request; this effectively ignores the host_index
1141
+ in the spec for a single request.
1142
+ :type _host_index: int, optional
1143
+ :return: Returns the result object.
1144
+ """ # noqa: E501
1145
+
1146
+ _param = self._place_details_serialize(
1147
+ ids=ids,
1148
+ lang=lang,
1149
+ _request_auth=_request_auth,
1150
+ _content_type=_content_type,
1151
+ _headers=_headers,
1152
+ _host_index=_host_index
1153
+ )
1154
+
1155
+ _response_types_map: Dict[str, Optional[str]] = {
1156
+ '200': "GeocodeResponse",
1157
+ '400': None,
1158
+ }
1159
+ response_data = self.api_client.call_api(
1160
+ *_param,
1161
+ _request_timeout=_request_timeout
1162
+ )
1163
+ response_data.read()
1164
+ return self.api_client.response_deserialize(
1165
+ response_data=response_data,
1166
+ response_types_map=_response_types_map,
1167
+ ).data
1168
+
1169
+
1170
+ @validate_call
1171
+ def place_details_with_http_info(
1172
+ self,
1173
+ ids: Annotated[List[StrictStr], Field(description="A list of GIDs to search for.")],
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,
1175
+ _request_timeout: Union[
1176
+ None,
1177
+ Annotated[StrictFloat, Field(gt=0)],
1178
+ Tuple[
1179
+ Annotated[StrictFloat, Field(gt=0)],
1180
+ Annotated[StrictFloat, Field(gt=0)]
1181
+ ]
1182
+ ] = None,
1183
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1184
+ _content_type: Optional[StrictStr] = None,
1185
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1186
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1187
+ ) -> ApiResponse[GeocodeResponse]:
1188
+ """Retrieve details of a place using its GID.
1189
+
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.
1191
+
1192
+ :param ids: A list of GIDs to search for. (required)
1193
+ :type ids: List[str]
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.
1195
+ :type lang: str
1196
+ :param _request_timeout: timeout setting for this request. If one
1197
+ number provided, it will be total request
1198
+ timeout. It can also be a pair (tuple) of
1199
+ (connection, read) timeouts.
1200
+ :type _request_timeout: int, tuple(int, int), optional
1201
+ :param _request_auth: set to override the auth_settings for an a single
1202
+ request; this effectively ignores the
1203
+ authentication in the spec for a single request.
1204
+ :type _request_auth: dict, optional
1205
+ :param _content_type: force content-type for the request.
1206
+ :type _content_type: str, Optional
1207
+ :param _headers: set to override the headers for a single
1208
+ request; this effectively ignores the headers
1209
+ in the spec for a single request.
1210
+ :type _headers: dict, optional
1211
+ :param _host_index: set to override the host_index for a single
1212
+ request; this effectively ignores the host_index
1213
+ in the spec for a single request.
1214
+ :type _host_index: int, optional
1215
+ :return: Returns the result object.
1216
+ """ # noqa: E501
1217
+
1218
+ _param = self._place_details_serialize(
1219
+ ids=ids,
1220
+ lang=lang,
1221
+ _request_auth=_request_auth,
1222
+ _content_type=_content_type,
1223
+ _headers=_headers,
1224
+ _host_index=_host_index
1225
+ )
1226
+
1227
+ _response_types_map: Dict[str, Optional[str]] = {
1228
+ '200': "GeocodeResponse",
1229
+ '400': None,
1230
+ }
1231
+ response_data = self.api_client.call_api(
1232
+ *_param,
1233
+ _request_timeout=_request_timeout
1234
+ )
1235
+ response_data.read()
1236
+ return self.api_client.response_deserialize(
1237
+ response_data=response_data,
1238
+ response_types_map=_response_types_map,
1239
+ )
1240
+
1241
+
1242
+ @validate_call
1243
+ def place_details_without_preload_content(
573
1244
  self,
574
1245
  ids: Annotated[List[StrictStr], Field(description="A list of GIDs to search for.")],
575
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,
@@ -585,13 +1256,458 @@ class GeocodingApi:
585
1256
  _content_type: Optional[StrictStr] = None,
586
1257
  _headers: Optional[Dict[StrictStr, Any]] = None,
587
1258
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1259
+ ) -> RESTResponseType:
1260
+ """Retrieve details of a place using its GID.
1261
+
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.
1263
+
1264
+ :param ids: A list of GIDs to search for. (required)
1265
+ :type ids: List[str]
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.
1267
+ :type lang: str
1268
+ :param _request_timeout: timeout setting for this request. If one
1269
+ number provided, it will be total request
1270
+ timeout. It can also be a pair (tuple) of
1271
+ (connection, read) timeouts.
1272
+ :type _request_timeout: int, tuple(int, int), optional
1273
+ :param _request_auth: set to override the auth_settings for an a single
1274
+ request; this effectively ignores the
1275
+ authentication in the spec for a single request.
1276
+ :type _request_auth: dict, optional
1277
+ :param _content_type: force content-type for the request.
1278
+ :type _content_type: str, Optional
1279
+ :param _headers: set to override the headers for a single
1280
+ request; this effectively ignores the headers
1281
+ in the spec for a single request.
1282
+ :type _headers: dict, optional
1283
+ :param _host_index: set to override the host_index for a single
1284
+ request; this effectively ignores the host_index
1285
+ in the spec for a single request.
1286
+ :type _host_index: int, optional
1287
+ :return: Returns the result object.
1288
+ """ # noqa: E501
1289
+
1290
+ _param = self._place_details_serialize(
1291
+ ids=ids,
1292
+ lang=lang,
1293
+ _request_auth=_request_auth,
1294
+ _content_type=_content_type,
1295
+ _headers=_headers,
1296
+ _host_index=_host_index
1297
+ )
1298
+
1299
+ _response_types_map: Dict[str, Optional[str]] = {
1300
+ '200': "GeocodeResponse",
1301
+ '400': None,
1302
+ }
1303
+ response_data = self.api_client.call_api(
1304
+ *_param,
1305
+ _request_timeout=_request_timeout
1306
+ )
1307
+ return response_data.response
1308
+
1309
+
1310
+ def _place_details_serialize(
1311
+ self,
1312
+ ids,
1313
+ lang,
1314
+ _request_auth,
1315
+ _content_type,
1316
+ _headers,
1317
+ _host_index,
1318
+ ) -> RequestSerialized:
1319
+
1320
+ _host = None
1321
+
1322
+ _collection_formats: Dict[str, str] = {
1323
+ 'ids': 'csv',
1324
+ }
1325
+
1326
+ _path_params: Dict[str, str] = {}
1327
+ _query_params: List[Tuple[str, str]] = []
1328
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1329
+ _form_params: List[Tuple[str, str]] = []
1330
+ _files: Dict[
1331
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1332
+ ] = {}
1333
+ _body_params: Optional[bytes] = None
1334
+
1335
+ # process the path parameters
1336
+ # process the query parameters
1337
+ if ids is not None:
1338
+
1339
+ _query_params.append(('ids', ids))
1340
+
1341
+ if lang is not None:
1342
+
1343
+ _query_params.append(('lang', lang))
1344
+
1345
+ # process the header parameters
1346
+ # process the form parameters
1347
+ # process the body parameter
1348
+
1349
+
1350
+ # set the HTTP header `Accept`
1351
+ if 'Accept' not in _header_params:
1352
+ _header_params['Accept'] = self.api_client.select_header_accept(
1353
+ [
1354
+ 'application/json'
1355
+ ]
1356
+ )
1357
+
1358
+
1359
+ # authentication setting
1360
+ _auth_settings: List[str] = [
1361
+ 'ApiKeyAuth'
1362
+ ]
1363
+
1364
+ return self.api_client.param_serialize(
1365
+ method='GET',
1366
+ resource_path='/geocoding/v1/place',
1367
+ path_params=_path_params,
1368
+ query_params=_query_params,
1369
+ header_params=_header_params,
1370
+ body=_body_params,
1371
+ post_params=_form_params,
1372
+ files=_files,
1373
+ auth_settings=_auth_settings,
1374
+ collection_formats=_collection_formats,
1375
+ _host=_host,
1376
+ _request_auth=_request_auth
1377
+ )
1378
+
1379
+
1380
+
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
+
1666
+ @validate_call
1667
+ def reverse(
1668
+ self,
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.")],
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.")],
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,
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,
1676
+ size: Annotated[Optional[StrictInt], Field(description="The maximum number of results to return.")] = None,
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,
1678
+ _request_timeout: Union[
1679
+ None,
1680
+ Annotated[StrictFloat, Field(gt=0)],
1681
+ Tuple[
1682
+ Annotated[StrictFloat, Field(gt=0)],
1683
+ Annotated[StrictFloat, Field(gt=0)]
1684
+ ]
1685
+ ] = None,
1686
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1687
+ _content_type: Optional[StrictStr] = None,
1688
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1689
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
588
1690
  ) -> GeocodeResponse:
589
- """Retrieve details of a place using its GID.
1691
+ """Find places and addresses near geographic coordinates (reverse geocoding).
590
1692
 
591
- 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.
1693
+ Reverse geocoding and search finds places and addresses near any geographic coordinates.
592
1694
 
593
- :param ids: A list of GIDs to search for. (required)
594
- :type ids: List[str]
1695
+ :param point_lat: The latitude of the point at which to perform the search. (required)
1696
+ :type point_lat: float
1697
+ :param point_lon: The longitude of the point at which to perform the search. (required)
1698
+ :type point_lon: float
1699
+ :param boundary_circle_radius: The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.
1700
+ :type boundary_circle_radius: float
1701
+ :param layers: A list of layers to limit the search to.
1702
+ :type layers: List[GeocodingLayer]
1703
+ :param sources: A list of sources to limit the search to.
1704
+ :type sources: List[GeocodingSource]
1705
+ :param boundary_country: A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.
1706
+ :type boundary_country: List[str]
1707
+ :param boundary_gid: The GID of an area to limit the search to.
1708
+ :type boundary_gid: str
1709
+ :param size: The maximum number of results to return.
1710
+ :type size: int
595
1711
  :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.
596
1712
  :type lang: str
597
1713
  :param _request_timeout: timeout setting for this request. If one
@@ -616,8 +1732,15 @@ class GeocodingApi:
616
1732
  :return: Returns the result object.
617
1733
  """ # noqa: E501
618
1734
 
619
- _param = self._place_serialize(
620
- ids=ids,
1735
+ _param = self._reverse_serialize(
1736
+ point_lat=point_lat,
1737
+ point_lon=point_lon,
1738
+ boundary_circle_radius=boundary_circle_radius,
1739
+ layers=layers,
1740
+ sources=sources,
1741
+ boundary_country=boundary_country,
1742
+ boundary_gid=boundary_gid,
1743
+ size=size,
621
1744
  lang=lang,
622
1745
  _request_auth=_request_auth,
623
1746
  _content_type=_content_type,
@@ -641,9 +1764,16 @@ class GeocodingApi:
641
1764
 
642
1765
 
643
1766
  @validate_call
644
- def place_with_http_info(
1767
+ def reverse_with_http_info(
645
1768
  self,
646
- ids: Annotated[List[StrictStr], Field(description="A list of GIDs to search for.")],
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.")],
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.")],
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,
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,
1776
+ size: Annotated[Optional[StrictInt], Field(description="The maximum number of results to return.")] = None,
647
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,
648
1778
  _request_timeout: Union[
649
1779
  None,
@@ -658,12 +1788,26 @@ class GeocodingApi:
658
1788
  _headers: Optional[Dict[StrictStr, Any]] = None,
659
1789
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
660
1790
  ) -> ApiResponse[GeocodeResponse]:
661
- """Retrieve details of a place using its GID.
1791
+ """Find places and addresses near geographic coordinates (reverse geocoding).
662
1792
 
663
- 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.
1793
+ Reverse geocoding and search finds places and addresses near any geographic coordinates.
664
1794
 
665
- :param ids: A list of GIDs to search for. (required)
666
- :type ids: List[str]
1795
+ :param point_lat: The latitude of the point at which to perform the search. (required)
1796
+ :type point_lat: float
1797
+ :param point_lon: The longitude of the point at which to perform the search. (required)
1798
+ :type point_lon: float
1799
+ :param boundary_circle_radius: The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.
1800
+ :type boundary_circle_radius: float
1801
+ :param layers: A list of layers to limit the search to.
1802
+ :type layers: List[GeocodingLayer]
1803
+ :param sources: A list of sources to limit the search to.
1804
+ :type sources: List[GeocodingSource]
1805
+ :param boundary_country: A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.
1806
+ :type boundary_country: List[str]
1807
+ :param boundary_gid: The GID of an area to limit the search to.
1808
+ :type boundary_gid: str
1809
+ :param size: The maximum number of results to return.
1810
+ :type size: int
667
1811
  :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.
668
1812
  :type lang: str
669
1813
  :param _request_timeout: timeout setting for this request. If one
@@ -688,8 +1832,15 @@ class GeocodingApi:
688
1832
  :return: Returns the result object.
689
1833
  """ # noqa: E501
690
1834
 
691
- _param = self._place_serialize(
692
- ids=ids,
1835
+ _param = self._reverse_serialize(
1836
+ point_lat=point_lat,
1837
+ point_lon=point_lon,
1838
+ boundary_circle_radius=boundary_circle_radius,
1839
+ layers=layers,
1840
+ sources=sources,
1841
+ boundary_country=boundary_country,
1842
+ boundary_gid=boundary_gid,
1843
+ size=size,
693
1844
  lang=lang,
694
1845
  _request_auth=_request_auth,
695
1846
  _content_type=_content_type,
@@ -713,9 +1864,16 @@ class GeocodingApi:
713
1864
 
714
1865
 
715
1866
  @validate_call
716
- def place_without_preload_content(
1867
+ def reverse_without_preload_content(
717
1868
  self,
718
- ids: Annotated[List[StrictStr], Field(description="A list of GIDs to search for.")],
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.")],
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.")],
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,
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,
1876
+ size: Annotated[Optional[StrictInt], Field(description="The maximum number of results to return.")] = None,
719
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,
720
1878
  _request_timeout: Union[
721
1879
  None,
@@ -730,12 +1888,26 @@ class GeocodingApi:
730
1888
  _headers: Optional[Dict[StrictStr, Any]] = None,
731
1889
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
732
1890
  ) -> RESTResponseType:
733
- """Retrieve details of a place using its GID.
1891
+ """Find places and addresses near geographic coordinates (reverse geocoding).
734
1892
 
735
- 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.
1893
+ Reverse geocoding and search finds places and addresses near any geographic coordinates.
736
1894
 
737
- :param ids: A list of GIDs to search for. (required)
738
- :type ids: List[str]
1895
+ :param point_lat: The latitude of the point at which to perform the search. (required)
1896
+ :type point_lat: float
1897
+ :param point_lon: The longitude of the point at which to perform the search. (required)
1898
+ :type point_lon: float
1899
+ :param boundary_circle_radius: The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.
1900
+ :type boundary_circle_radius: float
1901
+ :param layers: A list of layers to limit the search to.
1902
+ :type layers: List[GeocodingLayer]
1903
+ :param sources: A list of sources to limit the search to.
1904
+ :type sources: List[GeocodingSource]
1905
+ :param boundary_country: A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.
1906
+ :type boundary_country: List[str]
1907
+ :param boundary_gid: The GID of an area to limit the search to.
1908
+ :type boundary_gid: str
1909
+ :param size: The maximum number of results to return.
1910
+ :type size: int
739
1911
  :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.
740
1912
  :type lang: str
741
1913
  :param _request_timeout: timeout setting for this request. If one
@@ -760,8 +1932,15 @@ class GeocodingApi:
760
1932
  :return: Returns the result object.
761
1933
  """ # noqa: E501
762
1934
 
763
- _param = self._place_serialize(
764
- ids=ids,
1935
+ _param = self._reverse_serialize(
1936
+ point_lat=point_lat,
1937
+ point_lon=point_lon,
1938
+ boundary_circle_radius=boundary_circle_radius,
1939
+ layers=layers,
1940
+ sources=sources,
1941
+ boundary_country=boundary_country,
1942
+ boundary_gid=boundary_gid,
1943
+ size=size,
765
1944
  lang=lang,
766
1945
  _request_auth=_request_auth,
767
1946
  _content_type=_content_type,
@@ -780,9 +1959,16 @@ class GeocodingApi:
780
1959
  return response_data.response
781
1960
 
782
1961
 
783
- def _place_serialize(
1962
+ def _reverse_serialize(
784
1963
  self,
785
- ids,
1964
+ point_lat,
1965
+ point_lon,
1966
+ boundary_circle_radius,
1967
+ layers,
1968
+ sources,
1969
+ boundary_country,
1970
+ boundary_gid,
1971
+ size,
786
1972
  lang,
787
1973
  _request_auth,
788
1974
  _content_type,
@@ -793,7 +1979,9 @@ class GeocodingApi:
793
1979
  _host = None
794
1980
 
795
1981
  _collection_formats: Dict[str, str] = {
796
- 'ids': 'csv',
1982
+ 'layers': 'csv',
1983
+ 'sources': 'csv',
1984
+ 'boundary.country': 'csv',
797
1985
  }
798
1986
 
799
1987
  _path_params: Dict[str, str] = {}
@@ -807,9 +1995,37 @@ class GeocodingApi:
807
1995
 
808
1996
  # process the path parameters
809
1997
  # process the query parameters
810
- if ids is not None:
1998
+ if point_lat is not None:
811
1999
 
812
- _query_params.append(('ids', ids))
2000
+ _query_params.append(('point.lat', point_lat))
2001
+
2002
+ if point_lon is not None:
2003
+
2004
+ _query_params.append(('point.lon', point_lon))
2005
+
2006
+ if boundary_circle_radius is not None:
2007
+
2008
+ _query_params.append(('boundary.circle.radius', boundary_circle_radius))
2009
+
2010
+ if layers is not None:
2011
+
2012
+ _query_params.append(('layers', layers))
2013
+
2014
+ if sources is not None:
2015
+
2016
+ _query_params.append(('sources', sources))
2017
+
2018
+ if boundary_country is not None:
2019
+
2020
+ _query_params.append(('boundary.country', boundary_country))
2021
+
2022
+ if boundary_gid is not None:
2023
+
2024
+ _query_params.append(('boundary.gid', boundary_gid))
2025
+
2026
+ if size is not None:
2027
+
2028
+ _query_params.append(('size', size))
813
2029
 
814
2030
  if lang is not None:
815
2031
 
@@ -836,7 +2052,7 @@ class GeocodingApi:
836
2052
 
837
2053
  return self.api_client.param_serialize(
838
2054
  method='GET',
839
- resource_path='/geocoding/v1/place',
2055
+ resource_path='/geocoding/v1/reverse',
840
2056
  path_params=_path_params,
841
2057
  query_params=_query_params,
842
2058
  header_params=_header_params,
@@ -853,17 +2069,19 @@ class GeocodingApi:
853
2069
 
854
2070
 
855
2071
  @validate_call
856
- def reverse(
2072
+ def reverse_v2(
857
2073
  self,
858
2074
  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.")],
859
2075
  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.")],
860
- 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,
861
- layers: Annotated[Optional[List[GeocodingLayer]], Field(description="A list of layers to limit the search to.")] = None,
862
- sources: Annotated[Optional[List[GeocodingSource]], Field(description="A list of sources to limit the search to.")] = None,
863
- 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,
864
- boundary_gid: Annotated[Optional[StrictStr], Field(description="The GID of an area to limit the search to.")] = None,
865
- size: Annotated[Optional[StrictInt], Field(description="The maximum number of results to return.")] = None,
866
- 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,
2076
+ layers: Annotated[Optional[List[LayerId]], Field(description="A list of layers to limit the search to.")] = None,
2077
+ sources: Annotated[Optional[List[SourceId]], Field(description="A list of sources to limit the search to.")] = None,
2078
+ 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,
2079
+ 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,
2080
+ 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,
2081
+ 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.lat.")] = None,
2082
+ 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 2km if unspecified.")] = None,
2083
+ 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,
2084
+ 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,
867
2085
  _request_timeout: Union[
868
2086
  None,
869
2087
  Annotated[StrictFloat, Field(gt=0)],
@@ -876,28 +2094,31 @@ class GeocodingApi:
876
2094
  _content_type: Optional[StrictStr] = None,
877
2095
  _headers: Optional[Dict[StrictStr, Any]] = None,
878
2096
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
879
- ) -> GeocodeResponse:
880
- """Find places and addresses near geographic coordinates (reverse geocoding).
2097
+ ) -> GeocodeResponseEnvelopePropertiesV2:
2098
+ """reverse_v2
881
2099
 
882
- Reverse geocoding and search finds places and addresses near any geographic coordinates.
883
2100
 
884
2101
  :param point_lat: The latitude of the point at which to perform the search. (required)
885
2102
  :type point_lat: float
886
2103
  :param point_lon: The longitude of the point at which to perform the search. (required)
887
2104
  :type point_lon: float
888
- :param boundary_circle_radius: The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.
889
- :type boundary_circle_radius: float
890
2105
  :param layers: A list of layers to limit the search to.
891
- :type layers: List[GeocodingLayer]
2106
+ :type layers: List[LayerId]
892
2107
  :param sources: A list of sources to limit the search to.
893
- :type sources: List[GeocodingSource]
894
- :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.
895
- :type boundary_country: List[str]
896
- :param boundary_gid: The GID of an area to limit the search to.
2108
+ :type sources: List[SourceId]
2109
+ :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.
897
2110
  :type boundary_gid: str
898
- :param size: The maximum number of results to return.
2111
+ :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.
2112
+ :type boundary_country: List[str]
2113
+ :param boundary_circle_lat: The latitude of the center of a circle to limit the search to. NOTE: Requires boundary.circle.lon.
2114
+ :type boundary_circle_lat: float
2115
+ :param boundary_circle_lon: The longitude of the center of a circle to limit the search to. NOTE: Requires boundary.circle.lat.
2116
+ :type boundary_circle_lon: float
2117
+ :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 2km if unspecified.
2118
+ :type boundary_circle_radius: int
2119
+ :param size: The maximum number of items to return from a query.
899
2120
  :type size: int
900
- :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.
2121
+ :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.
901
2122
  :type lang: str
902
2123
  :param _request_timeout: timeout setting for this request. If one
903
2124
  number provided, it will be total request
@@ -921,14 +2142,16 @@ class GeocodingApi:
921
2142
  :return: Returns the result object.
922
2143
  """ # noqa: E501
923
2144
 
924
- _param = self._reverse_serialize(
2145
+ _param = self._reverse_v2_serialize(
925
2146
  point_lat=point_lat,
926
2147
  point_lon=point_lon,
927
- boundary_circle_radius=boundary_circle_radius,
928
2148
  layers=layers,
929
2149
  sources=sources,
930
- boundary_country=boundary_country,
931
2150
  boundary_gid=boundary_gid,
2151
+ boundary_country=boundary_country,
2152
+ boundary_circle_lat=boundary_circle_lat,
2153
+ boundary_circle_lon=boundary_circle_lon,
2154
+ boundary_circle_radius=boundary_circle_radius,
932
2155
  size=size,
933
2156
  lang=lang,
934
2157
  _request_auth=_request_auth,
@@ -938,8 +2161,9 @@ class GeocodingApi:
938
2161
  )
939
2162
 
940
2163
  _response_types_map: Dict[str, Optional[str]] = {
941
- '200': "GeocodeResponse",
942
- '400': None,
2164
+ '200': "GeocodeResponseEnvelopePropertiesV2",
2165
+ '400': "GeocodeResponseEnvelopePropertiesV2",
2166
+ '500': "GeocodeResponseEnvelopePropertiesV2",
943
2167
  }
944
2168
  response_data = self.api_client.call_api(
945
2169
  *_param,
@@ -953,17 +2177,19 @@ class GeocodingApi:
953
2177
 
954
2178
 
955
2179
  @validate_call
956
- def reverse_with_http_info(
2180
+ def reverse_v2_with_http_info(
957
2181
  self,
958
2182
  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.")],
959
2183
  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.")],
960
- 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,
961
- layers: Annotated[Optional[List[GeocodingLayer]], Field(description="A list of layers to limit the search to.")] = None,
962
- sources: Annotated[Optional[List[GeocodingSource]], Field(description="A list of sources to limit the search to.")] = None,
963
- 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,
964
- boundary_gid: Annotated[Optional[StrictStr], Field(description="The GID of an area to limit the search to.")] = None,
965
- size: Annotated[Optional[StrictInt], Field(description="The maximum number of results to return.")] = None,
966
- 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,
2184
+ layers: Annotated[Optional[List[LayerId]], Field(description="A list of layers to limit the search to.")] = None,
2185
+ sources: Annotated[Optional[List[SourceId]], Field(description="A list of sources to limit the search to.")] = None,
2186
+ 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,
2187
+ 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,
2188
+ 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,
2189
+ 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.lat.")] = None,
2190
+ 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 2km if unspecified.")] = None,
2191
+ 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,
2192
+ 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,
967
2193
  _request_timeout: Union[
968
2194
  None,
969
2195
  Annotated[StrictFloat, Field(gt=0)],
@@ -976,28 +2202,31 @@ class GeocodingApi:
976
2202
  _content_type: Optional[StrictStr] = None,
977
2203
  _headers: Optional[Dict[StrictStr, Any]] = None,
978
2204
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
979
- ) -> ApiResponse[GeocodeResponse]:
980
- """Find places and addresses near geographic coordinates (reverse geocoding).
2205
+ ) -> ApiResponse[GeocodeResponseEnvelopePropertiesV2]:
2206
+ """reverse_v2
981
2207
 
982
- Reverse geocoding and search finds places and addresses near any geographic coordinates.
983
2208
 
984
2209
  :param point_lat: The latitude of the point at which to perform the search. (required)
985
2210
  :type point_lat: float
986
2211
  :param point_lon: The longitude of the point at which to perform the search. (required)
987
2212
  :type point_lon: float
988
- :param boundary_circle_radius: The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.
989
- :type boundary_circle_radius: float
990
2213
  :param layers: A list of layers to limit the search to.
991
- :type layers: List[GeocodingLayer]
2214
+ :type layers: List[LayerId]
992
2215
  :param sources: A list of sources to limit the search to.
993
- :type sources: List[GeocodingSource]
994
- :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.
995
- :type boundary_country: List[str]
996
- :param boundary_gid: The GID of an area to limit the search to.
2216
+ :type sources: List[SourceId]
2217
+ :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.
997
2218
  :type boundary_gid: str
998
- :param size: The maximum number of results to return.
2219
+ :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.
2220
+ :type boundary_country: List[str]
2221
+ :param boundary_circle_lat: The latitude of the center of a circle to limit the search to. NOTE: Requires boundary.circle.lon.
2222
+ :type boundary_circle_lat: float
2223
+ :param boundary_circle_lon: The longitude of the center of a circle to limit the search to. NOTE: Requires boundary.circle.lat.
2224
+ :type boundary_circle_lon: float
2225
+ :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 2km if unspecified.
2226
+ :type boundary_circle_radius: int
2227
+ :param size: The maximum number of items to return from a query.
999
2228
  :type size: int
1000
- :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.
2229
+ :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.
1001
2230
  :type lang: str
1002
2231
  :param _request_timeout: timeout setting for this request. If one
1003
2232
  number provided, it will be total request
@@ -1021,14 +2250,16 @@ class GeocodingApi:
1021
2250
  :return: Returns the result object.
1022
2251
  """ # noqa: E501
1023
2252
 
1024
- _param = self._reverse_serialize(
2253
+ _param = self._reverse_v2_serialize(
1025
2254
  point_lat=point_lat,
1026
2255
  point_lon=point_lon,
1027
- boundary_circle_radius=boundary_circle_radius,
1028
2256
  layers=layers,
1029
2257
  sources=sources,
1030
- boundary_country=boundary_country,
1031
2258
  boundary_gid=boundary_gid,
2259
+ boundary_country=boundary_country,
2260
+ boundary_circle_lat=boundary_circle_lat,
2261
+ boundary_circle_lon=boundary_circle_lon,
2262
+ boundary_circle_radius=boundary_circle_radius,
1032
2263
  size=size,
1033
2264
  lang=lang,
1034
2265
  _request_auth=_request_auth,
@@ -1038,8 +2269,9 @@ class GeocodingApi:
1038
2269
  )
1039
2270
 
1040
2271
  _response_types_map: Dict[str, Optional[str]] = {
1041
- '200': "GeocodeResponse",
1042
- '400': None,
2272
+ '200': "GeocodeResponseEnvelopePropertiesV2",
2273
+ '400': "GeocodeResponseEnvelopePropertiesV2",
2274
+ '500': "GeocodeResponseEnvelopePropertiesV2",
1043
2275
  }
1044
2276
  response_data = self.api_client.call_api(
1045
2277
  *_param,
@@ -1053,17 +2285,19 @@ class GeocodingApi:
1053
2285
 
1054
2286
 
1055
2287
  @validate_call
1056
- def reverse_without_preload_content(
2288
+ def reverse_v2_without_preload_content(
1057
2289
  self,
1058
2290
  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.")],
1059
2291
  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.")],
1060
- 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,
1061
- layers: Annotated[Optional[List[GeocodingLayer]], Field(description="A list of layers to limit the search to.")] = None,
1062
- sources: Annotated[Optional[List[GeocodingSource]], Field(description="A list of sources to limit the search to.")] = None,
1063
- 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,
1064
- boundary_gid: Annotated[Optional[StrictStr], Field(description="The GID of an area to limit the search to.")] = None,
1065
- size: Annotated[Optional[StrictInt], Field(description="The maximum number of results to return.")] = None,
1066
- 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,
2292
+ layers: Annotated[Optional[List[LayerId]], Field(description="A list of layers to limit the search to.")] = None,
2293
+ sources: Annotated[Optional[List[SourceId]], Field(description="A list of sources to limit the search to.")] = None,
2294
+ 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,
2295
+ 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,
2296
+ 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,
2297
+ 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.lat.")] = None,
2298
+ 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 2km if unspecified.")] = None,
2299
+ 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,
2300
+ 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,
1067
2301
  _request_timeout: Union[
1068
2302
  None,
1069
2303
  Annotated[StrictFloat, Field(gt=0)],
@@ -1077,27 +2311,30 @@ class GeocodingApi:
1077
2311
  _headers: Optional[Dict[StrictStr, Any]] = None,
1078
2312
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1079
2313
  ) -> RESTResponseType:
1080
- """Find places and addresses near geographic coordinates (reverse geocoding).
2314
+ """reverse_v2
1081
2315
 
1082
- Reverse geocoding and search finds places and addresses near any geographic coordinates.
1083
2316
 
1084
2317
  :param point_lat: The latitude of the point at which to perform the search. (required)
1085
2318
  :type point_lat: float
1086
2319
  :param point_lon: The longitude of the point at which to perform the search. (required)
1087
2320
  :type point_lon: float
1088
- :param boundary_circle_radius: The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.
1089
- :type boundary_circle_radius: float
1090
2321
  :param layers: A list of layers to limit the search to.
1091
- :type layers: List[GeocodingLayer]
2322
+ :type layers: List[LayerId]
1092
2323
  :param sources: A list of sources to limit the search to.
1093
- :type sources: List[GeocodingSource]
1094
- :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.
1095
- :type boundary_country: List[str]
1096
- :param boundary_gid: The GID of an area to limit the search to.
2324
+ :type sources: List[SourceId]
2325
+ :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.
1097
2326
  :type boundary_gid: str
1098
- :param size: The maximum number of results to return.
2327
+ :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.
2328
+ :type boundary_country: List[str]
2329
+ :param boundary_circle_lat: The latitude of the center of a circle to limit the search to. NOTE: Requires boundary.circle.lon.
2330
+ :type boundary_circle_lat: float
2331
+ :param boundary_circle_lon: The longitude of the center of a circle to limit the search to. NOTE: Requires boundary.circle.lat.
2332
+ :type boundary_circle_lon: float
2333
+ :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 2km if unspecified.
2334
+ :type boundary_circle_radius: int
2335
+ :param size: The maximum number of items to return from a query.
1099
2336
  :type size: int
1100
- :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.
2337
+ :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.
1101
2338
  :type lang: str
1102
2339
  :param _request_timeout: timeout setting for this request. If one
1103
2340
  number provided, it will be total request
@@ -1121,14 +2358,16 @@ class GeocodingApi:
1121
2358
  :return: Returns the result object.
1122
2359
  """ # noqa: E501
1123
2360
 
1124
- _param = self._reverse_serialize(
2361
+ _param = self._reverse_v2_serialize(
1125
2362
  point_lat=point_lat,
1126
2363
  point_lon=point_lon,
1127
- boundary_circle_radius=boundary_circle_radius,
1128
2364
  layers=layers,
1129
2365
  sources=sources,
1130
- boundary_country=boundary_country,
1131
2366
  boundary_gid=boundary_gid,
2367
+ boundary_country=boundary_country,
2368
+ boundary_circle_lat=boundary_circle_lat,
2369
+ boundary_circle_lon=boundary_circle_lon,
2370
+ boundary_circle_radius=boundary_circle_radius,
1132
2371
  size=size,
1133
2372
  lang=lang,
1134
2373
  _request_auth=_request_auth,
@@ -1138,8 +2377,9 @@ class GeocodingApi:
1138
2377
  )
1139
2378
 
1140
2379
  _response_types_map: Dict[str, Optional[str]] = {
1141
- '200': "GeocodeResponse",
1142
- '400': None,
2380
+ '200': "GeocodeResponseEnvelopePropertiesV2",
2381
+ '400': "GeocodeResponseEnvelopePropertiesV2",
2382
+ '500': "GeocodeResponseEnvelopePropertiesV2",
1143
2383
  }
1144
2384
  response_data = self.api_client.call_api(
1145
2385
  *_param,
@@ -1148,15 +2388,17 @@ class GeocodingApi:
1148
2388
  return response_data.response
1149
2389
 
1150
2390
 
1151
- def _reverse_serialize(
2391
+ def _reverse_v2_serialize(
1152
2392
  self,
1153
2393
  point_lat,
1154
2394
  point_lon,
1155
- boundary_circle_radius,
1156
2395
  layers,
1157
2396
  sources,
1158
- boundary_country,
1159
2397
  boundary_gid,
2398
+ boundary_country,
2399
+ boundary_circle_lat,
2400
+ boundary_circle_lon,
2401
+ boundary_circle_radius,
1160
2402
  size,
1161
2403
  lang,
1162
2404
  _request_auth,
@@ -1192,10 +2434,6 @@ class GeocodingApi:
1192
2434
 
1193
2435
  _query_params.append(('point.lon', point_lon))
1194
2436
 
1195
- if boundary_circle_radius is not None:
1196
-
1197
- _query_params.append(('boundary.circle.radius', boundary_circle_radius))
1198
-
1199
2437
  if layers is not None:
1200
2438
 
1201
2439
  _query_params.append(('layers', layers))
@@ -1204,13 +2442,25 @@ class GeocodingApi:
1204
2442
 
1205
2443
  _query_params.append(('sources', sources))
1206
2444
 
2445
+ if boundary_gid is not None:
2446
+
2447
+ _query_params.append(('boundary.gid', boundary_gid))
2448
+
1207
2449
  if boundary_country is not None:
1208
2450
 
1209
2451
  _query_params.append(('boundary.country', boundary_country))
1210
2452
 
1211
- if boundary_gid is not None:
2453
+ if boundary_circle_lat is not None:
1212
2454
 
1213
- _query_params.append(('boundary.gid', boundary_gid))
2455
+ _query_params.append(('boundary.circle.lat', boundary_circle_lat))
2456
+
2457
+ if boundary_circle_lon is not None:
2458
+
2459
+ _query_params.append(('boundary.circle.lon', boundary_circle_lon))
2460
+
2461
+ if boundary_circle_radius is not None:
2462
+
2463
+ _query_params.append(('boundary.circle.radius', boundary_circle_radius))
1214
2464
 
1215
2465
  if size is not None:
1216
2466
 
@@ -1241,7 +2491,7 @@ class GeocodingApi:
1241
2491
 
1242
2492
  return self.api_client.param_serialize(
1243
2493
  method='GET',
1244
- resource_path='/geocoding/v1/reverse',
2494
+ resource_path='/geocoding/v2/reverse',
1245
2495
  path_params=_path_params,
1246
2496
  query_params=_query_params,
1247
2497
  header_params=_header_params,
@@ -1270,7 +2520,7 @@ class GeocodingApi:
1270
2520
  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,
1271
2521
  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,
1272
2522
  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,
1273
- 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,
2523
+ boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.")] = None,
1274
2524
  boundary_gid: Annotated[Optional[StrictStr], Field(description="The GID of an area to limit the search to.")] = None,
1275
2525
  layers: Annotated[Optional[List[GeocodingLayer]], Field(description="A list of layers to limit the search to.")] = None,
1276
2526
  sources: Annotated[Optional[List[GeocodingSource]], Field(description="A list of sources to limit the search to.")] = None,
@@ -1313,7 +2563,7 @@ class GeocodingApi:
1313
2563
  :type boundary_circle_lon: float
1314
2564
  :param boundary_circle_radius: The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.
1315
2565
  :type boundary_circle_radius: float
1316
- :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.
2566
+ :param boundary_country: A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.
1317
2567
  :type boundary_country: List[str]
1318
2568
  :param boundary_gid: The GID of an area to limit the search to.
1319
2569
  :type boundary_gid: str
@@ -1398,7 +2648,7 @@ class GeocodingApi:
1398
2648
  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,
1399
2649
  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,
1400
2650
  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,
1401
- 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,
2651
+ boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.")] = None,
1402
2652
  boundary_gid: Annotated[Optional[StrictStr], Field(description="The GID of an area to limit the search to.")] = None,
1403
2653
  layers: Annotated[Optional[List[GeocodingLayer]], Field(description="A list of layers to limit the search to.")] = None,
1404
2654
  sources: Annotated[Optional[List[GeocodingSource]], Field(description="A list of sources to limit the search to.")] = None,
@@ -1441,7 +2691,7 @@ class GeocodingApi:
1441
2691
  :type boundary_circle_lon: float
1442
2692
  :param boundary_circle_radius: The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.
1443
2693
  :type boundary_circle_radius: float
1444
- :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.
2694
+ :param boundary_country: A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.
1445
2695
  :type boundary_country: List[str]
1446
2696
  :param boundary_gid: The GID of an area to limit the search to.
1447
2697
  :type boundary_gid: str
@@ -1526,7 +2776,7 @@ class GeocodingApi:
1526
2776
  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,
1527
2777
  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,
1528
2778
  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,
1529
- 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,
2779
+ boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.")] = None,
1530
2780
  boundary_gid: Annotated[Optional[StrictStr], Field(description="The GID of an area to limit the search to.")] = None,
1531
2781
  layers: Annotated[Optional[List[GeocodingLayer]], Field(description="A list of layers to limit the search to.")] = None,
1532
2782
  sources: Annotated[Optional[List[GeocodingSource]], Field(description="A list of sources to limit the search to.")] = None,
@@ -1569,7 +2819,7 @@ class GeocodingApi:
1569
2819
  :type boundary_circle_lon: float
1570
2820
  :param boundary_circle_radius: The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.
1571
2821
  :type boundary_circle_radius: float
1572
- :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.
2822
+ :param boundary_country: A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.
1573
2823
  :type boundary_country: List[str]
1574
2824
  :param boundary_gid: The GID of an area to limit the search to.
1575
2825
  :type boundary_gid: str
@@ -2069,7 +3319,7 @@ class GeocodingApi:
2069
3319
  county: Annotated[Optional[StrictStr], Field(description="Administrative divisions between localities and regions. Not commonly used as input to structured geocoding.")] = None,
2070
3320
  region: Annotated[Optional[StrictStr], Field(description="Typically the first administrative division within a country. For example, a US state or a Canadian province.")] = None,
2071
3321
  postalcode: Annotated[Optional[StrictStr], Field(description="A mail sorting code.")] = None,
2072
- 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,
3322
+ country: Annotated[Optional[StrictStr], Field(description="A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.")] = None,
2073
3323
  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,
2074
3324
  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,
2075
3325
  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,
@@ -2079,7 +3329,7 @@ class GeocodingApi:
2079
3329
  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,
2080
3330
  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,
2081
3331
  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,
2082
- 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,
3332
+ boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.")] = None,
2083
3333
  boundary_gid: Annotated[Optional[StrictStr], Field(description="The GID of an area to limit the search to.")] = None,
2084
3334
  layers: Annotated[Optional[List[GeocodingLayer]], Field(description="A list of layers to limit the search to.")] = None,
2085
3335
  sources: Annotated[Optional[List[GeocodingSource]], Field(description="A list of sources to limit the search to.")] = None,
@@ -2116,7 +3366,7 @@ class GeocodingApi:
2116
3366
  :type region: str
2117
3367
  :param postalcode: A mail sorting code.
2118
3368
  :type postalcode: str
2119
- :param country: A full name (ex: Canada), or a 2 or 3 character ISO code. Prefer ISO codes when possible.
3369
+ :param country: A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.
2120
3370
  :type country: str
2121
3371
  :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`.
2122
3372
  :type focus_point_lat: float
@@ -2136,7 +3386,7 @@ class GeocodingApi:
2136
3386
  :type boundary_circle_lon: float
2137
3387
  :param boundary_circle_radius: The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.
2138
3388
  :type boundary_circle_radius: float
2139
- :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.
3389
+ :param boundary_country: A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.
2140
3390
  :type boundary_country: List[str]
2141
3391
  :param boundary_gid: The GID of an area to limit the search to.
2142
3392
  :type boundary_gid: str
@@ -2225,7 +3475,7 @@ class GeocodingApi:
2225
3475
  county: Annotated[Optional[StrictStr], Field(description="Administrative divisions between localities and regions. Not commonly used as input to structured geocoding.")] = None,
2226
3476
  region: Annotated[Optional[StrictStr], Field(description="Typically the first administrative division within a country. For example, a US state or a Canadian province.")] = None,
2227
3477
  postalcode: Annotated[Optional[StrictStr], Field(description="A mail sorting code.")] = None,
2228
- 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,
3478
+ country: Annotated[Optional[StrictStr], Field(description="A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.")] = None,
2229
3479
  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,
2230
3480
  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,
2231
3481
  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,
@@ -2235,7 +3485,7 @@ class GeocodingApi:
2235
3485
  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,
2236
3486
  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,
2237
3487
  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,
2238
- 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,
3488
+ boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.")] = None,
2239
3489
  boundary_gid: Annotated[Optional[StrictStr], Field(description="The GID of an area to limit the search to.")] = None,
2240
3490
  layers: Annotated[Optional[List[GeocodingLayer]], Field(description="A list of layers to limit the search to.")] = None,
2241
3491
  sources: Annotated[Optional[List[GeocodingSource]], Field(description="A list of sources to limit the search to.")] = None,
@@ -2272,7 +3522,7 @@ class GeocodingApi:
2272
3522
  :type region: str
2273
3523
  :param postalcode: A mail sorting code.
2274
3524
  :type postalcode: str
2275
- :param country: A full name (ex: Canada), or a 2 or 3 character ISO code. Prefer ISO codes when possible.
3525
+ :param country: A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.
2276
3526
  :type country: str
2277
3527
  :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`.
2278
3528
  :type focus_point_lat: float
@@ -2292,7 +3542,7 @@ class GeocodingApi:
2292
3542
  :type boundary_circle_lon: float
2293
3543
  :param boundary_circle_radius: The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.
2294
3544
  :type boundary_circle_radius: float
2295
- :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.
3545
+ :param boundary_country: A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.
2296
3546
  :type boundary_country: List[str]
2297
3547
  :param boundary_gid: The GID of an area to limit the search to.
2298
3548
  :type boundary_gid: str
@@ -2381,7 +3631,7 @@ class GeocodingApi:
2381
3631
  county: Annotated[Optional[StrictStr], Field(description="Administrative divisions between localities and regions. Not commonly used as input to structured geocoding.")] = None,
2382
3632
  region: Annotated[Optional[StrictStr], Field(description="Typically the first administrative division within a country. For example, a US state or a Canadian province.")] = None,
2383
3633
  postalcode: Annotated[Optional[StrictStr], Field(description="A mail sorting code.")] = None,
2384
- 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,
3634
+ country: Annotated[Optional[StrictStr], Field(description="A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.")] = None,
2385
3635
  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,
2386
3636
  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,
2387
3637
  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,
@@ -2391,7 +3641,7 @@ class GeocodingApi:
2391
3641
  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,
2392
3642
  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,
2393
3643
  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,
2394
- 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,
3644
+ boundary_country: Annotated[Optional[List[StrictStr]], Field(description="A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.")] = None,
2395
3645
  boundary_gid: Annotated[Optional[StrictStr], Field(description="The GID of an area to limit the search to.")] = None,
2396
3646
  layers: Annotated[Optional[List[GeocodingLayer]], Field(description="A list of layers to limit the search to.")] = None,
2397
3647
  sources: Annotated[Optional[List[GeocodingSource]], Field(description="A list of sources to limit the search to.")] = None,
@@ -2428,7 +3678,7 @@ class GeocodingApi:
2428
3678
  :type region: str
2429
3679
  :param postalcode: A mail sorting code.
2430
3680
  :type postalcode: str
2431
- :param country: A full name (ex: Canada), or a 2 or 3 character ISO code. Prefer ISO codes when possible.
3681
+ :param country: A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.
2432
3682
  :type country: str
2433
3683
  :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`.
2434
3684
  :type focus_point_lat: float
@@ -2448,7 +3698,7 @@ class GeocodingApi:
2448
3698
  :type boundary_circle_lon: float
2449
3699
  :param boundary_circle_radius: The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.
2450
3700
  :type boundary_circle_radius: float
2451
- :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.
3701
+ :param boundary_country: A list of country codes in ISO 3116-1 alpha-2 or alpha-3 format.
2452
3702
  :type boundary_country: List[str]
2453
3703
  :param boundary_gid: The GID of an area to limit the search to.
2454
3704
  :type boundary_gid: str