stadiamaps 3.2.1__py3-none-any.whl → 4.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.
Files changed (134) hide show
  1. stadiamaps/__init__.py +23 -2
  2. stadiamaps/api/geocoding_api.py +1 -1
  3. stadiamaps/api/geospatial_api.py +1 -1
  4. stadiamaps/api/routing_api.py +12 -12
  5. stadiamaps/api_client.py +9 -2
  6. stadiamaps/configuration.py +3 -3
  7. stadiamaps/exceptions.py +1 -1
  8. stadiamaps/models/__init__.py +22 -1
  9. stadiamaps/models/access.py +1 -1
  10. stadiamaps/models/admin_region.py +1 -1
  11. stadiamaps/models/administrative.py +1 -1
  12. stadiamaps/models/annotation_filters.py +124 -0
  13. stadiamaps/models/auto_costing_options.py +1 -1
  14. stadiamaps/models/base_costing_options.py +1 -1
  15. stadiamaps/models/base_trace_request.py +4 -4
  16. stadiamaps/models/bicycle_costing_options.py +1 -1
  17. stadiamaps/models/bike_network.py +1 -1
  18. stadiamaps/models/bulk_request.py +1 -1
  19. stadiamaps/models/bulk_request_query.py +1 -1
  20. stadiamaps/models/bulk_search_response.py +1 -1
  21. stadiamaps/models/contour.py +1 -1
  22. stadiamaps/models/coordinate.py +1 -1
  23. stadiamaps/models/costing_model.py +1 -1
  24. stadiamaps/models/costing_options.py +1 -1
  25. stadiamaps/models/directions_options.py +1 -1
  26. stadiamaps/models/distance_unit.py +1 -1
  27. stadiamaps/models/edge_sign.py +1 -1
  28. stadiamaps/models/edge_use.py +1 -1
  29. stadiamaps/models/end_node.py +4 -4
  30. stadiamaps/models/extended_directions_options.py +121 -0
  31. stadiamaps/models/geo_attributes.py +1 -1
  32. stadiamaps/models/geo_json_geometry.py +1 -1
  33. stadiamaps/models/geo_json_geometry_base.py +1 -1
  34. stadiamaps/models/geo_json_line_string.py +1 -1
  35. stadiamaps/models/geo_json_point.py +1 -1
  36. stadiamaps/models/geo_json_polygon.py +1 -1
  37. stadiamaps/models/geocoding_object.py +1 -1
  38. stadiamaps/models/height_request.py +4 -4
  39. stadiamaps/models/height_response.py +4 -4
  40. stadiamaps/models/highway_classification.py +1 -1
  41. stadiamaps/models/intersecting_edge.py +1 -1
  42. stadiamaps/models/isochrone_costing_model.py +1 -1
  43. stadiamaps/models/isochrone_feature.py +1 -1
  44. stadiamaps/models/isochrone_properties.py +1 -1
  45. stadiamaps/models/isochrone_request.py +7 -7
  46. stadiamaps/models/isochrone_response.py +4 -4
  47. stadiamaps/models/locate_detailed_edge.py +1 -1
  48. stadiamaps/models/locate_edge.py +1 -1
  49. stadiamaps/models/locate_edge_info.py +1 -1
  50. stadiamaps/models/locate_node.py +1 -1
  51. stadiamaps/models/locate_object.py +7 -7
  52. stadiamaps/models/low_speed_vehicle_costing_options.py +1 -1
  53. stadiamaps/models/maneuver_sign.py +13 -13
  54. stadiamaps/models/maneuver_sign_element.py +1 -1
  55. stadiamaps/models/map_match_costing_model.py +1 -1
  56. stadiamaps/models/map_match_request.py +27 -5
  57. stadiamaps/models/map_match_route_response.py +4 -4
  58. stadiamaps/models/map_match_trace_options.py +1 -1
  59. stadiamaps/models/map_match_waypoint.py +1 -1
  60. stadiamaps/models/matched_point.py +1 -1
  61. stadiamaps/models/matrix_costing_model.py +1 -1
  62. stadiamaps/models/matrix_distance.py +1 -1
  63. stadiamaps/models/matrix_request.py +7 -7
  64. stadiamaps/models/matrix_response.py +13 -13
  65. stadiamaps/models/matrix_waypoint.py +1 -1
  66. stadiamaps/models/motor_scooter_costing_options.py +1 -1
  67. stadiamaps/models/motorcycle_costing_options.py +1 -1
  68. stadiamaps/models/nearest_roads_request.py +4 -4
  69. stadiamaps/models/node_id.py +1 -1
  70. stadiamaps/models/node_type.py +1 -1
  71. stadiamaps/models/optimized_route_request.py +28 -6
  72. stadiamaps/models/osrm_admin.py +103 -0
  73. stadiamaps/models/osrm_annotation.py +117 -0
  74. stadiamaps/models/osrm_banner_component.py +113 -0
  75. stadiamaps/models/osrm_banner_content.py +131 -0
  76. stadiamaps/models/osrm_banner_instruction.py +112 -0
  77. stadiamaps/models/osrm_base_api_response.py +112 -0
  78. stadiamaps/models/osrm_guidance_modifier.py +44 -0
  79. stadiamaps/models/osrm_intersection.py +145 -0
  80. stadiamaps/models/osrm_lane.py +111 -0
  81. stadiamaps/models/osrm_route.py +119 -0
  82. stadiamaps/models/osrm_route_leg.py +148 -0
  83. stadiamaps/models/osrm_route_response.py +132 -0
  84. stadiamaps/models/osrm_route_step.py +185 -0
  85. stadiamaps/models/osrm_speed_limit.py +117 -0
  86. stadiamaps/models/osrm_step_maneuver.py +127 -0
  87. stadiamaps/models/osrm_via_waypoint.py +105 -0
  88. stadiamaps/models/osrm_voice_instruction.py +105 -0
  89. stadiamaps/models/osrm_waypoint.py +108 -0
  90. stadiamaps/models/pedestrian_costing_options.py +1 -1
  91. stadiamaps/models/pelias_geo_json_feature.py +1 -1
  92. stadiamaps/models/pelias_geo_json_properties.py +1 -1
  93. stadiamaps/models/pelias_geo_json_properties_addendum.py +1 -1
  94. stadiamaps/models/pelias_geo_json_properties_addendum_osm.py +1 -1
  95. stadiamaps/models/pelias_layer.py +1 -1
  96. stadiamaps/models/pelias_response.py +4 -4
  97. stadiamaps/models/pelias_source.py +1 -1
  98. stadiamaps/models/restrictions.py +1 -1
  99. stadiamaps/models/road_class.py +1 -1
  100. stadiamaps/models/route200_response.py +138 -0
  101. stadiamaps/models/route_leg.py +4 -4
  102. stadiamaps/models/route_maneuver.py +1 -1
  103. stadiamaps/models/route_request.py +30 -8
  104. stadiamaps/models/route_response.py +4 -4
  105. stadiamaps/models/route_response_alternates_inner.py +1 -1
  106. stadiamaps/models/route_summary.py +1 -1
  107. stadiamaps/models/route_trip.py +7 -7
  108. stadiamaps/models/routing_response_waypoint.py +1 -1
  109. stadiamaps/models/routing_waypoint.py +1 -1
  110. stadiamaps/models/routing_waypoint_all_of_search_filter.py +1 -1
  111. stadiamaps/models/search_query.py +1 -1
  112. stadiamaps/models/search_structured_query.py +1 -1
  113. stadiamaps/models/simple_routing_waypoint.py +1 -1
  114. stadiamaps/models/speeds.py +1 -1
  115. stadiamaps/models/trace_attribute_filter_options.py +1 -1
  116. stadiamaps/models/trace_attribute_key.py +1 -1
  117. stadiamaps/models/trace_attributes_base_response.py +10 -10
  118. stadiamaps/models/trace_attributes_request.py +4 -4
  119. stadiamaps/models/trace_attributes_response.py +13 -13
  120. stadiamaps/models/trace_edge.py +2 -2
  121. stadiamaps/models/travel_mode.py +1 -1
  122. stadiamaps/models/traversability.py +1 -1
  123. stadiamaps/models/truck_costing_options.py +1 -1
  124. stadiamaps/models/tz_response.py +1 -1
  125. stadiamaps/models/valhalla_languages.py +1 -1
  126. stadiamaps/models/valhalla_long_units.py +1 -1
  127. stadiamaps/models/warning.py +1 -1
  128. stadiamaps/rest.py +1 -1
  129. {stadiamaps-3.2.1.dist-info → stadiamaps-4.0.0.dist-info}/METADATA +1 -1
  130. stadiamaps-4.0.0.dist-info/RECORD +160 -0
  131. {stadiamaps-3.2.1.dist-info → stadiamaps-4.0.0.dist-info}/WHEEL +1 -1
  132. stadiamaps-3.2.1.dist-info/RECORD +0 -139
  133. {stadiamaps-3.2.1.dist-info → stadiamaps-4.0.0.dist-info}/LICENSE.txt +0 -0
  134. {stadiamaps-3.2.1.dist-info → stadiamaps-4.0.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,117 @@
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: 7.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, StrictInt, 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 OsrmSpeedLimit(BaseModel):
27
+ """
28
+ The speed limit between the pair of coordinates.
29
+ """ # noqa: E501
30
+ speed: Optional[StrictInt] = None
31
+ unit: Optional[StrictStr] = Field(default=None, description="The unit of measure for the speed. Always included if speed is present.")
32
+ unknown: Optional[StrictBool] = Field(default=None, description="True if the speed limit is not known.")
33
+ var_none: Optional[StrictBool] = Field(default=None, description="True if there is no explicit speed limit (ex: some Autobahn sections)", alias="none")
34
+ additional_properties: Dict[str, Any] = {}
35
+ __properties: ClassVar[List[str]] = ["speed", "unit", "unknown", "none"]
36
+
37
+ @field_validator('unit')
38
+ def unit_validate_enum(cls, value):
39
+ """Validates the enum"""
40
+ if value is None:
41
+ return value
42
+
43
+ if value not in set(['km/h', 'mph']):
44
+ raise ValueError("must be one of enum values ('km/h', 'mph')")
45
+ return value
46
+
47
+ model_config = ConfigDict(
48
+ populate_by_name=True,
49
+ validate_assignment=True,
50
+ protected_namespaces=(),
51
+ )
52
+
53
+
54
+ def to_str(self) -> str:
55
+ """Returns the string representation of the model using alias"""
56
+ return pprint.pformat(self.model_dump(by_alias=True))
57
+
58
+ def to_json(self) -> str:
59
+ """Returns the JSON representation of the model using alias"""
60
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
61
+ return json.dumps(self.to_dict())
62
+
63
+ @classmethod
64
+ def from_json(cls, json_str: str) -> Optional[Self]:
65
+ """Create an instance of OsrmSpeedLimit from a JSON string"""
66
+ return cls.from_dict(json.loads(json_str))
67
+
68
+ def to_dict(self) -> Dict[str, Any]:
69
+ """Return the dictionary representation of the model using alias.
70
+
71
+ This has the following differences from calling pydantic's
72
+ `self.model_dump(by_alias=True)`:
73
+
74
+ * `None` is only added to the output dict for nullable fields that
75
+ were set at model initialization. Other fields with value `None`
76
+ are ignored.
77
+ * Fields in `self.additional_properties` are added to the output dict.
78
+ """
79
+ excluded_fields: Set[str] = set([
80
+ "additional_properties",
81
+ ])
82
+
83
+ _dict = self.model_dump(
84
+ by_alias=True,
85
+ exclude=excluded_fields,
86
+ exclude_none=True,
87
+ )
88
+ # puts key-value pairs in additional_properties in the top level
89
+ if self.additional_properties is not None:
90
+ for _key, _value in self.additional_properties.items():
91
+ _dict[_key] = _value
92
+
93
+ return _dict
94
+
95
+ @classmethod
96
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
97
+ """Create an instance of OsrmSpeedLimit from a dict"""
98
+ if obj is None:
99
+ return None
100
+
101
+ if not isinstance(obj, dict):
102
+ return cls.model_validate(obj)
103
+
104
+ _obj = cls.model_validate({
105
+ "speed": obj.get("speed"),
106
+ "unit": obj.get("unit"),
107
+ "unknown": obj.get("unknown"),
108
+ "none": obj.get("none")
109
+ })
110
+ # store additional fields in additional_properties
111
+ for _key in obj.keys():
112
+ if _key not in cls.__properties:
113
+ _obj.additional_properties[_key] = obj.get(_key)
114
+
115
+ return _obj
116
+
117
+
@@ -0,0 +1,127 @@
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: 7.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, StrictFloat, StrictInt, StrictStr, field_validator
22
+ from typing import Any, ClassVar, Dict, List, Optional, Union
23
+ from typing_extensions import Annotated
24
+ from stadiamaps.models.osrm_guidance_modifier import OsrmGuidanceModifier
25
+ from typing import Optional, Set
26
+ from typing_extensions import Self
27
+
28
+ class OsrmStepManeuver(BaseModel):
29
+ """
30
+ OsrmStepManeuver
31
+ """ # noqa: E501
32
+ location: Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=2)] = Field(description="A (longitude, latitude) coordinate pair.")
33
+ instruction: Optional[StrictStr] = Field(default=None, description="A human-readable instruction for the maneuver.")
34
+ bearing_before: StrictInt = Field(description="The clockwise angle from true north to the direction of travel immediately before the maneuver.")
35
+ bearing_after: StrictInt = Field(description="The clockwise angle from true north to the direction of travel immediately after the maneuver.")
36
+ type: StrictStr
37
+ modifier: Optional[OsrmGuidanceModifier] = None
38
+ exit: Optional[StrictInt] = Field(default=None, description="The exit number to take (for roundabouts, rotaries, and number of intersections).")
39
+ additional_properties: Dict[str, Any] = {}
40
+ __properties: ClassVar[List[str]] = ["location", "instruction", "bearing_before", "bearing_after", "type", "modifier", "exit"]
41
+
42
+ @field_validator('type')
43
+ def type_validate_enum(cls, value):
44
+ """Validates the enum"""
45
+ if value not in set(['turn', 'new name', 'depart', 'arrive', 'merge', 'ramp', 'on ramp', 'off ramp', 'fork', 'end of road', 'use lane', 'continue', 'roundabout', 'rotary', 'roundabout turn', 'notification']):
46
+ raise ValueError("must be one of enum values ('turn', 'new name', 'depart', 'arrive', 'merge', 'ramp', 'on ramp', 'off ramp', 'fork', 'end of road', 'use lane', 'continue', 'roundabout', 'rotary', 'roundabout turn', 'notification')")
47
+ return value
48
+
49
+ model_config = ConfigDict(
50
+ populate_by_name=True,
51
+ validate_assignment=True,
52
+ protected_namespaces=(),
53
+ )
54
+
55
+
56
+ def to_str(self) -> str:
57
+ """Returns the string representation of the model using alias"""
58
+ return pprint.pformat(self.model_dump(by_alias=True))
59
+
60
+ def to_json(self) -> str:
61
+ """Returns the JSON representation of the model using alias"""
62
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
63
+ return json.dumps(self.to_dict())
64
+
65
+ @classmethod
66
+ def from_json(cls, json_str: str) -> Optional[Self]:
67
+ """Create an instance of OsrmStepManeuver from a JSON string"""
68
+ return cls.from_dict(json.loads(json_str))
69
+
70
+ def to_dict(self) -> Dict[str, Any]:
71
+ """Return the dictionary representation of the model using alias.
72
+
73
+ This has the following differences from calling pydantic's
74
+ `self.model_dump(by_alias=True)`:
75
+
76
+ * `None` is only added to the output dict for nullable fields that
77
+ were set at model initialization. Other fields with value `None`
78
+ are ignored.
79
+ * Fields in `self.additional_properties` are added to the output dict.
80
+ """
81
+ excluded_fields: Set[str] = set([
82
+ "additional_properties",
83
+ ])
84
+
85
+ _dict = self.model_dump(
86
+ by_alias=True,
87
+ exclude=excluded_fields,
88
+ exclude_none=True,
89
+ )
90
+ # puts key-value pairs in additional_properties in the top level
91
+ if self.additional_properties is not None:
92
+ for _key, _value in self.additional_properties.items():
93
+ _dict[_key] = _value
94
+
95
+ # set to None if modifier (nullable) is None
96
+ # and model_fields_set contains the field
97
+ if self.modifier is None and "modifier" in self.model_fields_set:
98
+ _dict['modifier'] = None
99
+
100
+ return _dict
101
+
102
+ @classmethod
103
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
104
+ """Create an instance of OsrmStepManeuver from a dict"""
105
+ if obj is None:
106
+ return None
107
+
108
+ if not isinstance(obj, dict):
109
+ return cls.model_validate(obj)
110
+
111
+ _obj = cls.model_validate({
112
+ "location": obj.get("location"),
113
+ "instruction": obj.get("instruction"),
114
+ "bearing_before": obj.get("bearing_before"),
115
+ "bearing_after": obj.get("bearing_after"),
116
+ "type": obj.get("type"),
117
+ "modifier": obj.get("modifier"),
118
+ "exit": obj.get("exit")
119
+ })
120
+ # store additional fields in additional_properties
121
+ for _key in obj.keys():
122
+ if _key not in cls.__properties:
123
+ _obj.additional_properties[_key] = obj.get(_key)
124
+
125
+ return _obj
126
+
127
+
@@ -0,0 +1,105 @@
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: 7.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, StrictFloat, StrictInt
22
+ from typing import Any, ClassVar, Dict, List, Union
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class OsrmViaWaypoint(BaseModel):
27
+ """
28
+ OsrmViaWaypoint
29
+ """ # noqa: E501
30
+ distance_from_start: Union[StrictFloat, StrictInt] = Field(description="The distance from the start of the leg, in meters.")
31
+ geometry_index: StrictInt = Field(description="The index of the waypoint's location in the route geometry.")
32
+ waypoint_index: StrictInt = Field(description="The index of the associated waypoint.")
33
+ additional_properties: Dict[str, Any] = {}
34
+ __properties: ClassVar[List[str]] = ["distance_from_start", "geometry_index", "waypoint_index"]
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 OsrmViaWaypoint 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 OsrmViaWaypoint 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
+ "distance_from_start": obj.get("distance_from_start"),
95
+ "geometry_index": obj.get("geometry_index"),
96
+ "waypoint_index": obj.get("waypoint_index")
97
+ })
98
+ # store additional fields in additional_properties
99
+ for _key in obj.keys():
100
+ if _key not in cls.__properties:
101
+ _obj.additional_properties[_key] = obj.get(_key)
102
+
103
+ return _obj
104
+
105
+
@@ -0,0 +1,105 @@
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: 7.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, StrictFloat, StrictInt, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional, Union
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class OsrmVoiceInstruction(BaseModel):
27
+ """
28
+ OsrmVoiceInstruction
29
+ """ # noqa: E501
30
+ distance_along_geometry: Union[StrictFloat, StrictInt] = Field(description="How far (in meters) from the upcoming maneuver the instruction should be announced.", alias="distanceAlongGeometry")
31
+ announcement: StrictStr = Field(description="The plain-text announcement.")
32
+ ssml_announcement: Optional[StrictStr] = Field(default=None, description="The announcement in Speech Synthesis Markup Language (SSML). Supported TTS engines include Amazon Polly and Apple's AVSpeechSynthesizer.", alias="ssmlAnnouncement")
33
+ additional_properties: Dict[str, Any] = {}
34
+ __properties: ClassVar[List[str]] = ["distanceAlongGeometry", "announcement", "ssmlAnnouncement"]
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 OsrmVoiceInstruction 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 OsrmVoiceInstruction 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
+ "distanceAlongGeometry": obj.get("distanceAlongGeometry"),
95
+ "announcement": obj.get("announcement"),
96
+ "ssmlAnnouncement": obj.get("ssmlAnnouncement")
97
+ })
98
+ # store additional fields in additional_properties
99
+ for _key in obj.keys():
100
+ if _key not in cls.__properties:
101
+ _obj.additional_properties[_key] = obj.get(_key)
102
+
103
+ return _obj
104
+
105
+
@@ -0,0 +1,108 @@
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: 7.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, StrictFloat, StrictInt, StrictStr
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
26
+
27
+ class OsrmWaypoint(BaseModel):
28
+ """
29
+ OsrmWaypoint
30
+ """ # noqa: E501
31
+ name: Optional[StrictStr] = None
32
+ location: Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=2)] = Field(description="A (longitude, latitude) coordinate pair.")
33
+ distance: Union[StrictFloat, StrictInt] = Field(description="The distance of the snapped point from the original location.")
34
+ hint: Optional[StrictStr] = None
35
+ additional_properties: Dict[str, Any] = {}
36
+ __properties: ClassVar[List[str]] = ["name", "location", "distance", "hint"]
37
+
38
+ model_config = ConfigDict(
39
+ populate_by_name=True,
40
+ validate_assignment=True,
41
+ protected_namespaces=(),
42
+ )
43
+
44
+
45
+ def to_str(self) -> str:
46
+ """Returns the string representation of the model using alias"""
47
+ return pprint.pformat(self.model_dump(by_alias=True))
48
+
49
+ def to_json(self) -> str:
50
+ """Returns the JSON representation of the model using alias"""
51
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
52
+ return json.dumps(self.to_dict())
53
+
54
+ @classmethod
55
+ def from_json(cls, json_str: str) -> Optional[Self]:
56
+ """Create an instance of OsrmWaypoint from a JSON string"""
57
+ return cls.from_dict(json.loads(json_str))
58
+
59
+ def to_dict(self) -> Dict[str, Any]:
60
+ """Return the dictionary representation of the model using alias.
61
+
62
+ This has the following differences from calling pydantic's
63
+ `self.model_dump(by_alias=True)`:
64
+
65
+ * `None` is only added to the output dict for nullable fields that
66
+ were set at model initialization. Other fields with value `None`
67
+ are ignored.
68
+ * Fields in `self.additional_properties` are added to the output dict.
69
+ """
70
+ excluded_fields: Set[str] = set([
71
+ "additional_properties",
72
+ ])
73
+
74
+ _dict = self.model_dump(
75
+ by_alias=True,
76
+ exclude=excluded_fields,
77
+ exclude_none=True,
78
+ )
79
+ # puts key-value pairs in additional_properties in the top level
80
+ if self.additional_properties is not None:
81
+ for _key, _value in self.additional_properties.items():
82
+ _dict[_key] = _value
83
+
84
+ return _dict
85
+
86
+ @classmethod
87
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
88
+ """Create an instance of OsrmWaypoint from a dict"""
89
+ if obj is None:
90
+ return None
91
+
92
+ if not isinstance(obj, dict):
93
+ return cls.model_validate(obj)
94
+
95
+ _obj = cls.model_validate({
96
+ "name": obj.get("name"),
97
+ "location": obj.get("location"),
98
+ "distance": obj.get("distance"),
99
+ "hint": obj.get("hint")
100
+ })
101
+ # store additional fields in additional_properties
102
+ for _key in obj.keys():
103
+ if _key not in cls.__properties:
104
+ _obj.additional_properties[_key] = obj.get(_key)
105
+
106
+ return _obj
107
+
108
+
@@ -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: 6.6.3
8
+ The version of the OpenAPI document: 7.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: 6.6.3
8
+ The version of the OpenAPI document: 7.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: 6.6.3
8
+ The version of the OpenAPI document: 7.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: 6.6.3
8
+ The version of the OpenAPI document: 7.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: 6.6.3
8
+ The version of the OpenAPI document: 7.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: 6.6.3
8
+ The version of the OpenAPI document: 7.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: 6.6.3
8
+ The version of the OpenAPI document: 7.0.0
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -83,9 +83,9 @@ class PeliasResponse(BaseModel):
83
83
  # override the default output from pydantic by calling `to_dict()` of each item in features (list)
84
84
  _items = []
85
85
  if self.features:
86
- for _item in self.features:
87
- if _item:
88
- _items.append(_item.to_dict())
86
+ for _item_features in self.features:
87
+ if _item_features:
88
+ _items.append(_item_features.to_dict())
89
89
  _dict['features'] = _items
90
90
  # puts key-value pairs in additional_properties in the top level
91
91
  if self.additional_properties is not 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: 6.6.3
8
+ The version of the OpenAPI document: 7.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: 6.6.3
8
+ The version of the OpenAPI document: 7.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: 6.6.3
8
+ The version of the OpenAPI document: 7.0.0
9
9
  Contact: support@stadiamaps.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11