stadiamaps 1.0.7__py3-none-any.whl → 2.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 +6 -24
- stadiamaps/api/geocoding_api.py +1917 -760
- stadiamaps/api/geospatial_api.py +483 -221
- stadiamaps/api/routing_api.py +1615 -723
- stadiamaps/api_client.py +275 -272
- stadiamaps/api_response.py +12 -16
- stadiamaps/configuration.py +13 -11
- stadiamaps/exceptions.py +67 -30
- stadiamaps/models/__init__.py +5 -23
- stadiamaps/models/access.py +44 -26
- stadiamaps/models/admin_region.py +46 -28
- stadiamaps/models/administrative.py +48 -30
- stadiamaps/models/auto_costing_options.py +75 -48
- stadiamaps/models/base_costing_options.py +59 -34
- stadiamaps/models/base_trace_request.py +70 -40
- stadiamaps/models/bicycle_costing_options.py +67 -42
- stadiamaps/models/bike_network.py +42 -24
- stadiamaps/models/contour.py +45 -27
- stadiamaps/models/coordinate.py +45 -26
- stadiamaps/models/costing_model.py +10 -12
- stadiamaps/models/costing_options.py +51 -33
- stadiamaps/models/directions_options.py +45 -27
- stadiamaps/models/distance_unit.py +8 -11
- stadiamaps/models/edge_sign.py +46 -28
- stadiamaps/models/edge_use.py +8 -11
- stadiamaps/models/end_node.py +48 -30
- stadiamaps/models/geo_attributes.py +47 -29
- stadiamaps/models/geo_json_geometry.py +25 -25
- stadiamaps/models/geo_json_geometry_base.py +45 -27
- stadiamaps/models/geo_json_line_string.py +47 -28
- stadiamaps/models/geo_json_line_string_all_of.py +1 -1
- stadiamaps/models/geo_json_point.py +47 -28
- stadiamaps/models/geo_json_point_all_of.py +1 -1
- stadiamaps/models/geo_json_polygon.py +47 -28
- stadiamaps/models/geo_json_polygon_all_of.py +1 -1
- stadiamaps/models/geocoding_object.py +46 -28
- stadiamaps/models/height_request.py +55 -34
- stadiamaps/models/height_response.py +49 -30
- stadiamaps/models/highway_classification.py +52 -34
- stadiamaps/models/intersecting_edge.py +45 -27
- stadiamaps/models/isochrone_costing_model.py +8 -11
- stadiamaps/models/isochrone_feature.py +45 -27
- stadiamaps/models/isochrone_properties.py +48 -30
- stadiamaps/models/isochrone_request.py +54 -35
- stadiamaps/models/isochrone_response.py +47 -29
- stadiamaps/models/locate_detailed_edge.py +73 -55
- stadiamaps/models/locate_edge.py +56 -39
- stadiamaps/models/locate_edge_info.py +47 -29
- stadiamaps/models/locate_node.py +50 -31
- stadiamaps/models/locate_object.py +49 -31
- stadiamaps/models/maneuver_sign.py +50 -32
- stadiamaps/models/maneuver_sign_element.py +45 -27
- stadiamaps/models/map_match_costing_model.py +8 -11
- stadiamaps/models/map_match_request.py +74 -44
- stadiamaps/models/map_match_route_response.py +57 -29
- stadiamaps/models/map_match_trace_options.py +47 -29
- stadiamaps/models/map_match_waypoint.py +49 -30
- stadiamaps/models/matched_point.py +52 -34
- stadiamaps/models/matrix_costing_model.py +9 -12
- stadiamaps/models/matrix_distance.py +46 -28
- stadiamaps/models/matrix_request.py +70 -39
- stadiamaps/models/matrix_response.py +60 -36
- stadiamaps/models/motor_scooter_costing_options.py +76 -49
- stadiamaps/models/motorcycle_costing_options.py +75 -48
- stadiamaps/models/nearest_roads_request.py +65 -34
- stadiamaps/models/node_id.py +42 -24
- stadiamaps/models/node_type.py +8 -11
- stadiamaps/models/optimized_route_request.py +66 -35
- stadiamaps/models/pedestrian_costing_options.py +59 -40
- stadiamaps/models/pelias_geo_json_feature.py +50 -31
- stadiamaps/models/pelias_geo_json_properties.py +54 -36
- stadiamaps/models/pelias_geo_json_properties_addendum.py +43 -25
- stadiamaps/models/pelias_geo_json_properties_addendum_osm.py +42 -24
- stadiamaps/models/pelias_layer.py +8 -11
- stadiamaps/models/pelias_response.py +49 -30
- stadiamaps/models/pelias_source.py +8 -11
- stadiamaps/models/restrictions.py +44 -26
- stadiamaps/models/road_class.py +8 -11
- stadiamaps/models/route_leg.py +48 -29
- stadiamaps/models/route_maneuver.py +73 -55
- stadiamaps/models/route_request.py +76 -43
- stadiamaps/models/route_response.py +56 -28
- stadiamaps/models/route_response_alternates_inner.py +105 -0
- stadiamaps/models/route_summary.py +48 -30
- stadiamaps/models/route_trip.py +135 -0
- stadiamaps/models/routing_response_waypoint.py +49 -30
- stadiamaps/models/routing_waypoint.py +60 -41
- stadiamaps/models/routing_waypoint_all_of_search_filter.py +48 -30
- stadiamaps/models/simple_routing_waypoint.py +48 -29
- stadiamaps/models/speeds.py +49 -31
- stadiamaps/models/trace_attribute_filter_options.py +47 -28
- stadiamaps/models/trace_attribute_key.py +8 -11
- stadiamaps/models/trace_attributes_base_response.py +51 -32
- stadiamaps/models/trace_attributes_request.py +72 -42
- stadiamaps/models/trace_attributes_request_all_of_filters.py +1 -1
- stadiamaps/models/trace_attributes_response.py +54 -35
- stadiamaps/models/trace_edge.py +88 -70
- stadiamaps/models/travel_mode.py +8 -11
- stadiamaps/models/traversability.py +8 -11
- stadiamaps/models/truck_costing_options.py +78 -51
- stadiamaps/models/tz_response.py +45 -27
- stadiamaps/models/valhalla_languages.py +8 -11
- stadiamaps/models/valhalla_long_units.py +8 -11
- stadiamaps/models/warning.py +42 -24
- stadiamaps/py.typed +0 -0
- stadiamaps/rest.py +127 -172
- {stadiamaps-1.0.7.dist-info → stadiamaps-2.1.0.dist-info}/METADATA +4 -4
- stadiamaps-2.1.0.dist-info/RECORD +128 -0
- {stadiamaps-1.0.7.dist-info → stadiamaps-2.1.0.dist-info}/WHEEL +1 -1
- stadiamaps-1.0.7.dist-info/RECORD +0 -125
- {stadiamaps-1.0.7.dist-info → stadiamaps-2.1.0.dist-info}/LICENSE.txt +0 -0
- {stadiamaps-1.0.7.dist-info → stadiamaps-2.1.0.dist-info}/top_level.txt +0 -0
@@ -3,14 +3,14 @@
|
|
3
3
|
"""
|
4
4
|
Stadia Maps Geospatial APIs
|
5
5
|
|
6
|
-
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
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: 6.1.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
12
12
|
Do not edit the class manually.
|
13
|
-
"""
|
13
|
+
""" # noqa: E501
|
14
14
|
|
15
15
|
|
16
16
|
from __future__ import annotations
|
@@ -18,52 +18,70 @@ import pprint
|
|
18
18
|
import re # noqa: F401
|
19
19
|
import json
|
20
20
|
|
21
|
-
|
22
|
-
from typing import List, Optional
|
23
|
-
from
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
23
|
+
from typing_extensions import Annotated
|
24
24
|
from stadiamaps.models.coordinate import Coordinate
|
25
25
|
from stadiamaps.models.matrix_distance import MatrixDistance
|
26
26
|
from stadiamaps.models.valhalla_long_units import ValhallaLongUnits
|
27
27
|
from stadiamaps.models.warning import Warning
|
28
|
+
from typing import Optional, Set
|
29
|
+
from typing_extensions import Self
|
28
30
|
|
29
31
|
class MatrixResponse(BaseModel):
|
30
32
|
"""
|
31
33
|
MatrixResponse
|
32
|
-
"""
|
33
|
-
id: Optional[StrictStr] = Field(None, description="An identifier to disambiguate requests (echoed by the server).")
|
34
|
-
sources:
|
35
|
-
targets:
|
36
|
-
sources_to_targets:
|
37
|
-
warnings: Optional[
|
38
|
-
units: ValhallaLongUnits
|
34
|
+
""" # noqa: E501
|
35
|
+
id: Optional[StrictStr] = Field(default=None, description="An identifier to disambiguate requests (echoed by the server).")
|
36
|
+
sources: Annotated[List[Coordinate], Field(min_length=1)] = Field(description="The list of starting locations")
|
37
|
+
targets: Annotated[List[Coordinate], Field(min_length=1)] = Field(description="The list of ending locations")
|
38
|
+
sources_to_targets: Annotated[List[List[MatrixDistance]], Field(min_length=1)] = Field(description="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.")
|
39
|
+
warnings: Optional[List[Warning]] = None
|
40
|
+
units: ValhallaLongUnits
|
39
41
|
additional_properties: Dict[str, Any] = {}
|
40
|
-
__properties = ["id", "sources", "targets", "sources_to_targets", "warnings", "units"]
|
42
|
+
__properties: ClassVar[List[str]] = ["id", "sources", "targets", "sources_to_targets", "warnings", "units"]
|
43
|
+
|
44
|
+
model_config = ConfigDict(
|
45
|
+
populate_by_name=True,
|
46
|
+
validate_assignment=True,
|
47
|
+
protected_namespaces=(),
|
48
|
+
)
|
41
49
|
|
42
|
-
class Config:
|
43
|
-
"""Pydantic configuration"""
|
44
|
-
allow_population_by_field_name = True
|
45
|
-
validate_assignment = True
|
46
50
|
|
47
51
|
def to_str(self) -> str:
|
48
52
|
"""Returns the string representation of the model using alias"""
|
49
|
-
return pprint.pformat(self.
|
53
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
50
54
|
|
51
55
|
def to_json(self) -> str:
|
52
56
|
"""Returns the JSON representation of the model using alias"""
|
57
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
53
58
|
return json.dumps(self.to_dict())
|
54
59
|
|
55
60
|
@classmethod
|
56
|
-
def from_json(cls, json_str: str) ->
|
61
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
57
62
|
"""Create an instance of MatrixResponse from a JSON string"""
|
58
63
|
return cls.from_dict(json.loads(json_str))
|
59
64
|
|
60
|
-
def to_dict(self):
|
61
|
-
"""
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
65
|
+
def to_dict(self) -> Dict[str, Any]:
|
66
|
+
"""Return the dictionary representation of the model using alias.
|
67
|
+
|
68
|
+
This has the following differences from calling pydantic's
|
69
|
+
`self.model_dump(by_alias=True)`:
|
70
|
+
|
71
|
+
* `None` is only added to the output dict for nullable fields that
|
72
|
+
were set at model initialization. Other fields with value `None`
|
73
|
+
are ignored.
|
74
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
75
|
+
"""
|
76
|
+
excluded_fields: Set[str] = set([
|
77
|
+
"additional_properties",
|
78
|
+
])
|
79
|
+
|
80
|
+
_dict = self.model_dump(
|
81
|
+
by_alias=True,
|
82
|
+
exclude=excluded_fields,
|
83
|
+
exclude_none=True,
|
84
|
+
)
|
67
85
|
# override the default output from pydantic by calling `to_dict()` of each item in sources (list)
|
68
86
|
_items = []
|
69
87
|
if self.sources:
|
@@ -78,12 +96,14 @@ class MatrixResponse(BaseModel):
|
|
78
96
|
if _item:
|
79
97
|
_items.append(_item.to_dict())
|
80
98
|
_dict['targets'] = _items
|
81
|
-
# override the default output from pydantic by calling `to_dict()` of each item in sources_to_targets (list)
|
99
|
+
# override the default output from pydantic by calling `to_dict()` of each item in sources_to_targets (list of list)
|
82
100
|
_items = []
|
83
101
|
if self.sources_to_targets:
|
84
102
|
for _item in self.sources_to_targets:
|
85
103
|
if _item:
|
86
|
-
_items.append(
|
104
|
+
_items.append(
|
105
|
+
[_inner_item.to_dict() for _inner_item in _item if _inner_item is not None]
|
106
|
+
)
|
87
107
|
_dict['sources_to_targets'] = _items
|
88
108
|
# override the default output from pydantic by calling `to_dict()` of each item in warnings (list)
|
89
109
|
_items = []
|
@@ -100,20 +120,23 @@ class MatrixResponse(BaseModel):
|
|
100
120
|
return _dict
|
101
121
|
|
102
122
|
@classmethod
|
103
|
-
def from_dict(cls, obj:
|
123
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
104
124
|
"""Create an instance of MatrixResponse from a dict"""
|
105
125
|
if obj is None:
|
106
126
|
return None
|
107
127
|
|
108
128
|
if not isinstance(obj, dict):
|
109
|
-
return
|
129
|
+
return cls.model_validate(obj)
|
110
130
|
|
111
|
-
_obj =
|
131
|
+
_obj = cls.model_validate({
|
112
132
|
"id": obj.get("id"),
|
113
|
-
"sources": [
|
114
|
-
"targets": [
|
115
|
-
"sources_to_targets": [
|
116
|
-
|
133
|
+
"sources": [Coordinate.from_dict(_item) for _item in obj["sources"]] if obj.get("sources") is not None else None,
|
134
|
+
"targets": [Coordinate.from_dict(_item) for _item in obj["targets"]] if obj.get("targets") is not None else None,
|
135
|
+
"sources_to_targets": [
|
136
|
+
[MatrixDistance.from_dict(_inner_item) for _inner_item in _item]
|
137
|
+
for _item in obj["sources_to_targets"]
|
138
|
+
] if obj.get("sources_to_targets") is not None else None,
|
139
|
+
"warnings": [Warning.from_dict(_item) for _item in obj["warnings"]] if obj.get("warnings") is not None else None,
|
117
140
|
"units": obj.get("units")
|
118
141
|
})
|
119
142
|
# store additional fields in additional_properties
|
@@ -123,3 +146,4 @@ class MatrixResponse(BaseModel):
|
|
123
146
|
|
124
147
|
return _obj
|
125
148
|
|
149
|
+
|
@@ -3,14 +3,14 @@
|
|
3
3
|
"""
|
4
4
|
Stadia Maps Geospatial APIs
|
5
5
|
|
6
|
-
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
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: 6.1.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
12
12
|
Do not edit the class manually.
|
13
|
-
"""
|
13
|
+
""" # noqa: E501
|
14
14
|
|
15
15
|
|
16
16
|
from __future__ import annotations
|
@@ -18,67 +18,89 @@ import pprint
|
|
18
18
|
import re # noqa: F401
|
19
19
|
import json
|
20
20
|
|
21
|
-
|
22
|
-
from typing import Optional, Union
|
23
|
-
from
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
23
|
+
from typing_extensions import Annotated
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
24
26
|
|
25
27
|
class MotorScooterCostingOptions(BaseModel):
|
26
28
|
"""
|
27
29
|
MotorScooterCostingOptions
|
28
|
-
"""
|
29
|
-
maneuver_penalty: Optional[StrictInt] = Field(5, description="A penalty (in seconds) applied when transitioning between roads (determined by name).")
|
30
|
-
gate_cost: Optional[StrictInt] = Field(15, description="The estimated cost (in seconds) when a gate is encountered.")
|
31
|
-
gate_penalty: Optional[StrictInt] = Field(300, description="A penalty (in seconds) applied to the route cost when a gate is encountered. This penalty can be used to reduce the likelihood of suggesting a route with gates unless absolutely necessary.")
|
32
|
-
country_crossing_cost: Optional[StrictInt] = Field(600, description="The estimated cost (in seconds) when encountering an international border.")
|
33
|
-
country_crossing_penalty: Optional[StrictInt] = Field(0, description="A penalty applied to transitions to international border crossings. This penalty can be used to reduce the likelihood of suggesting a route with border crossings unless absolutely necessary.")
|
34
|
-
service_penalty: Optional[StrictInt] = Field(None, description="A penalty applied to transitions to service roads. This penalty can be used to reduce the likelihood of suggesting a route with service roads unless absolutely necessary. The default penalty is 15 for cars, busses, motor scooters, and motorcycles; and zero for others.")
|
35
|
-
service_factor: Optional[Union[StrictFloat, StrictInt]] = Field(1, description="A factor that multiplies the cost when service roads are encountered. The default is 1.2 for cars and busses, and 1 for trucks, motor scooters, and motorcycles.")
|
36
|
-
use_living_streets: Optional[Union[
|
37
|
-
use_ferry: Optional[Union[
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
30
|
+
""" # noqa: E501
|
31
|
+
maneuver_penalty: Optional[StrictInt] = Field(default=5, description="A penalty (in seconds) applied when transitioning between roads (determined by name).")
|
32
|
+
gate_cost: Optional[StrictInt] = Field(default=15, description="The estimated cost (in seconds) when a gate is encountered.")
|
33
|
+
gate_penalty: Optional[StrictInt] = Field(default=300, description="A penalty (in seconds) applied to the route cost when a gate is encountered. This penalty can be used to reduce the likelihood of suggesting a route with gates unless absolutely necessary.")
|
34
|
+
country_crossing_cost: Optional[StrictInt] = Field(default=600, description="The estimated cost (in seconds) when encountering an international border.")
|
35
|
+
country_crossing_penalty: Optional[StrictInt] = Field(default=0, description="A penalty applied to transitions to international border crossings. This penalty can be used to reduce the likelihood of suggesting a route with border crossings unless absolutely necessary.")
|
36
|
+
service_penalty: Optional[StrictInt] = Field(default=None, description="A penalty applied to transitions to service roads. This penalty can be used to reduce the likelihood of suggesting a route with service roads unless absolutely necessary. The default penalty is 15 for cars, busses, motor scooters, and motorcycles; and zero for others.")
|
37
|
+
service_factor: Optional[Union[StrictFloat, StrictInt]] = Field(default=1, description="A factor that multiplies the cost when service roads are encountered. The default is 1.2 for cars and busses, and 1 for trucks, motor scooters, and motorcycles.")
|
38
|
+
use_living_streets: Optional[Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=None, description="A measure of willingness to take living streets. Values near 0 attempt to avoid them, and values near 1 will favour them. Note that as some routes may be impossible without living streets, 0 does not guarantee avoidance of them. The default value is 0 for trucks; 0.1 for other motor vehicles; 0.5 for bicycles; and 0.6 for pedestrians.")
|
39
|
+
use_ferry: Optional[Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=0.5, description="A measure of willingness to take ferries. Values near 0 attempt to avoid ferries, and values near 1 will favour them. Note that as some routes may be impossible without ferries, 0 does not guarantee avoidance of them.")
|
40
|
+
ignore_restrictions: Optional[StrictBool] = Field(default=None, description="If set to true, ignores any restrictions (eg: turn and conditional restrictions). Useful for matching GPS traces to the road network regardless of restrictions.")
|
41
|
+
ignore_non_vehicular_restrictions: Optional[StrictBool] = Field(default=None, description="If set to true, ignores most restrictions (eg: turn and conditional restrictions), but still respects restrictions that impact vehicle safety such as weight and size.")
|
42
|
+
ignore_oneways: Optional[StrictBool] = Field(default=None, description="If set to true, ignores directional restrictions on roads. Useful for matching GPS traces to the road network regardless of restrictions.")
|
43
|
+
height: Optional[Union[StrictFloat, StrictInt]] = Field(default=1.9, description="The height of the automobile (in meters).")
|
44
|
+
width: Optional[Union[StrictFloat, StrictInt]] = Field(default=1.6, description="The width of the automobile (in meters).")
|
45
|
+
toll_booth_cost: Optional[StrictInt] = Field(default=15, description="The estimated cost (in seconds) when a toll booth is encountered.")
|
46
|
+
toll_booth_penalty: Optional[StrictInt] = Field(default=0, description="A penalty (in seconds) applied to the route cost when a toll booth is encountered. This penalty can be used to reduce the likelihood of suggesting a route with toll booths unless absolutely necessary.")
|
47
|
+
ferry_cost: Optional[StrictInt] = Field(default=300, description="The estimated cost (in seconds) when a ferry is encountered.")
|
48
|
+
use_highways: Optional[Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=0.5, description="A measure of willingness to take highways. Values near 0 attempt to avoid highways, and values near 1 will favour them. Note that as some routes may be impossible without highways, 0 does not guarantee avoidance of them.")
|
49
|
+
use_tolls: Optional[Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=0.5, description="A measure of willingness to take toll roads. Values near 0 attempt to avoid tolls, and values near 1 will favour them. Note that as some routes may be impossible without tolls, 0 does not guarantee avoidance of them.")
|
50
|
+
use_tracks: Optional[Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=None, description="A measure of willingness to take track roads. Values near 0 attempt to avoid them, and values near 1 will favour them. Note that as some routes may be impossible without track roads, 0 does not guarantee avoidance of them. The default value is 0 for automobiles, busses, and trucks; and 0.5 for all other costing modes.")
|
51
|
+
top_speed: Optional[Annotated[int, Field(le=252, strict=True, ge=10)]] = Field(default=140, description="The top speed (in kph) that the vehicle is capable of travelling.")
|
52
|
+
shortest: Optional[StrictBool] = Field(default=False, description="If true changes the cost metric to be quasi-shortest (pure distance-based) costing. This will disable ALL other costing factors.")
|
53
|
+
ignore_closures: Optional[StrictBool] = Field(default=False, description="If true, ignores all known closures. This option cannot be set if `location.search_filter.exclude_closures` is also specified.")
|
54
|
+
include_hov2: Optional[StrictBool] = Field(default=False, description="If true, indicates the desire to include HOV roads with a 2-occupant requirement in the route when advantageous.")
|
55
|
+
include_hov3: Optional[StrictBool] = Field(default=False, description="If true, indicates the desire to include HOV roads with a 3-occupant requirement in the route when advantageous.")
|
56
|
+
include_hot: Optional[StrictBool] = Field(default=False, description="If true, indicates the desire to include toll roads which require the driver to pay a toll if the occupant requirement isn't met")
|
57
|
+
alley_factor: Optional[Union[StrictFloat, StrictInt]] = Field(default=1, description="A factor that multiplies the cost when alleys are encountered.")
|
58
|
+
use_primary: Optional[Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=0.5, description="A measure of willingness to use primary roads. Values near 0 attempt to avoid primary roads and stay on roads with lower speeds, and values near 1 indicate the rider is more comfortable on these roads.")
|
59
|
+
use_hills: Optional[Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=0.5, description="A measure of willingness to take tackle hills. Values near 0 attempt to avoid hills and steeper grades even if it means a longer route, and values near 1 indicates that the rider does not fear them. Note that as some routes may be impossible without hills, 0 does not guarantee avoidance of them.")
|
54
60
|
additional_properties: Dict[str, Any] = {}
|
55
|
-
__properties = ["maneuver_penalty", "gate_cost", "gate_penalty", "country_crossing_cost", "country_crossing_penalty", "service_penalty", "service_factor", "use_living_streets", "use_ferry", "height", "width", "toll_booth_cost", "toll_booth_penalty", "ferry_cost", "use_highways", "use_tolls", "use_tracks", "top_speed", "shortest", "ignore_closures", "include_hov2", "include_hov3", "include_hot", "use_primary", "use_hills"]
|
61
|
+
__properties: ClassVar[List[str]] = ["maneuver_penalty", "gate_cost", "gate_penalty", "country_crossing_cost", "country_crossing_penalty", "service_penalty", "service_factor", "use_living_streets", "use_ferry", "ignore_restrictions", "ignore_non_vehicular_restrictions", "ignore_oneways", "height", "width", "toll_booth_cost", "toll_booth_penalty", "ferry_cost", "use_highways", "use_tolls", "use_tracks", "top_speed", "shortest", "ignore_closures", "include_hov2", "include_hov3", "include_hot", "alley_factor", "use_primary", "use_hills"]
|
62
|
+
|
63
|
+
model_config = ConfigDict(
|
64
|
+
populate_by_name=True,
|
65
|
+
validate_assignment=True,
|
66
|
+
protected_namespaces=(),
|
67
|
+
)
|
56
68
|
|
57
|
-
class Config:
|
58
|
-
"""Pydantic configuration"""
|
59
|
-
allow_population_by_field_name = True
|
60
|
-
validate_assignment = True
|
61
69
|
|
62
70
|
def to_str(self) -> str:
|
63
71
|
"""Returns the string representation of the model using alias"""
|
64
|
-
return pprint.pformat(self.
|
72
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
65
73
|
|
66
74
|
def to_json(self) -> str:
|
67
75
|
"""Returns the JSON representation of the model using alias"""
|
76
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
68
77
|
return json.dumps(self.to_dict())
|
69
78
|
|
70
79
|
@classmethod
|
71
|
-
def from_json(cls, json_str: str) ->
|
80
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
72
81
|
"""Create an instance of MotorScooterCostingOptions from a JSON string"""
|
73
82
|
return cls.from_dict(json.loads(json_str))
|
74
83
|
|
75
|
-
def to_dict(self):
|
76
|
-
"""
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
84
|
+
def to_dict(self) -> Dict[str, Any]:
|
85
|
+
"""Return the dictionary representation of the model using alias.
|
86
|
+
|
87
|
+
This has the following differences from calling pydantic's
|
88
|
+
`self.model_dump(by_alias=True)`:
|
89
|
+
|
90
|
+
* `None` is only added to the output dict for nullable fields that
|
91
|
+
were set at model initialization. Other fields with value `None`
|
92
|
+
are ignored.
|
93
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
94
|
+
"""
|
95
|
+
excluded_fields: Set[str] = set([
|
96
|
+
"additional_properties",
|
97
|
+
])
|
98
|
+
|
99
|
+
_dict = self.model_dump(
|
100
|
+
by_alias=True,
|
101
|
+
exclude=excluded_fields,
|
102
|
+
exclude_none=True,
|
103
|
+
)
|
82
104
|
# puts key-value pairs in additional_properties in the top level
|
83
105
|
if self.additional_properties is not None:
|
84
106
|
for _key, _value in self.additional_properties.items():
|
@@ -87,15 +109,15 @@ class MotorScooterCostingOptions(BaseModel):
|
|
87
109
|
return _dict
|
88
110
|
|
89
111
|
@classmethod
|
90
|
-
def from_dict(cls, obj:
|
112
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
91
113
|
"""Create an instance of MotorScooterCostingOptions from a dict"""
|
92
114
|
if obj is None:
|
93
115
|
return None
|
94
116
|
|
95
117
|
if not isinstance(obj, dict):
|
96
|
-
return
|
118
|
+
return cls.model_validate(obj)
|
97
119
|
|
98
|
-
_obj =
|
120
|
+
_obj = cls.model_validate({
|
99
121
|
"maneuver_penalty": obj.get("maneuver_penalty") if obj.get("maneuver_penalty") is not None else 5,
|
100
122
|
"gate_cost": obj.get("gate_cost") if obj.get("gate_cost") is not None else 15,
|
101
123
|
"gate_penalty": obj.get("gate_penalty") if obj.get("gate_penalty") is not None else 300,
|
@@ -105,6 +127,9 @@ class MotorScooterCostingOptions(BaseModel):
|
|
105
127
|
"service_factor": obj.get("service_factor") if obj.get("service_factor") is not None else 1,
|
106
128
|
"use_living_streets": obj.get("use_living_streets"),
|
107
129
|
"use_ferry": obj.get("use_ferry") if obj.get("use_ferry") is not None else 0.5,
|
130
|
+
"ignore_restrictions": obj.get("ignore_restrictions"),
|
131
|
+
"ignore_non_vehicular_restrictions": obj.get("ignore_non_vehicular_restrictions"),
|
132
|
+
"ignore_oneways": obj.get("ignore_oneways"),
|
108
133
|
"height": obj.get("height") if obj.get("height") is not None else 1.9,
|
109
134
|
"width": obj.get("width") if obj.get("width") is not None else 1.6,
|
110
135
|
"toll_booth_cost": obj.get("toll_booth_cost") if obj.get("toll_booth_cost") is not None else 15,
|
@@ -119,6 +144,7 @@ class MotorScooterCostingOptions(BaseModel):
|
|
119
144
|
"include_hov2": obj.get("include_hov2") if obj.get("include_hov2") is not None else False,
|
120
145
|
"include_hov3": obj.get("include_hov3") if obj.get("include_hov3") is not None else False,
|
121
146
|
"include_hot": obj.get("include_hot") if obj.get("include_hot") is not None else False,
|
147
|
+
"alley_factor": obj.get("alley_factor") if obj.get("alley_factor") is not None else 1,
|
122
148
|
"use_primary": obj.get("use_primary") if obj.get("use_primary") is not None else 0.5,
|
123
149
|
"use_hills": obj.get("use_hills") if obj.get("use_hills") is not None else 0.5
|
124
150
|
})
|
@@ -129,3 +155,4 @@ class MotorScooterCostingOptions(BaseModel):
|
|
129
155
|
|
130
156
|
return _obj
|
131
157
|
|
158
|
+
|
@@ -3,14 +3,14 @@
|
|
3
3
|
"""
|
4
4
|
Stadia Maps Geospatial APIs
|
5
5
|
|
6
|
-
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
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: 6.1.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
12
12
|
Do not edit the class manually.
|
13
|
-
"""
|
13
|
+
""" # noqa: E501
|
14
14
|
|
15
15
|
|
16
16
|
from __future__ import annotations
|
@@ -18,66 +18,88 @@ import pprint
|
|
18
18
|
import re # noqa: F401
|
19
19
|
import json
|
20
20
|
|
21
|
-
|
22
|
-
from typing import Optional, Union
|
23
|
-
from
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
23
|
+
from typing_extensions import Annotated
|
24
|
+
from typing import Optional, Set
|
25
|
+
from typing_extensions import Self
|
24
26
|
|
25
27
|
class MotorcycleCostingOptions(BaseModel):
|
26
28
|
"""
|
27
29
|
MotorcycleCostingOptions
|
28
|
-
"""
|
29
|
-
maneuver_penalty: Optional[StrictInt] = Field(5, description="A penalty (in seconds) applied when transitioning between roads (determined by name).")
|
30
|
-
gate_cost: Optional[StrictInt] = Field(15, description="The estimated cost (in seconds) when a gate is encountered.")
|
31
|
-
gate_penalty: Optional[StrictInt] = Field(300, description="A penalty (in seconds) applied to the route cost when a gate is encountered. This penalty can be used to reduce the likelihood of suggesting a route with gates unless absolutely necessary.")
|
32
|
-
country_crossing_cost: Optional[StrictInt] = Field(600, description="The estimated cost (in seconds) when encountering an international border.")
|
33
|
-
country_crossing_penalty: Optional[StrictInt] = Field(0, description="A penalty applied to transitions to international border crossings. This penalty can be used to reduce the likelihood of suggesting a route with border crossings unless absolutely necessary.")
|
34
|
-
service_penalty: Optional[StrictInt] = Field(None, description="A penalty applied to transitions to service roads. This penalty can be used to reduce the likelihood of suggesting a route with service roads unless absolutely necessary. The default penalty is 15 for cars, busses, motor scooters, and motorcycles; and zero for others.")
|
35
|
-
service_factor: Optional[Union[StrictFloat, StrictInt]] = Field(1, description="A factor that multiplies the cost when service roads are encountered. The default is 1.2 for cars and busses, and 1 for trucks, motor scooters, and motorcycles.")
|
36
|
-
use_living_streets: Optional[Union[
|
37
|
-
use_ferry: Optional[Union[
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
30
|
+
""" # noqa: E501
|
31
|
+
maneuver_penalty: Optional[StrictInt] = Field(default=5, description="A penalty (in seconds) applied when transitioning between roads (determined by name).")
|
32
|
+
gate_cost: Optional[StrictInt] = Field(default=15, description="The estimated cost (in seconds) when a gate is encountered.")
|
33
|
+
gate_penalty: Optional[StrictInt] = Field(default=300, description="A penalty (in seconds) applied to the route cost when a gate is encountered. This penalty can be used to reduce the likelihood of suggesting a route with gates unless absolutely necessary.")
|
34
|
+
country_crossing_cost: Optional[StrictInt] = Field(default=600, description="The estimated cost (in seconds) when encountering an international border.")
|
35
|
+
country_crossing_penalty: Optional[StrictInt] = Field(default=0, description="A penalty applied to transitions to international border crossings. This penalty can be used to reduce the likelihood of suggesting a route with border crossings unless absolutely necessary.")
|
36
|
+
service_penalty: Optional[StrictInt] = Field(default=None, description="A penalty applied to transitions to service roads. This penalty can be used to reduce the likelihood of suggesting a route with service roads unless absolutely necessary. The default penalty is 15 for cars, busses, motor scooters, and motorcycles; and zero for others.")
|
37
|
+
service_factor: Optional[Union[StrictFloat, StrictInt]] = Field(default=1, description="A factor that multiplies the cost when service roads are encountered. The default is 1.2 for cars and busses, and 1 for trucks, motor scooters, and motorcycles.")
|
38
|
+
use_living_streets: Optional[Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=None, description="A measure of willingness to take living streets. Values near 0 attempt to avoid them, and values near 1 will favour them. Note that as some routes may be impossible without living streets, 0 does not guarantee avoidance of them. The default value is 0 for trucks; 0.1 for other motor vehicles; 0.5 for bicycles; and 0.6 for pedestrians.")
|
39
|
+
use_ferry: Optional[Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=0.5, description="A measure of willingness to take ferries. Values near 0 attempt to avoid ferries, and values near 1 will favour them. Note that as some routes may be impossible without ferries, 0 does not guarantee avoidance of them.")
|
40
|
+
ignore_restrictions: Optional[StrictBool] = Field(default=None, description="If set to true, ignores any restrictions (eg: turn and conditional restrictions). Useful for matching GPS traces to the road network regardless of restrictions.")
|
41
|
+
ignore_non_vehicular_restrictions: Optional[StrictBool] = Field(default=None, description="If set to true, ignores most restrictions (eg: turn and conditional restrictions), but still respects restrictions that impact vehicle safety such as weight and size.")
|
42
|
+
ignore_oneways: Optional[StrictBool] = Field(default=None, description="If set to true, ignores directional restrictions on roads. Useful for matching GPS traces to the road network regardless of restrictions.")
|
43
|
+
height: Optional[Union[StrictFloat, StrictInt]] = Field(default=1.9, description="The height of the automobile (in meters).")
|
44
|
+
width: Optional[Union[StrictFloat, StrictInt]] = Field(default=1.6, description="The width of the automobile (in meters).")
|
45
|
+
toll_booth_cost: Optional[StrictInt] = Field(default=15, description="The estimated cost (in seconds) when a toll booth is encountered.")
|
46
|
+
toll_booth_penalty: Optional[StrictInt] = Field(default=0, description="A penalty (in seconds) applied to the route cost when a toll booth is encountered. This penalty can be used to reduce the likelihood of suggesting a route with toll booths unless absolutely necessary.")
|
47
|
+
ferry_cost: Optional[StrictInt] = Field(default=300, description="The estimated cost (in seconds) when a ferry is encountered.")
|
48
|
+
use_highways: Optional[Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=1.0, description="A measure of willingness to use highways. Values near 0 attempt to avoid highways and stay on roads with lower speeds, and values near 1 indicate the rider is more comfortable on these roads.")
|
49
|
+
use_tolls: Optional[Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=0.5, description="A measure of willingness to take toll roads. Values near 0 attempt to avoid tolls, and values near 1 will favour them. Note that as some routes may be impossible without tolls, 0 does not guarantee avoidance of them.")
|
50
|
+
use_tracks: Optional[Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=None, description="A measure of willingness to take track roads. Values near 0 attempt to avoid them, and values near 1 will favour them. Note that as some routes may be impossible without track roads, 0 does not guarantee avoidance of them. The default value is 0 for automobiles, busses, and trucks; and 0.5 for all other costing modes.")
|
51
|
+
top_speed: Optional[Annotated[int, Field(le=252, strict=True, ge=10)]] = Field(default=140, description="The top speed (in kph) that the vehicle is capable of travelling.")
|
52
|
+
shortest: Optional[StrictBool] = Field(default=False, description="If true changes the cost metric to be quasi-shortest (pure distance-based) costing. This will disable ALL other costing factors.")
|
53
|
+
ignore_closures: Optional[StrictBool] = Field(default=False, description="If true, ignores all known closures. This option cannot be set if `location.search_filter.exclude_closures` is also specified.")
|
54
|
+
include_hov2: Optional[StrictBool] = Field(default=False, description="If true, indicates the desire to include HOV roads with a 2-occupant requirement in the route when advantageous.")
|
55
|
+
include_hov3: Optional[StrictBool] = Field(default=False, description="If true, indicates the desire to include HOV roads with a 3-occupant requirement in the route when advantageous.")
|
56
|
+
include_hot: Optional[StrictBool] = Field(default=False, description="If true, indicates the desire to include toll roads which require the driver to pay a toll if the occupant requirement isn't met")
|
57
|
+
alley_factor: Optional[Union[StrictFloat, StrictInt]] = Field(default=1, description="A factor that multiplies the cost when alleys are encountered.")
|
58
|
+
use_trails: Optional[Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=0.0, description="A measure of the rider's sense of adventure. Values near 0 attempt to avoid highways and stay on roads with potentially unsuitable terrain (trails, tracks, unclassified, or bad surfaces), and values near 1 will tend to avoid major roads and route on secondary roads.")
|
53
59
|
additional_properties: Dict[str, Any] = {}
|
54
|
-
__properties = ["maneuver_penalty", "gate_cost", "gate_penalty", "country_crossing_cost", "country_crossing_penalty", "service_penalty", "service_factor", "use_living_streets", "use_ferry", "height", "width", "toll_booth_cost", "toll_booth_penalty", "ferry_cost", "use_highways", "use_tolls", "use_tracks", "top_speed", "shortest", "ignore_closures", "include_hov2", "include_hov3", "include_hot", "use_trails"]
|
60
|
+
__properties: ClassVar[List[str]] = ["maneuver_penalty", "gate_cost", "gate_penalty", "country_crossing_cost", "country_crossing_penalty", "service_penalty", "service_factor", "use_living_streets", "use_ferry", "ignore_restrictions", "ignore_non_vehicular_restrictions", "ignore_oneways", "height", "width", "toll_booth_cost", "toll_booth_penalty", "ferry_cost", "use_highways", "use_tolls", "use_tracks", "top_speed", "shortest", "ignore_closures", "include_hov2", "include_hov3", "include_hot", "alley_factor", "use_trails"]
|
61
|
+
|
62
|
+
model_config = ConfigDict(
|
63
|
+
populate_by_name=True,
|
64
|
+
validate_assignment=True,
|
65
|
+
protected_namespaces=(),
|
66
|
+
)
|
55
67
|
|
56
|
-
class Config:
|
57
|
-
"""Pydantic configuration"""
|
58
|
-
allow_population_by_field_name = True
|
59
|
-
validate_assignment = True
|
60
68
|
|
61
69
|
def to_str(self) -> str:
|
62
70
|
"""Returns the string representation of the model using alias"""
|
63
|
-
return pprint.pformat(self.
|
71
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
64
72
|
|
65
73
|
def to_json(self) -> str:
|
66
74
|
"""Returns the JSON representation of the model using alias"""
|
75
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
67
76
|
return json.dumps(self.to_dict())
|
68
77
|
|
69
78
|
@classmethod
|
70
|
-
def from_json(cls, json_str: str) ->
|
79
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
71
80
|
"""Create an instance of MotorcycleCostingOptions from a JSON string"""
|
72
81
|
return cls.from_dict(json.loads(json_str))
|
73
82
|
|
74
|
-
def to_dict(self):
|
75
|
-
"""
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
83
|
+
def to_dict(self) -> Dict[str, Any]:
|
84
|
+
"""Return the dictionary representation of the model using alias.
|
85
|
+
|
86
|
+
This has the following differences from calling pydantic's
|
87
|
+
`self.model_dump(by_alias=True)`:
|
88
|
+
|
89
|
+
* `None` is only added to the output dict for nullable fields that
|
90
|
+
were set at model initialization. Other fields with value `None`
|
91
|
+
are ignored.
|
92
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
93
|
+
"""
|
94
|
+
excluded_fields: Set[str] = set([
|
95
|
+
"additional_properties",
|
96
|
+
])
|
97
|
+
|
98
|
+
_dict = self.model_dump(
|
99
|
+
by_alias=True,
|
100
|
+
exclude=excluded_fields,
|
101
|
+
exclude_none=True,
|
102
|
+
)
|
81
103
|
# puts key-value pairs in additional_properties in the top level
|
82
104
|
if self.additional_properties is not None:
|
83
105
|
for _key, _value in self.additional_properties.items():
|
@@ -86,15 +108,15 @@ class MotorcycleCostingOptions(BaseModel):
|
|
86
108
|
return _dict
|
87
109
|
|
88
110
|
@classmethod
|
89
|
-
def from_dict(cls, obj:
|
111
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
90
112
|
"""Create an instance of MotorcycleCostingOptions from a dict"""
|
91
113
|
if obj is None:
|
92
114
|
return None
|
93
115
|
|
94
116
|
if not isinstance(obj, dict):
|
95
|
-
return
|
117
|
+
return cls.model_validate(obj)
|
96
118
|
|
97
|
-
_obj =
|
119
|
+
_obj = cls.model_validate({
|
98
120
|
"maneuver_penalty": obj.get("maneuver_penalty") if obj.get("maneuver_penalty") is not None else 5,
|
99
121
|
"gate_cost": obj.get("gate_cost") if obj.get("gate_cost") is not None else 15,
|
100
122
|
"gate_penalty": obj.get("gate_penalty") if obj.get("gate_penalty") is not None else 300,
|
@@ -104,6 +126,9 @@ class MotorcycleCostingOptions(BaseModel):
|
|
104
126
|
"service_factor": obj.get("service_factor") if obj.get("service_factor") is not None else 1,
|
105
127
|
"use_living_streets": obj.get("use_living_streets"),
|
106
128
|
"use_ferry": obj.get("use_ferry") if obj.get("use_ferry") is not None else 0.5,
|
129
|
+
"ignore_restrictions": obj.get("ignore_restrictions"),
|
130
|
+
"ignore_non_vehicular_restrictions": obj.get("ignore_non_vehicular_restrictions"),
|
131
|
+
"ignore_oneways": obj.get("ignore_oneways"),
|
107
132
|
"height": obj.get("height") if obj.get("height") is not None else 1.9,
|
108
133
|
"width": obj.get("width") if obj.get("width") is not None else 1.6,
|
109
134
|
"toll_booth_cost": obj.get("toll_booth_cost") if obj.get("toll_booth_cost") is not None else 15,
|
@@ -118,6 +143,7 @@ class MotorcycleCostingOptions(BaseModel):
|
|
118
143
|
"include_hov2": obj.get("include_hov2") if obj.get("include_hov2") is not None else False,
|
119
144
|
"include_hov3": obj.get("include_hov3") if obj.get("include_hov3") is not None else False,
|
120
145
|
"include_hot": obj.get("include_hot") if obj.get("include_hot") is not None else False,
|
146
|
+
"alley_factor": obj.get("alley_factor") if obj.get("alley_factor") is not None else 1,
|
121
147
|
"use_trails": obj.get("use_trails") if obj.get("use_trails") is not None else 0.0
|
122
148
|
})
|
123
149
|
# store additional fields in additional_properties
|
@@ -127,3 +153,4 @@ class MotorcycleCostingOptions(BaseModel):
|
|
127
153
|
|
128
154
|
return _obj
|
129
155
|
|
156
|
+
|