From 52082916684ea4cee1e91dd4e1b31e98f0b7758f Mon Sep 17 00:00:00 2001 From: Ian Wagner Date: Thu, 15 Aug 2024 00:09:21 +0900 Subject: [PATCH] Add bulk geocoding endpoint --- .openapi-generator/FILES | 12 + .openapi-generator/VERSION | 2 +- CHANGELOG.md | 10 + DEVELOPING.md | 6 +- docs/BaseTraceRequest.md | 4 +- docs/BulkRequest.md | 30 ++ docs/BulkSearchRequestInner.md | 30 ++ docs/BulkSearchResponse.md | 31 ++ docs/CostingModel.md | 23 +- docs/DirectionsOptions.md | 4 +- docs/DistanceUnit.md | 7 +- docs/EdgeUse.md | 65 ++- docs/GeocodingApi.md | 116 ++++- docs/GeospatialApi.md | 4 +- docs/IsochroneCostingModel.md | 23 +- docs/MapMatchCostingModel.md | 23 +- docs/MapMatchRequest.md | 4 +- docs/MatrixCostingModel.md | 23 +- docs/MatrixRequest.md | 4 +- docs/MatrixResponse.md | 2 +- docs/NearestRoadsRequest.md | 4 +- docs/NodeType.md | 21 +- docs/OptimizedRouteRequest.md | 4 +- docs/PeliasGeoJSONFeature.md | 1 - docs/PeliasGeoJSONProperties.md | 2 +- docs/PeliasLayer.md | 45 +- docs/PeliasSource.md | 11 +- docs/RoadClass.md | 19 +- docs/RouteLeg.md | 2 +- docs/RouteRequest.md | 4 +- docs/RouteTrip.md | 4 +- docs/RoutingApi.md | 16 +- docs/SearchBulkQuery.md | 30 ++ docs/SearchBulkRequest.md | 30 ++ docs/SearchQuery.md | 44 ++ docs/SearchStructuredBulkQuery.md | 30 ++ docs/SearchStructuredQuery.md | 51 ++ docs/TraceAttributeKey.md | 139 ++++- docs/TraceAttributesRequest.md | 4 +- docs/TraceAttributesResponse.md | 2 +- docs/TravelMode.md | 11 +- docs/Traversability.md | 9 +- docs/ValhallaLanguages.md | 61 ++- docs/ValhallaLongUnits.md | 7 +- pyproject.toml | 2 +- setup.py | 4 +- stadiamaps/__init__.py | 10 +- stadiamaps/api/geocoding_api.py | 485 ++++++++++++++---- stadiamaps/api/geospatial_api.py | 24 +- stadiamaps/api/routing_api.py | 85 +-- stadiamaps/api_client.py | 33 +- stadiamaps/configuration.py | 24 +- stadiamaps/exceptions.py | 2 +- stadiamaps/models/__init__.py | 8 +- stadiamaps/models/access.py | 2 +- stadiamaps/models/admin_region.py | 2 +- stadiamaps/models/administrative.py | 2 +- stadiamaps/models/auto_costing_options.py | 2 +- stadiamaps/models/base_costing_options.py | 2 +- stadiamaps/models/base_trace_request.py | 10 +- stadiamaps/models/bicycle_costing_options.py | 2 +- stadiamaps/models/bike_network.py | 2 +- stadiamaps/models/bulk_request.py | 141 +++++ .../models/bulk_search_request_inner.py | 141 +++++ stadiamaps/models/bulk_search_response.py | 109 ++++ stadiamaps/models/contour.py | 2 +- stadiamaps/models/coordinate.py | 2 +- stadiamaps/models/costing_model.py | 2 +- stadiamaps/models/costing_options.py | 2 +- stadiamaps/models/directions_options.py | 10 +- stadiamaps/models/distance_unit.py | 2 +- stadiamaps/models/edge_sign.py | 2 +- stadiamaps/models/edge_use.py | 2 +- stadiamaps/models/end_node.py | 2 +- stadiamaps/models/geo_attributes.py | 2 +- stadiamaps/models/geo_json_geometry.py | 2 +- stadiamaps/models/geo_json_geometry_base.py | 2 +- stadiamaps/models/geo_json_line_string.py | 2 +- stadiamaps/models/geo_json_point.py | 2 +- stadiamaps/models/geo_json_polygon.py | 2 +- stadiamaps/models/geocoding_object.py | 2 +- stadiamaps/models/height_request.py | 2 +- stadiamaps/models/height_response.py | 2 +- stadiamaps/models/highway_classification.py | 2 +- stadiamaps/models/intersecting_edge.py | 2 +- stadiamaps/models/isochrone_costing_model.py | 9 +- stadiamaps/models/isochrone_feature.py | 2 +- stadiamaps/models/isochrone_properties.py | 2 +- stadiamaps/models/isochrone_request.py | 2 +- stadiamaps/models/isochrone_response.py | 2 +- stadiamaps/models/locate_detailed_edge.py | 2 +- stadiamaps/models/locate_edge.py | 2 +- stadiamaps/models/locate_edge_info.py | 2 +- stadiamaps/models/locate_node.py | 2 +- stadiamaps/models/locate_object.py | 2 +- .../low_speed_vehicle_costing_options.py | 2 +- stadiamaps/models/maneuver_sign.py | 2 +- stadiamaps/models/maneuver_sign_element.py | 2 +- stadiamaps/models/map_match_costing_model.py | 10 +- stadiamaps/models/map_match_request.py | 10 +- stadiamaps/models/map_match_route_response.py | 2 +- stadiamaps/models/map_match_trace_options.py | 2 +- stadiamaps/models/map_match_waypoint.py | 2 +- stadiamaps/models/matched_point.py | 2 +- stadiamaps/models/matrix_costing_model.py | 2 +- stadiamaps/models/matrix_distance.py | 2 +- stadiamaps/models/matrix_request.py | 10 +- stadiamaps/models/matrix_response.py | 4 +- stadiamaps/models/matrix_waypoint.py | 2 +- .../models/motor_scooter_costing_options.py | 2 +- .../models/motorcycle_costing_options.py | 2 +- stadiamaps/models/nearest_roads_request.py | 10 +- stadiamaps/models/node_id.py | 2 +- stadiamaps/models/node_type.py | 2 +- stadiamaps/models/optimized_route_request.py | 10 +- .../models/pedestrian_costing_options.py | 2 +- stadiamaps/models/pelias_geo_json_feature.py | 8 +- .../models/pelias_geo_json_properties.py | 4 +- .../pelias_geo_json_properties_addendum.py | 2 +- ...pelias_geo_json_properties_addendum_osm.py | 2 +- stadiamaps/models/pelias_layer.py | 2 +- stadiamaps/models/pelias_response.py | 2 +- stadiamaps/models/pelias_source.py | 2 +- stadiamaps/models/restrictions.py | 2 +- stadiamaps/models/road_class.py | 2 +- stadiamaps/models/route_leg.py | 4 +- stadiamaps/models/route_maneuver.py | 2 +- stadiamaps/models/route_request.py | 10 +- stadiamaps/models/route_response.py | 2 +- .../models/route_response_alternates_inner.py | 2 +- stadiamaps/models/route_summary.py | 2 +- stadiamaps/models/route_trip.py | 6 +- .../models/routing_response_waypoint.py | 2 +- stadiamaps/models/routing_waypoint.py | 2 +- .../routing_waypoint_all_of_search_filter.py | 2 +- stadiamaps/models/search_bulk_query.py | 117 +++++ stadiamaps/models/search_bulk_request.py | 141 +++++ stadiamaps/models/search_query.py | 134 +++++ .../models/search_structured_bulk_query.py | 117 +++++ stadiamaps/models/search_structured_query.py | 148 ++++++ stadiamaps/models/simple_routing_waypoint.py | 2 +- stadiamaps/models/speeds.py | 2 +- .../models/trace_attribute_filter_options.py | 2 +- stadiamaps/models/trace_attribute_key.py | 2 +- .../models/trace_attributes_base_response.py | 2 +- stadiamaps/models/trace_attributes_request.py | 10 +- .../models/trace_attributes_response.py | 6 +- stadiamaps/models/trace_edge.py | 2 +- stadiamaps/models/travel_mode.py | 2 +- stadiamaps/models/traversability.py | 2 +- stadiamaps/models/truck_costing_options.py | 2 +- stadiamaps/models/tz_response.py | 2 +- stadiamaps/models/valhalla_languages.py | 2 +- stadiamaps/models/valhalla_long_units.py | 2 +- stadiamaps/models/warning.py | 2 +- stadiamaps/rest.py | 2 +- test/integration/test_gecoding.py | 24 +- test/test_bulk_request.py | 82 +++ test/test_bulk_search_request_inner.py | 82 +++ test/test_bulk_search_response.py | 55 ++ test/test_search_bulk_query.py | 75 +++ test/test_search_bulk_request.py | 82 +++ test/test_search_query.py | 73 +++ test/test_search_structured_bulk_query.py | 82 +++ test/test_search_structured_query.py | 80 +++ 165 files changed, 3207 insertions(+), 414 deletions(-) create mode 100644 docs/BulkRequest.md create mode 100644 docs/BulkSearchRequestInner.md create mode 100644 docs/BulkSearchResponse.md create mode 100644 docs/SearchBulkQuery.md create mode 100644 docs/SearchBulkRequest.md create mode 100644 docs/SearchQuery.md create mode 100644 docs/SearchStructuredBulkQuery.md create mode 100644 docs/SearchStructuredQuery.md create mode 100644 stadiamaps/models/bulk_request.py create mode 100644 stadiamaps/models/bulk_search_request_inner.py create mode 100644 stadiamaps/models/bulk_search_response.py create mode 100644 stadiamaps/models/search_bulk_query.py create mode 100644 stadiamaps/models/search_bulk_request.py create mode 100644 stadiamaps/models/search_query.py create mode 100644 stadiamaps/models/search_structured_bulk_query.py create mode 100644 stadiamaps/models/search_structured_query.py create mode 100644 test/test_bulk_request.py create mode 100644 test/test_bulk_search_request_inner.py create mode 100644 test/test_bulk_search_response.py create mode 100644 test/test_search_bulk_query.py create mode 100644 test/test_search_bulk_request.py create mode 100644 test/test_search_query.py create mode 100644 test/test_search_structured_bulk_query.py create mode 100644 test/test_search_structured_query.py diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 34e2ce3..901cbd1 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -9,6 +9,8 @@ docs/BaseCostingOptions.md docs/BaseTraceRequest.md docs/BicycleCostingOptions.md docs/BikeNetwork.md +docs/BulkRequest.md +docs/BulkSearchResponse.md docs/Contour.md docs/Coordinate.md docs/CostingModel.md @@ -82,6 +84,10 @@ docs/RoutingApi.md docs/RoutingResponseWaypoint.md docs/RoutingWaypoint.md docs/RoutingWaypointAllOfSearchFilter.md +docs/SearchBulkQuery.md +docs/SearchQuery.md +docs/SearchStructuredBulkQuery.md +docs/SearchStructuredQuery.md docs/SimpleRoutingWaypoint.md docs/Speeds.md docs/TraceAttributeFilterOptions.md @@ -120,6 +126,8 @@ stadiamaps/models/base_costing_options.py stadiamaps/models/base_trace_request.py stadiamaps/models/bicycle_costing_options.py stadiamaps/models/bike_network.py +stadiamaps/models/bulk_request.py +stadiamaps/models/bulk_search_response.py stadiamaps/models/contour.py stadiamaps/models/coordinate.py stadiamaps/models/costing_model.py @@ -190,6 +198,10 @@ stadiamaps/models/route_trip.py stadiamaps/models/routing_response_waypoint.py stadiamaps/models/routing_waypoint.py stadiamaps/models/routing_waypoint_all_of_search_filter.py +stadiamaps/models/search_bulk_query.py +stadiamaps/models/search_query.py +stadiamaps/models/search_structured_bulk_query.py +stadiamaps/models/search_structured_query.py stadiamaps/models/simple_routing_waypoint.py stadiamaps/models/speeds.py stadiamaps/models/trace_attribute_filter_options.py diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 18bb418..1985849 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.5.0 +7.7.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 000abe5..cefa8d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Version 3.2.0 - 2024-08-15 + +### Added + +- Add support for bulk geocoding + +### Fixed + +- Isochrone request models now support all costing models + ## Version 3.1.0 - 2024-05-11 ### Added diff --git a/DEVELOPING.md b/DEVELOPING.md index a93d1a4..7583582 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -33,10 +33,6 @@ When making schema changes, you may need to temporarily remove [README.md](READM ### Generator bugs -The following info is current as of v7.4.0. - -The current release of the generator's `python` generator does not generate entirely valid code. -Specifically the handling of enums is not correct, and they will not serialize to the expected values. -We have added workarounds to api_client.py. +The following info is current as of v7.7.0. The auto-generated code does not pass flake8, so we have disabled the checks. diff --git a/docs/BaseTraceRequest.md b/docs/BaseTraceRequest.md index 3ae0f76..9e49edc 100644 --- a/docs/BaseTraceRequest.md +++ b/docs/BaseTraceRequest.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**units** | [**DistanceUnit**](DistanceUnit.md) | | [optional] -**language** | [**ValhallaLanguages**](ValhallaLanguages.md) | | [optional] +**units** | [**DistanceUnit**](DistanceUnit.md) | | [optional] [default to DistanceUnit.KM] +**language** | [**ValhallaLanguages**](ValhallaLanguages.md) | | [optional] [default to ValhallaLanguages.EN_MINUS_US] **directions_type** | **str** | The level of directional narrative to include. Locations and times will always be returned, but narrative generation verbosity can be controlled with this parameter. | [optional] [default to 'instructions'] **id** | **str** | An identifier to disambiguate requests (echoed by the server). | [optional] **shape** | [**List[MapMatchWaypoint]**](MapMatchWaypoint.md) | REQUIRED if `encoded_polyline` is not present. Note that `break` type locations are only supported when `shape_match` is set to `map_match`. | [optional] diff --git a/docs/BulkRequest.md b/docs/BulkRequest.md new file mode 100644 index 0000000..cdfb7e6 --- /dev/null +++ b/docs/BulkRequest.md @@ -0,0 +1,30 @@ +# BulkRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**endpoint** | **str** | | [optional] +**query** | [**SearchStructuredQuery**](SearchStructuredQuery.md) | | [optional] + +## Example + +```python +from stadiamaps.models.bulk_request import BulkRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of BulkRequest from a JSON string +bulk_request_instance = BulkRequest.from_json(json) +# print the JSON string representation of the object +print(BulkRequest.to_json()) + +# convert the object into a dict +bulk_request_dict = bulk_request_instance.to_dict() +# create an instance of BulkRequest from a dict +bulk_request_from_dict = BulkRequest.from_dict(bulk_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BulkSearchRequestInner.md b/docs/BulkSearchRequestInner.md new file mode 100644 index 0000000..b2d9147 --- /dev/null +++ b/docs/BulkSearchRequestInner.md @@ -0,0 +1,30 @@ +# BulkSearchRequestInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**endpoint** | **str** | | [optional] +**query** | [**SearchStructuredQuery**](SearchStructuredQuery.md) | | [optional] + +## Example + +```python +from stadiamaps.models.bulk_search_request_inner import BulkSearchRequestInner + +# TODO update the JSON string below +json = "{}" +# create an instance of BulkSearchRequestInner from a JSON string +bulk_search_request_inner_instance = BulkSearchRequestInner.from_json(json) +# print the JSON string representation of the object +print(BulkSearchRequestInner.to_json()) + +# convert the object into a dict +bulk_search_request_inner_dict = bulk_search_request_inner_instance.to_dict() +# create an instance of BulkSearchRequestInner from a dict +bulk_search_request_inner_from_dict = BulkSearchRequestInner.from_dict(bulk_search_request_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BulkSearchResponse.md b/docs/BulkSearchResponse.md new file mode 100644 index 0000000..258758f --- /dev/null +++ b/docs/BulkSearchResponse.md @@ -0,0 +1,31 @@ +# BulkSearchResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **int** | | +**response** | [**PeliasResponse**](PeliasResponse.md) | | [optional] +**msg** | **str** | An error message describing what went wrong (if the status is not 200). | [optional] + +## Example + +```python +from stadiamaps.models.bulk_search_response import BulkSearchResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BulkSearchResponse from a JSON string +bulk_search_response_instance = BulkSearchResponse.from_json(json) +# print the JSON string representation of the object +print(BulkSearchResponse.to_json()) + +# convert the object into a dict +bulk_search_response_dict = bulk_search_response_instance.to_dict() +# create an instance of BulkSearchResponse from a dict +bulk_search_response_from_dict = BulkSearchResponse.from_dict(bulk_search_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CostingModel.md b/docs/CostingModel.md index 18ed43e..6196f2f 100644 --- a/docs/CostingModel.md +++ b/docs/CostingModel.md @@ -2,10 +2,27 @@ A model which influences the routing based on the type of travel. The costing model affects parameters ranging from which roads are legally accessible to preferences based on comfort or speed. See https://valhalla.github.io/valhalla/api/turn-by-turn/api-reference/#costing-models for in-depth descriptions of each costing model. -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `AUTO` (value: `'auto'`) + +* `BUS` (value: `'bus'`) + +* `TAXI` (value: `'taxi'`) + +* `TRUCK` (value: `'truck'`) + +* `BICYCLE` (value: `'bicycle'`) + +* `BIKESHARE` (value: `'bikeshare'`) + +* `MOTOR_SCOOTER` (value: `'motor_scooter'`) + +* `MOTORCYCLE` (value: `'motorcycle'`) + +* `PEDESTRIAN` (value: `'pedestrian'`) + +* `LOW_SPEED_VEHICLE` (value: `'low_speed_vehicle'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DirectionsOptions.md b/docs/DirectionsOptions.md index fff8d2c..1251d86 100644 --- a/docs/DirectionsOptions.md +++ b/docs/DirectionsOptions.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**units** | [**DistanceUnit**](DistanceUnit.md) | | [optional] -**language** | [**ValhallaLanguages**](ValhallaLanguages.md) | | [optional] +**units** | [**DistanceUnit**](DistanceUnit.md) | | [optional] [default to DistanceUnit.KM] +**language** | [**ValhallaLanguages**](ValhallaLanguages.md) | | [optional] [default to ValhallaLanguages.EN_MINUS_US] **directions_type** | **str** | The level of directional narrative to include. Locations and times will always be returned, but narrative generation verbosity can be controlled with this parameter. | [optional] [default to 'instructions'] ## Example diff --git a/docs/DistanceUnit.md b/docs/DistanceUnit.md index 084a6ba..bc82a25 100644 --- a/docs/DistanceUnit.md +++ b/docs/DistanceUnit.md @@ -1,10 +1,11 @@ # DistanceUnit -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `KM` (value: `'km'`) + +* `MI` (value: `'mi'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EdgeUse.md b/docs/EdgeUse.md index ceaaea5..dd6b748 100644 --- a/docs/EdgeUse.md +++ b/docs/EdgeUse.md @@ -2,10 +2,69 @@ The use for the edge. -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `ROAD` (value: `'road'`) + +* `RAMP` (value: `'ramp'`) + +* `TURN_CHANNEL` (value: `'turn_channel'`) + +* `TRACK` (value: `'track'`) + +* `DRIVEWAY` (value: `'driveway'`) + +* `ALLEY` (value: `'alley'`) + +* `PARKING_AISLE` (value: `'parking_aisle'`) + +* `EMERGENCY_ACCESS` (value: `'emergency_access'`) + +* `DRIVE_THROUGH` (value: `'drive_through'`) + +* `CULDESAC` (value: `'culdesac'`) + +* `LIVING_STREET` (value: `'living_street'`) + +* `SERVICE_ROAD` (value: `'service_road'`) + +* `CYCLEWAY` (value: `'cycleway'`) + +* `MOUNTAIN_BIKE` (value: `'mountain_bike'`) + +* `SIDEWALK` (value: `'sidewalk'`) + +* `FOOTWAY` (value: `'footway'`) + +* `STEPS` (value: `'steps'`) + +* `PATH` (value: `'path'`) + +* `PEDESTRIAN` (value: `'pedestrian'`) + +* `PEDESTRIAN_CROSSING` (value: `'pedestrian_crossing'`) + +* `BRIDLEWAY` (value: `'bridleway'`) + +* `REST_AREA` (value: `'rest_area'`) + +* `SERVICE_AREA` (value: `'service_area'`) + +* `OTHER` (value: `'other'`) + +* `FERRY` (value: `'ferry'`) + +* `RAIL_MINUS_FERRY` (value: `'rail-ferry'`) + +* `RAIL` (value: `'rail'`) + +* `BUS` (value: `'bus'`) + +* `EGRESS_CONNECTION` (value: `'egress_connection'`) + +* `PLATFORM_CONNECTION` (value: `'platform_connection'`) + +* `TRANSIT_CONNECTION` (value: `'transit_connection'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GeocodingApi.md b/docs/GeocodingApi.md index 429bc9d..12edb34 100644 --- a/docs/GeocodingApi.md +++ b/docs/GeocodingApi.md @@ -8,6 +8,7 @@ Method | HTTP request | Description [**place**](GeocodingApi.md#place) | **GET** /geocoding/v1/place | Retrieve details of a place using its GID. [**reverse**](GeocodingApi.md#reverse) | **GET** /geocoding/v1/reverse | Find places and addresses near geographic coordinates (reverse geocoding). [**search**](GeocodingApi.md#search) | **GET** /geocoding/v1/search | Search for location and other info using a place name or address (forward geocoding). +[**search_bulk**](GeocodingApi.md#search_bulk) | **POST** /geocoding/v1/search/bulk | Quickly run a batch of geocoding queries against the search or structured search endpoints. [**search_structured**](GeocodingApi.md#search_structured) | **GET** /geocoding/v1/search/structured | Find locations matching components (structured forward geocoding). @@ -51,7 +52,7 @@ configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] with stadiamaps.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = stadiamaps.GeocodingApi(api_client) - text = '1600 Pennsylvania Ave NW' # str | The place name (address, venue name, etc.) to search for. + text = 'text_example' # str | The place name (address, venue name, etc.) to search for. focus_point_lat = 3.4 # float | The latitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lon`. (optional) focus_point_lon = 3.4 # float | The longitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lat`. (optional) boundary_rect_min_lat = 3.4 # float | Defines the min latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified. (optional) @@ -118,7 +119,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns the collection of autocomplete results. | - | +**200** | A GeoJSON collection of autocomplete search results. | - | **400** | Bad request | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -200,7 +201,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns the collection of search results. | - | +**200** | A GeoJSON collection of search results. | - | **400** | Bad request | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -245,8 +246,8 @@ configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] with stadiamaps.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = stadiamaps.GeocodingApi(api_client) - point_lat = 48.848268 # float | The latitude of the point at which to perform the search. - point_lon = 2.294471 # float | The longitude of the point at which to perform the search. + point_lat = 3.4 # float | The latitude of the point at which to perform the search. + point_lon = 3.4 # float | The longitude of the point at which to perform the search. boundary_circle_radius = 3.4 # float | The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified. (optional) layers = [stadiamaps.PeliasLayer()] # List[PeliasLayer] | A list of layers to limit the search to. (optional) sources = [stadiamaps.PeliasSource()] # List[PeliasSource] | A list of sources to limit the search to. (optional) @@ -298,7 +299,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns the collection of search results. | - | +**200** | A GeoJSON collection of search results. | - | **400** | Bad request | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -343,7 +344,7 @@ configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] with stadiamaps.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = stadiamaps.GeocodingApi(api_client) - text = '1600 Pennsylvania Ave NW' # str | The place name (address, venue name, etc.) to search for. + text = 'text_example' # str | The place name (address, venue name, etc.) to search for. focus_point_lat = 3.4 # float | The latitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lon`. (optional) focus_point_lon = 3.4 # float | The longitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lat`. (optional) boundary_rect_min_lat = 3.4 # float | Defines the min latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified. (optional) @@ -410,11 +411,92 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns the collection of search results. | - | +**200** | A GeoJSON collection of search results. | - | **400** | Bad request | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **search_bulk** +> List[BulkSearchResponse] search_bulk(bulk_request=bulk_request) + +Quickly run a batch of geocoding queries against the search or structured search endpoints. + +The batch endpoint lets you specify many search or structured search requests at once. Once received, all requests will be processed internally on our infrastructure, improving throughput when you need to do a lot of queries. + +### Example + +* Api Key Authentication (ApiKeyAuth): + +```python +import stadiamaps +from stadiamaps.models.bulk_request import BulkRequest +from stadiamaps.models.bulk_search_response import BulkSearchResponse +from stadiamaps.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.stadiamaps.com +# See configuration.py for a list of all supported configuration parameters. +configuration = stadiamaps.Configuration( + host = "https://api.stadiamaps.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' + +# Enter a context with an instance of the API client +with stadiamaps.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = stadiamaps.GeocodingApi(api_client) + bulk_request = [stadiamaps.BulkRequest()] # List[BulkRequest] | (optional) + + try: + # Quickly run a batch of geocoding queries against the search or structured search endpoints. + api_response = api_instance.search_bulk(bulk_request=bulk_request) + print("The response of GeocodingApi->search_bulk:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GeocodingApi->search_bulk: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **bulk_request** | [**List[BulkRequest]**](BulkRequest.md)| | [optional] + +### Return type + +[**List[BulkSearchResponse]**](BulkSearchResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A JSON array of the individual query responses, each annotated with a status code. Individual requests may fail but this endpoint will still return all results. Responses will be in the same order as the input. | - | +**400** | Bad request; more details will be included | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **search_structured** > PeliasResponse search_structured(address=address, neighbourhood=neighbourhood, borough=borough, locality=locality, county=county, region=region, postalcode=postalcode, country=country, focus_point_lat=focus_point_lat, focus_point_lon=focus_point_lon, boundary_rect_min_lat=boundary_rect_min_lat, boundary_rect_max_lat=boundary_rect_max_lat, boundary_rect_min_lon=boundary_rect_min_lon, boundary_rect_max_lon=boundary_rect_max_lon, boundary_circle_lat=boundary_circle_lat, boundary_circle_lon=boundary_circle_lon, boundary_circle_radius=boundary_circle_radius, boundary_country=boundary_country, boundary_gid=boundary_gid, layers=layers, sources=sources, size=size, lang=lang) @@ -455,14 +537,14 @@ configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] with stadiamaps.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = stadiamaps.GeocodingApi(api_client) - address = '11 Wall Street' # str | A street name, optionally with a house number. (optional) - neighbourhood = 'Financial District' # str | Varies by area, but has a locally specific meaning (NOT always an official administrative unit). (optional) - borough = 'Manhattan' # str | A unit within a city (not widely used, but present in places like NYC and Mexico City). (optional) - locality = 'New York' # str | The city, village, town, etc. that the place/address is part of. (optional) - county = 'New York County' # str | Administrative divisions between localities and regions. Not commonly used as input to structured geocoding. (optional) - region = 'New York' # str | Typically the first administrative division within a country. For example, a US state or a Canadian province. (optional) - postalcode = '10005' # str | A mail sorting code. (optional) - country = 'USA' # str | A full name (ex: Canada), or a 2 or 3 character ISO code. Prefer ISO codes when possible. (optional) + address = 'address_example' # str | A street name, optionally with a house number. (optional) + neighbourhood = 'neighbourhood_example' # str | Varies by area, but has a locally specific meaning (NOT always an official administrative unit). (optional) + borough = 'borough_example' # str | A unit within a city (not widely used, but present in places like NYC and Mexico City). (optional) + locality = 'locality_example' # str | The city, village, town, etc. that the place/address is part of. (optional) + county = 'county_example' # str | Administrative divisions between localities and regions. Not commonly used as input to structured geocoding. (optional) + region = 'region_example' # str | Typically the first administrative division within a country. For example, a US state or a Canadian province. (optional) + postalcode = 'postalcode_example' # str | A mail sorting code. (optional) + country = 'country_example' # str | A full name (ex: Canada), or a 2 or 3 character ISO code. Prefer ISO codes when possible. (optional) focus_point_lat = 3.4 # float | The latitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lon`. (optional) focus_point_lon = 3.4 # float | The longitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lat`. (optional) boundary_rect_min_lat = 3.4 # float | Defines the min latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified. (optional) @@ -536,7 +618,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns the collection of search results. | - | +**200** | A GeoJSON collection of search results. | - | **400** | Bad request | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/GeospatialApi.md b/docs/GeospatialApi.md index e58cad9..0aa7f67 100644 --- a/docs/GeospatialApi.md +++ b/docs/GeospatialApi.md @@ -84,7 +84,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a list of elevations along the polyline, in meters. | - | +**200** | A list of elevations along the polyline, in meters. | - | **400** | Bad request; more details will be included | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -168,7 +168,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns the time zone metadata. | - | +**200** | The time zone metadata. | - | **404** | Time zone not found | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/IsochroneCostingModel.md b/docs/IsochroneCostingModel.md index ff58c47..6a117bd 100644 --- a/docs/IsochroneCostingModel.md +++ b/docs/IsochroneCostingModel.md @@ -1,10 +1,27 @@ # IsochroneCostingModel -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `AUTO` (value: `'auto'`) + +* `BUS` (value: `'bus'`) + +* `TAXI` (value: `'taxi'`) + +* `TRUCK` (value: `'truck'`) + +* `BICYCLE` (value: `'bicycle'`) + +* `BIKESHARE` (value: `'bikeshare'`) + +* `MOTOR_SCOOTER` (value: `'motor_scooter'`) + +* `MOTORCYCLE` (value: `'motorcycle'`) + +* `PEDESTRIAN` (value: `'pedestrian'`) + +* `LOW_SPEED_VEHICLE` (value: `'low_speed_vehicle'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MapMatchCostingModel.md b/docs/MapMatchCostingModel.md index 2a10175..f61266c 100644 --- a/docs/MapMatchCostingModel.md +++ b/docs/MapMatchCostingModel.md @@ -1,10 +1,27 @@ # MapMatchCostingModel -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `AUTO` (value: `'auto'`) + +* `BUS` (value: `'bus'`) + +* `TAXI` (value: `'taxi'`) + +* `TRUCK` (value: `'truck'`) + +* `BICYCLE` (value: `'bicycle'`) + +* `BIKESHARE` (value: `'bikeshare'`) + +* `MOTOR_SCOOTER` (value: `'motor_scooter'`) + +* `MOTORCYCLE` (value: `'motorcycle'`) + +* `PEDESTRIAN` (value: `'pedestrian'`) + +* `LOW_SPEED_VEHICLE` (value: `'low_speed_vehicle'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MapMatchRequest.md b/docs/MapMatchRequest.md index 94f0550..4ab9ba1 100644 --- a/docs/MapMatchRequest.md +++ b/docs/MapMatchRequest.md @@ -11,8 +11,8 @@ Name | Type | Description | Notes **costing** | [**MapMatchCostingModel**](MapMatchCostingModel.md) | | **costing_options** | [**CostingOptions**](CostingOptions.md) | | [optional] **shape_match** | **str** | Three snapping modes provide some control over how the map matching occurs. `edge_walk` is fast, but requires extremely precise data that matches the route graph almost perfectly. `map_snap` can handle significantly noisier data, but is very expensive. `walk_or_snap`, the default, tries to use edge walking first and falls back to map matching if edge walking fails. In general, you should not need to change this parameter unless you want to trace a multi-leg route with multiple `break` locations in the `shape`. | [optional] -**units** | [**DistanceUnit**](DistanceUnit.md) | | [optional] -**language** | [**ValhallaLanguages**](ValhallaLanguages.md) | | [optional] +**units** | [**DistanceUnit**](DistanceUnit.md) | | [optional] [default to DistanceUnit.KM] +**language** | [**ValhallaLanguages**](ValhallaLanguages.md) | | [optional] [default to ValhallaLanguages.EN_MINUS_US] **directions_type** | **str** | The level of directional narrative to include. Locations and times will always be returned, but narrative generation verbosity can be controlled with this parameter. | [optional] [default to 'instructions'] **begin_time** | **int** | The timestamp at the start of the trace. Combined with `durations`, this provides a way to include timing information for an `encoded_polyline` trace. | [optional] **durations** | **int** | A list of durations (in seconds) between each successive pair of points in a polyline. | [optional] diff --git a/docs/MatrixCostingModel.md b/docs/MatrixCostingModel.md index 4de476f..fa02eda 100644 --- a/docs/MatrixCostingModel.md +++ b/docs/MatrixCostingModel.md @@ -1,10 +1,27 @@ # MatrixCostingModel -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `AUTO` (value: `'auto'`) + +* `BUS` (value: `'bus'`) + +* `TAXI` (value: `'taxi'`) + +* `TRUCK` (value: `'truck'`) + +* `BICYCLE` (value: `'bicycle'`) + +* `BIKESHARE` (value: `'bikeshare'`) + +* `MOTOR_SCOOTER` (value: `'motor_scooter'`) + +* `MOTORCYCLE` (value: `'motorcycle'`) + +* `PEDESTRIAN` (value: `'pedestrian'`) + +* `LOW_SPEED_VEHICLE` (value: `'low_speed_vehicle'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MatrixRequest.md b/docs/MatrixRequest.md index e536c54..afbdff8 100644 --- a/docs/MatrixRequest.md +++ b/docs/MatrixRequest.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**units** | [**DistanceUnit**](DistanceUnit.md) | | [optional] -**language** | [**ValhallaLanguages**](ValhallaLanguages.md) | | [optional] +**units** | [**DistanceUnit**](DistanceUnit.md) | | [optional] [default to DistanceUnit.KM] +**language** | [**ValhallaLanguages**](ValhallaLanguages.md) | | [optional] [default to ValhallaLanguages.EN_MINUS_US] **directions_type** | **str** | The level of directional narrative to include. Locations and times will always be returned, but narrative generation verbosity can be controlled with this parameter. | [optional] [default to 'instructions'] **id** | **str** | An identifier to disambiguate requests (echoed by the server). | [optional] **sources** | [**List[MatrixWaypoint]**](MatrixWaypoint.md) | The list of starting locations | diff --git a/docs/MatrixResponse.md b/docs/MatrixResponse.md index 2e89d79..ab039e4 100644 --- a/docs/MatrixResponse.md +++ b/docs/MatrixResponse.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **targets** | [**List[Coordinate]**](Coordinate.md) | The list of ending locations determined by snapping to the nearest appropriate point on the road network for the costing model. All locations appear in the same order as the input. | **sources_to_targets** | **List[List[MatrixDistance]]** | The matrix of starting and ending locations, along with the computed distance and travel time. The array is row-ordered. This means that the time and distance from the first location to all others forms the first row of the array, followed by the time and distance from the second source location to all target locations, etc. | **warnings** | [**List[Warning]**](Warning.md) | | [optional] -**units** | [**ValhallaLongUnits**](ValhallaLongUnits.md) | | +**units** | [**ValhallaLongUnits**](ValhallaLongUnits.md) | | [default to ValhallaLongUnits.KILOMETERS] ## Example diff --git a/docs/NearestRoadsRequest.md b/docs/NearestRoadsRequest.md index 275902b..acffaa8 100644 --- a/docs/NearestRoadsRequest.md +++ b/docs/NearestRoadsRequest.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**units** | [**DistanceUnit**](DistanceUnit.md) | | [optional] -**language** | [**ValhallaLanguages**](ValhallaLanguages.md) | | [optional] +**units** | [**DistanceUnit**](DistanceUnit.md) | | [optional] [default to DistanceUnit.KM] +**language** | [**ValhallaLanguages**](ValhallaLanguages.md) | | [optional] [default to ValhallaLanguages.EN_MINUS_US] **directions_type** | **str** | The level of directional narrative to include. Locations and times will always be returned, but narrative generation verbosity can be controlled with this parameter. | [optional] [default to 'instructions'] **locations** | [**List[Coordinate]**](Coordinate.md) | | **costing** | [**CostingModel**](CostingModel.md) | | [optional] diff --git a/docs/NodeType.md b/docs/NodeType.md index eecc6a2..ef34b1b 100644 --- a/docs/NodeType.md +++ b/docs/NodeType.md @@ -1,10 +1,25 @@ # NodeType -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `STREET_INTERSECTION` (value: `'street_intersection'`) + +* `GATE` (value: `'gate'`) + +* `BOLLARD` (value: `'bollard'`) + +* `TOLL_BOOTH` (value: `'toll_booth'`) + +* `MULTI_USE_TRANSIT_STOP` (value: `'multi_use_transit_stop'`) + +* `BIKE_SHARE` (value: `'bike_share'`) + +* `PARKING` (value: `'parking'`) + +* `MOTOR_WAY_JUNCTION` (value: `'motor_way_junction'`) + +* `BORDER_CONTROL` (value: `'border_control'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OptimizedRouteRequest.md b/docs/OptimizedRouteRequest.md index c11c2ef..e52778d 100644 --- a/docs/OptimizedRouteRequest.md +++ b/docs/OptimizedRouteRequest.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**units** | [**DistanceUnit**](DistanceUnit.md) | | [optional] -**language** | [**ValhallaLanguages**](ValhallaLanguages.md) | | [optional] +**units** | [**DistanceUnit**](DistanceUnit.md) | | [optional] [default to DistanceUnit.KM] +**language** | [**ValhallaLanguages**](ValhallaLanguages.md) | | [optional] [default to ValhallaLanguages.EN_MINUS_US] **directions_type** | **str** | The level of directional narrative to include. Locations and times will always be returned, but narrative generation verbosity can be controlled with this parameter. | [optional] [default to 'instructions'] **id** | **str** | An identifier to disambiguate requests (echoed by the server). | [optional] **locations** | [**List[Coordinate]**](Coordinate.md) | The list of locations. The first and last are assumed to be the start and end points, and all intermediate points are locations that you want to visit along the way. | diff --git a/docs/PeliasGeoJSONFeature.md b/docs/PeliasGeoJSONFeature.md index 60e341f..3e9ff61 100644 --- a/docs/PeliasGeoJSONFeature.md +++ b/docs/PeliasGeoJSONFeature.md @@ -9,7 +9,6 @@ Name | Type | Description | Notes **geometry** | [**GeoJSONPoint**](GeoJSONPoint.md) | | **properties** | [**PeliasGeoJSONProperties**](PeliasGeoJSONProperties.md) | | [optional] **bbox** | **List[float]** | An array of 4 floating point numbers representing the (W, S, E, N) extremes of the features found. | [optional] -**id** | **str** | | [optional] ## Example diff --git a/docs/PeliasGeoJSONProperties.md b/docs/PeliasGeoJSONProperties.md index da7c0de..a13739e 100644 --- a/docs/PeliasGeoJSONProperties.md +++ b/docs/PeliasGeoJSONProperties.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**gid** | **str** | A scoped GID for this result. This can be passed to the place endpoint. Note that these are not always stable. For OSM, Geonames, and Who's on First, these are usually stable, but for other sources like OSM, no stability is guaranteed. | [optional] +**gid** | **str** | A scoped GID for this result. This can be passed to the place endpoint. Note that these are not always stable. For Geonames and Who's on First, these are usually stable, but for other sources like OSM, no stability is guaranteed. | [optional] **source_id** | **str** | An ID referencing the original data source (specified via source) for the result. These IDs are specific to the source that they originated from. For example, in the case of OSM, these typically look like way/123 or point/123. | [optional] **label** | **str** | A full, human-readable label. However, you may not necessarily want to use this; be sure to read the docs for name, locality, and region before making a decision. This field is mostly localized. The order of components is generally locally correct (ex: for an address in South Korea, the house number appears after the street name). However, components will use a request language equivalent if one exists (ex: Seoul instead of 서울 if lang=en). | [optional] **layer** | [**PeliasLayer**](PeliasLayer.md) | | [optional] diff --git a/docs/PeliasLayer.md b/docs/PeliasLayer.md index 8d084a1..2e00ecb 100644 --- a/docs/PeliasLayer.md +++ b/docs/PeliasLayer.md @@ -2,10 +2,49 @@ Our database is organized into several layers (in the GIS sense of the term) as follows: - `venue`: Points of interest, businesses, and things with walls - `address`: Places with a street address - `street`: Streets, roads, highways - `county`: Places that issue passports, nations, nation-states - `macroregion`: A related group of regions (mostly in Europe) - `region`: The first administrative division within a country (usually states and provinces) - `macrocounty`: A related group of counties (mostly in Europe) - `county`: Official governmental areas; usually bigger than a locality, but almost always smaller than a region - `locality`: Towns, hamlets, cities, etc. - `localadmin`: Local administrative boundaries - `borough`: Local administrative boundaries within cities (not widely used, but present in places such as NYC and Mexico City) - `neighbourhood`: Social communities and neighborhoods (note the British spelling in the API!) - `postalcode`: Postal codes used by mail services (note: not used for reverse geocoding) - `coarse`: An alias for simultaneously using all administrative layers (everything except `venue` and `address`) - `marinearea`: Places with fishes and boats. - `ocean`: A really big marine area. -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `VENUE` (value: `'venue'`) + +* `ADDRESS` (value: `'address'`) + +* `STREET` (value: `'street'`) + +* `COUNTRY` (value: `'country'`) + +* `MACROREGION` (value: `'macroregion'`) + +* `REGION` (value: `'region'`) + +* `MACROCOUNTY` (value: `'macrocounty'`) + +* `COUNTY` (value: `'county'`) + +* `LOCALITY` (value: `'locality'`) + +* `LOCALADMIN` (value: `'localadmin'`) + +* `BOROUGH` (value: `'borough'`) + +* `NEIGHBOURHOOD` (value: `'neighbourhood'`) + +* `POSTALCODE` (value: `'postalcode'`) + +* `COARSE` (value: `'coarse'`) + +* `DEPENDENCY` (value: `'dependency'`) + +* `MACROHOOD` (value: `'macrohood'`) + +* `MARINEAREA` (value: `'marinearea'`) + +* `DISPUTED` (value: `'disputed'`) + +* `EMPIRE` (value: `'empire'`) + +* `CONTINENT` (value: `'continent'`) + +* `OCEAN` (value: `'ocean'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PeliasSource.md b/docs/PeliasSource.md index f3087dc..b2f2d82 100644 --- a/docs/PeliasSource.md +++ b/docs/PeliasSource.md @@ -2,10 +2,15 @@ Our database contains info from multiple sources. These identifiers can be used to either limit search results or to determine the relevance of a result. -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `OPENSTREETMAP` (value: `'openstreetmap'`) + +* `OPENADDRESSES` (value: `'openaddresses'`) + +* `WHOSONFIRST` (value: `'whosonfirst'`) + +* `GEONAMES` (value: `'geonames'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RoadClass.md b/docs/RoadClass.md index 3876e5b..f3e679b 100644 --- a/docs/RoadClass.md +++ b/docs/RoadClass.md @@ -2,10 +2,23 @@ Class of road (ranked in descending order) -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `MOTORWAY` (value: `'motorway'`) + +* `TRUNK` (value: `'trunk'`) + +* `PRIMARY` (value: `'primary'`) + +* `SECONDARY` (value: `'secondary'`) + +* `TERTIARY` (value: `'tertiary'`) + +* `UNCLASSIFIED` (value: `'unclassified'`) + +* `RESIDENTIAL` (value: `'residential'`) + +* `SERVICE_OTHER` (value: `'service_other'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RouteLeg.md b/docs/RouteLeg.md index ee9a1ef..e1d24ef 100644 --- a/docs/RouteLeg.md +++ b/docs/RouteLeg.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **maneuvers** | [**List[RouteManeuver]**](RouteManeuver.md) | | **shape** | **str** | An encoded polyline (https://developers.google.com/maps/documentation/utilities/polylinealgorithm) with 6 digits of decimal precision. | **summary** | [**RouteSummary**](RouteSummary.md) | | -**elevation_interval** | **float** | The sampling distance between elevation values along the route. This echoes the request parameter having the same name. | [optional] +**elevation_interval** | **float** | The sampling distance between elevation values along the route. This echoes the request parameter having the same name (converted to `units` if necessary). | [optional] **elevation** | **List[float]** | An array of elevation values sampled every `elevation_interval`. Units are either metric or imperial depending on the value of `units`. | [optional] ## Example diff --git a/docs/RouteRequest.md b/docs/RouteRequest.md index 6c83cf8..9f99135 100644 --- a/docs/RouteRequest.md +++ b/docs/RouteRequest.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**units** | [**DistanceUnit**](DistanceUnit.md) | | [optional] -**language** | [**ValhallaLanguages**](ValhallaLanguages.md) | | [optional] +**units** | [**DistanceUnit**](DistanceUnit.md) | | [optional] [default to DistanceUnit.KM] +**language** | [**ValhallaLanguages**](ValhallaLanguages.md) | | [optional] [default to ValhallaLanguages.EN_MINUS_US] **directions_type** | **str** | The level of directional narrative to include. Locations and times will always be returned, but narrative generation verbosity can be controlled with this parameter. | [optional] [default to 'instructions'] **id** | **str** | An identifier to disambiguate requests (echoed by the server). | [optional] **locations** | [**List[RoutingWaypoint]**](RoutingWaypoint.md) | | diff --git a/docs/RouteTrip.md b/docs/RouteTrip.md index 35e83ef..8ff27be 100644 --- a/docs/RouteTrip.md +++ b/docs/RouteTrip.md @@ -7,8 +7,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **status** | **int** | The response status code | **status_message** | **str** | The response status message | -**units** | [**ValhallaLongUnits**](ValhallaLongUnits.md) | | -**language** | [**ValhallaLanguages**](ValhallaLanguages.md) | | +**units** | [**ValhallaLongUnits**](ValhallaLongUnits.md) | | [default to ValhallaLongUnits.KILOMETERS] +**language** | [**ValhallaLanguages**](ValhallaLanguages.md) | | [default to ValhallaLanguages.EN_MINUS_US] **locations** | [**List[RoutingResponseWaypoint]**](RoutingResponseWaypoint.md) | | **legs** | [**List[RouteLeg]**](RouteLeg.md) | | **summary** | [**RouteSummary**](RouteSummary.md) | | diff --git a/docs/RoutingApi.md b/docs/RoutingApi.md index 6c4802b..c3cd1b3 100644 --- a/docs/RoutingApi.md +++ b/docs/RoutingApi.md @@ -18,7 +18,7 @@ Method | HTTP request | Description Calculate areas of equal travel time from a location. -The isochrone API lets you compute or visualize areas of roughly equal travel time based on the routing graph. The resulting polygon can be rendered on a map and shaded much like elevation contours and used for exploring urban mobility. +The isochrone API computes reachable areas within a time or distance constraint. The resulting polygon can be rendered on a map and used for assessing urban mobility, planning, or as a search filter of places within a constrained range. ### Example @@ -89,7 +89,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a GeoJSON object which can be integrated into your geospatial application. | - | +**200** | A GeoJSON object which can be integrated into your geospatial application. | - | **400** | Bad request; more details will be included | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -170,7 +170,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns the matched route, which looks more or less like a normal route response, optionally with a `linear_references` key. | - | +**200** | The matched route(s), which looks more or less like a normal route response, optionally with a `linear_references` key. | - | **400** | Bad request; more details will be included | - | **500** | An internal parse error occurred; more details will be included | - | @@ -252,7 +252,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a list of streets and intersections that match the query. | - | +**200** | A list of streets and intersections that match the query. | - | **400** | Bad request; more details will be included | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -333,7 +333,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns the optimized route, which looks more or less like a normal route response. The only significant difference is that the `locations` may be re-ordered and annotated with an `original_index`. | - | +**200** | The optimized route, which looks more or less like a normal route response. The only significant difference is that the `locations` may be re-ordered and annotated with an `original_index`. | - | **400** | Bad request; more details will be included | - | **500** | An internal parse error occurred; more details will be included | - | @@ -415,7 +415,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns the computed route | - | +**200** | The computed route(s). | - | **400** | Bad request; more details will be included | - | **500** | An internal parse error occurred; more details will be included | - | @@ -497,7 +497,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns a matrix of times and distances between the start and end points. | - | +**200** | A matrix of times and distances between the start and end points. | - | **400** | Bad request; more details will be included. NOTE: failure to find suitable edges near a location will result in a 400. | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -578,7 +578,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Returns the edges along the traced route with detailed info. | - | +**200** | The edges along the traced route with detailed info. | - | **400** | Bad request; more details will be included | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/SearchBulkQuery.md b/docs/SearchBulkQuery.md new file mode 100644 index 0000000..7d967fa --- /dev/null +++ b/docs/SearchBulkQuery.md @@ -0,0 +1,30 @@ +# SearchBulkQuery + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**endpoint** | **str** | | [optional] +**query** | [**SearchQuery**](SearchQuery.md) | | [optional] + +## Example + +```python +from stadiamaps.models.search_bulk_query import SearchBulkQuery + +# TODO update the JSON string below +json = "{}" +# create an instance of SearchBulkQuery from a JSON string +search_bulk_query_instance = SearchBulkQuery.from_json(json) +# print the JSON string representation of the object +print(SearchBulkQuery.to_json()) + +# convert the object into a dict +search_bulk_query_dict = search_bulk_query_instance.to_dict() +# create an instance of SearchBulkQuery from a dict +search_bulk_query_from_dict = SearchBulkQuery.from_dict(search_bulk_query_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SearchBulkRequest.md b/docs/SearchBulkRequest.md new file mode 100644 index 0000000..29f9528 --- /dev/null +++ b/docs/SearchBulkRequest.md @@ -0,0 +1,30 @@ +# SearchBulkRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**endpoint** | **str** | | [optional] +**query** | [**SearchStructuredQuery**](SearchStructuredQuery.md) | | [optional] + +## Example + +```python +from stadiamaps.models.search_bulk_request import SearchBulkRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of SearchBulkRequest from a JSON string +search_bulk_request_instance = SearchBulkRequest.from_json(json) +# print the JSON string representation of the object +print(SearchBulkRequest.to_json()) + +# convert the object into a dict +search_bulk_request_dict = search_bulk_request_instance.to_dict() +# create an instance of SearchBulkRequest from a dict +search_bulk_request_from_dict = SearchBulkRequest.from_dict(search_bulk_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SearchQuery.md b/docs/SearchQuery.md new file mode 100644 index 0000000..ddb610b --- /dev/null +++ b/docs/SearchQuery.md @@ -0,0 +1,44 @@ +# SearchQuery + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**text** | **str** | The place name (address, venue name, etc.) to search for. | [optional] +**focus_point_lat** | **float** | The latitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lon`. | [optional] +**focus_point_lon** | **float** | The longitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lat`. | [optional] +**boundary_rect_min_lat** | **float** | Defines the min latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified. | [optional] +**boundary_rect_max_lat** | **float** | Defines the max latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified. | [optional] +**boundary_rect_min_lon** | **float** | Defines the min longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified. | [optional] +**boundary_rect_max_lon** | **float** | Defines the max longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified. | [optional] +**boundary_circle_lat** | **float** | The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`. | [optional] +**boundary_circle_lon** | **float** | The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`. | [optional] +**boundary_circle_radius** | **float** | The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified. | [optional] +**boundary_country** | **List[str]** | 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. | [optional] +**boundary_gid** | **str** | The Pelias GID of an area to limit the search to. | [optional] +**layers** | [**List[PeliasLayer]**](PeliasLayer.md) | A list of layers to limit the search to. | [optional] +**sources** | [**List[PeliasSource]**](PeliasSource.md) | A list of sources to limit the search to. | [optional] +**size** | **int** | The maximum number of results to return. | [optional] +**lang** | **str** | 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. | [optional] + +## Example + +```python +from stadiamaps.models.search_query import SearchQuery + +# TODO update the JSON string below +json = "{}" +# create an instance of SearchQuery from a JSON string +search_query_instance = SearchQuery.from_json(json) +# print the JSON string representation of the object +print(SearchQuery.to_json()) + +# convert the object into a dict +search_query_dict = search_query_instance.to_dict() +# create an instance of SearchQuery from a dict +search_query_from_dict = SearchQuery.from_dict(search_query_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SearchStructuredBulkQuery.md b/docs/SearchStructuredBulkQuery.md new file mode 100644 index 0000000..1ca757a --- /dev/null +++ b/docs/SearchStructuredBulkQuery.md @@ -0,0 +1,30 @@ +# SearchStructuredBulkQuery + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**endpoint** | **str** | | [optional] +**query** | [**SearchStructuredQuery**](SearchStructuredQuery.md) | | [optional] + +## Example + +```python +from stadiamaps.models.search_structured_bulk_query import SearchStructuredBulkQuery + +# TODO update the JSON string below +json = "{}" +# create an instance of SearchStructuredBulkQuery from a JSON string +search_structured_bulk_query_instance = SearchStructuredBulkQuery.from_json(json) +# print the JSON string representation of the object +print(SearchStructuredBulkQuery.to_json()) + +# convert the object into a dict +search_structured_bulk_query_dict = search_structured_bulk_query_instance.to_dict() +# create an instance of SearchStructuredBulkQuery from a dict +search_structured_bulk_query_from_dict = SearchStructuredBulkQuery.from_dict(search_structured_bulk_query_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SearchStructuredQuery.md b/docs/SearchStructuredQuery.md new file mode 100644 index 0000000..bc297ce --- /dev/null +++ b/docs/SearchStructuredQuery.md @@ -0,0 +1,51 @@ +# SearchStructuredQuery + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address** | **str** | A street name, optionally with a house number. | [optional] +**neighbourhood** | **str** | Varies by area, but has a locally specific meaning (NOT always an official administrative unit). | [optional] +**borough** | **str** | A unit within a city (not widely used, but present in places like NYC and Mexico City). | [optional] +**locality** | **str** | The city, village, town, etc. that the place/address is part of. | [optional] +**county** | **str** | Administrative divisions between localities and regions. Not commonly used as input to structured geocoding. | [optional] +**region** | **str** | Typically the first administrative division within a country. For example, a US state or a Canadian province. | [optional] +**postal_code** | **str** | A mail sorting code. | [optional] +**country** | **str** | A full name (ex: Canada), or a 2 or 3 character ISO code. Prefer ISO codes when possible. | [optional] +**focus_point_lat** | **float** | The latitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lon`. | [optional] +**focus_point_lon** | **float** | The longitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lat`. | [optional] +**boundary_rect_min_lat** | **float** | Defines the min latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified. | [optional] +**boundary_rect_max_lat** | **float** | Defines the max latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified. | [optional] +**boundary_rect_min_lon** | **float** | Defines the min longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified. | [optional] +**boundary_rect_max_lon** | **float** | Defines the max longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified. | [optional] +**boundary_circle_lat** | **float** | The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`. | [optional] +**boundary_circle_lon** | **float** | The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`. | [optional] +**boundary_circle_radius** | **float** | The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified. | [optional] +**boundary_country** | **List[str]** | 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. | [optional] +**boundary_gid** | **str** | The Pelias GID of an area to limit the search to. | [optional] +**layers** | [**List[PeliasLayer]**](PeliasLayer.md) | A list of layers to limit the search to. | [optional] +**sources** | [**List[PeliasSource]**](PeliasSource.md) | A list of sources to limit the search to. | [optional] +**size** | **int** | The maximum number of results to return. | [optional] +**lang** | **str** | 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. | [optional] + +## Example + +```python +from stadiamaps.models.search_structured_query import SearchStructuredQuery + +# TODO update the JSON string below +json = "{}" +# create an instance of SearchStructuredQuery from a JSON string +search_structured_query_instance = SearchStructuredQuery.from_json(json) +# print the JSON string representation of the object +print(SearchStructuredQuery.to_json()) + +# convert the object into a dict +search_structured_query_dict = search_structured_query_instance.to_dict() +# create an instance of SearchStructuredQuery from a dict +search_structured_query_from_dict = SearchStructuredQuery.from_dict(search_structured_query_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TraceAttributeKey.md b/docs/TraceAttributeKey.md index 24b6da8..d769732 100644 --- a/docs/TraceAttributeKey.md +++ b/docs/TraceAttributeKey.md @@ -1,10 +1,143 @@ # TraceAttributeKey -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `EDGE_DOT_NAMES` (value: `'edge.names'`) + +* `EDGE_DOT_LENGTH` (value: `'edge.length'`) + +* `EDGE_DOT_SPEED` (value: `'edge.speed'`) + +* `EDGE_DOT_ROAD_CLASS` (value: `'edge.road_class'`) + +* `EDGE_DOT_BEGIN_HEADING` (value: `'edge.begin_heading'`) + +* `EDGE_DOT_END_HEADING` (value: `'edge.end_heading'`) + +* `EDGE_DOT_BEGIN_SHAPE_INDEX` (value: `'edge.begin_shape_index'`) + +* `EDGE_DOT_END_SHAPE_INDEX` (value: `'edge.end_shape_index'`) + +* `EDGE_DOT_TRAVERSABILITY` (value: `'edge.traversability'`) + +* `EDGE_DOT_USE` (value: `'edge.use'`) + +* `EDGE_DOT_TOLL` (value: `'edge.toll'`) + +* `EDGE_DOT_UNPAVED` (value: `'edge.unpaved'`) + +* `EDGE_DOT_TUNNEL` (value: `'edge.tunnel'`) + +* `EDGE_DOT_BRIDGE` (value: `'edge.bridge'`) + +* `EDGE_DOT_ROUNDABOUT` (value: `'edge.roundabout'`) + +* `EDGE_DOT_INTERNAL_INTERSECTION` (value: `'edge.internal_intersection'`) + +* `EDGE_DOT_DRIVE_ON_RIGHT` (value: `'edge.drive_on_right'`) + +* `EDGE_DOT_SURFACE` (value: `'edge.surface'`) + +* `EDGE_DOT_SIGN_DOT_EXIT_NUMBER` (value: `'edge.sign.exit_number'`) + +* `EDGE_DOT_SIGN_DOT_EXIT_BRANCH` (value: `'edge.sign.exit_branch'`) + +* `EDGE_DOT_SIGN_DOT_EXIT_TOWARD` (value: `'edge.sign.exit_toward'`) + +* `EDGE_DOT_SIGN_DOT_EXIT_NAME` (value: `'edge.sign.exit_name'`) + +* `EDGE_DOT_TRAVEL_MODE` (value: `'edge.travel_mode'`) + +* `EDGE_DOT_VEHICLE_TYPE` (value: `'edge.vehicle_type'`) + +* `EDGE_DOT_PEDESTRIAN_TYPE` (value: `'edge.pedestrian_type'`) + +* `EDGE_DOT_BICYCLE_TYPE` (value: `'edge.bicycle_type'`) + +* `EDGE_DOT_TRANSIT_TYPE` (value: `'edge.transit_type'`) + +* `EDGE_DOT_ID` (value: `'edge.id'`) + +* `EDGE_DOT_WAY_ID` (value: `'edge.way_id'`) + +* `EDGE_DOT_WEIGHTED_GRADE` (value: `'edge.weighted_grade'`) + +* `EDGE_DOT_MAX_UPWARD_GRADE` (value: `'edge.max_upward_grade'`) + +* `EDGE_DOT_MAX_DOWNWARD_GRADE` (value: `'edge.max_downward_grade'`) + +* `EDGE_DOT_MEAN_ELEVATION` (value: `'edge.mean_elevation'`) + +* `EDGE_DOT_LANE_COUNT` (value: `'edge.lane_count'`) + +* `EDGE_DOT_CYCLE_LANE` (value: `'edge.cycle_lane'`) + +* `EDGE_DOT_BICYCLE_NETWORK` (value: `'edge.bicycle_network'`) + +* `EDGE_DOT_SAC_SCALE` (value: `'edge.sac_scale'`) + +* `EDGE_DOT_SIDEWALK` (value: `'edge.sidewalk'`) + +* `EDGE_DOT_DENSITY` (value: `'edge.density'`) + +* `EDGE_DOT_SPEED_LIMIT` (value: `'edge.speed_limit'`) + +* `EDGE_DOT_TRUCK_SPEED` (value: `'edge.truck_speed'`) + +* `EDGE_DOT_TRUCK_ROUTE` (value: `'edge.truck_route'`) + +* `NODE_DOT_INTERSECTING_EDGE_DOT_BEGIN_HEADING` (value: `'node.intersecting_edge.begin_heading'`) + +* `NODE_DOT_INTERSECTING_EDGE_DOT_FROM_EDGE_NAME_CONSISTENCY` (value: `'node.intersecting_edge.from_edge_name_consistency'`) + +* `NODE_DOT_INTERSECTING_EDGE_DOT_TO_EDGE_NAME_CONSISTENCY` (value: `'node.intersecting_edge.to_edge_name_consistency'`) + +* `NODE_DOT_INTERSECTING_EDGE_DOT_DRIVEABILITY` (value: `'node.intersecting_edge.driveability'`) + +* `NODE_DOT_INTERSECTING_EDGE_DOT_CYCLABILITY` (value: `'node.intersecting_edge.cyclability'`) + +* `NODE_DOT_INTERSECTING_EDGE_DOT_WALKABILITY` (value: `'node.intersecting_edge.walkability'`) + +* `NODE_DOT_INTERSECTING_EDGE_DOT_USE` (value: `'node.intersecting_edge.use'`) + +* `NODE_DOT_INTERSECTING_EDGE_DOT_ROAD_CLASS` (value: `'node.intersecting_edge.road_class'`) + +* `NODE_DOT_ELAPSED_TIME` (value: `'node.elapsed_time'`) + +* `NODE_DOT_ADMIN_INDEX` (value: `'node.admin_index'`) + +* `NODE_DOT_TYPE` (value: `'node.type'`) + +* `NODE_DOT_FORK` (value: `'node.fork'`) + +* `NODE_DOT_TIME_ZONE` (value: `'node.time_zone'`) + +* `OSM_CHANGESET` (value: `'osm_changeset'`) + +* `SHAPE` (value: `'shape'`) + +* `ADMIN_DOT_COUNTRY_CODE` (value: `'admin.country_code'`) + +* `ADMIN_DOT_COUNTRY_TEXT` (value: `'admin.country_text'`) + +* `ADMIN_DOT_STATE_CODE` (value: `'admin.state_code'`) + +* `ADMIN_DOT_STATE_TEXT` (value: `'admin.state_text'`) + +* `MATCHED_DOT_POINT` (value: `'matched.point'`) + +* `MATCHED_DOT_TYPE` (value: `'matched.type'`) + +* `MATCHED_DOT_EDGE_INDEX` (value: `'matched.edge_index'`) + +* `MATCHED_DOT_BEGIN_ROUTE_DISCONTINUITY` (value: `'matched.begin_route_discontinuity'`) + +* `MATCHED_DOT_END_ROUTE_DISCONTINUITY` (value: `'matched.end_route_discontinuity'`) + +* `MATCHED_DOT_DISTANCE_ALONG_EDGE` (value: `'matched.distance_along_edge'`) + +* `MATCHED_DOT_DISTANCE_FROM_TRACE_POINT` (value: `'matched.distance_from_trace_point'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TraceAttributesRequest.md b/docs/TraceAttributesRequest.md index 2850287..aa25bb8 100644 --- a/docs/TraceAttributesRequest.md +++ b/docs/TraceAttributesRequest.md @@ -11,8 +11,8 @@ Name | Type | Description | Notes **costing** | [**MapMatchCostingModel**](MapMatchCostingModel.md) | | **costing_options** | [**CostingOptions**](CostingOptions.md) | | [optional] **shape_match** | **str** | Three snapping modes provide some control over how the map matching occurs. `edge_walk` is fast, but requires extremely precise data that matches the route graph almost perfectly. `map_snap` can handle significantly noisier data, but is very expensive. `walk_or_snap`, the default, tries to use edge walking first and falls back to map matching if edge walking fails. In general, you should not need to change this parameter unless you want to trace a multi-leg route with multiple `break` locations in the `shape`. | [optional] -**units** | [**DistanceUnit**](DistanceUnit.md) | | [optional] -**language** | [**ValhallaLanguages**](ValhallaLanguages.md) | | [optional] +**units** | [**DistanceUnit**](DistanceUnit.md) | | [optional] [default to DistanceUnit.KM] +**language** | [**ValhallaLanguages**](ValhallaLanguages.md) | | [optional] [default to ValhallaLanguages.EN_MINUS_US] **directions_type** | **str** | The level of directional narrative to include. Locations and times will always be returned, but narrative generation verbosity can be controlled with this parameter. | [optional] [default to 'instructions'] **filters** | [**TraceAttributeFilterOptions**](TraceAttributeFilterOptions.md) | If present, provides either a whitelist or a blacklist of keys to include/exclude in the response. This key is optional, and if omitted from the request, all available info will be returned. | [optional] diff --git a/docs/TraceAttributesResponse.md b/docs/TraceAttributesResponse.md index ebb679b..a755c21 100644 --- a/docs/TraceAttributesResponse.md +++ b/docs/TraceAttributesResponse.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **shape** | **str** | The encoded polyline (https://developers.google.com/maps/documentation/utilities/polylinealgorithm) of the matched path. | [optional] **confidence_score** | **float** | | [optional] **id** | **str** | An identifier to disambiguate requests (echoed by the server). | [optional] -**units** | [**ValhallaLongUnits**](ValhallaLongUnits.md) | | [optional] +**units** | [**ValhallaLongUnits**](ValhallaLongUnits.md) | | [optional] [default to ValhallaLongUnits.KILOMETERS] **alternate_paths** | [**List[TraceAttributesBaseResponse]**](TraceAttributesBaseResponse.md) | Alternate paths, if any, that were not classified as the best match. | [optional] ## Example diff --git a/docs/TravelMode.md b/docs/TravelMode.md index e54f965..cc69405 100644 --- a/docs/TravelMode.md +++ b/docs/TravelMode.md @@ -1,10 +1,15 @@ # TravelMode -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `DRIVE` (value: `'drive'`) + +* `PEDESTRIAN` (value: `'pedestrian'`) + +* `BICYCLE` (value: `'bicycle'`) + +* `TRANSIT` (value: `'transit'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Traversability.md b/docs/Traversability.md index e21afc4..ec807ea 100644 --- a/docs/Traversability.md +++ b/docs/Traversability.md @@ -2,10 +2,13 @@ The directions in which the edge is traversable. -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `FORWARD` (value: `'forward'`) + +* `BACKWARD` (value: `'backward'`) + +* `BOTH` (value: `'both'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ValhallaLanguages.md b/docs/ValhallaLanguages.md index 6ccc397..c294cd9 100644 --- a/docs/ValhallaLanguages.md +++ b/docs/ValhallaLanguages.md @@ -1,10 +1,65 @@ # ValhallaLanguages -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `BG_MINUS_BG` (value: `'bg-BG'`) + +* `CA_MINUS_ES` (value: `'ca-ES'`) + +* `CS_MINUS_CZ` (value: `'cs-CZ'`) + +* `DA_MINUS_DK` (value: `'da-DK'`) + +* `DE_MINUS_DE` (value: `'de-DE'`) + +* `EL_MINUS_GR` (value: `'el-GR'`) + +* `EN_MINUS_GB` (value: `'en-GB'`) + +* `EN_MINUS_US_MINUS_X_MINUS_PIRATE` (value: `'en-US-x-pirate'`) + +* `EN_MINUS_US` (value: `'en-US'`) + +* `ES_MINUS_ES` (value: `'es-ES'`) + +* `ET_MINUS_EE` (value: `'et-EE'`) + +* `FI_MINUS_FI` (value: `'fi-FI'`) + +* `FR_MINUS_FR` (value: `'fr-FR'`) + +* `HI_MINUS_IN` (value: `'hi-IN'`) + +* `HU_MINUS_HU` (value: `'hu-HU'`) + +* `IT_MINUS_IT` (value: `'it-IT'`) + +* `JA_MINUS_JP` (value: `'ja-JP'`) + +* `NB_MINUS_NO` (value: `'nb-NO'`) + +* `NL_MINUS_NL` (value: `'nl-NL'`) + +* `PL_MINUS_PL` (value: `'pl-PL'`) + +* `PT_MINUS_BR` (value: `'pt-BR'`) + +* `PT_MINUS_PT` (value: `'pt-PT'`) + +* `RO_MINUS_RO` (value: `'ro-RO'`) + +* `RU_MINUS_RU` (value: `'ru-RU'`) + +* `SK_MINUS_SK` (value: `'sk-SK'`) + +* `SL_MINUS_SI` (value: `'sl-SI'`) + +* `SV_MINUS_SE` (value: `'sv-SE'`) + +* `TR_MINUS_TR` (value: `'tr-TR'`) + +* `UK_MINUS_UA` (value: `'uk-UA'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ValhallaLongUnits.md b/docs/ValhallaLongUnits.md index 166a774..eb01f08 100644 --- a/docs/ValhallaLongUnits.md +++ b/docs/ValhallaLongUnits.md @@ -1,10 +1,11 @@ # ValhallaLongUnits -## Properties +## Enum -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +* `MILES` (value: `'miles'`) + +* `KILOMETERS` (value: `'kilometers'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/pyproject.toml b/pyproject.toml index b29542e..238be2a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "stadiamaps" -version = "3.1.0" +version = "3.2.0" description = "Stadia Maps Geospatial APIs" authors = ["Stadia Maps Support "] license = "BSD-3-Clause" diff --git a/setup.py b/setup.py index 0998383..5b714dd 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -22,7 +22,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "stadiamaps" -VERSION = "3.1.0" +VERSION = "3.2.0" PYTHON_REQUIRES = ">=3.7" REQUIRES = [ "urllib3 >= 1.25.3, < 2.1.0", diff --git a/stadiamaps/__init__.py b/stadiamaps/__init__.py index c0ac5d3..a162f16 100644 --- a/stadiamaps/__init__.py +++ b/stadiamaps/__init__.py @@ -7,7 +7,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -15,7 +15,7 @@ """ # noqa: E501 -__version__ = "3.1.0" +__version__ = "3.2.0" # import apis into sdk package from stadiamaps.api.geocoding_api import GeocodingApi @@ -42,6 +42,8 @@ from stadiamaps.models.base_trace_request import BaseTraceRequest from stadiamaps.models.bicycle_costing_options import BicycleCostingOptions from stadiamaps.models.bike_network import BikeNetwork +from stadiamaps.models.bulk_request import BulkRequest +from stadiamaps.models.bulk_search_response import BulkSearchResponse from stadiamaps.models.contour import Contour from stadiamaps.models.coordinate import Coordinate from stadiamaps.models.costing_model import CostingModel @@ -112,6 +114,10 @@ from stadiamaps.models.routing_response_waypoint import RoutingResponseWaypoint from stadiamaps.models.routing_waypoint import RoutingWaypoint from stadiamaps.models.routing_waypoint_all_of_search_filter import RoutingWaypointAllOfSearchFilter +from stadiamaps.models.search_bulk_query import SearchBulkQuery +from stadiamaps.models.search_query import SearchQuery +from stadiamaps.models.search_structured_bulk_query import SearchStructuredBulkQuery +from stadiamaps.models.search_structured_query import SearchStructuredQuery from stadiamaps.models.simple_routing_waypoint import SimpleRoutingWaypoint from stadiamaps.models.speeds import Speeds from stadiamaps.models.trace_attribute_filter_options import TraceAttributeFilterOptions diff --git a/stadiamaps/api/geocoding_api.py b/stadiamaps/api/geocoding_api.py index dc8dc76..6a3ccb1 100644 --- a/stadiamaps/api/geocoding_api.py +++ b/stadiamaps/api/geocoding_api.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -20,6 +20,8 @@ from pydantic import Field, StrictFloat, StrictInt, StrictStr from typing import List, Optional, Union from typing_extensions import Annotated +from stadiamaps.models.bulk_request import BulkRequest +from stadiamaps.models.bulk_search_response import BulkSearchResponse from stadiamaps.models.pelias_layer import PeliasLayer from stadiamaps.models.pelias_response import PeliasResponse from stadiamaps.models.pelias_source import PeliasSource @@ -46,14 +48,14 @@ def __init__(self, api_client=None) -> None: def autocomplete( self, text: Annotated[StrictStr, Field(description="The place name (address, venue name, etc.) to search for.")], - focus_point_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], 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, - focus_point_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], 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, - boundary_rect_min_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], 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, - boundary_rect_max_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Defines the max latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, - boundary_rect_min_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Defines the min longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, - boundary_rect_max_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Defines the max longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, - boundary_circle_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`.")] = None, - boundary_circle_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.")] = None, + 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, + 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, + 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, + 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="Defines the max latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, + 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="Defines the min longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, + 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="Defines the max longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, + 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, + 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, 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, 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, boundary_gid: Annotated[Optional[StrictStr], Field(description="The Pelias GID of an area to limit the search to.")] = None, @@ -174,14 +176,14 @@ def autocomplete( def autocomplete_with_http_info( self, text: Annotated[StrictStr, Field(description="The place name (address, venue name, etc.) to search for.")], - focus_point_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], 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, - focus_point_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], 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, - boundary_rect_min_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], 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, - boundary_rect_max_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Defines the max latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, - boundary_rect_min_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Defines the min longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, - boundary_rect_max_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Defines the max longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, - boundary_circle_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`.")] = None, - boundary_circle_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.")] = None, + 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, + 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, + 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, + 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="Defines the max latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, + 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="Defines the min longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, + 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="Defines the max longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, + 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, + 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, 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, 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, boundary_gid: Annotated[Optional[StrictStr], Field(description="The Pelias GID of an area to limit the search to.")] = None, @@ -302,14 +304,14 @@ def autocomplete_with_http_info( def autocomplete_without_preload_content( self, text: Annotated[StrictStr, Field(description="The place name (address, venue name, etc.) to search for.")], - focus_point_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], 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, - focus_point_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], 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, - boundary_rect_min_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], 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, - boundary_rect_max_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Defines the max latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, - boundary_rect_min_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Defines the min longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, - boundary_rect_max_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Defines the max longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, - boundary_circle_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`.")] = None, - boundary_circle_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.")] = None, + 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, + 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, + 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, + 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="Defines the max latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, + 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="Defines the min longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, + 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="Defines the max longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, + 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, + 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, 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, 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, boundary_gid: Annotated[Optional[StrictStr], Field(description="The Pelias GID of an area to limit the search to.")] = None, @@ -533,11 +535,12 @@ def _autocomplete_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -566,7 +569,7 @@ def _autocomplete_serialize( @validate_call def place( self, - ids: Annotated[List[StrictStr], Field(min_length=1, description="A list of Pelias GIDs to search for.")], + ids: Annotated[List[StrictStr], Field(description="A list of Pelias GIDs to search for.")], 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, _request_timeout: Union[ None, @@ -638,7 +641,7 @@ def place( @validate_call def place_with_http_info( self, - ids: Annotated[List[StrictStr], Field(min_length=1, description="A list of Pelias GIDs to search for.")], + ids: Annotated[List[StrictStr], Field(description="A list of Pelias GIDs to search for.")], 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, _request_timeout: Union[ None, @@ -710,7 +713,7 @@ def place_with_http_info( @validate_call def place_without_preload_content( self, - ids: Annotated[List[StrictStr], Field(min_length=1, description="A list of Pelias GIDs to search for.")], + ids: Annotated[List[StrictStr], Field(description="A list of Pelias GIDs to search for.")], 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, _request_timeout: Union[ None, @@ -814,11 +817,12 @@ def _place_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -1216,11 +1220,12 @@ def _reverse_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -1250,14 +1255,14 @@ def _reverse_serialize( def search( self, text: Annotated[StrictStr, Field(description="The place name (address, venue name, etc.) to search for.")], - focus_point_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], 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, - focus_point_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], 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, - boundary_rect_min_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], 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, - boundary_rect_max_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Defines the max latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, - boundary_rect_min_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Defines the min longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, - boundary_rect_max_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Defines the max longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, - boundary_circle_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`.")] = None, - boundary_circle_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.")] = None, + 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, + 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, + 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, + 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="Defines the max latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, + 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="Defines the min longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, + 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="Defines the max longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, + 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, + 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, 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, 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, boundary_gid: Annotated[Optional[StrictStr], Field(description="The Pelias GID of an area to limit the search to.")] = None, @@ -1378,14 +1383,14 @@ def search( def search_with_http_info( self, text: Annotated[StrictStr, Field(description="The place name (address, venue name, etc.) to search for.")], - focus_point_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], 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, - focus_point_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], 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, - boundary_rect_min_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], 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, - boundary_rect_max_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Defines the max latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, - boundary_rect_min_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Defines the min longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, - boundary_rect_max_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Defines the max longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, - boundary_circle_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`.")] = None, - boundary_circle_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.")] = None, + 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, + 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, + 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, + 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="Defines the max latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, + 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="Defines the min longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, + 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="Defines the max longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, + 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, + 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, 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, 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, boundary_gid: Annotated[Optional[StrictStr], Field(description="The Pelias GID of an area to limit the search to.")] = None, @@ -1506,14 +1511,14 @@ def search_with_http_info( def search_without_preload_content( self, text: Annotated[StrictStr, Field(description="The place name (address, venue name, etc.) to search for.")], - focus_point_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], 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, - focus_point_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], 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, - boundary_rect_min_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], 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, - boundary_rect_max_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Defines the max latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, - boundary_rect_min_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Defines the min longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, - boundary_rect_max_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Defines the max longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, - boundary_circle_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`.")] = None, - boundary_circle_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.")] = None, + 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, + 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, + 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, + 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="Defines the max latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, + 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="Defines the min longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, + 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="Defines the max longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, + 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, + 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, 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, 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, boundary_gid: Annotated[Optional[StrictStr], Field(description="The Pelias GID of an area to limit the search to.")] = None, @@ -1737,11 +1742,12 @@ def _search_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -1767,6 +1773,282 @@ def _search_serialize( + @validate_call + def search_bulk( + self, + bulk_request: Optional[List[BulkRequest]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[BulkSearchResponse]: + """Quickly run a batch of geocoding queries against the search or structured search endpoints. + + The batch endpoint lets you specify many search or structured search requests at once. Once received, all requests will be processed internally on our infrastructure, improving throughput when you need to do a lot of queries. + + :param bulk_request: + :type bulk_request: List[BulkRequest] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._search_bulk_serialize( + bulk_request=bulk_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[BulkSearchResponse]", + '400': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def search_bulk_with_http_info( + self, + bulk_request: Optional[List[BulkRequest]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[BulkSearchResponse]]: + """Quickly run a batch of geocoding queries against the search or structured search endpoints. + + The batch endpoint lets you specify many search or structured search requests at once. Once received, all requests will be processed internally on our infrastructure, improving throughput when you need to do a lot of queries. + + :param bulk_request: + :type bulk_request: List[BulkRequest] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._search_bulk_serialize( + bulk_request=bulk_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[BulkSearchResponse]", + '400': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def search_bulk_without_preload_content( + self, + bulk_request: Optional[List[BulkRequest]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Quickly run a batch of geocoding queries against the search or structured search endpoints. + + The batch endpoint lets you specify many search or structured search requests at once. Once received, all requests will be processed internally on our infrastructure, improving throughput when you need to do a lot of queries. + + :param bulk_request: + :type bulk_request: List[BulkRequest] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._search_bulk_serialize( + bulk_request=bulk_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[BulkSearchResponse]", + '400': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _search_bulk_serialize( + self, + bulk_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'BulkRequest': '', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if bulk_request is not None: + _body_params = bulk_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/geocoding/v1/search/bulk', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def search_structured( self, @@ -1778,14 +2060,14 @@ def search_structured( region: Annotated[Optional[StrictStr], Field(description="Typically the first administrative division within a country. For example, a US state or a Canadian province.")] = None, postalcode: Annotated[Optional[StrictStr], Field(description="A mail sorting code.")] = None, 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, - focus_point_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], 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, - focus_point_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], 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, - boundary_rect_min_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], 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, - boundary_rect_max_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Defines the max latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, - boundary_rect_min_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Defines the min longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, - boundary_rect_max_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Defines the max longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, - boundary_circle_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`.")] = None, - boundary_circle_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.")] = None, + 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, + 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, + 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, + 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="Defines the max latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, + 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="Defines the min longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, + 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="Defines the max longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, + 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, + 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, 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, 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, boundary_gid: Annotated[Optional[StrictStr], Field(description="The Pelias GID of an area to limit the search to.")] = None, @@ -1934,14 +2216,14 @@ def search_structured_with_http_info( region: Annotated[Optional[StrictStr], Field(description="Typically the first administrative division within a country. For example, a US state or a Canadian province.")] = None, postalcode: Annotated[Optional[StrictStr], Field(description="A mail sorting code.")] = None, 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, - focus_point_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], 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, - focus_point_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], 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, - boundary_rect_min_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], 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, - boundary_rect_max_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Defines the max latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, - boundary_rect_min_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Defines the min longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, - boundary_rect_max_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Defines the max longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, - boundary_circle_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`.")] = None, - boundary_circle_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.")] = None, + 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, + 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, + 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, + 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="Defines the max latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, + 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="Defines the min longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, + 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="Defines the max longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, + 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, + 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, 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, 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, boundary_gid: Annotated[Optional[StrictStr], Field(description="The Pelias GID of an area to limit the search to.")] = None, @@ -2090,14 +2372,14 @@ def search_structured_without_preload_content( region: Annotated[Optional[StrictStr], Field(description="Typically the first administrative division within a country. For example, a US state or a Canadian province.")] = None, postalcode: Annotated[Optional[StrictStr], Field(description="A mail sorting code.")] = None, 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, - focus_point_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], 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, - focus_point_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], 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, - boundary_rect_min_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], 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, - boundary_rect_max_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Defines the max latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, - boundary_rect_min_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Defines the min longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, - boundary_rect_max_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Defines the max longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, - boundary_circle_lat: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`.")] = None, - boundary_circle_lon: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.")] = None, + 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, + 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, + 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, + 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="Defines the max latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, + 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="Defines the min longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, + 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="Defines the max longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.")] = None, + 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, + 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, 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, 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, boundary_gid: Annotated[Optional[StrictStr], Field(description="The Pelias GID of an area to limit the search to.")] = None, @@ -2377,11 +2659,12 @@ def _search_structured_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting diff --git a/stadiamaps/api/geospatial_api.py b/stadiamaps/api/geospatial_api.py index c16fe4a..02bf604 100644 --- a/stadiamaps/api/geospatial_api.py +++ b/stadiamaps/api/geospatial_api.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -273,11 +273,12 @@ def _elevation_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -583,11 +584,12 @@ def _tz_lookup_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting diff --git a/stadiamaps/api/routing_api.py b/stadiamaps/api/routing_api.py index 529a2e3..cbd1ef3 100644 --- a/stadiamaps/api/routing_api.py +++ b/stadiamaps/api/routing_api.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -69,7 +69,7 @@ def isochrone( ) -> IsochroneResponse: """Calculate areas of equal travel time from a location. - The isochrone API lets you compute or visualize areas of roughly equal travel time based on the routing graph. The resulting polygon can be rendered on a map and shaded much like elevation contours and used for exploring urban mobility. + The isochrone API computes reachable areas within a time or distance constraint. The resulting polygon can be rendered on a map and used for assessing urban mobility, planning, or as a search filter of places within a constrained range. :param isochrone_request: :type isochrone_request: IsochroneRequest @@ -137,7 +137,7 @@ def isochrone_with_http_info( ) -> ApiResponse[IsochroneResponse]: """Calculate areas of equal travel time from a location. - The isochrone API lets you compute or visualize areas of roughly equal travel time based on the routing graph. The resulting polygon can be rendered on a map and shaded much like elevation contours and used for exploring urban mobility. + The isochrone API computes reachable areas within a time or distance constraint. The resulting polygon can be rendered on a map and used for assessing urban mobility, planning, or as a search filter of places within a constrained range. :param isochrone_request: :type isochrone_request: IsochroneRequest @@ -205,7 +205,7 @@ def isochrone_without_preload_content( ) -> RESTResponseType: """Calculate areas of equal travel time from a location. - The isochrone API lets you compute or visualize areas of roughly equal travel time based on the routing graph. The resulting polygon can be rendered on a map and shaded much like elevation contours and used for exploring urban mobility. + The isochrone API computes reachable areas within a time or distance constraint. The resulting polygon can be rendered on a map and used for assessing urban mobility, planning, or as a search filter of places within a constrained range. :param isochrone_request: :type isochrone_request: IsochroneRequest @@ -281,11 +281,12 @@ def _isochrone_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -558,11 +559,12 @@ def _map_match_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -832,11 +834,12 @@ def _nearest_roads_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -1109,11 +1112,12 @@ def _optimized_route_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -1386,11 +1390,12 @@ def _route_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -1660,11 +1665,12 @@ def _time_distance_matrix_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: @@ -1934,11 +1940,12 @@ def _trace_attributes_serialize( # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` if _content_type: diff --git a/stadiamaps/api_client.py b/stadiamaps/api_client.py index d8677bf..2b1fb46 100644 --- a/stadiamaps/api_client.py +++ b/stadiamaps/api_client.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -89,7 +89,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/3.1.0/python' + self.user_agent = 'OpenAPI-Generator/3.2.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): @@ -228,7 +228,7 @@ def param_serialize( body = self.sanitize_for_serialization(body) # request url - if _host is None: + if _host is None or self.configuration.ignore_operation_servers: url = self.configuration.host + resource_path else: # use server/host defined in path or operation instead @@ -315,10 +315,7 @@ def response_deserialize( match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) encoding = match.group(1) if match else "utf-8" response_text = response_data.data.decode(encoding) - if response_type in ["bytearray", "str"]: - return_data = self.__deserialize_primitive(response_text, response_type) - else: - return_data = self.deserialize(response_text, response_type) + return_data = self.deserialize(response_text, response_type, content_type) finally: if not 200 <= response_data.status <= 299: raise ApiException.from_response( @@ -386,21 +383,35 @@ def sanitize_for_serialization(self, obj): for key, val in obj_dict.items() } - def deserialize(self, response_text, response_type): + def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. :param response_type: class literal for deserialized object, or string of class name. + :param content_type: content type of response. :return: deserialized object. """ # fetch data from response object - try: - data = json.loads(response_text) - except ValueError: + if content_type is None: + try: + data = json.loads(response_text) + except ValueError: + data = response_text + elif content_type.startswith("application/json"): + if response_text == "": + data = "" + else: + data = json.loads(response_text) + elif content_type.startswith("text/plain"): data = response_text + else: + raise ApiException( + status=0, + reason="Unsupported content type: {0}".format(content_type) + ) return self.__deserialize(data, response_type) diff --git a/stadiamaps/configuration.py b/stadiamaps/configuration.py index 8de1083..3a41acd 100644 --- a/stadiamaps/configuration.py +++ b/stadiamaps/configuration.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -33,6 +33,9 @@ class Configuration: """This class contains various settings of the API client. :param host: Base url. + :param ignore_operation_servers + Boolean to ignore operation servers for the API client. + Config will use `host` as the base url regardless of the operation servers. :param api_key: Dict to store API key(s). Each entry in the dict specifies an API key. The dict key is the name of the security scheme in the OAS specification. @@ -55,6 +58,7 @@ class Configuration: values before. :param ssl_ca_cert: str - the path to a file of concatenated CA certificates in PEM format. + :param retries: Number of retries for API requests. :Example: @@ -86,7 +90,11 @@ def __init__(self, host=None, access_token=None, server_index=None, server_variables=None, server_operation_index=None, server_operation_variables=None, + ignore_operation_servers=False, ssl_ca_cert=None, + retries=None, + *, + debug: Optional[bool] = None ) -> None: """Constructor """ @@ -101,6 +109,9 @@ def __init__(self, host=None, self.server_operation_variables = server_operation_variables or {} """Default server variables """ + self.ignore_operation_servers = ignore_operation_servers + """Ignore operation servers + """ self.temp_folder_path = None """Temp file folder for downloading files """ @@ -144,7 +155,10 @@ def __init__(self, host=None, self.logger_file = None """Debug file location """ - self.debug = False + if debug is not None: + self.debug = debug + else: + self.__debug = False """Debug switch """ @@ -187,7 +201,7 @@ def __init__(self, host=None, self.safe_chars_for_path_param = '' """Safe chars for path_param """ - self.retries = None + self.retries = retries """Adding retries to override urllib3 default value 3 """ # Enable client side validation @@ -399,8 +413,8 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 6.3.0\n"\ - "SDK Package Version: 3.1.0".\ + "Version of the API: 6.6.2\n"\ + "SDK Package Version: 3.2.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/stadiamaps/exceptions.py b/stadiamaps/exceptions.py index f0f464f..f624c8d 100644 --- a/stadiamaps/exceptions.py +++ b/stadiamaps/exceptions.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/__init__.py b/stadiamaps/models/__init__.py index 98d6417..8573b21 100644 --- a/stadiamaps/models/__init__.py +++ b/stadiamaps/models/__init__.py @@ -6,7 +6,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -23,6 +23,8 @@ from stadiamaps.models.base_trace_request import BaseTraceRequest from stadiamaps.models.bicycle_costing_options import BicycleCostingOptions from stadiamaps.models.bike_network import BikeNetwork +from stadiamaps.models.bulk_request import BulkRequest +from stadiamaps.models.bulk_search_response import BulkSearchResponse from stadiamaps.models.contour import Contour from stadiamaps.models.coordinate import Coordinate from stadiamaps.models.costing_model import CostingModel @@ -93,6 +95,10 @@ from stadiamaps.models.routing_response_waypoint import RoutingResponseWaypoint from stadiamaps.models.routing_waypoint import RoutingWaypoint from stadiamaps.models.routing_waypoint_all_of_search_filter import RoutingWaypointAllOfSearchFilter +from stadiamaps.models.search_bulk_query import SearchBulkQuery +from stadiamaps.models.search_query import SearchQuery +from stadiamaps.models.search_structured_bulk_query import SearchStructuredBulkQuery +from stadiamaps.models.search_structured_query import SearchStructuredQuery from stadiamaps.models.simple_routing_waypoint import SimpleRoutingWaypoint from stadiamaps.models.speeds import Speeds from stadiamaps.models.trace_attribute_filter_options import TraceAttributeFilterOptions diff --git a/stadiamaps/models/access.py b/stadiamaps/models/access.py index 3a5d641..77f6bb5 100644 --- a/stadiamaps/models/access.py +++ b/stadiamaps/models/access.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/admin_region.py b/stadiamaps/models/admin_region.py index 9d07a48..f1ac469 100644 --- a/stadiamaps/models/admin_region.py +++ b/stadiamaps/models/admin_region.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/administrative.py b/stadiamaps/models/administrative.py index 255f774..2249811 100644 --- a/stadiamaps/models/administrative.py +++ b/stadiamaps/models/administrative.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/auto_costing_options.py b/stadiamaps/models/auto_costing_options.py index 99caada..039fd77 100644 --- a/stadiamaps/models/auto_costing_options.py +++ b/stadiamaps/models/auto_costing_options.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/base_costing_options.py b/stadiamaps/models/base_costing_options.py index e804f38..f258658 100644 --- a/stadiamaps/models/base_costing_options.py +++ b/stadiamaps/models/base_costing_options.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/base_trace_request.py b/stadiamaps/models/base_trace_request.py index 95cb7c8..51af57d 100644 --- a/stadiamaps/models/base_trace_request.py +++ b/stadiamaps/models/base_trace_request.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -32,8 +32,8 @@ class BaseTraceRequest(BaseModel): """ BaseTraceRequest """ # noqa: E501 - units: Optional[DistanceUnit] = None - language: Optional[ValhallaLanguages] = None + units: Optional[DistanceUnit] = DistanceUnit.KM + language: Optional[ValhallaLanguages] = ValhallaLanguages.EN_MINUS_US directions_type: Optional[StrictStr] = Field(default='instructions', description="The level of directional narrative to include. Locations and times will always be returned, but narrative generation verbosity can be controlled with this parameter.") id: Optional[StrictStr] = Field(default=None, description="An identifier to disambiguate requests (echoed by the server).") shape: Optional[List[MapMatchWaypoint]] = Field(default=None, description="REQUIRED if `encoded_polyline` is not present. Note that `break` type locations are only supported when `shape_match` is set to `map_match`.") @@ -132,8 +132,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "units": obj.get("units"), - "language": obj.get("language"), + "units": obj.get("units") if obj.get("units") is not None else DistanceUnit.KM, + "language": obj.get("language") if obj.get("language") is not None else ValhallaLanguages.EN_MINUS_US, "directions_type": obj.get("directions_type") if obj.get("directions_type") is not None else 'instructions', "id": obj.get("id"), "shape": [MapMatchWaypoint.from_dict(_item) for _item in obj["shape"]] if obj.get("shape") is not None else None, diff --git a/stadiamaps/models/bicycle_costing_options.py b/stadiamaps/models/bicycle_costing_options.py index 17622e1..dca379c 100644 --- a/stadiamaps/models/bicycle_costing_options.py +++ b/stadiamaps/models/bicycle_costing_options.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/bike_network.py b/stadiamaps/models/bike_network.py index fe37519..82b6250 100644 --- a/stadiamaps/models/bike_network.py +++ b/stadiamaps/models/bike_network.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/bulk_request.py b/stadiamaps/models/bulk_request.py new file mode 100644 index 0000000..9ddbb6f --- /dev/null +++ b/stadiamaps/models/bulk_request.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Stadia Maps Geospatial APIs + + The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. + + The version of the OpenAPI document: 6.6.2 + Contact: support@stadiamaps.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from stadiamaps.models.search_bulk_query import SearchBulkQuery +from stadiamaps.models.search_structured_bulk_query import SearchStructuredBulkQuery +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BULKREQUEST_ONE_OF_SCHEMAS = ["SearchBulkQuery", "SearchStructuredBulkQuery"] + +class BulkRequest(BaseModel): + """ + BulkRequest + """ + # data type: SearchBulkQuery + oneof_schema_1_validator: Optional[SearchBulkQuery] = None + # data type: SearchStructuredBulkQuery + oneof_schema_2_validator: Optional[SearchStructuredBulkQuery] = None + actual_instance: Optional[Union[SearchBulkQuery, SearchStructuredBulkQuery]] = None + one_of_schemas: Set[str] = { "SearchBulkQuery", "SearchStructuredBulkQuery" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BulkRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: SearchBulkQuery + if not isinstance(v, SearchBulkQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `SearchBulkQuery`") + else: + match += 1 + # validate data type: SearchStructuredBulkQuery + if not isinstance(v, SearchStructuredBulkQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `SearchStructuredBulkQuery`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BulkRequest with oneOf schemas: SearchBulkQuery, SearchStructuredBulkQuery. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BulkRequest with oneOf schemas: SearchBulkQuery, SearchStructuredBulkQuery. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into SearchBulkQuery + try: + instance.actual_instance = SearchBulkQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SearchStructuredBulkQuery + try: + instance.actual_instance = SearchStructuredBulkQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BulkRequest with oneOf schemas: SearchBulkQuery, SearchStructuredBulkQuery. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BulkRequest with oneOf schemas: SearchBulkQuery, SearchStructuredBulkQuery. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], SearchBulkQuery, SearchStructuredBulkQuery]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/stadiamaps/models/bulk_search_request_inner.py b/stadiamaps/models/bulk_search_request_inner.py new file mode 100644 index 0000000..e6bc126 --- /dev/null +++ b/stadiamaps/models/bulk_search_request_inner.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Stadia Maps Geospatial APIs + + The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. + + The version of the OpenAPI document: 6.6.2 + Contact: support@stadiamaps.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from stadiamaps.models.search_bulk_query import SearchBulkQuery +from stadiamaps.models.search_structured_bulk_query import SearchStructuredBulkQuery +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +BULKSEARCHREQUESTINNER_ONE_OF_SCHEMAS = ["SearchBulkQuery", "SearchStructuredBulkQuery"] + +class BulkSearchRequestInner(BaseModel): + """ + BulkSearchRequestInner + """ + # data type: SearchBulkQuery + oneof_schema_1_validator: Optional[SearchBulkQuery] = None + # data type: SearchStructuredBulkQuery + oneof_schema_2_validator: Optional[SearchStructuredBulkQuery] = None + actual_instance: Optional[Union[SearchBulkQuery, SearchStructuredBulkQuery]] = None + one_of_schemas: Set[str] = { "SearchBulkQuery", "SearchStructuredBulkQuery" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = BulkSearchRequestInner.model_construct() + error_messages = [] + match = 0 + # validate data type: SearchBulkQuery + if not isinstance(v, SearchBulkQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `SearchBulkQuery`") + else: + match += 1 + # validate data type: SearchStructuredBulkQuery + if not isinstance(v, SearchStructuredBulkQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `SearchStructuredBulkQuery`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in BulkSearchRequestInner with oneOf schemas: SearchBulkQuery, SearchStructuredBulkQuery. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in BulkSearchRequestInner with oneOf schemas: SearchBulkQuery, SearchStructuredBulkQuery. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into SearchBulkQuery + try: + instance.actual_instance = SearchBulkQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SearchStructuredBulkQuery + try: + instance.actual_instance = SearchStructuredBulkQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into BulkSearchRequestInner with oneOf schemas: SearchBulkQuery, SearchStructuredBulkQuery. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into BulkSearchRequestInner with oneOf schemas: SearchBulkQuery, SearchStructuredBulkQuery. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], SearchBulkQuery, SearchStructuredBulkQuery]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/stadiamaps/models/bulk_search_response.py b/stadiamaps/models/bulk_search_response.py new file mode 100644 index 0000000..f7f4527 --- /dev/null +++ b/stadiamaps/models/bulk_search_response.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Stadia Maps Geospatial APIs + + The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. + + The version of the OpenAPI document: 6.6.2 + Contact: support@stadiamaps.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from stadiamaps.models.pelias_response import PeliasResponse +from typing import Optional, Set +from typing_extensions import Self + +class BulkSearchResponse(BaseModel): + """ + BulkSearchResponse + """ # noqa: E501 + status: StrictInt + response: Optional[PeliasResponse] = None + msg: Optional[StrictStr] = Field(default=None, description="An error message describing what went wrong (if the status is not 200).") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["status", "response", "msg"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BulkSearchResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of response + if self.response: + _dict['response'] = self.response.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BulkSearchResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "response": PeliasResponse.from_dict(obj["response"]) if obj.get("response") is not None else None, + "msg": obj.get("msg") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/stadiamaps/models/contour.py b/stadiamaps/models/contour.py index d46c016..c947062 100644 --- a/stadiamaps/models/contour.py +++ b/stadiamaps/models/contour.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/coordinate.py b/stadiamaps/models/coordinate.py index 3b8908f..a428a47 100644 --- a/stadiamaps/models/coordinate.py +++ b/stadiamaps/models/coordinate.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/costing_model.py b/stadiamaps/models/costing_model.py index c34638c..72eecf6 100644 --- a/stadiamaps/models/costing_model.py +++ b/stadiamaps/models/costing_model.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/costing_options.py b/stadiamaps/models/costing_options.py index a443872..fea8e72 100644 --- a/stadiamaps/models/costing_options.py +++ b/stadiamaps/models/costing_options.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/directions_options.py b/stadiamaps/models/directions_options.py index 931920e..f6ed59f 100644 --- a/stadiamaps/models/directions_options.py +++ b/stadiamaps/models/directions_options.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -29,8 +29,8 @@ class DirectionsOptions(BaseModel): """ DirectionsOptions """ # noqa: E501 - units: Optional[DistanceUnit] = None - language: Optional[ValhallaLanguages] = None + units: Optional[DistanceUnit] = DistanceUnit.KM + language: Optional[ValhallaLanguages] = ValhallaLanguages.EN_MINUS_US directions_type: Optional[StrictStr] = Field(default='instructions', description="The level of directional narrative to include. Locations and times will always be returned, but narrative generation verbosity can be controlled with this parameter.") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["units", "language", "directions_type"] @@ -103,8 +103,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "units": obj.get("units"), - "language": obj.get("language"), + "units": obj.get("units") if obj.get("units") is not None else DistanceUnit.KM, + "language": obj.get("language") if obj.get("language") is not None else ValhallaLanguages.EN_MINUS_US, "directions_type": obj.get("directions_type") if obj.get("directions_type") is not None else 'instructions' }) # store additional fields in additional_properties diff --git a/stadiamaps/models/distance_unit.py b/stadiamaps/models/distance_unit.py index 0c2024e..07745e0 100644 --- a/stadiamaps/models/distance_unit.py +++ b/stadiamaps/models/distance_unit.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/edge_sign.py b/stadiamaps/models/edge_sign.py index 2e6ef21..796d801 100644 --- a/stadiamaps/models/edge_sign.py +++ b/stadiamaps/models/edge_sign.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/edge_use.py b/stadiamaps/models/edge_use.py index 522cf91..531033c 100644 --- a/stadiamaps/models/edge_use.py +++ b/stadiamaps/models/edge_use.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/end_node.py b/stadiamaps/models/end_node.py index 3b88520..9c0527d 100644 --- a/stadiamaps/models/end_node.py +++ b/stadiamaps/models/end_node.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/geo_attributes.py b/stadiamaps/models/geo_attributes.py index 85fbbbb..4c87cdf 100644 --- a/stadiamaps/models/geo_attributes.py +++ b/stadiamaps/models/geo_attributes.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/geo_json_geometry.py b/stadiamaps/models/geo_json_geometry.py index c0a15f0..66689bc 100644 --- a/stadiamaps/models/geo_json_geometry.py +++ b/stadiamaps/models/geo_json_geometry.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/geo_json_geometry_base.py b/stadiamaps/models/geo_json_geometry_base.py index 61f9607..549ce1e 100644 --- a/stadiamaps/models/geo_json_geometry_base.py +++ b/stadiamaps/models/geo_json_geometry_base.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/geo_json_line_string.py b/stadiamaps/models/geo_json_line_string.py index 623a768..b703d57 100644 --- a/stadiamaps/models/geo_json_line_string.py +++ b/stadiamaps/models/geo_json_line_string.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/geo_json_point.py b/stadiamaps/models/geo_json_point.py index c88742e..be2ff89 100644 --- a/stadiamaps/models/geo_json_point.py +++ b/stadiamaps/models/geo_json_point.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/geo_json_polygon.py b/stadiamaps/models/geo_json_polygon.py index d2cf17b..4f29715 100644 --- a/stadiamaps/models/geo_json_polygon.py +++ b/stadiamaps/models/geo_json_polygon.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/geocoding_object.py b/stadiamaps/models/geocoding_object.py index 226b42e..661f28a 100644 --- a/stadiamaps/models/geocoding_object.py +++ b/stadiamaps/models/geocoding_object.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/height_request.py b/stadiamaps/models/height_request.py index 580adff..2b9efc5 100644 --- a/stadiamaps/models/height_request.py +++ b/stadiamaps/models/height_request.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/height_response.py b/stadiamaps/models/height_response.py index e2de16a..c7ab427 100644 --- a/stadiamaps/models/height_response.py +++ b/stadiamaps/models/height_response.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/highway_classification.py b/stadiamaps/models/highway_classification.py index 028c224..8927a87 100644 --- a/stadiamaps/models/highway_classification.py +++ b/stadiamaps/models/highway_classification.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/intersecting_edge.py b/stadiamaps/models/intersecting_edge.py index 8a22df4..52b8af1 100644 --- a/stadiamaps/models/intersecting_edge.py +++ b/stadiamaps/models/intersecting_edge.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/isochrone_costing_model.py b/stadiamaps/models/isochrone_costing_model.py index 2d18c92..c3e3447 100644 --- a/stadiamaps/models/isochrone_costing_model.py +++ b/stadiamaps/models/isochrone_costing_model.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -28,8 +28,15 @@ class IsochroneCostingModel(str, Enum): allowed enum values """ AUTO = 'auto' + BUS = 'bus' + TAXI = 'taxi' + TRUCK = 'truck' BICYCLE = 'bicycle' + BIKESHARE = 'bikeshare' + MOTOR_SCOOTER = 'motor_scooter' + MOTORCYCLE = 'motorcycle' PEDESTRIAN = 'pedestrian' + LOW_SPEED_VEHICLE = 'low_speed_vehicle' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/stadiamaps/models/isochrone_feature.py b/stadiamaps/models/isochrone_feature.py index 1934472..2d4b9f0 100644 --- a/stadiamaps/models/isochrone_feature.py +++ b/stadiamaps/models/isochrone_feature.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/isochrone_properties.py b/stadiamaps/models/isochrone_properties.py index 107b4f2..c7e2e91 100644 --- a/stadiamaps/models/isochrone_properties.py +++ b/stadiamaps/models/isochrone_properties.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/isochrone_request.py b/stadiamaps/models/isochrone_request.py index 13ad177..6c0cae8 100644 --- a/stadiamaps/models/isochrone_request.py +++ b/stadiamaps/models/isochrone_request.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/isochrone_response.py b/stadiamaps/models/isochrone_response.py index b440622..7424ba7 100644 --- a/stadiamaps/models/isochrone_response.py +++ b/stadiamaps/models/isochrone_response.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/locate_detailed_edge.py b/stadiamaps/models/locate_detailed_edge.py index e7cb97f..f7073f3 100644 --- a/stadiamaps/models/locate_detailed_edge.py +++ b/stadiamaps/models/locate_detailed_edge.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/locate_edge.py b/stadiamaps/models/locate_edge.py index 8ab54a6..3e980ba 100644 --- a/stadiamaps/models/locate_edge.py +++ b/stadiamaps/models/locate_edge.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/locate_edge_info.py b/stadiamaps/models/locate_edge_info.py index aa9922c..4f126b3 100644 --- a/stadiamaps/models/locate_edge_info.py +++ b/stadiamaps/models/locate_edge_info.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/locate_node.py b/stadiamaps/models/locate_node.py index d2a0925..6828464 100644 --- a/stadiamaps/models/locate_node.py +++ b/stadiamaps/models/locate_node.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/locate_object.py b/stadiamaps/models/locate_object.py index c8eba69..a082b1f 100644 --- a/stadiamaps/models/locate_object.py +++ b/stadiamaps/models/locate_object.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/low_speed_vehicle_costing_options.py b/stadiamaps/models/low_speed_vehicle_costing_options.py index edb9c70..b81bcfd 100644 --- a/stadiamaps/models/low_speed_vehicle_costing_options.py +++ b/stadiamaps/models/low_speed_vehicle_costing_options.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/maneuver_sign.py b/stadiamaps/models/maneuver_sign.py index 5ea1598..9948caf 100644 --- a/stadiamaps/models/maneuver_sign.py +++ b/stadiamaps/models/maneuver_sign.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/maneuver_sign_element.py b/stadiamaps/models/maneuver_sign_element.py index deff2d7..229ef39 100644 --- a/stadiamaps/models/maneuver_sign_element.py +++ b/stadiamaps/models/maneuver_sign_element.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/map_match_costing_model.py b/stadiamaps/models/map_match_costing_model.py index 59eb2c6..28fa22d 100644 --- a/stadiamaps/models/map_match_costing_model.py +++ b/stadiamaps/models/map_match_costing_model.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -28,9 +28,15 @@ class MapMatchCostingModel(str, Enum): allowed enum values """ AUTO = 'auto' - BICYCLE = 'bicycle' BUS = 'bus' + TAXI = 'taxi' + TRUCK = 'truck' + BICYCLE = 'bicycle' + BIKESHARE = 'bikeshare' + MOTOR_SCOOTER = 'motor_scooter' + MOTORCYCLE = 'motorcycle' PEDESTRIAN = 'pedestrian' + LOW_SPEED_VEHICLE = 'low_speed_vehicle' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/stadiamaps/models/map_match_request.py b/stadiamaps/models/map_match_request.py index 0bff459..cd8ecdc 100644 --- a/stadiamaps/models/map_match_request.py +++ b/stadiamaps/models/map_match_request.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -39,8 +39,8 @@ class MapMatchRequest(BaseModel): costing: MapMatchCostingModel costing_options: Optional[CostingOptions] = None shape_match: Optional[StrictStr] = Field(default=None, description="Three snapping modes provide some control over how the map matching occurs. `edge_walk` is fast, but requires extremely precise data that matches the route graph almost perfectly. `map_snap` can handle significantly noisier data, but is very expensive. `walk_or_snap`, the default, tries to use edge walking first and falls back to map matching if edge walking fails. In general, you should not need to change this parameter unless you want to trace a multi-leg route with multiple `break` locations in the `shape`.") - units: Optional[DistanceUnit] = None - language: Optional[ValhallaLanguages] = None + units: Optional[DistanceUnit] = DistanceUnit.KM + language: Optional[ValhallaLanguages] = ValhallaLanguages.EN_MINUS_US directions_type: Optional[StrictStr] = Field(default='instructions', description="The level of directional narrative to include. Locations and times will always be returned, but narrative generation verbosity can be controlled with this parameter.") begin_time: Optional[StrictInt] = Field(default=None, description="The timestamp at the start of the trace. Combined with `durations`, this provides a way to include timing information for an `encoded_polyline` trace.") durations: Optional[StrictInt] = Field(default=None, description="A list of durations (in seconds) between each successive pair of points in a polyline.") @@ -147,8 +147,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "costing": obj.get("costing"), "costing_options": CostingOptions.from_dict(obj["costing_options"]) if obj.get("costing_options") is not None else None, "shape_match": obj.get("shape_match"), - "units": obj.get("units"), - "language": obj.get("language"), + "units": obj.get("units") if obj.get("units") is not None else DistanceUnit.KM, + "language": obj.get("language") if obj.get("language") is not None else ValhallaLanguages.EN_MINUS_US, "directions_type": obj.get("directions_type") if obj.get("directions_type") is not None else 'instructions', "begin_time": obj.get("begin_time"), "durations": obj.get("durations"), diff --git a/stadiamaps/models/map_match_route_response.py b/stadiamaps/models/map_match_route_response.py index c1a6377..fcf22d1 100644 --- a/stadiamaps/models/map_match_route_response.py +++ b/stadiamaps/models/map_match_route_response.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/map_match_trace_options.py b/stadiamaps/models/map_match_trace_options.py index d8bce2e..277b1d1 100644 --- a/stadiamaps/models/map_match_trace_options.py +++ b/stadiamaps/models/map_match_trace_options.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/map_match_waypoint.py b/stadiamaps/models/map_match_waypoint.py index 9d1637d..cf5f89c 100644 --- a/stadiamaps/models/map_match_waypoint.py +++ b/stadiamaps/models/map_match_waypoint.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/matched_point.py b/stadiamaps/models/matched_point.py index 88bde12..14f3f95 100644 --- a/stadiamaps/models/matched_point.py +++ b/stadiamaps/models/matched_point.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/matrix_costing_model.py b/stadiamaps/models/matrix_costing_model.py index 07f0c65..81bea5d 100644 --- a/stadiamaps/models/matrix_costing_model.py +++ b/stadiamaps/models/matrix_costing_model.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/matrix_distance.py b/stadiamaps/models/matrix_distance.py index 4449c60..4043aa9 100644 --- a/stadiamaps/models/matrix_distance.py +++ b/stadiamaps/models/matrix_distance.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/matrix_request.py b/stadiamaps/models/matrix_request.py index d0930e9..ddb35f0 100644 --- a/stadiamaps/models/matrix_request.py +++ b/stadiamaps/models/matrix_request.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -33,8 +33,8 @@ class MatrixRequest(BaseModel): """ MatrixRequest """ # noqa: E501 - units: Optional[DistanceUnit] = None - language: Optional[ValhallaLanguages] = None + units: Optional[DistanceUnit] = DistanceUnit.KM + language: Optional[ValhallaLanguages] = ValhallaLanguages.EN_MINUS_US directions_type: Optional[StrictStr] = Field(default='instructions', description="The level of directional narrative to include. Locations and times will always be returned, but narrative generation verbosity can be controlled with this parameter.") id: Optional[StrictStr] = Field(default=None, description="An identifier to disambiguate requests (echoed by the server).") sources: Annotated[List[MatrixWaypoint], Field(min_length=1)] = Field(description="The list of starting locations") @@ -130,8 +130,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "units": obj.get("units"), - "language": obj.get("language"), + "units": obj.get("units") if obj.get("units") is not None else DistanceUnit.KM, + "language": obj.get("language") if obj.get("language") is not None else ValhallaLanguages.EN_MINUS_US, "directions_type": obj.get("directions_type") if obj.get("directions_type") is not None else 'instructions', "id": obj.get("id"), "sources": [MatrixWaypoint.from_dict(_item) for _item in obj["sources"]] if obj.get("sources") is not None else None, diff --git a/stadiamaps/models/matrix_response.py b/stadiamaps/models/matrix_response.py index 77750dd..d41a7b4 100644 --- a/stadiamaps/models/matrix_response.py +++ b/stadiamaps/models/matrix_response.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -137,7 +137,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: for _item in obj["sources_to_targets"] ] if obj.get("sources_to_targets") is not None else None, "warnings": [Warning.from_dict(_item) for _item in obj["warnings"]] if obj.get("warnings") is not None else None, - "units": obj.get("units") + "units": obj.get("units") if obj.get("units") is not None else ValhallaLongUnits.KILOMETERS }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/stadiamaps/models/matrix_waypoint.py b/stadiamaps/models/matrix_waypoint.py index 1059515..2ea6e78 100644 --- a/stadiamaps/models/matrix_waypoint.py +++ b/stadiamaps/models/matrix_waypoint.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/motor_scooter_costing_options.py b/stadiamaps/models/motor_scooter_costing_options.py index c61a1a9..8727d88 100644 --- a/stadiamaps/models/motor_scooter_costing_options.py +++ b/stadiamaps/models/motor_scooter_costing_options.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/motorcycle_costing_options.py b/stadiamaps/models/motorcycle_costing_options.py index b77218e..e8bebde 100644 --- a/stadiamaps/models/motorcycle_costing_options.py +++ b/stadiamaps/models/motorcycle_costing_options.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/nearest_roads_request.py b/stadiamaps/models/nearest_roads_request.py index 460cc8b..12f95a4 100644 --- a/stadiamaps/models/nearest_roads_request.py +++ b/stadiamaps/models/nearest_roads_request.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -33,8 +33,8 @@ class NearestRoadsRequest(BaseModel): """ NearestRoadsRequest """ # noqa: E501 - units: Optional[DistanceUnit] = None - language: Optional[ValhallaLanguages] = None + units: Optional[DistanceUnit] = DistanceUnit.KM + language: Optional[ValhallaLanguages] = ValhallaLanguages.EN_MINUS_US directions_type: Optional[StrictStr] = Field(default='instructions', description="The level of directional narrative to include. Locations and times will always be returned, but narrative generation verbosity can be controlled with this parameter.") locations: Annotated[List[Coordinate], Field(min_length=1)] costing: Optional[CostingModel] = None @@ -121,8 +121,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "units": obj.get("units"), - "language": obj.get("language"), + "units": obj.get("units") if obj.get("units") is not None else DistanceUnit.KM, + "language": obj.get("language") if obj.get("language") is not None else ValhallaLanguages.EN_MINUS_US, "directions_type": obj.get("directions_type") if obj.get("directions_type") is not None else 'instructions', "locations": [Coordinate.from_dict(_item) for _item in obj["locations"]] if obj.get("locations") is not None else None, "costing": obj.get("costing"), diff --git a/stadiamaps/models/node_id.py b/stadiamaps/models/node_id.py index 1e21513..82dd38d 100644 --- a/stadiamaps/models/node_id.py +++ b/stadiamaps/models/node_id.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/node_type.py b/stadiamaps/models/node_type.py index 1790579..0b92cc7 100644 --- a/stadiamaps/models/node_type.py +++ b/stadiamaps/models/node_type.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/optimized_route_request.py b/stadiamaps/models/optimized_route_request.py index 24339b2..0130905 100644 --- a/stadiamaps/models/optimized_route_request.py +++ b/stadiamaps/models/optimized_route_request.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -33,8 +33,8 @@ class OptimizedRouteRequest(BaseModel): """ OptimizedRouteRequest """ # noqa: E501 - units: Optional[DistanceUnit] = None - language: Optional[ValhallaLanguages] = None + units: Optional[DistanceUnit] = DistanceUnit.KM + language: Optional[ValhallaLanguages] = ValhallaLanguages.EN_MINUS_US directions_type: Optional[StrictStr] = Field(default='instructions', description="The level of directional narrative to include. Locations and times will always be returned, but narrative generation verbosity can be controlled with this parameter.") id: Optional[StrictStr] = Field(default=None, description="An identifier to disambiguate requests (echoed by the server).") locations: Annotated[List[Coordinate], Field(min_length=3)] = Field(description="The list of locations. The first and last are assumed to be the start and end points, and all intermediate points are locations that you want to visit along the way.") @@ -121,8 +121,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "units": obj.get("units"), - "language": obj.get("language"), + "units": obj.get("units") if obj.get("units") is not None else DistanceUnit.KM, + "language": obj.get("language") if obj.get("language") is not None else ValhallaLanguages.EN_MINUS_US, "directions_type": obj.get("directions_type") if obj.get("directions_type") is not None else 'instructions', "id": obj.get("id"), "locations": [Coordinate.from_dict(_item) for _item in obj["locations"]] if obj.get("locations") is not None else None, diff --git a/stadiamaps/models/pedestrian_costing_options.py b/stadiamaps/models/pedestrian_costing_options.py index 0782d52..9bbbf68 100644 --- a/stadiamaps/models/pedestrian_costing_options.py +++ b/stadiamaps/models/pedestrian_costing_options.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/pelias_geo_json_feature.py b/stadiamaps/models/pelias_geo_json_feature.py index a5b8456..39c9b07 100644 --- a/stadiamaps/models/pelias_geo_json_feature.py +++ b/stadiamaps/models/pelias_geo_json_feature.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -34,9 +34,8 @@ class PeliasGeoJSONFeature(BaseModel): geometry: GeoJSONPoint properties: Optional[PeliasGeoJSONProperties] = None bbox: Optional[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=4, max_length=4)]] = Field(default=None, description="An array of 4 floating point numbers representing the (W, S, E, N) extremes of the features found.") - id: Optional[StrictStr] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["type", "geometry", "properties", "bbox", "id"] + __properties: ClassVar[List[str]] = ["type", "geometry", "properties", "bbox"] @field_validator('type') def type_validate_enum(cls, value): @@ -112,8 +111,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "type": obj.get("type"), "geometry": GeoJSONPoint.from_dict(obj["geometry"]) if obj.get("geometry") is not None else None, "properties": PeliasGeoJSONProperties.from_dict(obj["properties"]) if obj.get("properties") is not None else None, - "bbox": obj.get("bbox"), - "id": obj.get("id") + "bbox": obj.get("bbox") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/stadiamaps/models/pelias_geo_json_properties.py b/stadiamaps/models/pelias_geo_json_properties.py index 6299a71..125e7df 100644 --- a/stadiamaps/models/pelias_geo_json_properties.py +++ b/stadiamaps/models/pelias_geo_json_properties.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -29,7 +29,7 @@ class PeliasGeoJSONProperties(BaseModel): """ PeliasGeoJSONProperties """ # noqa: E501 - gid: Optional[StrictStr] = Field(default=None, description="A scoped GID for this result. This can be passed to the place endpoint. Note that these are not always stable. For OSM, Geonames, and Who's on First, these are usually stable, but for other sources like OSM, no stability is guaranteed.") + gid: Optional[StrictStr] = Field(default=None, description="A scoped GID for this result. This can be passed to the place endpoint. Note that these are not always stable. For Geonames and Who's on First, these are usually stable, but for other sources like OSM, no stability is guaranteed.") source_id: Optional[StrictStr] = Field(default=None, description="An ID referencing the original data source (specified via source) for the result. These IDs are specific to the source that they originated from. For example, in the case of OSM, these typically look like way/123 or point/123.") label: Optional[StrictStr] = Field(default=None, description="A full, human-readable label. However, you may not necessarily want to use this; be sure to read the docs for name, locality, and region before making a decision. This field is mostly localized. The order of components is generally locally correct (ex: for an address in South Korea, the house number appears after the street name). However, components will use a request language equivalent if one exists (ex: Seoul instead of 서울 if lang=en).") layer: Optional[PeliasLayer] = None diff --git a/stadiamaps/models/pelias_geo_json_properties_addendum.py b/stadiamaps/models/pelias_geo_json_properties_addendum.py index 234c268..b305413 100644 --- a/stadiamaps/models/pelias_geo_json_properties_addendum.py +++ b/stadiamaps/models/pelias_geo_json_properties_addendum.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/pelias_geo_json_properties_addendum_osm.py b/stadiamaps/models/pelias_geo_json_properties_addendum_osm.py index 3756430..94485f9 100644 --- a/stadiamaps/models/pelias_geo_json_properties_addendum_osm.py +++ b/stadiamaps/models/pelias_geo_json_properties_addendum_osm.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/pelias_layer.py b/stadiamaps/models/pelias_layer.py index 6c6ea11..fd4ce23 100644 --- a/stadiamaps/models/pelias_layer.py +++ b/stadiamaps/models/pelias_layer.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/pelias_response.py b/stadiamaps/models/pelias_response.py index 3af3b75..09673dc 100644 --- a/stadiamaps/models/pelias_response.py +++ b/stadiamaps/models/pelias_response.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/pelias_source.py b/stadiamaps/models/pelias_source.py index 317654d..8bf0013 100644 --- a/stadiamaps/models/pelias_source.py +++ b/stadiamaps/models/pelias_source.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/restrictions.py b/stadiamaps/models/restrictions.py index 98f3892..deae6cf 100644 --- a/stadiamaps/models/restrictions.py +++ b/stadiamaps/models/restrictions.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/road_class.py b/stadiamaps/models/road_class.py index af53c11..b5de0f6 100644 --- a/stadiamaps/models/road_class.py +++ b/stadiamaps/models/road_class.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/route_leg.py b/stadiamaps/models/route_leg.py index 2ed757e..eecd669 100644 --- a/stadiamaps/models/route_leg.py +++ b/stadiamaps/models/route_leg.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -33,7 +33,7 @@ class RouteLeg(BaseModel): maneuvers: Annotated[List[RouteManeuver], Field(min_length=1)] shape: StrictStr = Field(description="An encoded polyline (https://developers.google.com/maps/documentation/utilities/polylinealgorithm) with 6 digits of decimal precision.") summary: RouteSummary - elevation_interval: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The sampling distance between elevation values along the route. This echoes the request parameter having the same name.") + elevation_interval: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The sampling distance between elevation values along the route. This echoes the request parameter having the same name (converted to `units` if necessary).") elevation: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="An array of elevation values sampled every `elevation_interval`. Units are either metric or imperial depending on the value of `units`.") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["maneuvers", "shape", "summary", "elevation_interval", "elevation"] diff --git a/stadiamaps/models/route_maneuver.py b/stadiamaps/models/route_maneuver.py index 71882cb..bd61b93 100644 --- a/stadiamaps/models/route_maneuver.py +++ b/stadiamaps/models/route_maneuver.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/route_request.py b/stadiamaps/models/route_request.py index a4ce80d..56c0518 100644 --- a/stadiamaps/models/route_request.py +++ b/stadiamaps/models/route_request.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -33,8 +33,8 @@ class RouteRequest(BaseModel): """ RouteRequest """ # noqa: E501 - units: Optional[DistanceUnit] = None - language: Optional[ValhallaLanguages] = None + units: Optional[DistanceUnit] = DistanceUnit.KM + language: Optional[ValhallaLanguages] = ValhallaLanguages.EN_MINUS_US directions_type: Optional[StrictStr] = Field(default='instructions', description="The level of directional narrative to include. Locations and times will always be returned, but narrative generation verbosity can be controlled with this parameter.") id: Optional[StrictStr] = Field(default=None, description="An identifier to disambiguate requests (echoed by the server).") locations: Annotated[List[RoutingWaypoint], Field(min_length=2)] @@ -133,8 +133,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "units": obj.get("units"), - "language": obj.get("language"), + "units": obj.get("units") if obj.get("units") is not None else DistanceUnit.KM, + "language": obj.get("language") if obj.get("language") is not None else ValhallaLanguages.EN_MINUS_US, "directions_type": obj.get("directions_type") if obj.get("directions_type") is not None else 'instructions', "id": obj.get("id"), "locations": [RoutingWaypoint.from_dict(_item) for _item in obj["locations"]] if obj.get("locations") is not None else None, diff --git a/stadiamaps/models/route_response.py b/stadiamaps/models/route_response.py index 5ae3758..ea5dd70 100644 --- a/stadiamaps/models/route_response.py +++ b/stadiamaps/models/route_response.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/route_response_alternates_inner.py b/stadiamaps/models/route_response_alternates_inner.py index f3d0759..bdb28c7 100644 --- a/stadiamaps/models/route_response_alternates_inner.py +++ b/stadiamaps/models/route_response_alternates_inner.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/route_summary.py b/stadiamaps/models/route_summary.py index 0d37cac..b9bdc7e 100644 --- a/stadiamaps/models/route_summary.py +++ b/stadiamaps/models/route_summary.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/route_trip.py b/stadiamaps/models/route_trip.py index 222d8cc..ed3a690 100644 --- a/stadiamaps/models/route_trip.py +++ b/stadiamaps/models/route_trip.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -119,8 +119,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "status": obj.get("status"), "status_message": obj.get("status_message"), - "units": obj.get("units"), - "language": obj.get("language"), + "units": obj.get("units") if obj.get("units") is not None else ValhallaLongUnits.KILOMETERS, + "language": obj.get("language") if obj.get("language") is not None else ValhallaLanguages.EN_MINUS_US, "locations": [RoutingResponseWaypoint.from_dict(_item) for _item in obj["locations"]] if obj.get("locations") is not None else None, "legs": [RouteLeg.from_dict(_item) for _item in obj["legs"]] if obj.get("legs") is not None else None, "summary": RouteSummary.from_dict(obj["summary"]) if obj.get("summary") is not None else None diff --git a/stadiamaps/models/routing_response_waypoint.py b/stadiamaps/models/routing_response_waypoint.py index 098e084..9fcb5ee 100644 --- a/stadiamaps/models/routing_response_waypoint.py +++ b/stadiamaps/models/routing_response_waypoint.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/routing_waypoint.py b/stadiamaps/models/routing_waypoint.py index 0539659..891cbb4 100644 --- a/stadiamaps/models/routing_waypoint.py +++ b/stadiamaps/models/routing_waypoint.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/routing_waypoint_all_of_search_filter.py b/stadiamaps/models/routing_waypoint_all_of_search_filter.py index b329ef4..f6e68de 100644 --- a/stadiamaps/models/routing_waypoint_all_of_search_filter.py +++ b/stadiamaps/models/routing_waypoint_all_of_search_filter.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/search_bulk_query.py b/stadiamaps/models/search_bulk_query.py new file mode 100644 index 0000000..7300a40 --- /dev/null +++ b/stadiamaps/models/search_bulk_query.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Stadia Maps Geospatial APIs + + The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. + + The version of the OpenAPI document: 6.6.2 + Contact: support@stadiamaps.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from stadiamaps.models.search_query import SearchQuery +from typing import Optional, Set +from typing_extensions import Self + +class SearchBulkQuery(BaseModel): + """ + SearchBulkQuery + """ # noqa: E501 + endpoint: Optional[StrictStr] = None + query: Optional[SearchQuery] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["endpoint", "query"] + + @field_validator('endpoint') + def endpoint_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['/v1/search']): + raise ValueError("must be one of enum values ('/v1/search')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SearchBulkQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of query + if self.query: + _dict['query'] = self.query.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SearchBulkQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "endpoint": obj.get("endpoint"), + "query": SearchQuery.from_dict(obj["query"]) if obj.get("query") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/stadiamaps/models/search_bulk_request.py b/stadiamaps/models/search_bulk_request.py new file mode 100644 index 0000000..869de13 --- /dev/null +++ b/stadiamaps/models/search_bulk_request.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Stadia Maps Geospatial APIs + + The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. + + The version of the OpenAPI document: 6.6.2 + Contact: support@stadiamaps.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from stadiamaps.models.search_bulk_query import SearchBulkQuery +from stadiamaps.models.search_structured_bulk_query import SearchStructuredBulkQuery +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +SEARCHBULKREQUEST_ONE_OF_SCHEMAS = ["SearchBulkQuery", "SearchStructuredBulkQuery"] + +class SearchBulkRequest(BaseModel): + """ + SearchBulkRequest + """ + # data type: SearchBulkQuery + oneof_schema_1_validator: Optional[SearchBulkQuery] = None + # data type: SearchStructuredBulkQuery + oneof_schema_2_validator: Optional[SearchStructuredBulkQuery] = None + actual_instance: Optional[Union[SearchBulkQuery, SearchStructuredBulkQuery]] = None + one_of_schemas: Set[str] = { "SearchBulkQuery", "SearchStructuredBulkQuery" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = SearchBulkRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: SearchBulkQuery + if not isinstance(v, SearchBulkQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `SearchBulkQuery`") + else: + match += 1 + # validate data type: SearchStructuredBulkQuery + if not isinstance(v, SearchStructuredBulkQuery): + error_messages.append(f"Error! Input type `{type(v)}` is not `SearchStructuredBulkQuery`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in SearchBulkRequest with oneOf schemas: SearchBulkQuery, SearchStructuredBulkQuery. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in SearchBulkRequest with oneOf schemas: SearchBulkQuery, SearchStructuredBulkQuery. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into SearchBulkQuery + try: + instance.actual_instance = SearchBulkQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into SearchStructuredBulkQuery + try: + instance.actual_instance = SearchStructuredBulkQuery.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into SearchBulkRequest with oneOf schemas: SearchBulkQuery, SearchStructuredBulkQuery. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into SearchBulkRequest with oneOf schemas: SearchBulkQuery, SearchStructuredBulkQuery. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], SearchBulkQuery, SearchStructuredBulkQuery]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/stadiamaps/models/search_query.py b/stadiamaps/models/search_query.py new file mode 100644 index 0000000..1e24107 --- /dev/null +++ b/stadiamaps/models/search_query.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + Stadia Maps Geospatial APIs + + The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. + + The version of the OpenAPI document: 6.6.2 + Contact: support@stadiamaps.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from stadiamaps.models.pelias_layer import PeliasLayer +from stadiamaps.models.pelias_source import PeliasSource +from typing import Optional, Set +from typing_extensions import Self + +class SearchQuery(BaseModel): + """ + SearchQuery + """ # noqa: E501 + text: Optional[StrictStr] = Field(default=None, description="The place name (address, venue name, etc.) to search for.") + focus_point_lat: Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]] = Field(default=None, description="The latitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lon`.", alias="focus.point.lat") + focus_point_lon: Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]] = Field(default=None, description="The longitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lat`.", alias="focus.point.lon") + boundary_rect_min_lat: Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]] = Field(default=None, description="Defines the min latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.", alias="boundary.rect.min_lat") + boundary_rect_max_lat: Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]] = Field(default=None, description="Defines the max latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.", alias="boundary.rect.max_lat") + boundary_rect_min_lon: Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]] = Field(default=None, description="Defines the min longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.", alias="boundary.rect.min_lon") + boundary_rect_max_lon: Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]] = Field(default=None, description="Defines the max longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.", alias="boundary.rect.max_lon") + boundary_circle_lat: Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]] = Field(default=None, description="The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`.", alias="boundary.circle.lat") + boundary_circle_lon: Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]] = Field(default=None, description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.", alias="boundary.circle.lon") + boundary_circle_radius: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.", alias="boundary.circle.radius") + boundary_country: Optional[List[StrictStr]] = Field(default=None, 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.", alias="boundary.country") + boundary_gid: Optional[StrictStr] = Field(default=None, description="The Pelias GID of an area to limit the search to.", alias="boundary.gid") + layers: Optional[List[PeliasLayer]] = Field(default=None, description="A list of layers to limit the search to.") + sources: Optional[List[PeliasSource]] = Field(default=None, description="A list of sources to limit the search to.") + size: Optional[StrictInt] = Field(default=None, description="The maximum number of results to return.") + lang: Optional[StrictStr] = Field(default=None, 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.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["text", "focus.point.lat", "focus.point.lon", "boundary.rect.min_lat", "boundary.rect.max_lat", "boundary.rect.min_lon", "boundary.rect.max_lon", "boundary.circle.lat", "boundary.circle.lon", "boundary.circle.radius", "boundary.country", "boundary.gid", "layers", "sources", "size", "lang"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SearchQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SearchQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "text": obj.get("text"), + "focus.point.lat": obj.get("focus.point.lat"), + "focus.point.lon": obj.get("focus.point.lon"), + "boundary.rect.min_lat": obj.get("boundary.rect.min_lat"), + "boundary.rect.max_lat": obj.get("boundary.rect.max_lat"), + "boundary.rect.min_lon": obj.get("boundary.rect.min_lon"), + "boundary.rect.max_lon": obj.get("boundary.rect.max_lon"), + "boundary.circle.lat": obj.get("boundary.circle.lat"), + "boundary.circle.lon": obj.get("boundary.circle.lon"), + "boundary.circle.radius": obj.get("boundary.circle.radius"), + "boundary.country": obj.get("boundary.country"), + "boundary.gid": obj.get("boundary.gid"), + "layers": obj.get("layers"), + "sources": obj.get("sources"), + "size": obj.get("size"), + "lang": obj.get("lang") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/stadiamaps/models/search_structured_bulk_query.py b/stadiamaps/models/search_structured_bulk_query.py new file mode 100644 index 0000000..4133d54 --- /dev/null +++ b/stadiamaps/models/search_structured_bulk_query.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Stadia Maps Geospatial APIs + + The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. + + The version of the OpenAPI document: 6.6.2 + Contact: support@stadiamaps.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from stadiamaps.models.search_structured_query import SearchStructuredQuery +from typing import Optional, Set +from typing_extensions import Self + +class SearchStructuredBulkQuery(BaseModel): + """ + SearchStructuredBulkQuery + """ # noqa: E501 + endpoint: Optional[StrictStr] = None + query: Optional[SearchStructuredQuery] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["endpoint", "query"] + + @field_validator('endpoint') + def endpoint_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['/v1/search/structured']): + raise ValueError("must be one of enum values ('/v1/search/structured')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SearchStructuredBulkQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of query + if self.query: + _dict['query'] = self.query.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SearchStructuredBulkQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "endpoint": obj.get("endpoint"), + "query": SearchStructuredQuery.from_dict(obj["query"]) if obj.get("query") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/stadiamaps/models/search_structured_query.py b/stadiamaps/models/search_structured_query.py new file mode 100644 index 0000000..5001832 --- /dev/null +++ b/stadiamaps/models/search_structured_query.py @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" + Stadia Maps Geospatial APIs + + The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. + + The version of the OpenAPI document: 6.6.2 + Contact: support@stadiamaps.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from stadiamaps.models.pelias_layer import PeliasLayer +from stadiamaps.models.pelias_source import PeliasSource +from typing import Optional, Set +from typing_extensions import Self + +class SearchStructuredQuery(BaseModel): + """ + SearchStructuredQuery + """ # noqa: E501 + address: Optional[StrictStr] = Field(default=None, description="A street name, optionally with a house number.") + neighbourhood: Optional[StrictStr] = Field(default=None, description="Varies by area, but has a locally specific meaning (NOT always an official administrative unit).") + borough: Optional[StrictStr] = Field(default=None, description="A unit within a city (not widely used, but present in places like NYC and Mexico City).") + locality: Optional[StrictStr] = Field(default=None, description="The city, village, town, etc. that the place/address is part of.") + county: Optional[StrictStr] = Field(default=None, description="Administrative divisions between localities and regions. Not commonly used as input to structured geocoding.") + region: Optional[StrictStr] = Field(default=None, description="Typically the first administrative division within a country. For example, a US state or a Canadian province.") + postal_code: Optional[StrictStr] = Field(default=None, description="A mail sorting code.", alias="postalCode") + country: Optional[StrictStr] = Field(default=None, description="A full name (ex: Canada), or a 2 or 3 character ISO code. Prefer ISO codes when possible.") + focus_point_lat: Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]] = Field(default=None, description="The latitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lon`.", alias="focus.point.lat") + focus_point_lon: Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]] = Field(default=None, description="The longitude of the point to focus the search on. This will bias results toward the focus point. Requires `focus.point.lat`.", alias="focus.point.lon") + boundary_rect_min_lat: Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]] = Field(default=None, description="Defines the min latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.", alias="boundary.rect.min_lat") + boundary_rect_max_lat: Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]] = Field(default=None, description="Defines the max latitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.", alias="boundary.rect.max_lat") + boundary_rect_min_lon: Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]] = Field(default=None, description="Defines the min longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.", alias="boundary.rect.min_lon") + boundary_rect_max_lon: Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]] = Field(default=None, description="Defines the max longitude component of a bounding box to limit the search to. Requires all other `boundary.rect` parameters to be specified.", alias="boundary.rect.max_lon") + boundary_circle_lat: Optional[Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]]] = Field(default=None, description="The latitude of the center of a circle to limit the search to. Requires `boundary.circle.lon`.", alias="boundary.circle.lat") + boundary_circle_lon: Optional[Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]]] = Field(default=None, description="The longitude of the center of a circle to limit the search to. Requires `boundary.circle.lat`.", alias="boundary.circle.lon") + boundary_circle_radius: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The radius of the circle (in kilometers) to limit the search to. Defaults to 50km if unspecified.", alias="boundary.circle.radius") + boundary_country: Optional[List[StrictStr]] = Field(default=None, 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.", alias="boundary.country") + boundary_gid: Optional[StrictStr] = Field(default=None, description="The Pelias GID of an area to limit the search to.", alias="boundary.gid") + layers: Optional[List[PeliasLayer]] = Field(default=None, description="A list of layers to limit the search to.") + sources: Optional[List[PeliasSource]] = Field(default=None, description="A list of sources to limit the search to.") + size: Optional[StrictInt] = Field(default=None, description="The maximum number of results to return.") + lang: Optional[StrictStr] = Field(default=None, 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.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["address", "neighbourhood", "borough", "locality", "county", "region", "postalCode", "country", "focus.point.lat", "focus.point.lon", "boundary.rect.min_lat", "boundary.rect.max_lat", "boundary.rect.min_lon", "boundary.rect.max_lon", "boundary.circle.lat", "boundary.circle.lon", "boundary.circle.radius", "boundary.country", "boundary.gid", "layers", "sources", "size", "lang"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SearchStructuredQuery from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SearchStructuredQuery from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "address": obj.get("address"), + "neighbourhood": obj.get("neighbourhood"), + "borough": obj.get("borough"), + "locality": obj.get("locality"), + "county": obj.get("county"), + "region": obj.get("region"), + "postalCode": obj.get("postalCode"), + "country": obj.get("country"), + "focus.point.lat": obj.get("focus.point.lat"), + "focus.point.lon": obj.get("focus.point.lon"), + "boundary.rect.min_lat": obj.get("boundary.rect.min_lat"), + "boundary.rect.max_lat": obj.get("boundary.rect.max_lat"), + "boundary.rect.min_lon": obj.get("boundary.rect.min_lon"), + "boundary.rect.max_lon": obj.get("boundary.rect.max_lon"), + "boundary.circle.lat": obj.get("boundary.circle.lat"), + "boundary.circle.lon": obj.get("boundary.circle.lon"), + "boundary.circle.radius": obj.get("boundary.circle.radius"), + "boundary.country": obj.get("boundary.country"), + "boundary.gid": obj.get("boundary.gid"), + "layers": obj.get("layers"), + "sources": obj.get("sources"), + "size": obj.get("size"), + "lang": obj.get("lang") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/stadiamaps/models/simple_routing_waypoint.py b/stadiamaps/models/simple_routing_waypoint.py index 40f8203..8d0c157 100644 --- a/stadiamaps/models/simple_routing_waypoint.py +++ b/stadiamaps/models/simple_routing_waypoint.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/speeds.py b/stadiamaps/models/speeds.py index 954d152..cebc5f7 100644 --- a/stadiamaps/models/speeds.py +++ b/stadiamaps/models/speeds.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/trace_attribute_filter_options.py b/stadiamaps/models/trace_attribute_filter_options.py index d6280ed..a3eb599 100644 --- a/stadiamaps/models/trace_attribute_filter_options.py +++ b/stadiamaps/models/trace_attribute_filter_options.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/trace_attribute_key.py b/stadiamaps/models/trace_attribute_key.py index 86b75b2..e810ead 100644 --- a/stadiamaps/models/trace_attribute_key.py +++ b/stadiamaps/models/trace_attribute_key.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/trace_attributes_base_response.py b/stadiamaps/models/trace_attributes_base_response.py index 2bb102f..bc55e90 100644 --- a/stadiamaps/models/trace_attributes_base_response.py +++ b/stadiamaps/models/trace_attributes_base_response.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/trace_attributes_request.py b/stadiamaps/models/trace_attributes_request.py index b4f38d8..9fa6ff0 100644 --- a/stadiamaps/models/trace_attributes_request.py +++ b/stadiamaps/models/trace_attributes_request.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -39,8 +39,8 @@ class TraceAttributesRequest(BaseModel): costing: MapMatchCostingModel costing_options: Optional[CostingOptions] = None shape_match: Optional[StrictStr] = Field(default=None, description="Three snapping modes provide some control over how the map matching occurs. `edge_walk` is fast, but requires extremely precise data that matches the route graph almost perfectly. `map_snap` can handle significantly noisier data, but is very expensive. `walk_or_snap`, the default, tries to use edge walking first and falls back to map matching if edge walking fails. In general, you should not need to change this parameter unless you want to trace a multi-leg route with multiple `break` locations in the `shape`.") - units: Optional[DistanceUnit] = None - language: Optional[ValhallaLanguages] = None + units: Optional[DistanceUnit] = DistanceUnit.KM + language: Optional[ValhallaLanguages] = ValhallaLanguages.EN_MINUS_US directions_type: Optional[StrictStr] = Field(default='instructions', description="The level of directional narrative to include. Locations and times will always be returned, but narrative generation verbosity can be controlled with this parameter.") filters: Optional[TraceAttributeFilterOptions] = Field(default=None, description="If present, provides either a whitelist or a blacklist of keys to include/exclude in the response. This key is optional, and if omitted from the request, all available info will be returned.") additional_properties: Dict[str, Any] = {} @@ -143,8 +143,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "costing": obj.get("costing"), "costing_options": CostingOptions.from_dict(obj["costing_options"]) if obj.get("costing_options") is not None else None, "shape_match": obj.get("shape_match"), - "units": obj.get("units"), - "language": obj.get("language"), + "units": obj.get("units") if obj.get("units") is not None else DistanceUnit.KM, + "language": obj.get("language") if obj.get("language") is not None else ValhallaLanguages.EN_MINUS_US, "directions_type": obj.get("directions_type") if obj.get("directions_type") is not None else 'instructions', "filters": TraceAttributeFilterOptions.from_dict(obj["filters"]) if obj.get("filters") is not None else None }) diff --git a/stadiamaps/models/trace_attributes_response.py b/stadiamaps/models/trace_attributes_response.py index bbd0082..e1ef856 100644 --- a/stadiamaps/models/trace_attributes_response.py +++ b/stadiamaps/models/trace_attributes_response.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -40,7 +40,7 @@ class TraceAttributesResponse(BaseModel): shape: Optional[StrictStr] = Field(default=None, description="The encoded polyline (https://developers.google.com/maps/documentation/utilities/polylinealgorithm) of the matched path.") confidence_score: Optional[Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = None id: Optional[StrictStr] = Field(default=None, description="An identifier to disambiguate requests (echoed by the server).") - units: Optional[ValhallaLongUnits] = None + units: Optional[ValhallaLongUnits] = ValhallaLongUnits.KILOMETERS alternate_paths: Optional[List[TraceAttributesBaseResponse]] = Field(default=None, description="Alternate paths, if any, that were not classified as the best match.") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["edges", "admins", "matched_points", "osm_changeset", "shape", "confidence_score", "id", "units", "alternate_paths"] @@ -138,7 +138,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "shape": obj.get("shape"), "confidence_score": obj.get("confidence_score"), "id": obj.get("id"), - "units": obj.get("units"), + "units": obj.get("units") if obj.get("units") is not None else ValhallaLongUnits.KILOMETERS, "alternate_paths": [TraceAttributesBaseResponse.from_dict(_item) for _item in obj["alternate_paths"]] if obj.get("alternate_paths") is not None else None }) # store additional fields in additional_properties diff --git a/stadiamaps/models/trace_edge.py b/stadiamaps/models/trace_edge.py index 1bdd2ad..e32eb5a 100644 --- a/stadiamaps/models/trace_edge.py +++ b/stadiamaps/models/trace_edge.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/travel_mode.py b/stadiamaps/models/travel_mode.py index 9d551fb..82ce547 100644 --- a/stadiamaps/models/travel_mode.py +++ b/stadiamaps/models/travel_mode.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/traversability.py b/stadiamaps/models/traversability.py index 15d32cb..90e9ed3 100644 --- a/stadiamaps/models/traversability.py +++ b/stadiamaps/models/traversability.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/truck_costing_options.py b/stadiamaps/models/truck_costing_options.py index 811a63f..db0e5d1 100644 --- a/stadiamaps/models/truck_costing_options.py +++ b/stadiamaps/models/truck_costing_options.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/tz_response.py b/stadiamaps/models/tz_response.py index 4d81fde..c3be9c9 100644 --- a/stadiamaps/models/tz_response.py +++ b/stadiamaps/models/tz_response.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/valhalla_languages.py b/stadiamaps/models/valhalla_languages.py index b320b30..0aa5b8f 100644 --- a/stadiamaps/models/valhalla_languages.py +++ b/stadiamaps/models/valhalla_languages.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/valhalla_long_units.py b/stadiamaps/models/valhalla_long_units.py index 14906e7..721069f 100644 --- a/stadiamaps/models/valhalla_long_units.py +++ b/stadiamaps/models/valhalla_long_units.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/models/warning.py b/stadiamaps/models/warning.py index 3cf2446..887495e 100644 --- a/stadiamaps/models/warning.py +++ b/stadiamaps/models/warning.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/stadiamaps/rest.py b/stadiamaps/rest.py index 97b4205..e1546e0 100644 --- a/stadiamaps/rest.py +++ b/stadiamaps/rest.py @@ -5,7 +5,7 @@ The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. - The version of the OpenAPI document: 6.3.0 + The version of the OpenAPI document: 6.6.2 Contact: support@stadiamaps.com Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/test/integration/test_gecoding.py b/test/integration/test_gecoding.py index d57a29c..53b224f 100644 --- a/test/integration/test_gecoding.py +++ b/test/integration/test_gecoding.py @@ -50,7 +50,8 @@ def testReverseWithLayerFilter(self): with stadiamaps.ApiClient(self.configuration) as api_client: api_instance = stadiamaps.GeocodingApi(api_client) - res = api_instance.reverse(59.444351, 24.750645, layers=[stadiamaps.PeliasLayer.ADDRESS, stadiamaps.PeliasLayer.OCEAN]) + res = api_instance.reverse(59.444351, 24.750645, + layers=[stadiamaps.PeliasLayer.ADDRESS, stadiamaps.PeliasLayer.OCEAN]) self.assertEqual("Estonia", res.features[0].properties.country) self.assertEqual("address", res.features[0].properties.layer) @@ -70,3 +71,24 @@ def testPlace(self): self.assertEqual(1, len(res.features)) self.assertEqual("Estonia", res.features[0].properties.country) self.assertEqual("address", res.features[0].properties.layer) + + def testBulk(self): + with stadiamaps.ApiClient(self.configuration) as api_client: + api_instance = stadiamaps.GeocodingApi(api_client) + + res = api_instance.search_bulk([ + stadiamaps.BulkRequest( + stadiamaps.SearchBulkQuery(endpoint="/v1/search", query=stadiamaps.SearchQuery(text=address))), + stadiamaps.BulkRequest(stadiamaps.SearchStructuredBulkQuery(endpoint="/v1/search/structured", + query=stadiamaps.SearchStructuredQuery( + address=address, + country="EE", layers=[ + stadiamaps.PeliasLayer.COARSE, + stadiamaps.PeliasLayer.ADDRESS], ))), + ]) + + self.assertEqual(2, len(res)) + for rec in res: + self.assertEqual(200, rec.status) + self.assertEqual("Estonia", rec.response.features[0].properties.country) + self.assertEqual("address", rec.response.features[0].properties.layer) diff --git a/test/test_bulk_request.py b/test/test_bulk_request.py new file mode 100644 index 0000000..bc5c473 --- /dev/null +++ b/test/test_bulk_request.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Stadia Maps Geospatial APIs + + The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. + + The version of the OpenAPI document: 6.6.0 + Contact: support@stadiamaps.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from stadiamaps.models.bulk_request import BulkRequest + +class TestBulkRequest(unittest.TestCase): + """BulkRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BulkRequest: + """Test BulkRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BulkRequest` + """ + model = BulkRequest() + if include_optional: + return BulkRequest( + endpoint = '/v1/search/structured', + query = stadiamaps.models.search_structured_query.searchStructuredQuery( + address = '11 Wall Street', + neighbourhood = 'Financial District', + borough = 'Manhattan', + locality = 'New York', + county = 'New York County', + region = 'New York', + postal_code = '10005', + country = 'USA', + focus/point/lat = -90, + focus/point/lon = -180, + boundary/rect/min_lat = -90, + boundary/rect/max_lat = -90, + boundary/rect/min_lon = -180, + boundary/rect/max_lon = -180, + boundary/circle/lat = -90, + boundary/circle/lon = -180, + boundary/circle/radius = 1.337, + boundary/country = [ + '' + ], + boundary/gid = '', + layers = [ + 'venue' + ], + sources = [ + 'openstreetmap' + ], + size = 56, + lang = '', ) + ) + else: + return BulkRequest( + ) + """ + + def testBulkRequest(self): + """Test BulkRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_bulk_search_request_inner.py b/test/test_bulk_search_request_inner.py new file mode 100644 index 0000000..5cd02f5 --- /dev/null +++ b/test/test_bulk_search_request_inner.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Stadia Maps Geospatial APIs + + The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. + + The version of the OpenAPI document: 6.6.2 + Contact: support@stadiamaps.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from stadiamaps.models.bulk_search_request_inner import BulkSearchRequestInner + +class TestBulkSearchRequestInner(unittest.TestCase): + """BulkSearchRequestInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BulkSearchRequestInner: + """Test BulkSearchRequestInner + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BulkSearchRequestInner` + """ + model = BulkSearchRequestInner() + if include_optional: + return BulkSearchRequestInner( + endpoint = '/v1/search/structured', + query = stadiamaps.models.search_structured_query.searchStructuredQuery( + address = '11 Wall Street', + neighbourhood = 'Financial District', + borough = 'Manhattan', + locality = 'New York', + county = 'New York County', + region = 'New York', + postal_code = '10005', + country = 'USA', + focus/point/lat = -90, + focus/point/lon = -180, + boundary/rect/min_lat = -90, + boundary/rect/max_lat = -90, + boundary/rect/min_lon = -180, + boundary/rect/max_lon = -180, + boundary/circle/lat = -90, + boundary/circle/lon = -180, + boundary/circle/radius = 1.337, + boundary/country = [ + '' + ], + boundary/gid = '', + layers = [ + 'venue' + ], + sources = [ + 'openstreetmap' + ], + size = 56, + lang = '', ) + ) + else: + return BulkSearchRequestInner( + ) + """ + + def testBulkSearchRequestInner(self): + """Test BulkSearchRequestInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_bulk_search_response.py b/test/test_bulk_search_response.py new file mode 100644 index 0000000..d28dccd --- /dev/null +++ b/test/test_bulk_search_response.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Stadia Maps Geospatial APIs + + The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. + + The version of the OpenAPI document: 6.6.0 + Contact: support@stadiamaps.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from stadiamaps.models.bulk_search_response import BulkSearchResponse + +class TestBulkSearchResponse(unittest.TestCase): + """BulkSearchResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BulkSearchResponse: + """Test BulkSearchResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BulkSearchResponse` + """ + model = BulkSearchResponse() + if include_optional: + return BulkSearchResponse( + status = 56, + response = {"geocoding":{"version":"0.2","attribution":"https://stadiamaps.com/attribution","query":{"text":"1600 Pennsylvania Ave NW","size":10,"private":false,"lang":{"name":"English","iso6391":"en","iso6393":"eng","via":"default","defaulted":true},"querySize":20,"parser":"libpostal","parsed_text":{"housenumber":"1600","street":"pennsylvania ave nw"}},"engine":{"name":"Pelias","author":"Mapzen","version":"1.0"},"timestamp":1679043782383},"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Point","coordinates":[-77.036547,38.897675]},"properties":{"id":"us/dc/statewide:aa53d4bd0fe295be","gid":"openaddresses:address:us/dc/statewide:aa53d4bd0fe295be","layer":"address","source":"openaddresses","source_id":"us/dc/statewide:aa53d4bd0fe295be","country_code":"US","name":"1600 Pennsylvania Avenue NW","housenumber":"1600","street":"Pennsylvania Avenue NW","postalcode":"20500","confidence":1,"match_type":"exact","accuracy":"point","country":"United States","country_gid":"whosonfirst:country:85633793","country_a":"USA","region":"District of Columbia","region_gid":"whosonfirst:region:85688741","region_a":"DC","county":"District of Columbia","county_gid":"whosonfirst:county:1377370667","county_a":"DI","locality":"Washington","locality_gid":"whosonfirst:locality:85931779","neighbourhood":"White House Grounds","neighbourhood_gid":"whosonfirst:neighbourhood:1108724059","continent":"North America","continent_gid":"whosonfirst:continent:102191575","label":"1600 Pennsylvania Avenue NW, Washington, DC, USA"}}],"bbox":[-77.036547,38.897675,-77.036547,38.897675]}, + msg = '' + ) + else: + return BulkSearchResponse( + status = 56, + ) + """ + + def testBulkSearchResponse(self): + """Test BulkSearchResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_search_bulk_query.py b/test/test_search_bulk_query.py new file mode 100644 index 0000000..5793b77 --- /dev/null +++ b/test/test_search_bulk_query.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + Stadia Maps Geospatial APIs + + The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. + + The version of the OpenAPI document: 6.6.0 + Contact: support@stadiamaps.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from stadiamaps.models.search_bulk_query import SearchBulkQuery + +class TestSearchBulkQuery(unittest.TestCase): + """SearchBulkQuery unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SearchBulkQuery: + """Test SearchBulkQuery + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SearchBulkQuery` + """ + model = SearchBulkQuery() + if include_optional: + return SearchBulkQuery( + endpoint = '/v1/search', + query = stadiamaps.models.search_query.searchQuery( + text = '1600 Pennsylvania Ave NW', + focus/point/lat = -90, + focus/point/lon = -180, + boundary/rect/min_lat = -90, + boundary/rect/max_lat = -90, + boundary/rect/min_lon = -180, + boundary/rect/max_lon = -180, + boundary/circle/lat = -90, + boundary/circle/lon = -180, + boundary/circle/radius = 1.337, + boundary/country = [ + '' + ], + boundary/gid = '', + layers = [ + 'venue' + ], + sources = [ + 'openstreetmap' + ], + size = 56, + lang = '', ) + ) + else: + return SearchBulkQuery( + ) + """ + + def testSearchBulkQuery(self): + """Test SearchBulkQuery""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_search_bulk_request.py b/test/test_search_bulk_request.py new file mode 100644 index 0000000..17863e7 --- /dev/null +++ b/test/test_search_bulk_request.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Stadia Maps Geospatial APIs + + The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. + + The version of the OpenAPI document: 6.6.2 + Contact: support@stadiamaps.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from stadiamaps.models.search_bulk_request import SearchBulkRequest + +class TestSearchBulkRequest(unittest.TestCase): + """SearchBulkRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SearchBulkRequest: + """Test SearchBulkRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SearchBulkRequest` + """ + model = SearchBulkRequest() + if include_optional: + return SearchBulkRequest( + endpoint = '/v1/search/structured', + query = stadiamaps.models.search_structured_query.searchStructuredQuery( + address = '11 Wall Street', + neighbourhood = 'Financial District', + borough = 'Manhattan', + locality = 'New York', + county = 'New York County', + region = 'New York', + postal_code = '10005', + country = 'USA', + focus/point/lat = -90, + focus/point/lon = -180, + boundary/rect/min_lat = -90, + boundary/rect/max_lat = -90, + boundary/rect/min_lon = -180, + boundary/rect/max_lon = -180, + boundary/circle/lat = -90, + boundary/circle/lon = -180, + boundary/circle/radius = 1.337, + boundary/country = [ + '' + ], + boundary/gid = '', + layers = [ + 'venue' + ], + sources = [ + 'openstreetmap' + ], + size = 56, + lang = '', ) + ) + else: + return SearchBulkRequest( + ) + """ + + def testSearchBulkRequest(self): + """Test SearchBulkRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_search_query.py b/test/test_search_query.py new file mode 100644 index 0000000..57d5765 --- /dev/null +++ b/test/test_search_query.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + Stadia Maps Geospatial APIs + + The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. + + The version of the OpenAPI document: 6.6.0 + Contact: support@stadiamaps.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from stadiamaps.models.search_query import SearchQuery + +class TestSearchQuery(unittest.TestCase): + """SearchQuery unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SearchQuery: + """Test SearchQuery + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SearchQuery` + """ + model = SearchQuery() + if include_optional: + return SearchQuery( + text = '1600 Pennsylvania Ave NW', + focus_point_lat = -90, + focus_point_lon = -180, + boundary_rect_min_lat = -90, + boundary_rect_max_lat = -90, + boundary_rect_min_lon = -180, + boundary_rect_max_lon = -180, + boundary_circle_lat = -90, + boundary_circle_lon = -180, + boundary_circle_radius = 1.337, + boundary_country = [ + '' + ], + boundary_gid = '', + layers = [ + 'venue' + ], + sources = [ + 'openstreetmap' + ], + size = 56, + lang = '' + ) + else: + return SearchQuery( + ) + """ + + def testSearchQuery(self): + """Test SearchQuery""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_search_structured_bulk_query.py b/test/test_search_structured_bulk_query.py new file mode 100644 index 0000000..18d6eb4 --- /dev/null +++ b/test/test_search_structured_bulk_query.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Stadia Maps Geospatial APIs + + The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. + + The version of the OpenAPI document: 6.6.0 + Contact: support@stadiamaps.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from stadiamaps.models.search_structured_bulk_query import SearchStructuredBulkQuery + +class TestSearchStructuredBulkQuery(unittest.TestCase): + """SearchStructuredBulkQuery unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SearchStructuredBulkQuery: + """Test SearchStructuredBulkQuery + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SearchStructuredBulkQuery` + """ + model = SearchStructuredBulkQuery() + if include_optional: + return SearchStructuredBulkQuery( + endpoint = '/v1/search/structured', + query = stadiamaps.models.search_structured_query.searchStructuredQuery( + address = '11 Wall Street', + neighbourhood = 'Financial District', + borough = 'Manhattan', + locality = 'New York', + county = 'New York County', + region = 'New York', + postal_code = '10005', + country = 'USA', + focus/point/lat = -90, + focus/point/lon = -180, + boundary/rect/min_lat = -90, + boundary/rect/max_lat = -90, + boundary/rect/min_lon = -180, + boundary/rect/max_lon = -180, + boundary/circle/lat = -90, + boundary/circle/lon = -180, + boundary/circle/radius = 1.337, + boundary/country = [ + '' + ], + boundary/gid = '', + layers = [ + 'venue' + ], + sources = [ + 'openstreetmap' + ], + size = 56, + lang = '', ) + ) + else: + return SearchStructuredBulkQuery( + ) + """ + + def testSearchStructuredBulkQuery(self): + """Test SearchStructuredBulkQuery""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_search_structured_query.py b/test/test_search_structured_query.py new file mode 100644 index 0000000..7765070 --- /dev/null +++ b/test/test_search_structured_query.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + Stadia Maps Geospatial APIs + + The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications. + + The version of the OpenAPI document: 6.6.0 + Contact: support@stadiamaps.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from stadiamaps.models.search_structured_query import SearchStructuredQuery + +class TestSearchStructuredQuery(unittest.TestCase): + """SearchStructuredQuery unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SearchStructuredQuery: + """Test SearchStructuredQuery + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SearchStructuredQuery` + """ + model = SearchStructuredQuery() + if include_optional: + return SearchStructuredQuery( + address = '11 Wall Street', + neighbourhood = 'Financial District', + borough = 'Manhattan', + locality = 'New York', + county = 'New York County', + region = 'New York', + postal_code = '10005', + country = 'USA', + focus_point_lat = -90, + focus_point_lon = -180, + boundary_rect_min_lat = -90, + boundary_rect_max_lat = -90, + boundary_rect_min_lon = -180, + boundary_rect_max_lon = -180, + boundary_circle_lat = -90, + boundary_circle_lon = -180, + boundary_circle_radius = 1.337, + boundary_country = [ + '' + ], + boundary_gid = '', + layers = [ + 'venue' + ], + sources = [ + 'openstreetmap' + ], + size = 56, + lang = '' + ) + else: + return SearchStructuredQuery( + ) + """ + + def testSearchStructuredQuery(self): + """Test SearchStructuredQuery""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main()