Skip to content

Commit 31b3cc8

Browse files
docs: [google-maps-areainsights] clarifications of comments (googleapis#13825)
- [ ] Regenerate this pull request now. BEGIN_COMMIT_OVERRIDE docs: clarifications of comments docs: sample requests rewritten as JSON END_COMMIT_OVERRIDE docs: sample requests rewritten as JSON PiperOrigin-RevId: 750475120 Source-Link: googleapis/googleapis@61756de Source-Link: https://github.com/googleapis/googleapis-gen/commit/1a30ee94ab2215a59f58092dc281d7e6a6019335 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtYXJlYWluc2lnaHRzLy5Pd2xCb3QueWFtbCIsImgiOiIxYTMwZWU5NGFiMjIxNWE1OWY1ODA5MmRjMjgxZDdlNmE2MDE5MzM1In0= --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 5900059 commit 31b3cc8

File tree

1 file changed

+65
-42
lines changed

1 file changed

+65
-42
lines changed

packages/google-maps-areainsights/google/maps/areainsights_v1/types/area_insights_service.py

Lines changed: 65 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -49,59 +49,81 @@ class Insight(proto.Enum):
4949
When this insight is specified ComputeInsights returns the
5050
number of places that match the specified filter criteria.
5151
52+
Example request:
53+
5254
::
5355
54-
For example if the request is:
55-
ComputeInsightsRequest {
56-
insights: INSIGHT_COUNT
57-
filter {
58-
location_filter {region: <PlaceId of state of CA>}
59-
type_filter {included_types: "restaurant"}
60-
operating_status: OPERATING_STATUS_OPERATIONAL
61-
price_levels: PRICE_LEVEL_FREE
62-
price_levels: PRICE_LEVEL_INEXPENSIVE
63-
min_rating: 4.0
56+
{
57+
"insights": ["INSIGHT_COUNT"],
58+
"filter": {
59+
"locationFilter": {
60+
"region": {
61+
"place": "places/ChIJPV4oX_65j4ARVW8IJ6IJUYs"
62+
}
63+
},
64+
"typeFilter": {
65+
"includedTypes": ["restaurant"]
66+
},
67+
"operatingStatus": ["OPERATING_STATUS_OPERATIONAL"],
68+
"priceLevels": [
69+
"PRICE_LEVEL_FREE",
70+
"PRICE_LEVEL_INEXPENSIVE"
71+
],
72+
"ratingFilter": {
73+
"minRating": 4.0
74+
}
6475
}
6576
}
6677
67-
The method will return the count of restaurants in California that are
68-
operational, with price level free or inexpensive and have an average
69-
rating of at least 4 starts.
78+
Example response:
79+
80+
::
7081
71-
Example response:
72-
ComputeInsightsResponse {
73-
count: <number of places>
82+
{
83+
"count": 1234
7484
}
7585
INSIGHT_PLACES (2):
7686
Return Places
7787
7888
When this insight is specified ComputeInsights returns
79-
Places that match the specified filter criteria.
89+
places IDs that match the specified filter criteria.
90+
91+
Example request:
8092
8193
::
8294
83-
For example if the request is:
84-
ComputeInsightsRequest {
85-
insights: INSIGHT_PLACES
86-
filter {
87-
location_filter {region: <PlaceId of state of CA>}
88-
type_filter {included_types: "restaurant"}
89-
operating_status: OPERATING_STATUS_OPERATIONAL
90-
price_levels: PRICE_LEVEL_FREE
91-
price_levels: PRICE_LEVEL_INEXPENSIVE
92-
min_rating: 4.0
95+
{
96+
"insights": ["INSIGHT_PLACES"],
97+
"filter": {
98+
"locationFilter": {
99+
"region": {
100+
"place": "places/ChIJPV4oX_65j4ARVW8IJ6IJUYs"
101+
}
102+
},
103+
"typeFilter": {
104+
"includedTypes": ["restaurant"]
105+
},
106+
"operatingStatus": ["OPERATING_STATUS_OPERATIONAL"],
107+
"priceLevels": [
108+
"PRICE_LEVEL_FREE",
109+
"PRICE_LEVEL_INEXPENSIVE"
110+
],
111+
"ratingFilter": {
112+
"minRating": 4.0
113+
}
93114
}
94115
}
95116
96-
The method will return list of places of restaurants in
97-
California that are operational, with price level free or inexpensive and
98-
have an average rating of at least 4 stars.
117+
Example response:
99118
100-
Example response:
101-
ComputeInsightsResponse {
102-
place_insights { place: "places/ABC" }
103-
place_insights { place: "places/PQR" }
104-
place_insights { place: "places/XYZ" }
119+
::
120+
121+
{
122+
"placeInsights": [
123+
{"place": "places/ABC"},
124+
{"place": "places/PQR"},
125+
{"place": "places/XYZ"}
126+
]
105127
}
106128
"""
107129
INSIGHT_UNSPECIFIED = 0
@@ -114,14 +136,14 @@ class OperatingStatus(proto.Enum):
114136
115137
Values:
116138
OPERATING_STATUS_UNSPECIFIED (0):
117-
Not Specified.
139+
Not specified. This value should not be used.
118140
OPERATING_STATUS_OPERATIONAL (1):
119141
The place is operational and its open during
120142
its defined hours.
121143
OPERATING_STATUS_PERMANENTLY_CLOSED (3):
122144
The Place is no longer in business.
123145
OPERATING_STATUS_TEMPORARILY_CLOSED (4):
124-
The Place is temporarily closed and expected
146+
The place is temporarily closed and expected
125147
to reopen in the future.
126148
"""
127149
OPERATING_STATUS_UNSPECIFIED = 0
@@ -135,7 +157,7 @@ class PriceLevel(proto.Enum):
135157
136158
Values:
137159
PRICE_LEVEL_UNSPECIFIED (0):
138-
Place price level is unspecified or unknown.
160+
Not specified. This value should not be used.
139161
PRICE_LEVEL_FREE (1):
140162
Place provides free services.
141163
PRICE_LEVEL_INEXPENSIVE (2):
@@ -237,8 +259,8 @@ class Filter(proto.Message):
237259
OPERATING_STATUS_OPERATIONAL is used as default.
238260
price_levels (MutableSequence[google.maps.areainsights_v1.types.PriceLevel]):
239261
Optional. Restricts results to places whose price level is
240-
included on this list. If price_level is not set, all price
241-
levels are included in the results.
262+
included on this list. If ``price_levels`` is not set, all
263+
price levels are included in the results.
242264
rating_filter (google.maps.areainsights_v1.types.RatingFilter):
243265
Optional. Restricts results to places whose average user
244266
ratings are in the range specified by rating_filter. If
@@ -317,8 +339,9 @@ class Circle(proto.Message):
317339
318340
This field is a member of `oneof`_ ``center``.
319341
place (str):
320-
The Place resource name of the center of the
321-
circle. Only point places are supported.
342+
**Format:** Must be in the format ``places/PLACE_ID``, where
343+
``PLACE_ID`` is the unique identifier of a place. For
344+
example: ``places/ChIJgUbEo8cfqokR5lP9_Wh_DaM``.
322345
323346
This field is a member of `oneof`_ ``center``.
324347
radius (int):

0 commit comments

Comments
 (0)