stadiamaps 4.0.0__py3-none-any.whl → 6.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- stadiamaps/__init__.py +32 -14
- stadiamaps/api/geocoding_api.py +976 -153
- stadiamaps/api/geospatial_api.py +7 -3
- stadiamaps/api/routing_api.py +22 -8
- stadiamaps/api_client.py +15 -6
- stadiamaps/configuration.py +156 -40
- stadiamaps/exceptions.py +18 -1
- stadiamaps/models/__init__.py +31 -13
- 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 +4 -4
- stadiamaps/models/bicycle_costing_options.py +1 -1
- stadiamaps/models/bike_network.py +1 -1
- stadiamaps/models/bulk_request.py +1 -1
- stadiamaps/models/bulk_request_query.py +1 -1
- stadiamaps/models/bulk_search_response.py +4 -4
- stadiamaps/models/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 +4 -4
- stadiamaps/models/distance_unit.py +1 -1
- stadiamaps/models/edge_sign.py +1 -1
- stadiamaps/models/edge_use.py +1 -1
- stadiamaps/models/end_node.py +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.py +1 -1
- stadiamaps/models/geo_json_geometry_base.py +1 -1
- stadiamaps/models/geo_json_line_string.py +1 -1
- stadiamaps/models/geo_json_point.py +1 -1
- stadiamaps/models/geo_json_polygon.py +1 -1
- stadiamaps/models/{pelias_response.py → geocode_response.py} +8 -8
- stadiamaps/models/geocode_response_envelope_properties_v2.py +125 -0
- stadiamaps/models/{pelias_geo_json_feature.py → geocoding_geo_json_feature.py} +8 -8
- stadiamaps/models/{pelias_geo_json_properties.py → geocoding_geo_json_properties.py} +43 -15
- stadiamaps/models/{pelias_geo_json_properties_addendum.py → geocoding_geo_json_properties_addendum.py} +7 -7
- stadiamaps/models/{pelias_geo_json_properties_addendum_osm.py → geocoding_geo_json_properties_addendum_osm.py} +5 -5
- stadiamaps/models/{pelias_layer.py → geocoding_layer.py} +3 -3
- stadiamaps/models/geocoding_meta.py +108 -0
- stadiamaps/models/geocoding_object.py +1 -1
- stadiamaps/models/{pelias_source.py → geocoding_source.py} +4 -3
- 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 +10 -8
- 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 +4 -4
- stadiamaps/models/matrix_response.py +4 -4
- 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 +4 -4
- stadiamaps/models/node_id.py +1 -1
- stadiamaps/models/node_type.py +1 -1
- stadiamaps/models/open_street_map_addendum.py +162 -0
- stadiamaps/models/optimized_route_request.py +10 -8
- 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 +5 -5
- 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 +7 -7
- stadiamaps/models/{valhalla_languages.py → routing_languages.py} +4 -4
- stadiamaps/models/{valhalla_long_units.py → routing_long_units.py} +4 -4
- stadiamaps/models/routing_response_waypoint.py +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 +7 -7
- stadiamaps/models/search_structured_query.py +8 -8
- 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 +10 -8
- stadiamaps/models/trace_attributes_response.py +4 -9
- 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 +2 -2
- stadiamaps-6.0.0.dist-info/METADATA +117 -0
- stadiamaps-6.0.0.dist-info/RECORD +183 -0
- {stadiamaps-4.0.0.dist-info → stadiamaps-6.0.0.dist-info}/WHEEL +1 -1
- {stadiamaps-4.0.0.dist-info → stadiamaps-6.0.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 +112 -0
- test/integration/test_geospatial.py +43 -0
- test/integration/test_routing.py +282 -0
- stadiamaps/models/pelias_response_geocoding.py +0 -89
- stadiamaps/models/route_response_trip.py +0 -117
- stadiamaps/models/trace_attributes_response_all_of.py +0 -96
- stadiamaps-4.0.0.dist-info/METADATA +0 -79
- stadiamaps-4.0.0.dist-info/RECORD +0 -160
- {stadiamaps-4.0.0.dist-info → stadiamaps-6.0.0.dist-info/licenses}/LICENSE.txt +0 -0
stadiamaps/models/__init__.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
8
8
|
|
9
|
-
The version of the OpenAPI document:
|
9
|
+
The version of the OpenAPI document: 9.0.0
|
10
10
|
Contact: support@stadiamaps.com
|
11
11
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
12
12
|
|
@@ -16,6 +16,8 @@
|
|
16
16
|
|
17
17
|
# import models into model package
|
18
18
|
from stadiamaps.models.access import Access
|
19
|
+
from stadiamaps.models.addendum_v2 import AddendumV2
|
20
|
+
from stadiamaps.models.address_components_v2 import AddressComponentsV2
|
19
21
|
from stadiamaps.models.admin_region import AdminRegion
|
20
22
|
from stadiamaps.models.administrative import Administrative
|
21
23
|
from stadiamaps.models.annotation_filters import AnnotationFilters
|
@@ -27,6 +29,7 @@ from stadiamaps.models.bike_network import BikeNetwork
|
|
27
29
|
from stadiamaps.models.bulk_request import BulkRequest
|
28
30
|
from stadiamaps.models.bulk_request_query import BulkRequestQuery
|
29
31
|
from stadiamaps.models.bulk_search_response import BulkSearchResponse
|
32
|
+
from stadiamaps.models.context import Context
|
30
33
|
from stadiamaps.models.contour import Contour
|
31
34
|
from stadiamaps.models.coordinate import Coordinate
|
32
35
|
from stadiamaps.models.costing_model import CostingModel
|
@@ -37,13 +40,23 @@ from stadiamaps.models.edge_sign import EdgeSign
|
|
37
40
|
from stadiamaps.models.edge_use import EdgeUse
|
38
41
|
from stadiamaps.models.end_node import EndNode
|
39
42
|
from stadiamaps.models.extended_directions_options import ExtendedDirectionsOptions
|
43
|
+
from stadiamaps.models.feature_properties_v2 import FeaturePropertiesV2
|
44
|
+
from stadiamaps.models.feature_properties_v2_properties import FeaturePropertiesV2Properties
|
45
|
+
from stadiamaps.models.foursquare_addendum import FoursquareAddendum
|
40
46
|
from stadiamaps.models.geo_attributes import GeoAttributes
|
41
|
-
from stadiamaps.models.geo_json_geometry import GeoJSONGeometry
|
42
47
|
from stadiamaps.models.geo_json_geometry_base import GeoJSONGeometryBase
|
43
|
-
from stadiamaps.models.geo_json_line_string import GeoJSONLineString
|
44
48
|
from stadiamaps.models.geo_json_point import GeoJSONPoint
|
45
|
-
from stadiamaps.models.
|
49
|
+
from stadiamaps.models.geocode_response import GeocodeResponse
|
50
|
+
from stadiamaps.models.geocode_response_envelope_properties_v2 import GeocodeResponseEnvelopePropertiesV2
|
51
|
+
from stadiamaps.models.geocoding_geo_json_feature import GeocodingGeoJSONFeature
|
52
|
+
from stadiamaps.models.geocoding_geo_json_properties import GeocodingGeoJSONProperties
|
53
|
+
from stadiamaps.models.geocoding_geo_json_properties_addendum import GeocodingGeoJSONPropertiesAddendum
|
54
|
+
from stadiamaps.models.geocoding_geo_json_properties_addendum_osm import GeocodingGeoJSONPropertiesAddendumOsm
|
55
|
+
from stadiamaps.models.geocoding_layer import GeocodingLayer
|
56
|
+
from stadiamaps.models.geocoding_meta import GeocodingMeta
|
46
57
|
from stadiamaps.models.geocoding_object import GeocodingObject
|
58
|
+
from stadiamaps.models.geocoding_source import GeocodingSource
|
59
|
+
from stadiamaps.models.geonames_addendum import GeonamesAddendum
|
47
60
|
from stadiamaps.models.height_request import HeightRequest
|
48
61
|
from stadiamaps.models.height_response import HeightResponse
|
49
62
|
from stadiamaps.models.highway_classification import HighwayClassification
|
@@ -53,6 +66,7 @@ from stadiamaps.models.isochrone_feature import IsochroneFeature
|
|
53
66
|
from stadiamaps.models.isochrone_properties import IsochroneProperties
|
54
67
|
from stadiamaps.models.isochrone_request import IsochroneRequest
|
55
68
|
from stadiamaps.models.isochrone_response import IsochroneResponse
|
69
|
+
from stadiamaps.models.layer_id import LayerId
|
56
70
|
from stadiamaps.models.locate_detailed_edge import LocateDetailedEdge
|
57
71
|
from stadiamaps.models.locate_edge import LocateEdge
|
58
72
|
from stadiamaps.models.locate_edge_info import LocateEdgeInfo
|
@@ -66,6 +80,7 @@ from stadiamaps.models.map_match_request import MapMatchRequest
|
|
66
80
|
from stadiamaps.models.map_match_route_response import MapMatchRouteResponse
|
67
81
|
from stadiamaps.models.map_match_trace_options import MapMatchTraceOptions
|
68
82
|
from stadiamaps.models.map_match_waypoint import MapMatchWaypoint
|
83
|
+
from stadiamaps.models.match_type import MatchType
|
69
84
|
from stadiamaps.models.matched_point import MatchedPoint
|
70
85
|
from stadiamaps.models.matrix_costing_model import MatrixCostingModel
|
71
86
|
from stadiamaps.models.matrix_distance import MatrixDistance
|
@@ -77,6 +92,7 @@ from stadiamaps.models.motorcycle_costing_options import MotorcycleCostingOption
|
|
77
92
|
from stadiamaps.models.nearest_roads_request import NearestRoadsRequest
|
78
93
|
from stadiamaps.models.node_id import NodeId
|
79
94
|
from stadiamaps.models.node_type import NodeType
|
95
|
+
from stadiamaps.models.open_street_map_addendum import OpenStreetMapAddendum
|
80
96
|
from stadiamaps.models.optimized_route_request import OptimizedRouteRequest
|
81
97
|
from stadiamaps.models.osrm_admin import OsrmAdmin
|
82
98
|
from stadiamaps.models.osrm_annotation import OsrmAnnotation
|
@@ -97,13 +113,10 @@ from stadiamaps.models.osrm_via_waypoint import OsrmViaWaypoint
|
|
97
113
|
from stadiamaps.models.osrm_voice_instruction import OsrmVoiceInstruction
|
98
114
|
from stadiamaps.models.osrm_waypoint import OsrmWaypoint
|
99
115
|
from stadiamaps.models.pedestrian_costing_options import PedestrianCostingOptions
|
100
|
-
from stadiamaps.models.
|
101
|
-
from stadiamaps.models.
|
102
|
-
from stadiamaps.models.
|
103
|
-
from stadiamaps.models.
|
104
|
-
from stadiamaps.models.pelias_layer import PeliasLayer
|
105
|
-
from stadiamaps.models.pelias_response import PeliasResponse
|
106
|
-
from stadiamaps.models.pelias_source import PeliasSource
|
116
|
+
from stadiamaps.models.pedestrian_type import PedestrianType
|
117
|
+
from stadiamaps.models.point import Point
|
118
|
+
from stadiamaps.models.precision import Precision
|
119
|
+
from stadiamaps.models.properties_v2 import PropertiesV2
|
107
120
|
from stadiamaps.models.restrictions import Restrictions
|
108
121
|
from stadiamaps.models.road_class import RoadClass
|
109
122
|
from stadiamaps.models.route200_response import Route200Response
|
@@ -114,12 +127,16 @@ from stadiamaps.models.route_response import RouteResponse
|
|
114
127
|
from stadiamaps.models.route_response_alternates_inner import RouteResponseAlternatesInner
|
115
128
|
from stadiamaps.models.route_summary import RouteSummary
|
116
129
|
from stadiamaps.models.route_trip import RouteTrip
|
130
|
+
from stadiamaps.models.routing_languages import RoutingLanguages
|
131
|
+
from stadiamaps.models.routing_long_units import RoutingLongUnits
|
117
132
|
from stadiamaps.models.routing_response_waypoint import RoutingResponseWaypoint
|
118
133
|
from stadiamaps.models.routing_waypoint import RoutingWaypoint
|
119
134
|
from stadiamaps.models.routing_waypoint_all_of_search_filter import RoutingWaypointAllOfSearchFilter
|
120
135
|
from stadiamaps.models.search_query import SearchQuery
|
121
136
|
from stadiamaps.models.search_structured_query import SearchStructuredQuery
|
122
137
|
from stadiamaps.models.simple_routing_waypoint import SimpleRoutingWaypoint
|
138
|
+
from stadiamaps.models.source_attribution import SourceAttribution
|
139
|
+
from stadiamaps.models.source_id import SourceId
|
123
140
|
from stadiamaps.models.speeds import Speeds
|
124
141
|
from stadiamaps.models.trace_attribute_filter_options import TraceAttributeFilterOptions
|
125
142
|
from stadiamaps.models.trace_attribute_key import TraceAttributeKey
|
@@ -131,6 +148,7 @@ from stadiamaps.models.travel_mode import TravelMode
|
|
131
148
|
from stadiamaps.models.traversability import Traversability
|
132
149
|
from stadiamaps.models.truck_costing_options import TruckCostingOptions
|
133
150
|
from stadiamaps.models.tz_response import TzResponse
|
134
|
-
from stadiamaps.models.valhalla_languages import ValhallaLanguages
|
135
|
-
from stadiamaps.models.valhalla_long_units import ValhallaLongUnits
|
136
151
|
from stadiamaps.models.warning import Warning
|
152
|
+
from stadiamaps.models.whos_on_first_concordances import WhosOnFirstConcordances
|
153
|
+
from stadiamaps.models.wof_context import WofContext
|
154
|
+
from stadiamaps.models.wof_context_component import WofContextComponent
|
stadiamaps/models/access.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 9.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -0,0 +1,143 @@
|
|
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.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
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
23
|
+
from stadiamaps.models.foursquare_addendum import FoursquareAddendum
|
24
|
+
from stadiamaps.models.geonames_addendum import GeonamesAddendum
|
25
|
+
from stadiamaps.models.open_street_map_addendum import OpenStreetMapAddendum
|
26
|
+
from stadiamaps.models.whos_on_first_concordances import WhosOnFirstConcordances
|
27
|
+
from typing import Optional, Set
|
28
|
+
from typing_extensions import Self
|
29
|
+
|
30
|
+
class AddendumV2(BaseModel):
|
31
|
+
"""
|
32
|
+
Miscellaneous data that doesn't quite fit anywhere else in the record.
|
33
|
+
""" # noqa: E501
|
34
|
+
foursquare: Optional[FoursquareAddendum] = None
|
35
|
+
geonames: Optional[GeonamesAddendum] = None
|
36
|
+
osm: Optional[OpenStreetMapAddendum] = None
|
37
|
+
whosonfirst_concordances: Optional[WhosOnFirstConcordances] = None
|
38
|
+
additional_properties: Dict[str, Any] = {}
|
39
|
+
__properties: ClassVar[List[str]] = ["foursquare", "geonames", "osm", "whosonfirst_concordances"]
|
40
|
+
|
41
|
+
model_config = ConfigDict(
|
42
|
+
populate_by_name=True,
|
43
|
+
validate_assignment=True,
|
44
|
+
protected_namespaces=(),
|
45
|
+
)
|
46
|
+
|
47
|
+
|
48
|
+
def to_str(self) -> str:
|
49
|
+
"""Returns the string representation of the model using alias"""
|
50
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
51
|
+
|
52
|
+
def to_json(self) -> str:
|
53
|
+
"""Returns the JSON representation of the model using alias"""
|
54
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
55
|
+
return json.dumps(self.to_dict())
|
56
|
+
|
57
|
+
@classmethod
|
58
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
59
|
+
"""Create an instance of AddendumV2 from a JSON string"""
|
60
|
+
return cls.from_dict(json.loads(json_str))
|
61
|
+
|
62
|
+
def to_dict(self) -> Dict[str, Any]:
|
63
|
+
"""Return the dictionary representation of the model using alias.
|
64
|
+
|
65
|
+
This has the following differences from calling pydantic's
|
66
|
+
`self.model_dump(by_alias=True)`:
|
67
|
+
|
68
|
+
* `None` is only added to the output dict for nullable fields that
|
69
|
+
were set at model initialization. Other fields with value `None`
|
70
|
+
are ignored.
|
71
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
72
|
+
"""
|
73
|
+
excluded_fields: Set[str] = set([
|
74
|
+
"additional_properties",
|
75
|
+
])
|
76
|
+
|
77
|
+
_dict = self.model_dump(
|
78
|
+
by_alias=True,
|
79
|
+
exclude=excluded_fields,
|
80
|
+
exclude_none=True,
|
81
|
+
)
|
82
|
+
# override the default output from pydantic by calling `to_dict()` of foursquare
|
83
|
+
if self.foursquare:
|
84
|
+
_dict['foursquare'] = self.foursquare.to_dict()
|
85
|
+
# override the default output from pydantic by calling `to_dict()` of geonames
|
86
|
+
if self.geonames:
|
87
|
+
_dict['geonames'] = self.geonames.to_dict()
|
88
|
+
# override the default output from pydantic by calling `to_dict()` of osm
|
89
|
+
if self.osm:
|
90
|
+
_dict['osm'] = self.osm.to_dict()
|
91
|
+
# override the default output from pydantic by calling `to_dict()` of whosonfirst_concordances
|
92
|
+
if self.whosonfirst_concordances:
|
93
|
+
_dict['whosonfirst_concordances'] = self.whosonfirst_concordances.to_dict()
|
94
|
+
# puts key-value pairs in additional_properties in the top level
|
95
|
+
if self.additional_properties is not None:
|
96
|
+
for _key, _value in self.additional_properties.items():
|
97
|
+
_dict[_key] = _value
|
98
|
+
|
99
|
+
# set to None if foursquare (nullable) is None
|
100
|
+
# and model_fields_set contains the field
|
101
|
+
if self.foursquare is None and "foursquare" in self.model_fields_set:
|
102
|
+
_dict['foursquare'] = None
|
103
|
+
|
104
|
+
# set to None if geonames (nullable) is None
|
105
|
+
# and model_fields_set contains the field
|
106
|
+
if self.geonames is None and "geonames" in self.model_fields_set:
|
107
|
+
_dict['geonames'] = None
|
108
|
+
|
109
|
+
# set to None if osm (nullable) is None
|
110
|
+
# and model_fields_set contains the field
|
111
|
+
if self.osm is None and "osm" in self.model_fields_set:
|
112
|
+
_dict['osm'] = None
|
113
|
+
|
114
|
+
# set to None if whosonfirst_concordances (nullable) is None
|
115
|
+
# and model_fields_set contains the field
|
116
|
+
if self.whosonfirst_concordances is None and "whosonfirst_concordances" in self.model_fields_set:
|
117
|
+
_dict['whosonfirst_concordances'] = None
|
118
|
+
|
119
|
+
return _dict
|
120
|
+
|
121
|
+
@classmethod
|
122
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
123
|
+
"""Create an instance of AddendumV2 from a dict"""
|
124
|
+
if obj is None:
|
125
|
+
return None
|
126
|
+
|
127
|
+
if not isinstance(obj, dict):
|
128
|
+
return cls.model_validate(obj)
|
129
|
+
|
130
|
+
_obj = cls.model_validate({
|
131
|
+
"foursquare": FoursquareAddendum.from_dict(obj["foursquare"]) if obj.get("foursquare") is not None else None,
|
132
|
+
"geonames": GeonamesAddendum.from_dict(obj["geonames"]) if obj.get("geonames") is not None else None,
|
133
|
+
"osm": OpenStreetMapAddendum.from_dict(obj["osm"]) if obj.get("osm") is not None else None,
|
134
|
+
"whosonfirst_concordances": WhosOnFirstConcordances.from_dict(obj["whosonfirst_concordances"]) if obj.get("whosonfirst_concordances") is not None else None
|
135
|
+
})
|
136
|
+
# store additional fields in additional_properties
|
137
|
+
for _key in obj.keys():
|
138
|
+
if _key not in cls.__properties:
|
139
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
140
|
+
|
141
|
+
return _obj
|
142
|
+
|
143
|
+
|
@@ -0,0 +1,134 @@
|
|
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.0.0
|
9
|
+
Contact: support@stadiamaps.com
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
|
+
|
12
|
+
Do not edit the class manually.
|
13
|
+
""" # noqa: E501
|
14
|
+
|
15
|
+
|
16
|
+
from __future__ import annotations
|
17
|
+
import pprint
|
18
|
+
import re # noqa: F401
|
19
|
+
import json
|
20
|
+
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
23
|
+
from typing import Optional, Set
|
24
|
+
from typing_extensions import Self
|
25
|
+
|
26
|
+
class AddressComponentsV2(BaseModel):
|
27
|
+
"""
|
28
|
+
Structured address components.
|
29
|
+
""" # noqa: E501
|
30
|
+
cross_street: Optional[StrictStr] = Field(default=None, description="The cross street address component (rarely used).")
|
31
|
+
number: Optional[StrictStr] = Field(default=None, description="The house / building number. Note that, despite the name, this is not strictly numeric. Values such as 30-1 and 11A may be valid building/house numbers in some areas.")
|
32
|
+
postal_code: Optional[StrictStr] = Field(default=None, description="The postal code.")
|
33
|
+
street: Optional[StrictStr] = Field(default=None, description="The street component of the address.")
|
34
|
+
unit: Optional[StrictStr] = Field(default=None, description="The unit number (where available).")
|
35
|
+
additional_properties: Dict[str, Any] = {}
|
36
|
+
__properties: ClassVar[List[str]] = ["cross_street", "number", "postal_code", "street", "unit"]
|
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 AddressComponentsV2 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
|
+
# set to None if cross_street (nullable) is None
|
85
|
+
# and model_fields_set contains the field
|
86
|
+
if self.cross_street is None and "cross_street" in self.model_fields_set:
|
87
|
+
_dict['cross_street'] = None
|
88
|
+
|
89
|
+
# set to None if number (nullable) is None
|
90
|
+
# and model_fields_set contains the field
|
91
|
+
if self.number is None and "number" in self.model_fields_set:
|
92
|
+
_dict['number'] = None
|
93
|
+
|
94
|
+
# set to None if postal_code (nullable) is None
|
95
|
+
# and model_fields_set contains the field
|
96
|
+
if self.postal_code is None and "postal_code" in self.model_fields_set:
|
97
|
+
_dict['postal_code'] = None
|
98
|
+
|
99
|
+
# set to None if street (nullable) is None
|
100
|
+
# and model_fields_set contains the field
|
101
|
+
if self.street is None and "street" in self.model_fields_set:
|
102
|
+
_dict['street'] = None
|
103
|
+
|
104
|
+
# set to None if unit (nullable) is None
|
105
|
+
# and model_fields_set contains the field
|
106
|
+
if self.unit is None and "unit" in self.model_fields_set:
|
107
|
+
_dict['unit'] = None
|
108
|
+
|
109
|
+
return _dict
|
110
|
+
|
111
|
+
@classmethod
|
112
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
113
|
+
"""Create an instance of AddressComponentsV2 from a dict"""
|
114
|
+
if obj is None:
|
115
|
+
return None
|
116
|
+
|
117
|
+
if not isinstance(obj, dict):
|
118
|
+
return cls.model_validate(obj)
|
119
|
+
|
120
|
+
_obj = cls.model_validate({
|
121
|
+
"cross_street": obj.get("cross_street"),
|
122
|
+
"number": obj.get("number"),
|
123
|
+
"postal_code": obj.get("postal_code"),
|
124
|
+
"street": obj.get("street"),
|
125
|
+
"unit": obj.get("unit")
|
126
|
+
})
|
127
|
+
# store additional fields in additional_properties
|
128
|
+
for _key in obj.keys():
|
129
|
+
if _key not in cls.__properties:
|
130
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
131
|
+
|
132
|
+
return _obj
|
133
|
+
|
134
|
+
|
@@ -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.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 9.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 9.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 9.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 9.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 9.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -24,7 +24,7 @@ from stadiamaps.models.costing_options import CostingOptions
|
|
24
24
|
from stadiamaps.models.distance_unit import DistanceUnit
|
25
25
|
from stadiamaps.models.map_match_costing_model import MapMatchCostingModel
|
26
26
|
from stadiamaps.models.map_match_waypoint import MapMatchWaypoint
|
27
|
-
from stadiamaps.models.
|
27
|
+
from stadiamaps.models.routing_languages import RoutingLanguages
|
28
28
|
from typing import Optional, Set
|
29
29
|
from typing_extensions import Self
|
30
30
|
|
@@ -33,7 +33,7 @@ class BaseTraceRequest(BaseModel):
|
|
33
33
|
BaseTraceRequest
|
34
34
|
""" # noqa: E501
|
35
35
|
units: Optional[DistanceUnit] = DistanceUnit.KM
|
36
|
-
language: Optional[
|
36
|
+
language: Optional[RoutingLanguages] = RoutingLanguages.EN_MINUS_US
|
37
37
|
directions_type: Optional[StrictStr] = Field(default='instructions', description="The level of directional narrative to include. Locations and times will always be returned, but narrative generation verbosity can be controlled with this parameter.")
|
38
38
|
id: Optional[StrictStr] = Field(default=None, description="An identifier to disambiguate requests (echoed by the server).")
|
39
39
|
shape: Optional[List[MapMatchWaypoint]] = Field(default=None, description="REQUIRED if `encoded_polyline` is not present. Note that `break` type locations are only supported when `shape_match` is set to `map_match`.")
|
@@ -133,7 +133,7 @@ class BaseTraceRequest(BaseModel):
|
|
133
133
|
|
134
134
|
_obj = cls.model_validate({
|
135
135
|
"units": obj.get("units") if obj.get("units") is not None else DistanceUnit.KM,
|
136
|
-
"language": obj.get("language") if obj.get("language") is not None else
|
136
|
+
"language": obj.get("language") if obj.get("language") is not None else RoutingLanguages.EN_MINUS_US,
|
137
137
|
"directions_type": obj.get("directions_type") if obj.get("directions_type") is not None else 'instructions',
|
138
138
|
"id": obj.get("id"),
|
139
139
|
"shape": [MapMatchWaypoint.from_dict(_item) for _item in obj["shape"]] if obj.get("shape") is not None else None,
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 9.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 9.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 9.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 9.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 9.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -20,7 +20,7 @@ import json
|
|
20
20
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
23
|
-
from stadiamaps.models.
|
23
|
+
from stadiamaps.models.geocode_response import GeocodeResponse
|
24
24
|
from typing import Optional, Set
|
25
25
|
from typing_extensions import Self
|
26
26
|
|
@@ -29,7 +29,7 @@ class BulkSearchResponse(BaseModel):
|
|
29
29
|
BulkSearchResponse
|
30
30
|
""" # noqa: E501
|
31
31
|
status: StrictInt
|
32
|
-
response: Optional[
|
32
|
+
response: Optional[GeocodeResponse] = None
|
33
33
|
msg: Optional[StrictStr] = Field(default=None, description="An error message describing what went wrong (if the status is not 200).")
|
34
34
|
additional_properties: Dict[str, Any] = {}
|
35
35
|
__properties: ClassVar[List[str]] = ["status", "response", "msg"]
|
@@ -96,7 +96,7 @@ class BulkSearchResponse(BaseModel):
|
|
96
96
|
|
97
97
|
_obj = cls.model_validate({
|
98
98
|
"status": obj.get("status"),
|
99
|
-
"response":
|
99
|
+
"response": GeocodeResponse.from_dict(obj["response"]) if obj.get("response") is not None else None,
|
100
100
|
"msg": obj.get("msg")
|
101
101
|
})
|
102
102
|
# store additional fields in additional_properties
|