stadiamaps 5.0.0__py3-none-any.whl → 6.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- stadiamaps/__init__.py +23 -5
- stadiamaps/api/geocoding_api.py +1388 -138
- stadiamaps/api/geospatial_api.py +1 -1
- stadiamaps/api/routing_api.py +1 -1
- stadiamaps/api_client.py +3 -3
- stadiamaps/configuration.py +5 -5
- stadiamaps/exceptions.py +18 -1
- stadiamaps/models/__init__.py +22 -4
- stadiamaps/models/access.py +1 -1
- stadiamaps/models/addendum_v2.py +143 -0
- stadiamaps/models/address_components_v2.py +134 -0
- stadiamaps/models/admin_region.py +1 -1
- stadiamaps/models/administrative.py +1 -1
- stadiamaps/models/annotation_filters.py +1 -1
- stadiamaps/models/auto_costing_options.py +1 -1
- stadiamaps/models/base_costing_options.py +1 -1
- stadiamaps/models/base_trace_request.py +1 -1
- stadiamaps/models/bicycle_costing_options.py +1 -1
- stadiamaps/models/bike_network.py +1 -1
- stadiamaps/models/bulk_request.py +1 -1
- stadiamaps/models/bulk_request_query.py +1 -1
- stadiamaps/models/bulk_search_response.py +1 -1
- stadiamaps/models/context.py +119 -0
- stadiamaps/models/contour.py +1 -1
- stadiamaps/models/coordinate.py +1 -1
- stadiamaps/models/costing_model.py +1 -1
- stadiamaps/models/costing_options.py +1 -1
- stadiamaps/models/directions_options.py +1 -1
- stadiamaps/models/distance_unit.py +1 -1
- stadiamaps/models/edge_sign.py +1 -1
- stadiamaps/models/edge_use.py +1 -1
- stadiamaps/models/end_node.py +1 -1
- stadiamaps/models/extended_directions_options.py +1 -1
- stadiamaps/models/feature_properties_v2.py +126 -0
- stadiamaps/models/feature_properties_v2_properties.py +184 -0
- stadiamaps/models/foursquare_addendum.py +113 -0
- stadiamaps/models/geo_attributes.py +1 -1
- stadiamaps/models/geo_json_geometry_base.py +1 -1
- stadiamaps/models/geo_json_point.py +1 -1
- stadiamaps/models/geocode_response.py +1 -1
- stadiamaps/models/geocode_response_envelope_properties_v2.py +125 -0
- stadiamaps/models/geocoding_geo_json_feature.py +1 -1
- stadiamaps/models/geocoding_geo_json_properties.py +8 -6
- stadiamaps/models/geocoding_geo_json_properties_addendum.py +1 -1
- stadiamaps/models/geocoding_geo_json_properties_addendum_osm.py +1 -1
- stadiamaps/models/geocoding_layer.py +1 -1
- stadiamaps/models/geocoding_meta.py +108 -0
- stadiamaps/models/geocoding_object.py +1 -1
- stadiamaps/models/geocoding_source.py +1 -1
- stadiamaps/models/geonames_addendum.py +101 -0
- stadiamaps/models/height_request.py +1 -1
- stadiamaps/models/height_response.py +1 -1
- stadiamaps/models/highway_classification.py +1 -1
- stadiamaps/models/intersecting_edge.py +1 -1
- stadiamaps/models/isochrone_costing_model.py +1 -1
- stadiamaps/models/isochrone_feature.py +1 -1
- stadiamaps/models/isochrone_properties.py +1 -1
- stadiamaps/models/isochrone_request.py +1 -1
- stadiamaps/models/isochrone_response.py +1 -1
- stadiamaps/models/layer_id.py +57 -0
- stadiamaps/models/locate_detailed_edge.py +1 -1
- stadiamaps/models/locate_edge.py +1 -1
- stadiamaps/models/locate_edge_info.py +1 -1
- stadiamaps/models/locate_node.py +1 -1
- stadiamaps/models/locate_object.py +1 -1
- stadiamaps/models/low_speed_vehicle_costing_options.py +1 -1
- stadiamaps/models/maneuver_sign.py +1 -1
- stadiamaps/models/maneuver_sign_element.py +1 -1
- stadiamaps/models/map_match_costing_model.py +1 -1
- stadiamaps/models/map_match_request.py +1 -1
- stadiamaps/models/map_match_route_response.py +1 -1
- stadiamaps/models/map_match_trace_options.py +1 -1
- stadiamaps/models/map_match_waypoint.py +3 -3
- stadiamaps/models/match_type.py +39 -0
- stadiamaps/models/matched_point.py +1 -1
- stadiamaps/models/matrix_costing_model.py +1 -1
- stadiamaps/models/matrix_distance.py +1 -1
- stadiamaps/models/matrix_request.py +1 -1
- stadiamaps/models/matrix_response.py +1 -1
- stadiamaps/models/matrix_waypoint.py +1 -1
- stadiamaps/models/motor_scooter_costing_options.py +1 -1
- stadiamaps/models/motorcycle_costing_options.py +1 -1
- stadiamaps/models/nearest_roads_request.py +1 -1
- stadiamaps/models/node_id.py +1 -1
- stadiamaps/models/node_type.py +1 -1
- stadiamaps/models/open_street_map_addendum.py +169 -0
- stadiamaps/models/optimized_route_request.py +1 -1
- stadiamaps/models/osrm_admin.py +1 -1
- stadiamaps/models/osrm_annotation.py +1 -1
- stadiamaps/models/osrm_banner_component.py +1 -1
- stadiamaps/models/osrm_banner_content.py +1 -1
- stadiamaps/models/osrm_banner_instruction.py +1 -1
- stadiamaps/models/osrm_base_api_response.py +1 -1
- stadiamaps/models/osrm_guidance_modifier.py +1 -1
- stadiamaps/models/osrm_intersection.py +1 -1
- stadiamaps/models/osrm_lane.py +1 -1
- stadiamaps/models/osrm_route.py +1 -1
- stadiamaps/models/osrm_route_leg.py +1 -1
- stadiamaps/models/osrm_route_response.py +1 -1
- stadiamaps/models/osrm_route_step.py +1 -1
- stadiamaps/models/osrm_speed_limit.py +1 -1
- stadiamaps/models/osrm_step_maneuver.py +1 -1
- stadiamaps/models/osrm_via_waypoint.py +1 -1
- stadiamaps/models/osrm_voice_instruction.py +1 -1
- stadiamaps/models/osrm_waypoint.py +1 -1
- stadiamaps/models/pedestrian_costing_options.py +8 -5
- stadiamaps/models/pedestrian_type.py +39 -0
- stadiamaps/models/point.py +104 -0
- stadiamaps/models/precision.py +38 -0
- stadiamaps/models/properties_v2.py +184 -0
- stadiamaps/models/restrictions.py +11 -11
- stadiamaps/models/road_class.py +1 -1
- stadiamaps/models/route200_response.py +1 -1
- stadiamaps/models/route_leg.py +1 -1
- stadiamaps/models/route_maneuver.py +1 -1
- stadiamaps/models/route_request.py +1 -1
- stadiamaps/models/route_response.py +1 -1
- stadiamaps/models/route_response_alternates_inner.py +1 -1
- stadiamaps/models/route_summary.py +1 -1
- stadiamaps/models/route_trip.py +1 -1
- stadiamaps/models/routing_languages.py +1 -1
- stadiamaps/models/routing_long_units.py +1 -1
- stadiamaps/models/routing_response_waypoint.py +3 -3
- stadiamaps/models/routing_waypoint.py +3 -3
- stadiamaps/models/routing_waypoint_all_of_search_filter.py +1 -1
- stadiamaps/models/search_query.py +2 -2
- stadiamaps/models/search_structured_query.py +3 -3
- stadiamaps/models/simple_routing_waypoint.py +3 -3
- stadiamaps/models/source_attribution.py +110 -0
- stadiamaps/models/source_id.py +41 -0
- stadiamaps/models/speeds.py +1 -1
- stadiamaps/models/trace_attribute_filter_options.py +1 -1
- stadiamaps/models/trace_attribute_key.py +1 -1
- stadiamaps/models/trace_attributes_base_response.py +1 -1
- stadiamaps/models/trace_attributes_request.py +1 -1
- stadiamaps/models/trace_attributes_response.py +1 -6
- stadiamaps/models/trace_edge.py +2 -7
- stadiamaps/models/travel_mode.py +1 -1
- stadiamaps/models/traversability.py +1 -1
- stadiamaps/models/truck_costing_options.py +1 -1
- stadiamaps/models/tz_response.py +1 -1
- stadiamaps/models/warning.py +1 -1
- stadiamaps/models/whos_on_first_concordances.py +246 -0
- stadiamaps/models/wof_context.py +210 -0
- stadiamaps/models/wof_context_component.py +110 -0
- stadiamaps/rest.py +1 -1
- stadiamaps-6.1.0.dist-info/METADATA +117 -0
- stadiamaps-6.1.0.dist-info/RECORD +183 -0
- {stadiamaps-5.0.0.dist-info → stadiamaps-6.1.0.dist-info}/WHEEL +1 -1
- {stadiamaps-5.0.0.dist-info → stadiamaps-6.1.0.dist-info}/top_level.txt +1 -0
- test/integration/__init__.py +0 -0
- test/integration/test_eu_endpoint.py +21 -0
- test/integration/test_gecoding.py +136 -0
- test/integration/test_geospatial.py +43 -0
- test/integration/test_routing.py +282 -0
- stadiamaps-5.0.0.dist-info/METADATA +0 -87
- stadiamaps-5.0.0.dist-info/RECORD +0 -157
- {stadiamaps-5.0.0.dist-info → stadiamaps-6.1.0.dist-info/licenses}/LICENSE.txt +0 -0
stadiamaps/api/geospatial_api.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 9.1.1
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
stadiamaps/api/routing_api.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 9.1.1
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
stadiamaps/api_client.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 9.1.1
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -91,7 +91,7 @@ class ApiClient:
|
|
91
91
|
self.default_headers[header_name] = header_value
|
92
92
|
self.cookie = cookie
|
93
93
|
# Set default User-Agent.
|
94
|
-
self.user_agent = 'OpenAPI-Generator/
|
94
|
+
self.user_agent = 'OpenAPI-Generator/6.1.0/python'
|
95
95
|
self.client_side_validation = configuration.client_side_validation
|
96
96
|
|
97
97
|
def __enter__(self):
|
@@ -518,7 +518,7 @@ class ApiClient:
|
|
518
518
|
if k in collection_formats:
|
519
519
|
collection_format = collection_formats[k]
|
520
520
|
if collection_format == 'multi':
|
521
|
-
new_params.extend((k, str(value)) for value in v)
|
521
|
+
new_params.extend((k, quote(str(value))) for value in v)
|
522
522
|
else:
|
523
523
|
if collection_format == 'ssv':
|
524
524
|
delimiter = ' '
|
stadiamaps/configuration.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 9.1.1
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -19,7 +19,7 @@ import logging
|
|
19
19
|
from logging import FileHandler
|
20
20
|
import multiprocessing
|
21
21
|
import sys
|
22
|
-
from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict
|
22
|
+
from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union
|
23
23
|
from typing_extensions import NotRequired, Self
|
24
24
|
|
25
25
|
import urllib3
|
@@ -195,7 +195,7 @@ conf = stadiamaps.Configuration(
|
|
195
195
|
username: Optional[str]=None,
|
196
196
|
password: Optional[str]=None,
|
197
197
|
access_token: Optional[str]=None,
|
198
|
-
server_index: Optional[int]=None,
|
198
|
+
server_index: Optional[int]=None,
|
199
199
|
server_variables: Optional[ServerVariablesT]=None,
|
200
200
|
server_operation_index: Optional[Dict[int, int]]=None,
|
201
201
|
server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None,
|
@@ -524,8 +524,8 @@ conf = stadiamaps.Configuration(
|
|
524
524
|
return "Python SDK Debug Report:\n"\
|
525
525
|
"OS: {env}\n"\
|
526
526
|
"Python Version: {pyversion}\n"\
|
527
|
-
"Version of the API:
|
528
|
-
"SDK Package Version:
|
527
|
+
"Version of the API: 9.1.1\n"\
|
528
|
+
"SDK Package Version: 6.1.0".\
|
529
529
|
format(env=sys.platform, pyversion=sys.version)
|
530
530
|
|
531
531
|
def get_host_settings(self) -> List[HostSetting]:
|
stadiamaps/exceptions.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 9.1.1
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -151,6 +151,13 @@ class ApiException(OpenApiException):
|
|
151
151
|
if http_resp.status == 404:
|
152
152
|
raise NotFoundException(http_resp=http_resp, body=body, data=data)
|
153
153
|
|
154
|
+
# Added new conditions for 409 and 422
|
155
|
+
if http_resp.status == 409:
|
156
|
+
raise ConflictException(http_resp=http_resp, body=body, data=data)
|
157
|
+
|
158
|
+
if http_resp.status == 422:
|
159
|
+
raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data)
|
160
|
+
|
154
161
|
if 500 <= http_resp.status <= 599:
|
155
162
|
raise ServiceException(http_resp=http_resp, body=body, data=data)
|
156
163
|
raise ApiException(http_resp=http_resp, body=body, data=data)
|
@@ -189,6 +196,16 @@ class ServiceException(ApiException):
|
|
189
196
|
pass
|
190
197
|
|
191
198
|
|
199
|
+
class ConflictException(ApiException):
|
200
|
+
"""Exception for HTTP 409 Conflict."""
|
201
|
+
pass
|
202
|
+
|
203
|
+
|
204
|
+
class UnprocessableEntityException(ApiException):
|
205
|
+
"""Exception for HTTP 422 Unprocessable Entity."""
|
206
|
+
pass
|
207
|
+
|
208
|
+
|
192
209
|
def render_path(path_to_item):
|
193
210
|
"""Returns a string representation of a path"""
|
194
211
|
result = ""
|
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.1.1
|
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,20 +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.geo_json_polygon import GeoJSONPolygon
|
46
49
|
from stadiamaps.models.geocode_response import GeocodeResponse
|
50
|
+
from stadiamaps.models.geocode_response_envelope_properties_v2 import GeocodeResponseEnvelopePropertiesV2
|
47
51
|
from stadiamaps.models.geocoding_geo_json_feature import GeocodingGeoJSONFeature
|
48
52
|
from stadiamaps.models.geocoding_geo_json_properties import GeocodingGeoJSONProperties
|
49
53
|
from stadiamaps.models.geocoding_geo_json_properties_addendum import GeocodingGeoJSONPropertiesAddendum
|
50
54
|
from stadiamaps.models.geocoding_geo_json_properties_addendum_osm import GeocodingGeoJSONPropertiesAddendumOsm
|
51
55
|
from stadiamaps.models.geocoding_layer import GeocodingLayer
|
56
|
+
from stadiamaps.models.geocoding_meta import GeocodingMeta
|
52
57
|
from stadiamaps.models.geocoding_object import GeocodingObject
|
53
58
|
from stadiamaps.models.geocoding_source import GeocodingSource
|
59
|
+
from stadiamaps.models.geonames_addendum import GeonamesAddendum
|
54
60
|
from stadiamaps.models.height_request import HeightRequest
|
55
61
|
from stadiamaps.models.height_response import HeightResponse
|
56
62
|
from stadiamaps.models.highway_classification import HighwayClassification
|
@@ -60,6 +66,7 @@ from stadiamaps.models.isochrone_feature import IsochroneFeature
|
|
60
66
|
from stadiamaps.models.isochrone_properties import IsochroneProperties
|
61
67
|
from stadiamaps.models.isochrone_request import IsochroneRequest
|
62
68
|
from stadiamaps.models.isochrone_response import IsochroneResponse
|
69
|
+
from stadiamaps.models.layer_id import LayerId
|
63
70
|
from stadiamaps.models.locate_detailed_edge import LocateDetailedEdge
|
64
71
|
from stadiamaps.models.locate_edge import LocateEdge
|
65
72
|
from stadiamaps.models.locate_edge_info import LocateEdgeInfo
|
@@ -73,6 +80,7 @@ from stadiamaps.models.map_match_request import MapMatchRequest
|
|
73
80
|
from stadiamaps.models.map_match_route_response import MapMatchRouteResponse
|
74
81
|
from stadiamaps.models.map_match_trace_options import MapMatchTraceOptions
|
75
82
|
from stadiamaps.models.map_match_waypoint import MapMatchWaypoint
|
83
|
+
from stadiamaps.models.match_type import MatchType
|
76
84
|
from stadiamaps.models.matched_point import MatchedPoint
|
77
85
|
from stadiamaps.models.matrix_costing_model import MatrixCostingModel
|
78
86
|
from stadiamaps.models.matrix_distance import MatrixDistance
|
@@ -84,6 +92,7 @@ from stadiamaps.models.motorcycle_costing_options import MotorcycleCostingOption
|
|
84
92
|
from stadiamaps.models.nearest_roads_request import NearestRoadsRequest
|
85
93
|
from stadiamaps.models.node_id import NodeId
|
86
94
|
from stadiamaps.models.node_type import NodeType
|
95
|
+
from stadiamaps.models.open_street_map_addendum import OpenStreetMapAddendum
|
87
96
|
from stadiamaps.models.optimized_route_request import OptimizedRouteRequest
|
88
97
|
from stadiamaps.models.osrm_admin import OsrmAdmin
|
89
98
|
from stadiamaps.models.osrm_annotation import OsrmAnnotation
|
@@ -104,6 +113,10 @@ from stadiamaps.models.osrm_via_waypoint import OsrmViaWaypoint
|
|
104
113
|
from stadiamaps.models.osrm_voice_instruction import OsrmVoiceInstruction
|
105
114
|
from stadiamaps.models.osrm_waypoint import OsrmWaypoint
|
106
115
|
from stadiamaps.models.pedestrian_costing_options import PedestrianCostingOptions
|
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
|
@@ -122,6 +135,8 @@ from stadiamaps.models.routing_waypoint_all_of_search_filter import RoutingWaypo
|
|
122
135
|
from stadiamaps.models.search_query import SearchQuery
|
123
136
|
from stadiamaps.models.search_structured_query import SearchStructuredQuery
|
124
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
|
125
140
|
from stadiamaps.models.speeds import Speeds
|
126
141
|
from stadiamaps.models.trace_attribute_filter_options import TraceAttributeFilterOptions
|
127
142
|
from stadiamaps.models.trace_attribute_key import TraceAttributeKey
|
@@ -134,3 +149,6 @@ from stadiamaps.models.traversability import Traversability
|
|
134
149
|
from stadiamaps.models.truck_costing_options import TruckCostingOptions
|
135
150
|
from stadiamaps.models.tz_response import TzResponse
|
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.1.1
|
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.1.1
|
9
|
+
Contact: support@stadiamaps.com
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
|
+
|
12
|
+
Do not edit the class manually.
|
13
|
+
""" # noqa: E501
|
14
|
+
|
15
|
+
|
16
|
+
from __future__ import annotations
|
17
|
+
import pprint
|
18
|
+
import re # noqa: F401
|
19
|
+
import json
|
20
|
+
|
21
|
+
from pydantic import BaseModel, ConfigDict
|
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.1.1
|
9
|
+
Contact: support@stadiamaps.com
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
|
+
|
12
|
+
Do not edit the class manually.
|
13
|
+
""" # noqa: E501
|
14
|
+
|
15
|
+
|
16
|
+
from __future__ import annotations
|
17
|
+
import pprint
|
18
|
+
import re # noqa: F401
|
19
|
+
import json
|
20
|
+
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, 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.1.1
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 9.1.1
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 9.1.1
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 9.1.1
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 9.1.1
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 9.1.1
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 9.1.1
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 9.1.1
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 9.1.1
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 9.1.1
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 9.1.1
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|