stadiamaps 3.2.1__py3-none-any.whl → 5.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- stadiamaps/__init__.py +32 -11
- stadiamaps/api/geocoding_api.py +128 -116
- stadiamaps/api/geospatial_api.py +7 -3
- stadiamaps/api/routing_api.py +33 -19
- stadiamaps/api_client.py +21 -5
- stadiamaps/configuration.py +156 -40
- stadiamaps/exceptions.py +1 -1
- stadiamaps/models/__init__.py +31 -10
- stadiamaps/models/access.py +1 -1
- stadiamaps/models/admin_region.py +1 -1
- stadiamaps/models/administrative.py +1 -1
- stadiamaps/models/annotation_filters.py +124 -0
- stadiamaps/models/auto_costing_options.py +1 -1
- stadiamaps/models/base_costing_options.py +1 -1
- stadiamaps/models/base_trace_request.py +7 -7
- stadiamaps/models/bicycle_costing_options.py +1 -1
- stadiamaps/models/bike_network.py +1 -1
- stadiamaps/models/bulk_request.py +1 -1
- stadiamaps/models/bulk_request_query.py +1 -1
- stadiamaps/models/bulk_search_response.py +4 -4
- stadiamaps/models/contour.py +1 -1
- stadiamaps/models/coordinate.py +1 -1
- stadiamaps/models/costing_model.py +1 -1
- stadiamaps/models/costing_options.py +1 -1
- stadiamaps/models/directions_options.py +4 -4
- stadiamaps/models/distance_unit.py +1 -1
- stadiamaps/models/edge_sign.py +1 -1
- stadiamaps/models/edge_use.py +1 -1
- stadiamaps/models/end_node.py +4 -4
- stadiamaps/models/extended_directions_options.py +121 -0
- stadiamaps/models/geo_attributes.py +1 -1
- stadiamaps/models/geo_json_geometry.py +1 -1
- stadiamaps/models/geo_json_geometry_base.py +1 -1
- stadiamaps/models/geo_json_line_string.py +1 -1
- stadiamaps/models/geo_json_point.py +1 -1
- stadiamaps/models/geo_json_polygon.py +1 -1
- stadiamaps/models/{pelias_response.py → geocode_response.py} +11 -11
- stadiamaps/models/{pelias_geo_json_feature.py → geocoding_geo_json_feature.py} +8 -8
- stadiamaps/models/{pelias_geo_json_properties.py → geocoding_geo_json_properties.py} +40 -14
- stadiamaps/models/{pelias_geo_json_properties_addendum.py → geocoding_geo_json_properties_addendum.py} +7 -7
- stadiamaps/models/{pelias_geo_json_properties_addendum_osm.py → geocoding_geo_json_properties_addendum_osm.py} +5 -5
- stadiamaps/models/{pelias_layer.py → geocoding_layer.py} +3 -3
- stadiamaps/models/geocoding_object.py +1 -1
- stadiamaps/models/{pelias_source.py → geocoding_source.py} +4 -3
- stadiamaps/models/height_request.py +4 -4
- stadiamaps/models/height_response.py +4 -4
- stadiamaps/models/highway_classification.py +1 -1
- stadiamaps/models/intersecting_edge.py +1 -1
- stadiamaps/models/isochrone_costing_model.py +1 -1
- stadiamaps/models/isochrone_feature.py +1 -1
- stadiamaps/models/isochrone_properties.py +1 -1
- stadiamaps/models/isochrone_request.py +7 -7
- stadiamaps/models/isochrone_response.py +4 -4
- stadiamaps/models/locate_detailed_edge.py +1 -1
- stadiamaps/models/locate_edge.py +1 -1
- stadiamaps/models/locate_edge_info.py +1 -1
- stadiamaps/models/locate_node.py +1 -1
- stadiamaps/models/locate_object.py +7 -7
- stadiamaps/models/low_speed_vehicle_costing_options.py +1 -1
- stadiamaps/models/maneuver_sign.py +13 -13
- stadiamaps/models/maneuver_sign_element.py +1 -1
- stadiamaps/models/map_match_costing_model.py +1 -1
- stadiamaps/models/map_match_request.py +35 -11
- stadiamaps/models/map_match_route_response.py +4 -4
- stadiamaps/models/map_match_trace_options.py +1 -1
- stadiamaps/models/map_match_waypoint.py +1 -1
- stadiamaps/models/matched_point.py +1 -1
- stadiamaps/models/matrix_costing_model.py +1 -1
- stadiamaps/models/matrix_distance.py +1 -1
- stadiamaps/models/matrix_request.py +10 -10
- stadiamaps/models/matrix_response.py +16 -16
- stadiamaps/models/matrix_waypoint.py +1 -1
- stadiamaps/models/motor_scooter_costing_options.py +1 -1
- stadiamaps/models/motorcycle_costing_options.py +1 -1
- stadiamaps/models/nearest_roads_request.py +7 -7
- stadiamaps/models/node_id.py +1 -1
- stadiamaps/models/node_type.py +1 -1
- stadiamaps/models/optimized_route_request.py +35 -11
- stadiamaps/models/osrm_admin.py +103 -0
- stadiamaps/models/osrm_annotation.py +117 -0
- stadiamaps/models/osrm_banner_component.py +113 -0
- stadiamaps/models/osrm_banner_content.py +131 -0
- stadiamaps/models/osrm_banner_instruction.py +112 -0
- stadiamaps/models/osrm_base_api_response.py +112 -0
- stadiamaps/models/osrm_guidance_modifier.py +44 -0
- stadiamaps/models/osrm_intersection.py +145 -0
- stadiamaps/models/osrm_lane.py +111 -0
- stadiamaps/models/osrm_route.py +119 -0
- stadiamaps/models/osrm_route_leg.py +148 -0
- stadiamaps/models/osrm_route_response.py +132 -0
- stadiamaps/models/osrm_route_step.py +185 -0
- stadiamaps/models/osrm_speed_limit.py +117 -0
- stadiamaps/models/osrm_step_maneuver.py +127 -0
- stadiamaps/models/osrm_via_waypoint.py +105 -0
- stadiamaps/models/osrm_voice_instruction.py +105 -0
- stadiamaps/models/osrm_waypoint.py +108 -0
- stadiamaps/models/pedestrian_costing_options.py +1 -1
- stadiamaps/models/restrictions.py +1 -1
- stadiamaps/models/road_class.py +1 -1
- stadiamaps/models/route200_response.py +138 -0
- stadiamaps/models/route_leg.py +4 -4
- stadiamaps/models/route_maneuver.py +1 -1
- stadiamaps/models/route_request.py +34 -12
- stadiamaps/models/route_response.py +4 -4
- stadiamaps/models/route_response_alternates_inner.py +1 -1
- stadiamaps/models/route_summary.py +1 -1
- stadiamaps/models/route_trip.py +13 -13
- stadiamaps/models/{valhalla_languages.py → routing_languages.py} +4 -4
- stadiamaps/models/{valhalla_long_units.py → routing_long_units.py} +4 -4
- stadiamaps/models/routing_response_waypoint.py +1 -1
- stadiamaps/models/routing_waypoint.py +1 -1
- stadiamaps/models/routing_waypoint_all_of_search_filter.py +1 -1
- stadiamaps/models/search_query.py +6 -6
- stadiamaps/models/search_structured_query.py +6 -6
- stadiamaps/models/simple_routing_waypoint.py +1 -1
- stadiamaps/models/speeds.py +1 -1
- stadiamaps/models/trace_attribute_filter_options.py +1 -1
- stadiamaps/models/trace_attribute_key.py +1 -1
- stadiamaps/models/trace_attributes_base_response.py +10 -10
- stadiamaps/models/trace_attributes_request.py +13 -11
- stadiamaps/models/trace_attributes_response.py +16 -16
- stadiamaps/models/trace_edge.py +2 -2
- stadiamaps/models/travel_mode.py +1 -1
- stadiamaps/models/traversability.py +1 -1
- stadiamaps/models/truck_costing_options.py +1 -1
- stadiamaps/models/tz_response.py +1 -1
- stadiamaps/models/warning.py +1 -1
- stadiamaps/rest.py +2 -2
- {stadiamaps-3.2.1.dist-info → stadiamaps-5.0.0.dist-info}/METADATA +14 -6
- stadiamaps-5.0.0.dist-info/RECORD +157 -0
- {stadiamaps-3.2.1.dist-info → stadiamaps-5.0.0.dist-info}/WHEEL +1 -1
- stadiamaps/models/pelias_response_geocoding.py +0 -89
- stadiamaps/models/route_response_trip.py +0 -117
- stadiamaps/models/trace_attributes_response_all_of.py +0 -96
- stadiamaps-3.2.1.dist-info/RECORD +0 -139
- {stadiamaps-3.2.1.dist-info → stadiamaps-5.0.0.dist-info}/LICENSE.txt +0 -0
- {stadiamaps-3.2.1.dist-info → stadiamaps-5.0.0.dist-info}/top_level.txt +0 -0
stadiamaps/models/__init__.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
8
8
|
|
9
|
-
The version of the OpenAPI document:
|
9
|
+
The version of the OpenAPI document: 8.0.0
|
10
10
|
Contact: support@stadiamaps.com
|
11
11
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
12
12
|
|
@@ -18,6 +18,7 @@
|
|
18
18
|
from stadiamaps.models.access import Access
|
19
19
|
from stadiamaps.models.admin_region import AdminRegion
|
20
20
|
from stadiamaps.models.administrative import Administrative
|
21
|
+
from stadiamaps.models.annotation_filters import AnnotationFilters
|
21
22
|
from stadiamaps.models.auto_costing_options import AutoCostingOptions
|
22
23
|
from stadiamaps.models.base_costing_options import BaseCostingOptions
|
23
24
|
from stadiamaps.models.base_trace_request import BaseTraceRequest
|
@@ -35,13 +36,21 @@ from stadiamaps.models.distance_unit import DistanceUnit
|
|
35
36
|
from stadiamaps.models.edge_sign import EdgeSign
|
36
37
|
from stadiamaps.models.edge_use import EdgeUse
|
37
38
|
from stadiamaps.models.end_node import EndNode
|
39
|
+
from stadiamaps.models.extended_directions_options import ExtendedDirectionsOptions
|
38
40
|
from stadiamaps.models.geo_attributes import GeoAttributes
|
39
41
|
from stadiamaps.models.geo_json_geometry import GeoJSONGeometry
|
40
42
|
from stadiamaps.models.geo_json_geometry_base import GeoJSONGeometryBase
|
41
43
|
from stadiamaps.models.geo_json_line_string import GeoJSONLineString
|
42
44
|
from stadiamaps.models.geo_json_point import GeoJSONPoint
|
43
45
|
from stadiamaps.models.geo_json_polygon import GeoJSONPolygon
|
46
|
+
from stadiamaps.models.geocode_response import GeocodeResponse
|
47
|
+
from stadiamaps.models.geocoding_geo_json_feature import GeocodingGeoJSONFeature
|
48
|
+
from stadiamaps.models.geocoding_geo_json_properties import GeocodingGeoJSONProperties
|
49
|
+
from stadiamaps.models.geocoding_geo_json_properties_addendum import GeocodingGeoJSONPropertiesAddendum
|
50
|
+
from stadiamaps.models.geocoding_geo_json_properties_addendum_osm import GeocodingGeoJSONPropertiesAddendumOsm
|
51
|
+
from stadiamaps.models.geocoding_layer import GeocodingLayer
|
44
52
|
from stadiamaps.models.geocoding_object import GeocodingObject
|
53
|
+
from stadiamaps.models.geocoding_source import GeocodingSource
|
45
54
|
from stadiamaps.models.height_request import HeightRequest
|
46
55
|
from stadiamaps.models.height_response import HeightResponse
|
47
56
|
from stadiamaps.models.highway_classification import HighwayClassification
|
@@ -76,16 +85,28 @@ from stadiamaps.models.nearest_roads_request import NearestRoadsRequest
|
|
76
85
|
from stadiamaps.models.node_id import NodeId
|
77
86
|
from stadiamaps.models.node_type import NodeType
|
78
87
|
from stadiamaps.models.optimized_route_request import OptimizedRouteRequest
|
88
|
+
from stadiamaps.models.osrm_admin import OsrmAdmin
|
89
|
+
from stadiamaps.models.osrm_annotation import OsrmAnnotation
|
90
|
+
from stadiamaps.models.osrm_banner_component import OsrmBannerComponent
|
91
|
+
from stadiamaps.models.osrm_banner_content import OsrmBannerContent
|
92
|
+
from stadiamaps.models.osrm_banner_instruction import OsrmBannerInstruction
|
93
|
+
from stadiamaps.models.osrm_base_api_response import OsrmBaseApiResponse
|
94
|
+
from stadiamaps.models.osrm_guidance_modifier import OsrmGuidanceModifier
|
95
|
+
from stadiamaps.models.osrm_intersection import OsrmIntersection
|
96
|
+
from stadiamaps.models.osrm_lane import OsrmLane
|
97
|
+
from stadiamaps.models.osrm_route import OsrmRoute
|
98
|
+
from stadiamaps.models.osrm_route_leg import OsrmRouteLeg
|
99
|
+
from stadiamaps.models.osrm_route_response import OsrmRouteResponse
|
100
|
+
from stadiamaps.models.osrm_route_step import OsrmRouteStep
|
101
|
+
from stadiamaps.models.osrm_speed_limit import OsrmSpeedLimit
|
102
|
+
from stadiamaps.models.osrm_step_maneuver import OsrmStepManeuver
|
103
|
+
from stadiamaps.models.osrm_via_waypoint import OsrmViaWaypoint
|
104
|
+
from stadiamaps.models.osrm_voice_instruction import OsrmVoiceInstruction
|
105
|
+
from stadiamaps.models.osrm_waypoint import OsrmWaypoint
|
79
106
|
from stadiamaps.models.pedestrian_costing_options import PedestrianCostingOptions
|
80
|
-
from stadiamaps.models.pelias_geo_json_feature import PeliasGeoJSONFeature
|
81
|
-
from stadiamaps.models.pelias_geo_json_properties import PeliasGeoJSONProperties
|
82
|
-
from stadiamaps.models.pelias_geo_json_properties_addendum import PeliasGeoJSONPropertiesAddendum
|
83
|
-
from stadiamaps.models.pelias_geo_json_properties_addendum_osm import PeliasGeoJSONPropertiesAddendumOsm
|
84
|
-
from stadiamaps.models.pelias_layer import PeliasLayer
|
85
|
-
from stadiamaps.models.pelias_response import PeliasResponse
|
86
|
-
from stadiamaps.models.pelias_source import PeliasSource
|
87
107
|
from stadiamaps.models.restrictions import Restrictions
|
88
108
|
from stadiamaps.models.road_class import RoadClass
|
109
|
+
from stadiamaps.models.route200_response import Route200Response
|
89
110
|
from stadiamaps.models.route_leg import RouteLeg
|
90
111
|
from stadiamaps.models.route_maneuver import RouteManeuver
|
91
112
|
from stadiamaps.models.route_request import RouteRequest
|
@@ -93,6 +114,8 @@ from stadiamaps.models.route_response import RouteResponse
|
|
93
114
|
from stadiamaps.models.route_response_alternates_inner import RouteResponseAlternatesInner
|
94
115
|
from stadiamaps.models.route_summary import RouteSummary
|
95
116
|
from stadiamaps.models.route_trip import RouteTrip
|
117
|
+
from stadiamaps.models.routing_languages import RoutingLanguages
|
118
|
+
from stadiamaps.models.routing_long_units import RoutingLongUnits
|
96
119
|
from stadiamaps.models.routing_response_waypoint import RoutingResponseWaypoint
|
97
120
|
from stadiamaps.models.routing_waypoint import RoutingWaypoint
|
98
121
|
from stadiamaps.models.routing_waypoint_all_of_search_filter import RoutingWaypointAllOfSearchFilter
|
@@ -110,6 +133,4 @@ from stadiamaps.models.travel_mode import TravelMode
|
|
110
133
|
from stadiamaps.models.traversability import Traversability
|
111
134
|
from stadiamaps.models.truck_costing_options import TruckCostingOptions
|
112
135
|
from stadiamaps.models.tz_response import TzResponse
|
113
|
-
from stadiamaps.models.valhalla_languages import ValhallaLanguages
|
114
|
-
from stadiamaps.models.valhalla_long_units import ValhallaLongUnits
|
115
136
|
from stadiamaps.models.warning import Warning
|
stadiamaps/models/access.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -0,0 +1,124 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Stadia Maps Geospatial APIs
|
5
|
+
|
6
|
+
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
|
+
Contact: support@stadiamaps.com
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
|
+
|
12
|
+
Do not edit the class manually.
|
13
|
+
""" # noqa: E501
|
14
|
+
|
15
|
+
|
16
|
+
from __future__ import annotations
|
17
|
+
import pprint
|
18
|
+
import re # noqa: F401
|
19
|
+
import json
|
20
|
+
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
23
|
+
from typing import Optional, Set
|
24
|
+
from typing_extensions import Self
|
25
|
+
|
26
|
+
class AnnotationFilters(BaseModel):
|
27
|
+
"""
|
28
|
+
AnnotationFilters
|
29
|
+
""" # noqa: E501
|
30
|
+
action: Optional[StrictStr] = None
|
31
|
+
attributes: Optional[List[StrictStr]] = Field(default=None, description="A set of granular attributes to include between every pair of coordinates along the route. This can significantly increase the response size.")
|
32
|
+
additional_properties: Dict[str, Any] = {}
|
33
|
+
__properties: ClassVar[List[str]] = ["action", "attributes"]
|
34
|
+
|
35
|
+
@field_validator('action')
|
36
|
+
def action_validate_enum(cls, value):
|
37
|
+
"""Validates the enum"""
|
38
|
+
if value is None:
|
39
|
+
return value
|
40
|
+
|
41
|
+
if value not in set(['include', 'exclude']):
|
42
|
+
raise ValueError("must be one of enum values ('include', 'exclude')")
|
43
|
+
return value
|
44
|
+
|
45
|
+
@field_validator('attributes')
|
46
|
+
def attributes_validate_enum(cls, value):
|
47
|
+
"""Validates the enum"""
|
48
|
+
if value is None:
|
49
|
+
return value
|
50
|
+
|
51
|
+
for i in value:
|
52
|
+
if i not in set(['shape_attributes.speed', 'shape_attributes.speed_limit', 'shape_attributes.time', 'shape_attributes.length']):
|
53
|
+
raise ValueError("each list item must be one of ('shape_attributes.speed', 'shape_attributes.speed_limit', 'shape_attributes.time', 'shape_attributes.length')")
|
54
|
+
return value
|
55
|
+
|
56
|
+
model_config = ConfigDict(
|
57
|
+
populate_by_name=True,
|
58
|
+
validate_assignment=True,
|
59
|
+
protected_namespaces=(),
|
60
|
+
)
|
61
|
+
|
62
|
+
|
63
|
+
def to_str(self) -> str:
|
64
|
+
"""Returns the string representation of the model using alias"""
|
65
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
66
|
+
|
67
|
+
def to_json(self) -> str:
|
68
|
+
"""Returns the JSON representation of the model using alias"""
|
69
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
70
|
+
return json.dumps(self.to_dict())
|
71
|
+
|
72
|
+
@classmethod
|
73
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
74
|
+
"""Create an instance of AnnotationFilters from a JSON string"""
|
75
|
+
return cls.from_dict(json.loads(json_str))
|
76
|
+
|
77
|
+
def to_dict(self) -> Dict[str, Any]:
|
78
|
+
"""Return the dictionary representation of the model using alias.
|
79
|
+
|
80
|
+
This has the following differences from calling pydantic's
|
81
|
+
`self.model_dump(by_alias=True)`:
|
82
|
+
|
83
|
+
* `None` is only added to the output dict for nullable fields that
|
84
|
+
were set at model initialization. Other fields with value `None`
|
85
|
+
are ignored.
|
86
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
87
|
+
"""
|
88
|
+
excluded_fields: Set[str] = set([
|
89
|
+
"additional_properties",
|
90
|
+
])
|
91
|
+
|
92
|
+
_dict = self.model_dump(
|
93
|
+
by_alias=True,
|
94
|
+
exclude=excluded_fields,
|
95
|
+
exclude_none=True,
|
96
|
+
)
|
97
|
+
# puts key-value pairs in additional_properties in the top level
|
98
|
+
if self.additional_properties is not None:
|
99
|
+
for _key, _value in self.additional_properties.items():
|
100
|
+
_dict[_key] = _value
|
101
|
+
|
102
|
+
return _dict
|
103
|
+
|
104
|
+
@classmethod
|
105
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
106
|
+
"""Create an instance of AnnotationFilters from a dict"""
|
107
|
+
if obj is None:
|
108
|
+
return None
|
109
|
+
|
110
|
+
if not isinstance(obj, dict):
|
111
|
+
return cls.model_validate(obj)
|
112
|
+
|
113
|
+
_obj = cls.model_validate({
|
114
|
+
"action": obj.get("action"),
|
115
|
+
"attributes": obj.get("attributes")
|
116
|
+
})
|
117
|
+
# store additional fields in additional_properties
|
118
|
+
for _key in obj.keys():
|
119
|
+
if _key not in cls.__properties:
|
120
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
121
|
+
|
122
|
+
return _obj
|
123
|
+
|
124
|
+
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -24,7 +24,7 @@ from stadiamaps.models.costing_options import CostingOptions
|
|
24
24
|
from stadiamaps.models.distance_unit import DistanceUnit
|
25
25
|
from stadiamaps.models.map_match_costing_model import MapMatchCostingModel
|
26
26
|
from stadiamaps.models.map_match_waypoint import MapMatchWaypoint
|
27
|
-
from stadiamaps.models.
|
27
|
+
from stadiamaps.models.routing_languages import RoutingLanguages
|
28
28
|
from typing import Optional, Set
|
29
29
|
from typing_extensions import Self
|
30
30
|
|
@@ -33,7 +33,7 @@ class BaseTraceRequest(BaseModel):
|
|
33
33
|
BaseTraceRequest
|
34
34
|
""" # noqa: E501
|
35
35
|
units: Optional[DistanceUnit] = DistanceUnit.KM
|
36
|
-
language: Optional[
|
36
|
+
language: Optional[RoutingLanguages] = RoutingLanguages.EN_MINUS_US
|
37
37
|
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.")
|
38
38
|
id: Optional[StrictStr] = Field(default=None, description="An identifier to disambiguate requests (echoed by the server).")
|
39
39
|
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`.")
|
@@ -108,9 +108,9 @@ class BaseTraceRequest(BaseModel):
|
|
108
108
|
# override the default output from pydantic by calling `to_dict()` of each item in shape (list)
|
109
109
|
_items = []
|
110
110
|
if self.shape:
|
111
|
-
for
|
112
|
-
if
|
113
|
-
_items.append(
|
111
|
+
for _item_shape in self.shape:
|
112
|
+
if _item_shape:
|
113
|
+
_items.append(_item_shape.to_dict())
|
114
114
|
_dict['shape'] = _items
|
115
115
|
# override the default output from pydantic by calling `to_dict()` of costing_options
|
116
116
|
if self.costing_options:
|
@@ -133,7 +133,7 @@ class BaseTraceRequest(BaseModel):
|
|
133
133
|
|
134
134
|
_obj = cls.model_validate({
|
135
135
|
"units": obj.get("units") if obj.get("units") is not None else DistanceUnit.KM,
|
136
|
-
"language": obj.get("language") if obj.get("language") is not None else
|
136
|
+
"language": obj.get("language") if obj.get("language") is not None else RoutingLanguages.EN_MINUS_US,
|
137
137
|
"directions_type": obj.get("directions_type") if obj.get("directions_type") is not None else 'instructions',
|
138
138
|
"id": obj.get("id"),
|
139
139
|
"shape": [MapMatchWaypoint.from_dict(_item) for _item in obj["shape"]] if obj.get("shape") is not None else None,
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -20,7 +20,7 @@ import json
|
|
20
20
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
23
|
-
from stadiamaps.models.
|
23
|
+
from stadiamaps.models.geocode_response import GeocodeResponse
|
24
24
|
from typing import Optional, Set
|
25
25
|
from typing_extensions import Self
|
26
26
|
|
@@ -29,7 +29,7 @@ class BulkSearchResponse(BaseModel):
|
|
29
29
|
BulkSearchResponse
|
30
30
|
""" # noqa: E501
|
31
31
|
status: StrictInt
|
32
|
-
response: Optional[
|
32
|
+
response: Optional[GeocodeResponse] = None
|
33
33
|
msg: Optional[StrictStr] = Field(default=None, description="An error message describing what went wrong (if the status is not 200).")
|
34
34
|
additional_properties: Dict[str, Any] = {}
|
35
35
|
__properties: ClassVar[List[str]] = ["status", "response", "msg"]
|
@@ -96,7 +96,7 @@ class BulkSearchResponse(BaseModel):
|
|
96
96
|
|
97
97
|
_obj = cls.model_validate({
|
98
98
|
"status": obj.get("status"),
|
99
|
-
"response":
|
99
|
+
"response": GeocodeResponse.from_dict(obj["response"]) if obj.get("response") is not None else None,
|
100
100
|
"msg": obj.get("msg")
|
101
101
|
})
|
102
102
|
# store additional fields in additional_properties
|
stadiamaps/models/contour.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
stadiamaps/models/coordinate.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -21,7 +21,7 @@ import json
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
23
23
|
from stadiamaps.models.distance_unit import DistanceUnit
|
24
|
-
from stadiamaps.models.
|
24
|
+
from stadiamaps.models.routing_languages import RoutingLanguages
|
25
25
|
from typing import Optional, Set
|
26
26
|
from typing_extensions import Self
|
27
27
|
|
@@ -30,7 +30,7 @@ class DirectionsOptions(BaseModel):
|
|
30
30
|
DirectionsOptions
|
31
31
|
""" # noqa: E501
|
32
32
|
units: Optional[DistanceUnit] = DistanceUnit.KM
|
33
|
-
language: Optional[
|
33
|
+
language: Optional[RoutingLanguages] = RoutingLanguages.EN_MINUS_US
|
34
34
|
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.")
|
35
35
|
additional_properties: Dict[str, Any] = {}
|
36
36
|
__properties: ClassVar[List[str]] = ["units", "language", "directions_type"]
|
@@ -104,7 +104,7 @@ class DirectionsOptions(BaseModel):
|
|
104
104
|
|
105
105
|
_obj = cls.model_validate({
|
106
106
|
"units": obj.get("units") if obj.get("units") is not None else DistanceUnit.KM,
|
107
|
-
"language": obj.get("language") if obj.get("language") is not None else
|
107
|
+
"language": obj.get("language") if obj.get("language") is not None else RoutingLanguages.EN_MINUS_US,
|
108
108
|
"directions_type": obj.get("directions_type") if obj.get("directions_type") is not None else 'instructions'
|
109
109
|
})
|
110
110
|
# store additional fields in additional_properties
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
stadiamaps/models/edge_sign.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
stadiamaps/models/edge_use.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
stadiamaps/models/end_node.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -82,9 +82,9 @@ class EndNode(BaseModel):
|
|
82
82
|
# override the default output from pydantic by calling `to_dict()` of each item in intersecting_edges (list)
|
83
83
|
_items = []
|
84
84
|
if self.intersecting_edges:
|
85
|
-
for
|
86
|
-
if
|
87
|
-
_items.append(
|
85
|
+
for _item_intersecting_edges in self.intersecting_edges:
|
86
|
+
if _item_intersecting_edges:
|
87
|
+
_items.append(_item_intersecting_edges.to_dict())
|
88
88
|
_dict['intersecting_edges'] = _items
|
89
89
|
# puts key-value pairs in additional_properties in the top level
|
90
90
|
if self.additional_properties is not None:
|
@@ -0,0 +1,121 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Stadia Maps Geospatial APIs
|
5
|
+
|
6
|
+
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
|
+
Contact: support@stadiamaps.com
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
|
+
|
12
|
+
Do not edit the class manually.
|
13
|
+
""" # noqa: E501
|
14
|
+
|
15
|
+
|
16
|
+
from __future__ import annotations
|
17
|
+
import pprint
|
18
|
+
import re # noqa: F401
|
19
|
+
import json
|
20
|
+
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
23
|
+
from stadiamaps.models.annotation_filters import AnnotationFilters
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class ExtendedDirectionsOptions(BaseModel):
|
28
|
+
"""
|
29
|
+
ExtendedDirectionsOptions
|
30
|
+
""" # noqa: E501
|
31
|
+
format: Optional[StrictStr] = Field(default=None, description="The output response format. The default JSON format is extremely compact and ideal for web or data-constrained use cases where you want to fetch additional attributes on demand in small chunks. The OSRM format is much richer and is configurable with significantly more info for turn-by-turn navigation use cases.")
|
32
|
+
banner_instructions: Optional[StrictBool] = Field(default=None, description="Optionally includes helpful banners with timing information for turn-by-turn navigation. This is only available in the OSRM format.")
|
33
|
+
voice_instructions: Optional[StrictBool] = Field(default=None, description="Optionally includes voice instructions with timing information for turn-by-turn navigation. This is only available in the OSRM format.")
|
34
|
+
filters: Optional[AnnotationFilters] = None
|
35
|
+
additional_properties: Dict[str, Any] = {}
|
36
|
+
__properties: ClassVar[List[str]] = ["format", "banner_instructions", "voice_instructions", "filters"]
|
37
|
+
|
38
|
+
@field_validator('format')
|
39
|
+
def format_validate_enum(cls, value):
|
40
|
+
"""Validates the enum"""
|
41
|
+
if value is None:
|
42
|
+
return value
|
43
|
+
|
44
|
+
if value not in set(['json', 'osrm']):
|
45
|
+
raise ValueError("must be one of enum values ('json', 'osrm')")
|
46
|
+
return value
|
47
|
+
|
48
|
+
model_config = ConfigDict(
|
49
|
+
populate_by_name=True,
|
50
|
+
validate_assignment=True,
|
51
|
+
protected_namespaces=(),
|
52
|
+
)
|
53
|
+
|
54
|
+
|
55
|
+
def to_str(self) -> str:
|
56
|
+
"""Returns the string representation of the model using alias"""
|
57
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
58
|
+
|
59
|
+
def to_json(self) -> str:
|
60
|
+
"""Returns the JSON representation of the model using alias"""
|
61
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
62
|
+
return json.dumps(self.to_dict())
|
63
|
+
|
64
|
+
@classmethod
|
65
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
66
|
+
"""Create an instance of ExtendedDirectionsOptions from a JSON string"""
|
67
|
+
return cls.from_dict(json.loads(json_str))
|
68
|
+
|
69
|
+
def to_dict(self) -> Dict[str, Any]:
|
70
|
+
"""Return the dictionary representation of the model using alias.
|
71
|
+
|
72
|
+
This has the following differences from calling pydantic's
|
73
|
+
`self.model_dump(by_alias=True)`:
|
74
|
+
|
75
|
+
* `None` is only added to the output dict for nullable fields that
|
76
|
+
were set at model initialization. Other fields with value `None`
|
77
|
+
are ignored.
|
78
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
79
|
+
"""
|
80
|
+
excluded_fields: Set[str] = set([
|
81
|
+
"additional_properties",
|
82
|
+
])
|
83
|
+
|
84
|
+
_dict = self.model_dump(
|
85
|
+
by_alias=True,
|
86
|
+
exclude=excluded_fields,
|
87
|
+
exclude_none=True,
|
88
|
+
)
|
89
|
+
# override the default output from pydantic by calling `to_dict()` of filters
|
90
|
+
if self.filters:
|
91
|
+
_dict['filters'] = self.filters.to_dict()
|
92
|
+
# puts key-value pairs in additional_properties in the top level
|
93
|
+
if self.additional_properties is not None:
|
94
|
+
for _key, _value in self.additional_properties.items():
|
95
|
+
_dict[_key] = _value
|
96
|
+
|
97
|
+
return _dict
|
98
|
+
|
99
|
+
@classmethod
|
100
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
101
|
+
"""Create an instance of ExtendedDirectionsOptions from a dict"""
|
102
|
+
if obj is None:
|
103
|
+
return None
|
104
|
+
|
105
|
+
if not isinstance(obj, dict):
|
106
|
+
return cls.model_validate(obj)
|
107
|
+
|
108
|
+
_obj = cls.model_validate({
|
109
|
+
"format": obj.get("format"),
|
110
|
+
"banner_instructions": obj.get("banner_instructions"),
|
111
|
+
"voice_instructions": obj.get("voice_instructions"),
|
112
|
+
"filters": AnnotationFilters.from_dict(obj["filters"]) if obj.get("filters") is not None else None
|
113
|
+
})
|
114
|
+
# store additional fields in additional_properties
|
115
|
+
for _key in obj.keys():
|
116
|
+
if _key not in cls.__properties:
|
117
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
118
|
+
|
119
|
+
return _obj
|
120
|
+
|
121
|
+
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 8.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|