stadiamaps 5.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 +23 -5
- stadiamaps/api/geocoding_api.py +849 -38
- 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 +162 -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.0.0.dist-info/METADATA +117 -0
- stadiamaps-6.0.0.dist-info/RECORD +183 -0
- {stadiamaps-5.0.0.dist-info → stadiamaps-6.0.0.dist-info}/WHEEL +1 -1
- {stadiamaps-5.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-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.0.0.dist-info/licenses}/LICENSE.txt +0 -0
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 9.0.0
|
9
9
|
Contact: support@stadiamaps.com
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -0,0 +1,125 @@
|
|
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, StrictFloat, StrictInt, StrictStr
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
23
|
+
from typing_extensions import Annotated
|
24
|
+
from stadiamaps.models.feature_properties_v2 import FeaturePropertiesV2
|
25
|
+
from stadiamaps.models.geocoding_meta import GeocodingMeta
|
26
|
+
from typing import Optional, Set
|
27
|
+
from typing_extensions import Self
|
28
|
+
|
29
|
+
class GeocodeResponseEnvelopePropertiesV2(BaseModel):
|
30
|
+
"""
|
31
|
+
The GeoJSON response envelope. This is parameterized over the feature properties type to allow for changes between versions.
|
32
|
+
""" # noqa: E501
|
33
|
+
bbox: Optional[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=4, max_length=4)]] = Field(default=None, description="The geographic bounding box covering all features in the result set. This is empty for autocomplete results.")
|
34
|
+
features: List[FeaturePropertiesV2]
|
35
|
+
geocoding: GeocodingMeta
|
36
|
+
type: StrictStr = Field(description="The GeoJSON object type as defined in RFC 7946. NOTE: This is always FeatureCollection, as the response envelope is designed to hold multiple results.")
|
37
|
+
additional_properties: Dict[str, Any] = {}
|
38
|
+
__properties: ClassVar[List[str]] = ["bbox", "features", "geocoding", "type"]
|
39
|
+
|
40
|
+
model_config = ConfigDict(
|
41
|
+
populate_by_name=True,
|
42
|
+
validate_assignment=True,
|
43
|
+
protected_namespaces=(),
|
44
|
+
)
|
45
|
+
|
46
|
+
|
47
|
+
def to_str(self) -> str:
|
48
|
+
"""Returns the string representation of the model using alias"""
|
49
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
50
|
+
|
51
|
+
def to_json(self) -> str:
|
52
|
+
"""Returns the JSON representation of the model using alias"""
|
53
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
54
|
+
return json.dumps(self.to_dict())
|
55
|
+
|
56
|
+
@classmethod
|
57
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
58
|
+
"""Create an instance of GeocodeResponseEnvelopePropertiesV2 from a JSON string"""
|
59
|
+
return cls.from_dict(json.loads(json_str))
|
60
|
+
|
61
|
+
def to_dict(self) -> Dict[str, Any]:
|
62
|
+
"""Return the dictionary representation of the model using alias.
|
63
|
+
|
64
|
+
This has the following differences from calling pydantic's
|
65
|
+
`self.model_dump(by_alias=True)`:
|
66
|
+
|
67
|
+
* `None` is only added to the output dict for nullable fields that
|
68
|
+
were set at model initialization. Other fields with value `None`
|
69
|
+
are ignored.
|
70
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
71
|
+
"""
|
72
|
+
excluded_fields: Set[str] = set([
|
73
|
+
"additional_properties",
|
74
|
+
])
|
75
|
+
|
76
|
+
_dict = self.model_dump(
|
77
|
+
by_alias=True,
|
78
|
+
exclude=excluded_fields,
|
79
|
+
exclude_none=True,
|
80
|
+
)
|
81
|
+
# override the default output from pydantic by calling `to_dict()` of each item in features (list)
|
82
|
+
_items = []
|
83
|
+
if self.features:
|
84
|
+
for _item_features in self.features:
|
85
|
+
if _item_features:
|
86
|
+
_items.append(_item_features.to_dict())
|
87
|
+
_dict['features'] = _items
|
88
|
+
# override the default output from pydantic by calling `to_dict()` of geocoding
|
89
|
+
if self.geocoding:
|
90
|
+
_dict['geocoding'] = self.geocoding.to_dict()
|
91
|
+
# puts key-value pairs in additional_properties in the top level
|
92
|
+
if self.additional_properties is not None:
|
93
|
+
for _key, _value in self.additional_properties.items():
|
94
|
+
_dict[_key] = _value
|
95
|
+
|
96
|
+
# set to None if bbox (nullable) is None
|
97
|
+
# and model_fields_set contains the field
|
98
|
+
if self.bbox is None and "bbox" in self.model_fields_set:
|
99
|
+
_dict['bbox'] = None
|
100
|
+
|
101
|
+
return _dict
|
102
|
+
|
103
|
+
@classmethod
|
104
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
105
|
+
"""Create an instance of GeocodeResponseEnvelopePropertiesV2 from a dict"""
|
106
|
+
if obj is None:
|
107
|
+
return None
|
108
|
+
|
109
|
+
if not isinstance(obj, dict):
|
110
|
+
return cls.model_validate(obj)
|
111
|
+
|
112
|
+
_obj = cls.model_validate({
|
113
|
+
"bbox": obj.get("bbox"),
|
114
|
+
"features": [FeaturePropertiesV2.from_dict(_item) for _item in obj["features"]] if obj.get("features") is not None else None,
|
115
|
+
"geocoding": GeocodingMeta.from_dict(obj["geocoding"]) if obj.get("geocoding") is not None else None,
|
116
|
+
"type": obj.get("type")
|
117
|
+
})
|
118
|
+
# store additional fields in additional_properties
|
119
|
+
for _key in obj.keys():
|
120
|
+
if _key not in cls.__properties:
|
121
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
122
|
+
|
123
|
+
return _obj
|
124
|
+
|
125
|
+
|
@@ -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
|
|
@@ -19,9 +19,9 @@ import re # noqa: F401
|
|
19
19
|
import json
|
20
20
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
22
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
23
|
+
from typing_extensions import Annotated
|
23
24
|
from stadiamaps.models.geocoding_geo_json_properties_addendum import GeocodingGeoJSONPropertiesAddendum
|
24
|
-
from stadiamaps.models.geocoding_layer import GeocodingLayer
|
25
25
|
from typing import Optional, Set
|
26
26
|
from typing_extensions import Self
|
27
27
|
|
@@ -32,7 +32,7 @@ class GeocodingGeoJSONProperties(BaseModel):
|
|
32
32
|
gid: Optional[StrictStr] = Field(default=None, description="A scoped GID for this result. This can be passed to the place endpoint. Note that these are not always stable long-term.")
|
33
33
|
source_id: Optional[StrictStr] = Field(default=None, description="An ID referencing the original data source (specified via source) for the result. These IDs are specific to the source that they originated from. For example, in the case of OSM, these typically look like way/123 or point/123.")
|
34
34
|
label: Optional[StrictStr] = Field(default=None, description="A full, human-readable label. However, you may not necessarily want to use this; be sure to read the docs for name, locality, and region before making a decision. This field is mostly localized. The order of components is generally locally correct (ex: for an address in South Korea, the house number appears after the street name). However, components will use a request language equivalent if one exists (ex: Seoul instead of 서울 if lang=en).")
|
35
|
-
layer: Optional[
|
35
|
+
layer: Optional[StrictStr] = Field(default=None, description="The data layer containing the place (e.g. \"address\" or \"venue\").")
|
36
36
|
source: Optional[StrictStr] = Field(default=None, description="The ID of the data source that the result came from.")
|
37
37
|
name: Optional[StrictStr] = Field(default=None, description="The name of the place, the street address including house number, or label of similar relevance. If your app is localized to a specific region, you may get better display results by combining name, locality OR region (or neither?), and postal code together in the local format. Experiment with what works best for your use case.")
|
38
38
|
accuracy: Optional[StrictStr] = Field(default=None, description="The accuracy of the geographic coordinates in the result. This value is a property of the result itself and won't change based on the query. A point result means that the record can reasonably be represented by a single geographic point. Addresses, venues, or interpolated addresses usually have point accuracy. Larger areas, such as a city or country, cannot be represented by a single point, so a centroid is given instead.")
|
@@ -60,8 +60,9 @@ class GeocodingGeoJSONProperties(BaseModel):
|
|
60
60
|
localadmin: Optional[StrictStr] = Field(default=None, description="In many countries, this is the lowest level of government. Sometimes interchangeable with locality.")
|
61
61
|
localadmin_gid: Optional[StrictStr] = None
|
62
62
|
match_type: Optional[StrictStr] = Field(default=None, description="For search and structured search results, the type of match.")
|
63
|
+
confidence: Optional[Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=None, description="The level of confidence that the result matches what the user searched for. Only available on forward geocoding endpoints.")
|
63
64
|
additional_properties: Dict[str, Any] = {}
|
64
|
-
__properties: ClassVar[List[str]] = ["gid", "source_id", "label", "layer", "source", "name", "accuracy", "addendum", "continent", "continent_gid", "country", "country_a", "country_code", "country_gid", "neighbourhood", "neighbourhood_gid", "borough", "borough_gid", "postalcode", "street", "housenumber", "locality", "locality_gid", "county", "county_gid", "region", "region_a", "region_gid", "localadmin", "localadmin_gid", "match_type"]
|
65
|
+
__properties: ClassVar[List[str]] = ["gid", "source_id", "label", "layer", "source", "name", "accuracy", "addendum", "continent", "continent_gid", "country", "country_a", "country_code", "country_gid", "neighbourhood", "neighbourhood_gid", "borough", "borough_gid", "postalcode", "street", "housenumber", "locality", "locality_gid", "county", "county_gid", "region", "region_a", "region_gid", "localadmin", "localadmin_gid", "match_type", "confidence"]
|
65
66
|
|
66
67
|
@field_validator('accuracy')
|
67
68
|
def accuracy_validate_enum(cls, value):
|
@@ -174,7 +175,8 @@ class GeocodingGeoJSONProperties(BaseModel):
|
|
174
175
|
"region_gid": obj.get("region_gid"),
|
175
176
|
"localadmin": obj.get("localadmin"),
|
176
177
|
"localadmin_gid": obj.get("localadmin_gid"),
|
177
|
-
"match_type": obj.get("match_type")
|
178
|
+
"match_type": obj.get("match_type"),
|
179
|
+
"confidence": obj.get("confidence")
|
178
180
|
})
|
179
181
|
# store additional fields in additional_properties
|
180
182
|
for _key in obj.keys():
|
@@ -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
|
|
@@ -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: 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 GeocodingMeta(BaseModel):
|
27
|
+
"""
|
28
|
+
GeocodingMeta
|
29
|
+
""" # noqa: E501
|
30
|
+
attribution: StrictStr
|
31
|
+
error: Optional[StrictStr] = Field(default=None, description="Errors encountered serving the request (if any).")
|
32
|
+
additional_properties: Dict[str, Any] = {}
|
33
|
+
__properties: ClassVar[List[str]] = ["attribution", "error"]
|
34
|
+
|
35
|
+
model_config = ConfigDict(
|
36
|
+
populate_by_name=True,
|
37
|
+
validate_assignment=True,
|
38
|
+
protected_namespaces=(),
|
39
|
+
)
|
40
|
+
|
41
|
+
|
42
|
+
def to_str(self) -> str:
|
43
|
+
"""Returns the string representation of the model using alias"""
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
45
|
+
|
46
|
+
def to_json(self) -> str:
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
48
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
49
|
+
return json.dumps(self.to_dict())
|
50
|
+
|
51
|
+
@classmethod
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
53
|
+
"""Create an instance of GeocodingMeta from a JSON string"""
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
55
|
+
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
58
|
+
|
59
|
+
This has the following differences from calling pydantic's
|
60
|
+
`self.model_dump(by_alias=True)`:
|
61
|
+
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
63
|
+
were set at model initialization. Other fields with value `None`
|
64
|
+
are ignored.
|
65
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
66
|
+
"""
|
67
|
+
excluded_fields: Set[str] = set([
|
68
|
+
"additional_properties",
|
69
|
+
])
|
70
|
+
|
71
|
+
_dict = self.model_dump(
|
72
|
+
by_alias=True,
|
73
|
+
exclude=excluded_fields,
|
74
|
+
exclude_none=True,
|
75
|
+
)
|
76
|
+
# puts key-value pairs in additional_properties in the top level
|
77
|
+
if self.additional_properties is not None:
|
78
|
+
for _key, _value in self.additional_properties.items():
|
79
|
+
_dict[_key] = _value
|
80
|
+
|
81
|
+
# set to None if error (nullable) is None
|
82
|
+
# and model_fields_set contains the field
|
83
|
+
if self.error is None and "error" in self.model_fields_set:
|
84
|
+
_dict['error'] = None
|
85
|
+
|
86
|
+
return _dict
|
87
|
+
|
88
|
+
@classmethod
|
89
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
90
|
+
"""Create an instance of GeocodingMeta from a dict"""
|
91
|
+
if obj is None:
|
92
|
+
return None
|
93
|
+
|
94
|
+
if not isinstance(obj, dict):
|
95
|
+
return cls.model_validate(obj)
|
96
|
+
|
97
|
+
_obj = cls.model_validate({
|
98
|
+
"attribution": obj.get("attribution"),
|
99
|
+
"error": obj.get("error")
|
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:
|
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
|
|
@@ -0,0 +1,101 @@
|
|
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
|
23
|
+
from typing import Optional, Set
|
24
|
+
from typing_extensions import Self
|
25
|
+
|
26
|
+
class GeonamesAddendum(BaseModel):
|
27
|
+
"""
|
28
|
+
GeonamesAddendum
|
29
|
+
""" # noqa: E501
|
30
|
+
feature_code: StrictStr = Field(description="The GeoNames feature code (for GeoNames results only).")
|
31
|
+
additional_properties: Dict[str, Any] = {}
|
32
|
+
__properties: ClassVar[List[str]] = ["feature_code"]
|
33
|
+
|
34
|
+
model_config = ConfigDict(
|
35
|
+
populate_by_name=True,
|
36
|
+
validate_assignment=True,
|
37
|
+
protected_namespaces=(),
|
38
|
+
)
|
39
|
+
|
40
|
+
|
41
|
+
def to_str(self) -> str:
|
42
|
+
"""Returns the string representation of the model using alias"""
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
44
|
+
|
45
|
+
def to_json(self) -> str:
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
48
|
+
return json.dumps(self.to_dict())
|
49
|
+
|
50
|
+
@classmethod
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
52
|
+
"""Create an instance of GeonamesAddendum from a JSON string"""
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
54
|
+
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
57
|
+
|
58
|
+
This has the following differences from calling pydantic's
|
59
|
+
`self.model_dump(by_alias=True)`:
|
60
|
+
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
62
|
+
were set at model initialization. Other fields with value `None`
|
63
|
+
are ignored.
|
64
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
65
|
+
"""
|
66
|
+
excluded_fields: Set[str] = set([
|
67
|
+
"additional_properties",
|
68
|
+
])
|
69
|
+
|
70
|
+
_dict = self.model_dump(
|
71
|
+
by_alias=True,
|
72
|
+
exclude=excluded_fields,
|
73
|
+
exclude_none=True,
|
74
|
+
)
|
75
|
+
# puts key-value pairs in additional_properties in the top level
|
76
|
+
if self.additional_properties is not None:
|
77
|
+
for _key, _value in self.additional_properties.items():
|
78
|
+
_dict[_key] = _value
|
79
|
+
|
80
|
+
return _dict
|
81
|
+
|
82
|
+
@classmethod
|
83
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
84
|
+
"""Create an instance of GeonamesAddendum from a dict"""
|
85
|
+
if obj is None:
|
86
|
+
return None
|
87
|
+
|
88
|
+
if not isinstance(obj, dict):
|
89
|
+
return cls.model_validate(obj)
|
90
|
+
|
91
|
+
_obj = cls.model_validate({
|
92
|
+
"feature_code": obj.get("feature_code")
|
93
|
+
})
|
94
|
+
# store additional fields in additional_properties
|
95
|
+
for _key in obj.keys():
|
96
|
+
if _key not in cls.__properties:
|
97
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
98
|
+
|
99
|
+
return _obj
|
100
|
+
|
101
|
+
|
@@ -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
|
|
@@ -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
|
|
@@ -0,0 +1,57 @@
|
|
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 json
|
18
|
+
from enum import Enum
|
19
|
+
from typing_extensions import Self
|
20
|
+
|
21
|
+
|
22
|
+
class LayerId(str, Enum):
|
23
|
+
"""
|
24
|
+
Canonical geocoding layer IDs for querying.
|
25
|
+
"""
|
26
|
+
|
27
|
+
"""
|
28
|
+
allowed enum values
|
29
|
+
"""
|
30
|
+
POI = 'poi'
|
31
|
+
ADDRESS = 'address'
|
32
|
+
STREET = 'street'
|
33
|
+
COUNTRY = 'country'
|
34
|
+
MACROREGION = 'macroregion'
|
35
|
+
REGION = 'region'
|
36
|
+
MACROCOUNTY = 'macrocounty'
|
37
|
+
COUNTY = 'county'
|
38
|
+
LOCALITY = 'locality'
|
39
|
+
LOCALADMIN = 'localadmin'
|
40
|
+
BOROUGH = 'borough'
|
41
|
+
NEIGHBOURHOOD = 'neighbourhood'
|
42
|
+
POSTALCODE = 'postalcode'
|
43
|
+
DEPENDENCY = 'dependency'
|
44
|
+
MACROHOOD = 'macrohood'
|
45
|
+
MARINEAREA = 'marinearea'
|
46
|
+
DISPUTED = 'disputed'
|
47
|
+
EMPIRE = 'empire'
|
48
|
+
CONTINENT = 'continent'
|
49
|
+
OCEAN = 'ocean'
|
50
|
+
COARSE = 'coarse'
|
51
|
+
|
52
|
+
@classmethod
|
53
|
+
def from_json(cls, json_str: str) -> Self:
|
54
|
+
"""Create an instance of LayerId from a JSON string"""
|
55
|
+
return cls(json.loads(json_str))
|
56
|
+
|
57
|
+
|
@@ -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
|
|
stadiamaps/models/locate_edge.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
|
|
@@ -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
|
|
stadiamaps/models/locate_node.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
|
|
@@ -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
|
|