Types for Google Maps Areainsights v1 API¶
- class google.maps.areainsights_v1.types.ComputeInsightsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request for the ComputeInsights RPC.
- insights¶
Required. Insights to compute. Currently only INSIGHT_COUNT and INSIGHT_PLACES are supported.
- Type
MutableSequence[google.maps.areainsights_v1.types.Insight]
- filter¶
Required. Insight filter.
- class google.maps.areainsights_v1.types.ComputeInsightsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Response for the ComputeInsights RPC.
- place_insights¶
Result for Insights.INSIGHT_PLACES.
- Type
MutableSequence[google.maps.areainsights_v1.types.PlaceInsight]
- class google.maps.areainsights_v1.types.Filter(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Filters for the ComputeInsights RPC.
- location_filter¶
Required. Restricts results to places which are located in the area specified by location filters.
- type_filter¶
Required. Place type filters.
- operating_status¶
Optional. Restricts results to places whose operating status is included on this list. If operating_status is not set, OPERATING_STATUS_OPERATIONAL is used as default.
- Type
MutableSequence[google.maps.areainsights_v1.types.OperatingStatus]
- price_levels¶
Optional. Restricts results to places whose price level is included on this list. If price_level is not set, all price levels are included in the results.
- Type
MutableSequence[google.maps.areainsights_v1.types.PriceLevel]
- rating_filter¶
Optional. Restricts results to places whose average user ratings are in the range specified by rating_filter. If rating_filter is not set, all ratings are included in the result.
- class google.maps.areainsights_v1.types.Insight(value)[source]¶
Bases:
proto.enums.Enum
Supported insights.
- Values:
- INSIGHT_UNSPECIFIED (0):
Not Specified.
- INSIGHT_COUNT (1):
Count insight.
When this insight is specified ComputeInsights returns the number of places that match the specified filter criteria.
For example if the request is: ComputeInsightsRequest { insights: INSIGHT_COUNT filter { location_filter {region: <PlaceId of state of CA>} type_filter {included_types: "restaurant"} operating_status: OPERATING_STATUS_OPERATIONAL price_levels: PRICE_LEVEL_FREE price_levels: PRICE_LEVEL_INEXPENSIVE min_rating: 4.0 } } The method will return the count of restaurants in California that are operational, with price level free or inexpensive and have an average rating of at least 4 starts. Example response: ComputeInsightsResponse { count: <number of places> }
- INSIGHT_PLACES (2):
Return Places
When this insight is specified ComputeInsights returns Places that match the specified filter criteria.
For example if the request is: ComputeInsightsRequest { insights: INSIGHT_PLACES filter { location_filter {region: <PlaceId of state of CA>} type_filter {included_types: "restaurant"} operating_status: OPERATING_STATUS_OPERATIONAL price_levels: PRICE_LEVEL_FREE price_levels: PRICE_LEVEL_INEXPENSIVE min_rating: 4.0 } } The method will return list of places of restaurants in California that are operational, with price level free or inexpensive and have an average rating of at least 4 stars. Example response: ComputeInsightsResponse { place_insights { place: "places/ABC" } place_insights { place: "places/PQR" } place_insights { place: "places/XYZ" } }
- class google.maps.areainsights_v1.types.LocationFilter(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Location filters.
Specifies the area of interest for the insight.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- class Circle(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A circle is defined by a center point and radius in meters.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- lat_lng¶
The latitude and longitude of the center of the circle.
This field is a member of oneof
center
.- Type
google.type.latlng_pb2.LatLng
- class CustomArea(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Custom Area.
- polygon¶
Required. The custom area represented as a polygon
- class Polygon(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A polygon is represented by a series of connected coordinates in an counterclockwise ordered sequence. The coordinates form a closed loop and define a filled region. The first and last coordinates are equivalent, and they must contain identical values. The format is a simplified version of GeoJSON polygons (we only support one counterclockwise exterior ring).
- coordinates¶
Optional. The coordinates that define the polygon.
- Type
MutableSequence[google.type.latlng_pb2.LatLng]
- class google.maps.areainsights_v1.types.OperatingStatus(value)[source]¶
Bases:
proto.enums.Enum
Operating status of the place.
- Values:
- OPERATING_STATUS_UNSPECIFIED (0):
Not Specified.
- OPERATING_STATUS_OPERATIONAL (1):
The place is operational and its open during its defined hours.
- OPERATING_STATUS_PERMANENTLY_CLOSED (3):
The Place is no longer in business.
- OPERATING_STATUS_TEMPORARILY_CLOSED (4):
The Place is temporarily closed and expected to reopen in the future.
- class google.maps.areainsights_v1.types.PlaceInsight(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Holds information about a place
- place¶
The resource name of a place. This resource name can be used to retrieve details about the place using the Places API.
- Type
- class google.maps.areainsights_v1.types.PriceLevel(value)[source]¶
Bases:
proto.enums.Enum
Price level of the place.
- Values:
- PRICE_LEVEL_UNSPECIFIED (0):
Place price level is unspecified or unknown.
- PRICE_LEVEL_FREE (1):
Place provides free services.
- PRICE_LEVEL_INEXPENSIVE (2):
Place provides inexpensive services.
- PRICE_LEVEL_MODERATE (3):
Place provides moderately priced services.
- PRICE_LEVEL_EXPENSIVE (4):
Place provides expensive services.
- PRICE_LEVEL_VERY_EXPENSIVE (5):
Place provides very expensive services.
- class google.maps.areainsights_v1.types.RatingFilter(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Average user rating filters.
- class google.maps.areainsights_v1.types.TypeFilter(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Place type filters.
Only Place types from Table a are supported.
A place can only have a single primary type associated with it. For example, the primary type might be “mexican_restaurant” or “steak_house”. Use included_primary_types and excluded_primary_types to filter the results on a place’s primary type.
A place can also have multiple type values associated with it. For example a restaurant might have the following types: “seafood_restaurant”, “restaurant”, “food”, “point_of_interest”, “establishment”. Use included_types and excluded_types to filter the results on the list of types associated with a place.
If a search is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For example, if you specify {“included_types”: [“restaurant”], “excluded_primary_types”: [“steak_house”]}, the returned places provide “restaurant” related services but do not operate primarily as a “steak_house”.
If there are any conflicting types, i.e. a type appears in both included_types and excluded_types types or included_primary_types and excluded_primary_types, an INVALID_ARGUMENT error is returned.
One of included_types or included_primary_types must be set.