azure.maps.search.models package

class azure.maps.search.models.Address(*, building_number: Optional[str] = None, street: Optional[str] = None, cross_street: Optional[str] = None, street_number: Optional[str] = None, route_numbers: Optional[List[int]] = None, street_name: Optional[str] = None, street_name_and_number: Optional[str] = None, municipality: Optional[str] = None, municipality_subdivision: Optional[str] = None, country_tertiary_subdivision: Optional[str] = None, country_secondary_subdivision: Optional[str] = None, country_subdivision: Optional[str] = None, postal_code: Optional[str] = None, extended_postal_code: Optional[str] = None, country_code: Optional[str] = None, country: Optional[str] = None, country_code_iso3: Optional[str] = None, freeform_address: Optional[str] = None, country_subdivision_name: Optional[str] = None, local_name: Optional[str] = None, bounding_box: Optional[azure.maps.search.models._models.BoundingBox] = None)[source]

The address of the result.

Keyword Arguments
  • building_number (str) – The building number on the street.

  • street (str) – The street name.

  • cross_street (str) – The name of the street being crossed.

  • street_number (str) – The building number on the street.

  • route_numbers (list[int]) – The codes used to unambiguously identify the street.

  • street_name (str) – The street name.

  • street_name_and_number (str) – The street name and number.

  • municipality (str) – City / Town.

  • municipality_subdivision (str) – Sub / Super City.

  • country_tertiary_subdivision (str) – Named Area.

  • country_secondary_subdivision (str) – County.

  • country_subdivision (str) – State or Province.

  • postal_code (str) – Postal Code / Zip Code.

  • extended_postal_code (str) – Extended postal code (availability is dependent on the region).

  • country_code (str) – Country (Note: This is a two-letter code, not a country name.).

  • country (str) – Country name.

  • country_code_iso3 (str) – ISO alpha-3 country code.

  • freeform_address (str) – An address line formatted according to the formatting rules of a Result’s country of origin, or in the case of a country, its full country name.

  • country_subdivision_name (str) – The full name of a first level of country administrative hierarchy. This field appears only in case countrySubdivision is presented in an abbreviated form. Only supported for USA, Canada, and Great Britain.

  • local_name (str) – An address component which represents the name of a geographic area or locality that groups a number of addressable objects for addressing purposes, without being an administrative unit. This field is used to build the freeformAddress property.

  • bounding_box (BoundingBox) – Bounding box coordinates.

class azure.maps.search.models.AddressRanges(*, range_start: Optional[str] = None, range_end: Optional[str] = None, range_from: Optional[azure.maps.search.models._models.LatLon] = None, range_to: Optional[azure.maps.search.models._models.LatLon] = None)[source]

Describes the address range on both sides of the street for a search result. Coordinates for the start and end locations of the address range are included.

Keyword Arguments
  • range_start (str) – Address range on the left(start) side of the street.

  • range_end (str) – Address range on the right(end) side of the street.

  • range_from (LatLon) – A location represented as a latitude and longitude using short names ‘lat’ & ‘lon’.

  • range_to (LatLon) – A location represented as a latitude and longitude using short names ‘lat’ & ‘lon’.

class azure.maps.search.models.BatchResultSummary(**kwargs)[source]

Summary of the results for the batch request.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • successful_requests (int) – Number of successful requests in the batch.

  • total_requests (int) – Total number of requests in the batch.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.maps.search.models.BoundingBox(west: float = 0.0, south: float = 0.0, east: float = 0.0, north: float = 0.0)[source]

Represents information about the coordinate range

Keyword Arguments
  • west (float) – The westmost value of coordinates.

  • south (float) – The southmost value of coordinates.

  • east (float) – The eastmost value of coordinates.

  • north (float) – The northmost value of coordinates.

Create new instance of BoundingBox(west, south, east, north)

count(value, /)

Return number of occurrences of value.

index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

east: float

Alias for field number 2

north: float

Alias for field number 3

south: float

Alias for field number 1

west: float

Alias for field number 0

class azure.maps.search.models.ElectricVehicleConnector(value)[source]

An enumeration.

CHADEMO = 'Chademo'

CHAdeMO connector named after an association formed by the Tokyo Electric Power Company and industrial partners. Because of this is is also known as the TEPCO’s connector. It supports fast DC charging.

IEC60309_AC1_PHASE_BLUE = 'IEC60309AC1PhaseBlue'

Industrial Blue connector is a connector defined in the IEC 60309 standard. It is sometime referred to as by some combination of the standard, the color and the fact that is a single phase connector. The connector usually has the “P+N+E, 6h” configuration.

IEC60309_DC_WHITE = 'IEC60309DCWhite'

Industrial White connector is a DC connector defined in the IEC 60309 standard.

IEC62196_TYPE1 = 'IEC62196Type1'

Type 1 connector as defined in the IEC 62196-2 standard. Also called Yazaki after the original manufacturer or SAE J1772 after the standard that first published it. Mostly used in combination with 120V single phase or up to 240V single phase infrastructure.

IEC62196_TYPE1_CCS = 'IEC62196Type1CCS'

Type 1 based combo connector as defined in the IEC 62196-3 standard. The connector is based on the Type 1 connector – as defined in the IEC 62196-2 standard – with two additional direct current (DC) contacts to allow DC fast charging.

IEC62196_TYPE2_CABLE_ATTACHED = 'IEC62196Type2CableAttached'

Type 2 connector as defined in the IEC 62196-2 standard. Provided as a cable and plug attached to the charging point.

IEC62196_TYPE2_CCS = 'IEC62196Type2CCS'

Type 2 based combo connector as defined in the IEC 62196-3 standard. The connector is based on the Type 2 connector – as defined in the IEC 62196-2 standard – with two additional direct current (DC) contacts to allow DC fast charging.

IEC62196_TYPE2_OUTLET = 'IEC62196Type2Outlet'

Type 2 connector as defined in the IEC 62196-2 standard. Provided as a socket set into the charging point.

IEC62196_TYPE3 = 'IEC62196Type3'

Type 3 connector as defined in the IEC 62196-2 standard. Also called Scame after the original manufacturer. Mostly used in combination with up to 240V single phase or up to 420V three phase infrastructure.

STANDARD_HOUSEHOLD_COUNTRY_SPECIFIC = 'StandardHouseholdCountrySpecific'

These are the standard household connectors for a certain region. They are all AC single phase and the standard Voltage and standard Amperage.

TESLA = 'Tesla'

The Tesla connector is the regionally specific Tesla Supercharger connector. I.e. it refers to either Tesla’s proprietary connector, sometimes referred to as Tesla Port mostly limited to North America or the modified Type 2 (DC over Type 2) in Europe.

class azure.maps.search.models.EntryPoint(entry_point_type: Optional[str] = None, position: Optional[azure.maps.search.models._models.LatLon] = None)[source]

The entry point for the POI being returned.

Keyword Arguments
  • entry_point_type (str or EntryPointType) – The type of entry point.

  • position (LatLon) – A location represented as a latitude and longitude using short names ‘lat’ & ‘lon’.

class azure.maps.search.models.GeoJsonObject(type_: Optional[Union[str, azure.maps.search._generated.models._search_client_enums.GeoJsonObjectType]] = None, **kwargs)[source]

A valid GeoJSON object. Please refer to RFC 7946 for details.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: GeoJsonFeature, GeoJsonFeatureCollection, GeoJsonGeometry,

GeoJsonGeometryCollection, GeoJsonLineString, GeoJsonMultiLineString, GeoJsonMultiPoint, GeoJsonMultiPolygon, GeoJsonPoint, GeoJsonPolygon.

All required parameters must be populated in order to send to Azure.

Parameters

type (str or GeoJsonObjectType) – Required. Specifies the GeoJSON type. Must be one of the nine valid GeoJSON object types - Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon, GeometryCollection, Feature and FeatureCollection.Constant filled by server. Possible values include: “Point”, “MultiPoint”, “LineString”, “MultiLineString”, “Polygon”, “MultiPolygon”, “GeometryCollection”, “Feature”, “FeatureCollection”.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.maps.search.models.LatLon(lat: float = 0, lon: float = 0)[source]

Represents coordinate latitude and longitude

Keyword Arguments
  • lat (float) – The coordinate as latitude.

  • lon (float) – The coordinate as longitude.

Create new instance of LatLon(lat, lon)

count(value, /)

Return number of occurrences of value.

index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

lat: float

Alias for field number 0

lon: float

Alias for field number 1

class azure.maps.search.models.LocalizedMapView(value)[source]

An enumeration.

AE = 'AE'

United Arab Emirates (Arabic View).

AR = 'AR'

Argentina (Argentinian View).

AUTO = 'Auto'

Return the map data based on the IP address of the request.

BH = 'BH'

Bahrain (Arabic View).

IN_ENUM = 'IN'

India (Indian View).

IQ = 'IQ'

Iraq (Arabic View).

JO = 'JO'

Jordan (Arabic View).

KW = 'KW'

Kuwait (Arabic View).

LB = 'LB'

Lebanon (Arabic View).

MA = 'MA'

Morocco (Moroccan View).

OM = 'OM'

Oman (Arabic View).

PK = 'PK'

Pakistan (Pakistani View).

PS = 'PS'

Palestinian Authority (Arabic View).

QA = 'QA'

Qatar (Arabic View).

SA = 'SA'

Saudi Arabia (Arabic View).

SY = 'SY'

Syria (Arabic View).

UNIFIED = 'Unified'

Unified View (Others).

YE = 'YE'

Yemen (Arabic View).

class azure.maps.search.models.OperatingHoursRange(value)[source]

An enumeration.

NEXT_SEVEN_DAYS = 'nextSevenDays'

Shows the hours of operation for the next week, starting with the current day in the local time of the POI.

class azure.maps.search.models.PointOfInterestCategory(**kwargs)[source]

POI category result.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (int) – Unique ID for the category. ID can be used to restrict search results to specific categories through other Search Service APIs, like Get Search POI.

  • name (str) – Name of the category.

  • child_ids (list[int]) – Array of child category ids.

  • synonyms (list[str]) – Array of alternative names of the category.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.maps.search.models.PointOfInterestExtendedPostalCodes(value)[source]

An enumeration.

NONE = 'None'
POI = 'POI'
class azure.maps.search.models.Polygon(*, geometry_data: Optional[azure.maps.search._generated.models._models_py3.GeoJsonObject] = None, **kwargs)[source]

Polygon.

Variables are only populated by the server, and will be ignored when sending a request.

Variables

provider_id (str) – ID of the returned entity.

Parameters

geometry_data (GeoJsonObject) –

Geometry data in GeoJSON format. Please refer to RFC 7946 for details. Present only if “error” is not present.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.maps.search.models.ReverseSearchAddressBatchItem(**kwargs)[source]

An item returned from Search Address Reverse Batch service call.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • status_code (int) – HTTP request status code.

  • response (ReverseSearchAddressBatchItemResponse) – The result of the query. SearchAddressReverseResponse if the query completed successfully, ErrorResponse otherwise.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.maps.search.models.ReverseSearchAddressBatchProcessResult(*, summary: Optional[azure.maps.search._generated.models._models_py3.BatchResultSummary] = None, items: Optional[List[azure.maps.search.models._models.ReverseSearchAddressBatchItem]] = None)[source]

This object is returned from a successful Search Address Reverse Batch service call.

Variables are only populated by the server, and will be ignored when sending a request.

Keyword Arguments
class azure.maps.search.models.ReverseSearchAddressResult(*, summary: Optional[azure.maps.search.models._models.SearchSummary] = None, results: Optional[List[azure.maps.search.models._models.ReverseSearchAddressResultItem]] = None)[source]

This object is returned from a successful Search Address Reverse call.

Variables are only populated by the server, and will be ignored when sending a request.

Keyword Arguments
class azure.maps.search.models.ReverseSearchAddressResultItem(*, address: Optional[azure.maps.search.models._models.Address] = None, position: Optional[azure.maps.search.models._models.LatLon] = None, road_use: Optional[List[str]] = None, match_type: Optional[str] = None)[source]

Result object for a Search Address Reverse response.

Variables are only populated by the server, and will be ignored when sending a request.

Keyword Arguments
  • address (Address) – The address of the result.

  • position (LatLon) – Position property in the form of “latitude,longitude”.

  • road_use (list[str]) –

  • match_type (str or MatchType) – Information on the type of match.

class azure.maps.search.models.ReverseSearchCrossStreetAddressResult(**kwargs)[source]

This object is returned from a successful Search Address Reverse CrossStreet call.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • summary (SearchSummary) – Summary object for a Search Address Reverse Cross Street response.

  • addresses (list[ReverseSearchCrossStreetAddressResultItem]) – Addresses array.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.maps.search.models.RoadUseType(value)[source]

Describes the possible uses of a road.

ARTERIAL = 'Arterial'
LIMITED_ACCESS = 'LimitedAccess'
LOCAL_STREET = 'LocalStreet'
RAMP = 'Ramp'
ROTARY = 'Rotary'
TERMINAL = 'Terminal'
class azure.maps.search.models.SearchAddressBatchItem(response: Optional[azure.maps.search._generated.models._models_py3.SearchAddressBatchItemResponse] = None, **kwargs)[source]

An item returned from Search Address Batch service call.

Variables are only populated by the server, and will be ignored when sending a request.

Keyword Arguments
  • status_code (int) – HTTP request status code.

  • response (SearchAddressBatchItemResponse) – The result of the query. SearchAddressResponse if the query completed successfully, ErrorResponse otherwise.

class azure.maps.search.models.SearchAddressBatchResult(summary: Optional[azure.maps.search._generated.models._models_py3.BatchResultSummary] = None, items: Optional[List[azure.maps.search.models._models.SearchAddressBatchItem]] = None)[source]

This object is returned from a successful Search Address Batch service call.

Variables are only populated by the server, and will be ignored when sending a request.

Keyword Arguments
  • summary (BatchResultSummary) – Summary of the results for the batch request.

  • items (list[SearchAddressBatchItem]) – Array containing the batch results.

class azure.maps.search.models.SearchAddressResult(summary: Optional[azure.maps.search.models._models.SearchSummary] = None, results: Optional[List[azure.maps.search.models._models.SearchAddressResultItem]] = None)[source]

This object is returned from a successful Search calls.

Variables are only populated by the server, and will be ignored when sending a request.

Keyword Arguments
class azure.maps.search.models.SearchAddressResultItem(*, type_: Optional[str] = None, id_: Optional[str] = None, score: Optional[float] = None, distance_in_meters: Optional[float] = None, info: Optional[str] = None, entity_type: Optional[str] = None, point_of_interest: Optional[azure.maps.search._generated.models._models_py3.PointOfInterest] = None, address: Optional[azure.maps.search.models._models.Address] = None, position: Optional[azure.maps.search.models._models.LatLon] = None, viewport: Optional[azure.maps.search.models._models.BoundingBox] = None, entry_points: Optional[azure.maps.search.models._models.EntryPoint] = None, address_ranges: Optional[azure.maps.search.models._models.AddressRanges] = None, data_sources: Optional[azure.maps.search._generated.models._models_py3.DataSource] = None, match_type: Optional[str] = None, detour_time: Optional[int] = None)[source]

Result object for a Search API response..

Keyword Arguments
  • type (str or SearchAddressResultType) – Possible values include: “POI”, “Street”, “Geography”, “Point Address”, “Address Range”, “Cross Street”.

  • id (str) – Id property.

  • score (float) – The value within a result set to indicate the relative matching score between results.

  • distance_in_meters (float) – Straight line distance between the result and geobias location in meters.

  • info (str) – Information about the original data source of the Result. Used for support requests.

  • point_of_interest (PointOfInterest) – Details of the returned POI including information such as the name, phone, url address, and classifications.

  • address (Address) – The address of the result.

  • viewport (BoundingBox) – The viewport that covers the result represented by the top-left and bottom- right coordinates as BoundingBox.

  • entry_points (list[EntryPoint]) – Array of EntryPoints. Those describe the types of entrances available at the location. The type can be “main” for main entrances such as a front door, or a lobby, and “minor”, for side and back doors.

  • address_ranges (AddressRanges) – Describes the address range on both sides of the street for a search result. Coordinates for the start and end locations of the address range are included.

  • data_sources (DataSource) – Optional section. Reference geometry id.

  • match_type (str or MatchType) – Information on the type of match.

  • detour_time (int) – Detour time in seconds.

Parameters
  • entity_type (str or GeographicEntityType) – Possible values include: “Country”, “CountrySubdivision”, “CountrySecondarySubdivision”, “CountryTertiarySubdivision”, “Municipality”, “MunicipalitySubdivision”, “Neighbourhood”, “PostalCodeArea”.

  • position (LatLon) – A location represented as a latitude and longitude using short names ‘lat’ & ‘lon’.

class azure.maps.search.models.SearchAlongRouteOptions(*, route: Optional[azure.maps.search.models._models.GeoJsonLineString] = None, **kwargs)[source]
class azure.maps.search.models.SearchAlongRouteRequest(*, route: Optional[azure.maps.search._generated.models._models_py3.GeoJsonLineString] = None, **kwargs)[source]

This type represents the request body for the Search Along Route service.

Parameters

route (GeoJsonLineString) –

A valid GeoJSON LineString geometry type. Please refer to RFC 7946 for details.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.maps.search.models.SearchIndexes(value)[source]

An enumeration.

ADDRESS = 'Addr'

Address range interpolation.

CROSS_STREETS = 'Xstr'

Cross Streets (Intersections).

GEOGRAPHIES = 'Geo'

Geographies.

POINTS_OF_INTEREST = 'POI'

Points of interest.

POINT_ADDRESSES = 'PAD'

Point Addresses.

STREETS = 'Str'

Streets.

class azure.maps.search.models.SearchSummary(*, query: Optional[str] = None, query_type: Optional[str] = None, query_time: Optional[int] = None, num_results: Optional[int] = None, top: Optional[int] = None, skip: Optional[int] = None, total_results: Optional[int] = None, fuzzy_level: Optional[int] = None, geo_bias: Optional[azure.maps.search.models._models.LatLon] = None)[source]

Summary object for a Search API response.

Keyword Arguments
  • query (str) – The query parameter that was used to produce these search results.

  • query_type (str or QueryType) – The type of query being returned: NEARBY or NON_NEAR. Possible values include: “NEARBY”, “NON_NEAR”.

  • query_time (int) – Time spent resolving the query, in milliseconds.

  • num_results (int) – Number of results in the response.

  • top (int) – Maximum number of responses that will be returned.

  • skip (int) – The starting offset of the returned Results within the full Result set.

  • total_results (int) – The total number of Results found.

  • fuzzy_level (int) – The maximum fuzzy level required to provide Results.

  • geo_bias (LatLongPairAbbreviated) – Indication when the internal search engine has applied a geospatial bias to improve the ranking of results.

class azure.maps.search.models.StructuredAddress(country_code: str, *, cross_street: Optional[str] = None, street_number: Optional[str] = None, street_name: Optional[str] = None, municipality: Optional[str] = None, municipality_subdivision: Optional[str] = None, country_tertiary_subdivision: Optional[str] = None, country_secondary_subdivision: Optional[str] = None, country_subdivision: Optional[str] = None, postal_code: Optional[str] = None)[source]

The Structured address as the search input.

Parameters

country_code (str) – Country (Note: This is a two-letter code, not a country name.).

Keyword Arguments
  • cross_street (str) – The name of the street being crossed.

  • street_number (str) – The building number on the street.

  • street_name (str) – The street name.

  • municipality (str) – City / Town.

  • municipality_subdivision (str) – Sub / Super City.

  • country_tertiary_subdivision (str) – Named Area.

  • country_secondary_subdivision (str) – County.

  • country_subdivision (str) – State or Province.

  • postal_code (str) – Postal Code / Zip Code.