stadiamaps 5.0.0__py3-none-any.whl → 6.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- stadiamaps/__init__.py +23 -5
- stadiamaps/api/geocoding_api.py +1388 -138
- stadiamaps/api/geospatial_api.py +1 -1
- stadiamaps/api/routing_api.py +1 -1
- stadiamaps/api_client.py +3 -3
- stadiamaps/configuration.py +5 -5
- stadiamaps/exceptions.py +18 -1
- stadiamaps/models/__init__.py +22 -4
- stadiamaps/models/access.py +1 -1
- stadiamaps/models/addendum_v2.py +143 -0
- stadiamaps/models/address_components_v2.py +134 -0
- stadiamaps/models/admin_region.py +1 -1
- stadiamaps/models/administrative.py +1 -1
- stadiamaps/models/annotation_filters.py +1 -1
- stadiamaps/models/auto_costing_options.py +1 -1
- stadiamaps/models/base_costing_options.py +1 -1
- stadiamaps/models/base_trace_request.py +1 -1
- 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 +1 -1
- stadiamaps/models/context.py +119 -0
- 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 +1 -1
- 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 +1 -1
- stadiamaps/models/extended_directions_options.py +1 -1
- stadiamaps/models/feature_properties_v2.py +126 -0
- stadiamaps/models/feature_properties_v2_properties.py +184 -0
- stadiamaps/models/foursquare_addendum.py +113 -0
- stadiamaps/models/geo_attributes.py +1 -1
- stadiamaps/models/geo_json_geometry_base.py +1 -1
- stadiamaps/models/geo_json_point.py +1 -1
- stadiamaps/models/geocode_response.py +1 -1
- stadiamaps/models/geocode_response_envelope_properties_v2.py +125 -0
- stadiamaps/models/geocoding_geo_json_feature.py +1 -1
- stadiamaps/models/geocoding_geo_json_properties.py +8 -6
- stadiamaps/models/geocoding_geo_json_properties_addendum.py +1 -1
- stadiamaps/models/geocoding_geo_json_properties_addendum_osm.py +1 -1
- stadiamaps/models/geocoding_layer.py +1 -1
- stadiamaps/models/geocoding_meta.py +108 -0
- stadiamaps/models/geocoding_object.py +1 -1
- stadiamaps/models/geocoding_source.py +1 -1
- stadiamaps/models/geonames_addendum.py +101 -0
- stadiamaps/models/height_request.py +1 -1
- stadiamaps/models/height_response.py +1 -1
- 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 +1 -1
- stadiamaps/models/isochrone_response.py +1 -1
- stadiamaps/models/layer_id.py +57 -0
- 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 +1 -1
- stadiamaps/models/low_speed_vehicle_costing_options.py +1 -1
- stadiamaps/models/maneuver_sign.py +1 -1
- stadiamaps/models/maneuver_sign_element.py +1 -1
- stadiamaps/models/map_match_costing_model.py +1 -1
- stadiamaps/models/map_match_request.py +1 -1
- stadiamaps/models/map_match_route_response.py +1 -1
- stadiamaps/models/map_match_trace_options.py +1 -1
- stadiamaps/models/map_match_waypoint.py +3 -3
- stadiamaps/models/match_type.py +39 -0
- 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 +1 -1
- stadiamaps/models/matrix_response.py +1 -1
- 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 +1 -1
- stadiamaps/models/node_id.py +1 -1
- stadiamaps/models/node_type.py +1 -1
- stadiamaps/models/open_street_map_addendum.py +169 -0
- stadiamaps/models/optimized_route_request.py +1 -1
- stadiamaps/models/osrm_admin.py +1 -1
- stadiamaps/models/osrm_annotation.py +1 -1
- stadiamaps/models/osrm_banner_component.py +1 -1
- stadiamaps/models/osrm_banner_content.py +1 -1
- stadiamaps/models/osrm_banner_instruction.py +1 -1
- stadiamaps/models/osrm_base_api_response.py +1 -1
- stadiamaps/models/osrm_guidance_modifier.py +1 -1
- stadiamaps/models/osrm_intersection.py +1 -1
- stadiamaps/models/osrm_lane.py +1 -1
- stadiamaps/models/osrm_route.py +1 -1
- stadiamaps/models/osrm_route_leg.py +1 -1
- stadiamaps/models/osrm_route_response.py +1 -1
- stadiamaps/models/osrm_route_step.py +1 -1
- stadiamaps/models/osrm_speed_limit.py +1 -1
- stadiamaps/models/osrm_step_maneuver.py +1 -1
- stadiamaps/models/osrm_via_waypoint.py +1 -1
- stadiamaps/models/osrm_voice_instruction.py +1 -1
- stadiamaps/models/osrm_waypoint.py +1 -1
- stadiamaps/models/pedestrian_costing_options.py +8 -5
- stadiamaps/models/pedestrian_type.py +39 -0
- stadiamaps/models/point.py +104 -0
- stadiamaps/models/precision.py +38 -0
- stadiamaps/models/properties_v2.py +184 -0
- stadiamaps/models/restrictions.py +11 -11
- stadiamaps/models/road_class.py +1 -1
- stadiamaps/models/route200_response.py +1 -1
- stadiamaps/models/route_leg.py +1 -1
- stadiamaps/models/route_maneuver.py +1 -1
- stadiamaps/models/route_request.py +1 -1
- stadiamaps/models/route_response.py +1 -1
- stadiamaps/models/route_response_alternates_inner.py +1 -1
- stadiamaps/models/route_summary.py +1 -1
- stadiamaps/models/route_trip.py +1 -1
- stadiamaps/models/routing_languages.py +1 -1
- stadiamaps/models/routing_long_units.py +1 -1
- stadiamaps/models/routing_response_waypoint.py +3 -3
- stadiamaps/models/routing_waypoint.py +3 -3
- stadiamaps/models/routing_waypoint_all_of_search_filter.py +1 -1
- stadiamaps/models/search_query.py +2 -2
- stadiamaps/models/search_structured_query.py +3 -3
- stadiamaps/models/simple_routing_waypoint.py +3 -3
- stadiamaps/models/source_attribution.py +110 -0
- stadiamaps/models/source_id.py +41 -0
- 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 +1 -1
- stadiamaps/models/trace_attributes_request.py +1 -1
- stadiamaps/models/trace_attributes_response.py +1 -6
- stadiamaps/models/trace_edge.py +2 -7
- 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/models/whos_on_first_concordances.py +246 -0
- stadiamaps/models/wof_context.py +210 -0
- stadiamaps/models/wof_context_component.py +110 -0
- stadiamaps/rest.py +1 -1
- stadiamaps-6.1.0.dist-info/METADATA +117 -0
- stadiamaps-6.1.0.dist-info/RECORD +183 -0
- {stadiamaps-5.0.0.dist-info → stadiamaps-6.1.0.dist-info}/WHEEL +1 -1
- {stadiamaps-5.0.0.dist-info → stadiamaps-6.1.0.dist-info}/top_level.txt +1 -0
- test/integration/__init__.py +0 -0
- test/integration/test_eu_endpoint.py +21 -0
- test/integration/test_gecoding.py +136 -0
- test/integration/test_geospatial.py +43 -0
- test/integration/test_routing.py +282 -0
- stadiamaps-5.0.0.dist-info/METADATA +0 -87
- stadiamaps-5.0.0.dist-info/RECORD +0 -157
- {stadiamaps-5.0.0.dist-info → stadiamaps-6.1.0.dist-info/licenses}/LICENSE.txt +0 -0
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 9.1.1
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -21,6 +21,7 @@ import json
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional, Union
|
23
23
|
from typing_extensions import Annotated
|
24
|
+
from stadiamaps.models.pedestrian_type import PedestrianType
|
24
25
|
from typing import Optional, Set
|
25
26
|
from typing_extensions import Self
|
26
27
|
|
@@ -28,7 +29,7 @@ class PedestrianCostingOptions(BaseModel):
|
|
28
29
|
"""
|
29
30
|
PedestrianCostingOptions
|
30
31
|
""" # noqa: E501
|
31
|
-
walking_speed: Optional[Annotated[
|
32
|
+
walking_speed: Optional[Union[Annotated[float, Field(le=25, strict=True, ge=0.5)], Annotated[int, Field(le=25, strict=True, ge=1)]]] = Field(default=5.1, description="Walking speed in kph.")
|
32
33
|
walkway_factor: Optional[Union[StrictFloat, StrictInt]] = Field(default=1, description="A factor that multiplies the cost when walkways are encountered.")
|
33
34
|
sidewalk_factor: Optional[Union[StrictFloat, StrictInt]] = Field(default=1, description="A factor that multiplies the cost when sidewalks are encountered.")
|
34
35
|
alley_factor: Optional[Union[StrictFloat, StrictInt]] = Field(default=2, description="A factor that multiplies the cost when alleys are encountered.")
|
@@ -44,8 +45,9 @@ class PedestrianCostingOptions(BaseModel):
|
|
44
45
|
max_hiking_difficulty: Optional[Annotated[int, Field(le=6, strict=True, ge=1)]] = Field(default=1, description="The maximum difficulty of hiking trails allowed. This corresponds to the OSM `sac_scale`.")
|
45
46
|
bss_rent_cost: Optional[StrictInt] = Field(default=120, description="The estimated cost (in seconds) to rent a bicycle from a sharing station in `bikeshare` mode.")
|
46
47
|
bss_rent_penalty: Optional[StrictInt] = Field(default=0, description="A penalty (in seconds) to rent a bicycle in `bikeshare` mode.")
|
48
|
+
type: Optional[PedestrianType] = None
|
47
49
|
additional_properties: Dict[str, Any] = {}
|
48
|
-
__properties: ClassVar[List[str]] = ["walking_speed", "walkway_factor", "sidewalk_factor", "alley_factor", "driveway_factor", "step_penalty", "use_ferry", "use_living_streets", "use_tracks", "use_hills", "use_lit", "service_penalty", "service_factor", "max_hiking_difficulty", "bss_rent_cost", "bss_rent_penalty"]
|
50
|
+
__properties: ClassVar[List[str]] = ["walking_speed", "walkway_factor", "sidewalk_factor", "alley_factor", "driveway_factor", "step_penalty", "use_ferry", "use_living_streets", "use_tracks", "use_hills", "use_lit", "service_penalty", "service_factor", "max_hiking_difficulty", "bss_rent_cost", "bss_rent_penalty", "type"]
|
49
51
|
|
50
52
|
model_config = ConfigDict(
|
51
53
|
populate_by_name=True,
|
@@ -105,7 +107,7 @@ class PedestrianCostingOptions(BaseModel):
|
|
105
107
|
return cls.model_validate(obj)
|
106
108
|
|
107
109
|
_obj = cls.model_validate({
|
108
|
-
"walking_speed": obj.get("walking_speed"),
|
110
|
+
"walking_speed": obj.get("walking_speed") if obj.get("walking_speed") is not None else 5.1,
|
109
111
|
"walkway_factor": obj.get("walkway_factor") if obj.get("walkway_factor") is not None else 1,
|
110
112
|
"sidewalk_factor": obj.get("sidewalk_factor") if obj.get("sidewalk_factor") is not None else 1,
|
111
113
|
"alley_factor": obj.get("alley_factor") if obj.get("alley_factor") is not None else 2,
|
@@ -120,7 +122,8 @@ class PedestrianCostingOptions(BaseModel):
|
|
120
122
|
"service_factor": obj.get("service_factor") if obj.get("service_factor") is not None else 1,
|
121
123
|
"max_hiking_difficulty": obj.get("max_hiking_difficulty") if obj.get("max_hiking_difficulty") is not None else 1,
|
122
124
|
"bss_rent_cost": obj.get("bss_rent_cost") if obj.get("bss_rent_cost") is not None else 120,
|
123
|
-
"bss_rent_penalty": obj.get("bss_rent_penalty") if obj.get("bss_rent_penalty") is not None else 0
|
125
|
+
"bss_rent_penalty": obj.get("bss_rent_penalty") if obj.get("bss_rent_penalty") is not None else 0,
|
126
|
+
"type": obj.get("type")
|
124
127
|
})
|
125
128
|
# store additional fields in additional_properties
|
126
129
|
for _key in obj.keys():
|
@@ -0,0 +1,39 @@
|
|
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: 9.1.1
|
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 json
|
18
|
+
from enum import Enum
|
19
|
+
from typing_extensions import Self
|
20
|
+
|
21
|
+
|
22
|
+
class PedestrianType(str, Enum):
|
23
|
+
"""
|
24
|
+
If set to blind, enables additional route instructions which are helpful for blind users. These include announcing street crossings, stairs, bridges, tunnels, gates, and bollards passed on the route. If set to wheelchair, the walking speed and step penalty are adjusted for wheelchair users.
|
25
|
+
"""
|
26
|
+
|
27
|
+
"""
|
28
|
+
allowed enum values
|
29
|
+
"""
|
30
|
+
FOOT = 'foot'
|
31
|
+
BLIND = 'blind'
|
32
|
+
WHEELCHAIR = 'wheelchair'
|
33
|
+
|
34
|
+
@classmethod
|
35
|
+
def from_json(cls, json_str: str) -> Self:
|
36
|
+
"""Create an instance of PedestrianType from a JSON string"""
|
37
|
+
return cls(json.loads(json_str))
|
38
|
+
|
39
|
+
|
@@ -0,0 +1,104 @@
|
|
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: 9.1.1
|
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, StrictFloat, StrictInt, StrictStr
|
22
|
+
from typing import Any, ClassVar, Dict, List, Union
|
23
|
+
from typing_extensions import Annotated
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
26
|
+
|
27
|
+
class Point(BaseModel):
|
28
|
+
"""
|
29
|
+
A point geometry.
|
30
|
+
""" # noqa: E501
|
31
|
+
coordinates: Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=2)]
|
32
|
+
type: StrictStr
|
33
|
+
additional_properties: Dict[str, Any] = {}
|
34
|
+
__properties: ClassVar[List[str]] = ["coordinates", "type"]
|
35
|
+
|
36
|
+
model_config = ConfigDict(
|
37
|
+
populate_by_name=True,
|
38
|
+
validate_assignment=True,
|
39
|
+
protected_namespaces=(),
|
40
|
+
)
|
41
|
+
|
42
|
+
|
43
|
+
def to_str(self) -> str:
|
44
|
+
"""Returns the string representation of the model using alias"""
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
46
|
+
|
47
|
+
def to_json(self) -> str:
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
50
|
+
return json.dumps(self.to_dict())
|
51
|
+
|
52
|
+
@classmethod
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
54
|
+
"""Create an instance of Point from a JSON string"""
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
56
|
+
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
59
|
+
|
60
|
+
This has the following differences from calling pydantic's
|
61
|
+
`self.model_dump(by_alias=True)`:
|
62
|
+
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
64
|
+
were set at model initialization. Other fields with value `None`
|
65
|
+
are ignored.
|
66
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
67
|
+
"""
|
68
|
+
excluded_fields: Set[str] = set([
|
69
|
+
"additional_properties",
|
70
|
+
])
|
71
|
+
|
72
|
+
_dict = self.model_dump(
|
73
|
+
by_alias=True,
|
74
|
+
exclude=excluded_fields,
|
75
|
+
exclude_none=True,
|
76
|
+
)
|
77
|
+
# puts key-value pairs in additional_properties in the top level
|
78
|
+
if self.additional_properties is not None:
|
79
|
+
for _key, _value in self.additional_properties.items():
|
80
|
+
_dict[_key] = _value
|
81
|
+
|
82
|
+
return _dict
|
83
|
+
|
84
|
+
@classmethod
|
85
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
86
|
+
"""Create an instance of Point from a dict"""
|
87
|
+
if obj is None:
|
88
|
+
return None
|
89
|
+
|
90
|
+
if not isinstance(obj, dict):
|
91
|
+
return cls.model_validate(obj)
|
92
|
+
|
93
|
+
_obj = cls.model_validate({
|
94
|
+
"coordinates": obj.get("coordinates"),
|
95
|
+
"type": obj.get("type")
|
96
|
+
})
|
97
|
+
# store additional fields in additional_properties
|
98
|
+
for _key in obj.keys():
|
99
|
+
if _key not in cls.__properties:
|
100
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
101
|
+
|
102
|
+
return _obj
|
103
|
+
|
104
|
+
|
@@ -0,0 +1,38 @@
|
|
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: 9.1.1
|
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 json
|
18
|
+
from enum import Enum
|
19
|
+
from typing_extensions import Self
|
20
|
+
|
21
|
+
|
22
|
+
class Precision(str, Enum):
|
23
|
+
"""
|
24
|
+
The level of precision for the geometry.
|
25
|
+
"""
|
26
|
+
|
27
|
+
"""
|
28
|
+
allowed enum values
|
29
|
+
"""
|
30
|
+
POINT = 'point'
|
31
|
+
CENTROID = 'centroid'
|
32
|
+
|
33
|
+
@classmethod
|
34
|
+
def from_json(cls, json_str: str) -> Self:
|
35
|
+
"""Create an instance of Precision from a JSON string"""
|
36
|
+
return cls(json.loads(json_str))
|
37
|
+
|
38
|
+
|
@@ -0,0 +1,184 @@
|
|
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: 9.1.1
|
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, StrictFloat, StrictInt, StrictStr
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
23
|
+
from stadiamaps.models.addendum_v2 import AddendumV2
|
24
|
+
from stadiamaps.models.address_components_v2 import AddressComponentsV2
|
25
|
+
from stadiamaps.models.context import Context
|
26
|
+
from stadiamaps.models.match_type import MatchType
|
27
|
+
from stadiamaps.models.precision import Precision
|
28
|
+
from stadiamaps.models.source_attribution import SourceAttribution
|
29
|
+
from typing import Optional, Set
|
30
|
+
from typing_extensions import Self
|
31
|
+
|
32
|
+
class PropertiesV2(BaseModel):
|
33
|
+
"""
|
34
|
+
The GeoJSON properties object.
|
35
|
+
""" # noqa: E501
|
36
|
+
addendum: Optional[AddendumV2] = None
|
37
|
+
address_components: Optional[AddressComponentsV2] = None
|
38
|
+
coarse_location: Optional[StrictStr] = Field(default=None, description="The coarse-grained location of the place (e.g. Seoul, South Korea). In search experiences, this is typically the second line of a result cell.")
|
39
|
+
confidence: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The level of confidence (0.0 - 1.0) that the result is what you actually searched for. This is not necessarily the same as relevance (results are returned sorted by relevance already), but rather how closely the explicit or inferred components match the result. This is only present for forward geocoding responses (not autocomplete or place details).")
|
40
|
+
context: Optional[Context] = None
|
41
|
+
distance: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The distance from the search focus point, in kilometers.")
|
42
|
+
formatted_address_line: Optional[StrictStr] = Field(default=None, description="The address formatted as a single line, following local postal conventions for ordering and separators.")
|
43
|
+
formatted_address_lines: Optional[List[StrictStr]] = Field(default=None, description="Address components split up into lines, following local postal conventions for ordering and separators.")
|
44
|
+
gid: StrictStr = Field(description="The globally unique identifier for this result. You can use this to uniquely identify a place, and to get the full details from the place details endpoint. NOTE: While GIDs are unique, they may not necessarily be stable in all datasets.")
|
45
|
+
layer: StrictStr = Field(description="The data layer containing the place (e.g. \"address\" or \"poi\").")
|
46
|
+
match_type: Optional[MatchType] = Field(default=None, description="The type of match (forward geocoding endpoints only).")
|
47
|
+
name: StrictStr = Field(description="The best name for the place, accounting for request language preferences. When building an autocomplete search experience, this is the primary display string.")
|
48
|
+
precision: Precision
|
49
|
+
sources: Optional[List[SourceAttribution]] = Field(default=None, description="A list of sources from which the result is derived.")
|
50
|
+
additional_properties: Dict[str, Any] = {}
|
51
|
+
__properties: ClassVar[List[str]] = ["addendum", "address_components", "coarse_location", "confidence", "context", "distance", "formatted_address_line", "formatted_address_lines", "gid", "layer", "match_type", "name", "precision", "sources"]
|
52
|
+
|
53
|
+
model_config = ConfigDict(
|
54
|
+
populate_by_name=True,
|
55
|
+
validate_assignment=True,
|
56
|
+
protected_namespaces=(),
|
57
|
+
)
|
58
|
+
|
59
|
+
|
60
|
+
def to_str(self) -> str:
|
61
|
+
"""Returns the string representation of the model using alias"""
|
62
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
63
|
+
|
64
|
+
def to_json(self) -> str:
|
65
|
+
"""Returns the JSON representation of the model using alias"""
|
66
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
67
|
+
return json.dumps(self.to_dict())
|
68
|
+
|
69
|
+
@classmethod
|
70
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
71
|
+
"""Create an instance of PropertiesV2 from a JSON string"""
|
72
|
+
return cls.from_dict(json.loads(json_str))
|
73
|
+
|
74
|
+
def to_dict(self) -> Dict[str, Any]:
|
75
|
+
"""Return the dictionary representation of the model using alias.
|
76
|
+
|
77
|
+
This has the following differences from calling pydantic's
|
78
|
+
`self.model_dump(by_alias=True)`:
|
79
|
+
|
80
|
+
* `None` is only added to the output dict for nullable fields that
|
81
|
+
were set at model initialization. Other fields with value `None`
|
82
|
+
are ignored.
|
83
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
84
|
+
"""
|
85
|
+
excluded_fields: Set[str] = set([
|
86
|
+
"additional_properties",
|
87
|
+
])
|
88
|
+
|
89
|
+
_dict = self.model_dump(
|
90
|
+
by_alias=True,
|
91
|
+
exclude=excluded_fields,
|
92
|
+
exclude_none=True,
|
93
|
+
)
|
94
|
+
# override the default output from pydantic by calling `to_dict()` of addendum
|
95
|
+
if self.addendum:
|
96
|
+
_dict['addendum'] = self.addendum.to_dict()
|
97
|
+
# override the default output from pydantic by calling `to_dict()` of address_components
|
98
|
+
if self.address_components:
|
99
|
+
_dict['address_components'] = self.address_components.to_dict()
|
100
|
+
# override the default output from pydantic by calling `to_dict()` of context
|
101
|
+
if self.context:
|
102
|
+
_dict['context'] = self.context.to_dict()
|
103
|
+
# override the default output from pydantic by calling `to_dict()` of each item in sources (list)
|
104
|
+
_items = []
|
105
|
+
if self.sources:
|
106
|
+
for _item_sources in self.sources:
|
107
|
+
if _item_sources:
|
108
|
+
_items.append(_item_sources.to_dict())
|
109
|
+
_dict['sources'] = _items
|
110
|
+
# puts key-value pairs in additional_properties in the top level
|
111
|
+
if self.additional_properties is not None:
|
112
|
+
for _key, _value in self.additional_properties.items():
|
113
|
+
_dict[_key] = _value
|
114
|
+
|
115
|
+
# set to None if addendum (nullable) is None
|
116
|
+
# and model_fields_set contains the field
|
117
|
+
if self.addendum is None and "addendum" in self.model_fields_set:
|
118
|
+
_dict['addendum'] = None
|
119
|
+
|
120
|
+
# set to None if address_components (nullable) is None
|
121
|
+
# and model_fields_set contains the field
|
122
|
+
if self.address_components is None and "address_components" in self.model_fields_set:
|
123
|
+
_dict['address_components'] = None
|
124
|
+
|
125
|
+
# set to None if coarse_location (nullable) is None
|
126
|
+
# and model_fields_set contains the field
|
127
|
+
if self.coarse_location is None and "coarse_location" in self.model_fields_set:
|
128
|
+
_dict['coarse_location'] = None
|
129
|
+
|
130
|
+
# set to None if confidence (nullable) is None
|
131
|
+
# and model_fields_set contains the field
|
132
|
+
if self.confidence is None and "confidence" in self.model_fields_set:
|
133
|
+
_dict['confidence'] = None
|
134
|
+
|
135
|
+
# set to None if context (nullable) is None
|
136
|
+
# and model_fields_set contains the field
|
137
|
+
if self.context is None and "context" in self.model_fields_set:
|
138
|
+
_dict['context'] = None
|
139
|
+
|
140
|
+
# set to None if distance (nullable) is None
|
141
|
+
# and model_fields_set contains the field
|
142
|
+
if self.distance is None and "distance" in self.model_fields_set:
|
143
|
+
_dict['distance'] = None
|
144
|
+
|
145
|
+
# set to None if match_type (nullable) is None
|
146
|
+
# and model_fields_set contains the field
|
147
|
+
if self.match_type is None and "match_type" in self.model_fields_set:
|
148
|
+
_dict['match_type'] = None
|
149
|
+
|
150
|
+
return _dict
|
151
|
+
|
152
|
+
@classmethod
|
153
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
154
|
+
"""Create an instance of PropertiesV2 from a dict"""
|
155
|
+
if obj is None:
|
156
|
+
return None
|
157
|
+
|
158
|
+
if not isinstance(obj, dict):
|
159
|
+
return cls.model_validate(obj)
|
160
|
+
|
161
|
+
_obj = cls.model_validate({
|
162
|
+
"addendum": AddendumV2.from_dict(obj["addendum"]) if obj.get("addendum") is not None else None,
|
163
|
+
"address_components": AddressComponentsV2.from_dict(obj["address_components"]) if obj.get("address_components") is not None else None,
|
164
|
+
"coarse_location": obj.get("coarse_location"),
|
165
|
+
"confidence": obj.get("confidence"),
|
166
|
+
"context": Context.from_dict(obj["context"]) if obj.get("context") is not None else None,
|
167
|
+
"distance": obj.get("distance"),
|
168
|
+
"formatted_address_line": obj.get("formatted_address_line"),
|
169
|
+
"formatted_address_lines": obj.get("formatted_address_lines"),
|
170
|
+
"gid": obj.get("gid"),
|
171
|
+
"layer": obj.get("layer"),
|
172
|
+
"match_type": obj.get("match_type"),
|
173
|
+
"name": obj.get("name"),
|
174
|
+
"precision": obj.get("precision"),
|
175
|
+
"sources": [SourceAttribution.from_dict(_item) for _item in obj["sources"]] if obj.get("sources") is not None else None
|
176
|
+
})
|
177
|
+
# store additional fields in additional_properties
|
178
|
+
for _key in obj.keys():
|
179
|
+
if _key not in cls.__properties:
|
180
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
181
|
+
|
182
|
+
return _obj
|
183
|
+
|
184
|
+
|
@@ -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: 9.1.1
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -28,19 +28,19 @@ class Restrictions(BaseModel):
|
|
28
28
|
Restrictions
|
29
29
|
""" # noqa: E501
|
30
30
|
golf_cart: Optional[StrictBool] = None
|
31
|
-
truck: Optional[StrictBool] = None
|
32
|
-
pedestrian: Optional[StrictBool] = None
|
33
31
|
wheelchair: Optional[StrictBool] = None
|
34
32
|
taxi: Optional[StrictBool] = None
|
35
33
|
hov: Optional[StrictBool] = Field(default=None, alias="HOV")
|
34
|
+
truck: Optional[StrictBool] = None
|
36
35
|
emergency: Optional[StrictBool] = None
|
37
|
-
|
36
|
+
pedestrian: Optional[StrictBool] = None
|
38
37
|
car: Optional[StrictBool] = None
|
39
|
-
moped: Optional[StrictBool] = None
|
40
38
|
bus: Optional[StrictBool] = None
|
41
39
|
bicycle: Optional[StrictBool] = None
|
40
|
+
motorcycle: Optional[StrictBool] = None
|
41
|
+
moped: Optional[StrictBool] = None
|
42
42
|
additional_properties: Dict[str, Any] = {}
|
43
|
-
__properties: ClassVar[List[str]] = ["golf_cart", "
|
43
|
+
__properties: ClassVar[List[str]] = ["golf_cart", "wheelchair", "taxi", "HOV", "truck", "emergency", "pedestrian", "car", "bus", "bicycle", "motorcycle", "moped"]
|
44
44
|
|
45
45
|
model_config = ConfigDict(
|
46
46
|
populate_by_name=True,
|
@@ -101,17 +101,17 @@ class Restrictions(BaseModel):
|
|
101
101
|
|
102
102
|
_obj = cls.model_validate({
|
103
103
|
"golf_cart": obj.get("golf_cart"),
|
104
|
-
"truck": obj.get("truck"),
|
105
|
-
"pedestrian": obj.get("pedestrian"),
|
106
104
|
"wheelchair": obj.get("wheelchair"),
|
107
105
|
"taxi": obj.get("taxi"),
|
108
106
|
"HOV": obj.get("HOV"),
|
107
|
+
"truck": obj.get("truck"),
|
109
108
|
"emergency": obj.get("emergency"),
|
110
|
-
"
|
109
|
+
"pedestrian": obj.get("pedestrian"),
|
111
110
|
"car": obj.get("car"),
|
112
|
-
"moped": obj.get("moped"),
|
113
111
|
"bus": obj.get("bus"),
|
114
|
-
"bicycle": obj.get("bicycle")
|
112
|
+
"bicycle": obj.get("bicycle"),
|
113
|
+
"motorcycle": obj.get("motorcycle"),
|
114
|
+
"moped": obj.get("moped")
|
115
115
|
})
|
116
116
|
# store additional fields in additional_properties
|
117
117
|
for _key in obj.keys():
|
stadiamaps/models/road_class.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: 9.1.1
|
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: 9.1.1
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
stadiamaps/models/route_leg.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: 9.1.1
|
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: 9.1.1
|
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: 9.1.1
|
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: 9.1.1
|
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: 9.1.1
|
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: 9.1.1
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
stadiamaps/models/route_trip.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: 9.1.1
|
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: 9.1.1
|
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: 9.1.1
|
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: 9.1.1
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -30,7 +30,7 @@ class RoutingResponseWaypoint(BaseModel):
|
|
30
30
|
""" # noqa: E501
|
31
31
|
lat: Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]] = Field(description="The latitude of a point in the shape.")
|
32
32
|
lon: Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]] = Field(description="The longitude of a point in the shape.")
|
33
|
-
type: Optional[StrictStr] = Field(default=
|
33
|
+
type: Optional[StrictStr] = Field(default=None, description="A `break` represents the start or end of a leg, and allows reversals. A `through` location is an intermediate waypoint that must be visited between `break`s, but at which reversals are not allowed. A `via` is similar to a `through` except that reversals are allowed. A `break_through` is similar to a `break` in that it can be the start/end of a leg, but does not allow reversals. Defaults to `break`.")
|
34
34
|
original_index: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="The original index of the location (locations may be reordered for optimized routes)")
|
35
35
|
additional_properties: Dict[str, Any] = {}
|
36
36
|
__properties: ClassVar[List[str]] = ["lat", "lon", "type", "original_index"]
|
@@ -105,7 +105,7 @@ class RoutingResponseWaypoint(BaseModel):
|
|
105
105
|
_obj = cls.model_validate({
|
106
106
|
"lat": obj.get("lat"),
|
107
107
|
"lon": obj.get("lon"),
|
108
|
-
"type": obj.get("type")
|
108
|
+
"type": obj.get("type"),
|
109
109
|
"original_index": obj.get("original_index")
|
110
110
|
})
|
111
111
|
# 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: 9.1.1
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -31,7 +31,7 @@ class RoutingWaypoint(BaseModel):
|
|
31
31
|
""" # noqa: E501
|
32
32
|
lat: Union[Annotated[float, Field(le=90, strict=True, ge=-90)], Annotated[int, Field(le=90, strict=True, ge=-90)]] = Field(description="The latitude of a point in the shape.")
|
33
33
|
lon: Union[Annotated[float, Field(le=180, strict=True, ge=-180)], Annotated[int, Field(le=180, strict=True, ge=-180)]] = Field(description="The longitude of a point in the shape.")
|
34
|
-
type: Optional[StrictStr] = Field(default=
|
34
|
+
type: Optional[StrictStr] = Field(default=None, description="A `break` represents the start or end of a leg, and allows reversals. A `through` location is an intermediate waypoint that must be visited between `break`s, but at which reversals are not allowed. A `via` is similar to a `through` except that reversals are allowed. A `break_through` is similar to a `break` in that it can be the start/end of a leg, but does not allow reversals. Defaults to `break`.")
|
35
35
|
heading: Optional[Annotated[int, Field(le=360, strict=True, ge=0)]] = Field(default=None, description="The preferred direction of travel when starting the route, in integer clockwise degrees from north. North is 0, south is 180, east is 90, and west is 270.")
|
36
36
|
heading_tolerance: Optional[Annotated[int, Field(le=360, strict=True, ge=0)]] = Field(default=60, description="The tolerance (in degrees) determining whether a street is considered the same direction.")
|
37
37
|
minimum_reachability: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=50, description="The minimum number of nodes that must be reachable for a given edge to consider that edge as belonging to a connected region. If a candidate edge has fewer connections, it will be considered a disconnected island.")
|
@@ -128,7 +128,7 @@ class RoutingWaypoint(BaseModel):
|
|
128
128
|
_obj = cls.model_validate({
|
129
129
|
"lat": obj.get("lat"),
|
130
130
|
"lon": obj.get("lon"),
|
131
|
-
"type": obj.get("type")
|
131
|
+
"type": obj.get("type"),
|
132
132
|
"heading": obj.get("heading"),
|
133
133
|
"heading_tolerance": obj.get("heading_tolerance") if obj.get("heading_tolerance") is not None else 60,
|
134
134
|
"minimum_reachability": obj.get("minimum_reachability") if obj.get("minimum_reachability") is not None else 50,
|