Skip to content

Commit 61756de

Browse files
Google APIscopybara-github
authored andcommitted
docs: clarifications of comments
docs: sample requests rewritten as JSON PiperOrigin-RevId: 750475120
1 parent 45f440b commit 61756de

1 file changed

Lines changed: 62 additions & 41 deletions

File tree

google/maps/areainsights/v1/area_insights_service.proto

Lines changed: 62 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ message Filter {
105105
[(google.api.field_behavior) = OPTIONAL];
106106

107107
// Optional. Restricts results to places whose price level is included on this
108-
// list. If price_level is not set, all price levels are included in the
108+
// list. If `price_levels` is not set, all price levels are included in the
109109
// results.
110110
repeated PriceLevel price_levels = 4 [(google.api.field_behavior) = OPTIONAL];
111111

@@ -126,8 +126,9 @@ message LocationFilter {
126126
// The latitude and longitude of the center of the circle.
127127
google.type.LatLng lat_lng = 1;
128128

129-
// The Place resource name of the center of the circle. Only point places
130-
// are supported.
129+
// **Format:** Must be in the format `places/PLACE_ID`, where `PLACE_ID`
130+
// is the unique identifier of a place. For example:
131+
// `places/ChIJgUbEo8cfqokR5lP9_Wh_DaM`.
131132
string place = 2 [(google.api.resource_reference) = {
132133
type: "places.googleapis.com/Place"
133134
}];
@@ -246,66 +247,86 @@ enum Insight {
246247
//
247248
// When this insight is specified ComputeInsights returns the number of
248249
// places that match the specified filter criteria.
250+
//
251+
// Example request:
249252
// ```
250-
// For example if the request is:
251-
// ComputeInsightsRequest {
252-
// insights: INSIGHT_COUNT
253-
// filter {
254-
// location_filter {region: <PlaceId of state of CA>}
255-
// type_filter {included_types: "restaurant"}
256-
// operating_status: OPERATING_STATUS_OPERATIONAL
257-
// price_levels: PRICE_LEVEL_FREE
258-
// price_levels: PRICE_LEVEL_INEXPENSIVE
259-
// min_rating: 4.0
253+
// {
254+
// "insights": ["INSIGHT_COUNT"],
255+
// "filter": {
256+
// "locationFilter": {
257+
// "region": {
258+
// "place": "places/ChIJPV4oX_65j4ARVW8IJ6IJUYs"
259+
// }
260+
// },
261+
// "typeFilter": {
262+
// "includedTypes": ["restaurant"]
263+
// },
264+
// "operatingStatus": ["OPERATING_STATUS_OPERATIONAL"],
265+
// "priceLevels": [
266+
// "PRICE_LEVEL_FREE",
267+
// "PRICE_LEVEL_INEXPENSIVE"
268+
// ],
269+
// "ratingFilter": {
270+
// "minRating": 4.0
271+
// }
260272
// }
261273
// }
262-
//
263-
// The method will return the count of restaurants in California that are
264-
// operational, with price level free or inexpensive and have an average
265-
// rating of at least 4 starts.
274+
// ```
266275
//
267276
// Example response:
268-
// ComputeInsightsResponse {
269-
// count: <number of places>
277+
// ```
278+
// {
279+
// "count": 1234
270280
// }
271281
// ```
272282
INSIGHT_COUNT = 1;
273283

274284
// Return Places
275285
//
276-
// When this insight is specified ComputeInsights returns Places
286+
// When this insight is specified ComputeInsights returns places IDs
277287
// that match the specified filter criteria.
288+
//
289+
// Example request:
278290
// ```
279-
// For example if the request is:
280-
// ComputeInsightsRequest {
281-
// insights: INSIGHT_PLACES
282-
// filter {
283-
// location_filter {region: <PlaceId of state of CA>}
284-
// type_filter {included_types: "restaurant"}
285-
// operating_status: OPERATING_STATUS_OPERATIONAL
286-
// price_levels: PRICE_LEVEL_FREE
287-
// price_levels: PRICE_LEVEL_INEXPENSIVE
288-
// min_rating: 4.0
291+
// {
292+
// "insights": ["INSIGHT_PLACES"],
293+
// "filter": {
294+
// "locationFilter": {
295+
// "region": {
296+
// "place": "places/ChIJPV4oX_65j4ARVW8IJ6IJUYs"
297+
// }
298+
// },
299+
// "typeFilter": {
300+
// "includedTypes": ["restaurant"]
301+
// },
302+
// "operatingStatus": ["OPERATING_STATUS_OPERATIONAL"],
303+
// "priceLevels": [
304+
// "PRICE_LEVEL_FREE",
305+
// "PRICE_LEVEL_INEXPENSIVE"
306+
// ],
307+
// "ratingFilter": {
308+
// "minRating": 4.0
309+
// }
289310
// }
290311
// }
291-
//
292-
// The method will return list of places of restaurants in
293-
// California that are operational, with price level free or inexpensive and
294-
// have an average rating of at least 4 stars.
312+
// ```
295313
//
296314
// Example response:
297-
// ComputeInsightsResponse {
298-
// place_insights { place: "places/ABC" }
299-
// place_insights { place: "places/PQR" }
300-
// place_insights { place: "places/XYZ" }
315+
// ```
316+
// {
317+
// "placeInsights": [
318+
// {"place": "places/ABC"},
319+
// {"place": "places/PQR"},
320+
// {"place": "places/XYZ"}
321+
// ]
301322
// }
302323
// ```
303324
INSIGHT_PLACES = 2;
304325
}
305326

306327
// Operating status of the place.
307328
enum OperatingStatus {
308-
// Not Specified.
329+
// Not specified. This value should not be used.
309330
OPERATING_STATUS_UNSPECIFIED = 0;
310331

311332
// The place is operational and its open during its defined hours.
@@ -314,13 +335,13 @@ enum OperatingStatus {
314335
// The Place is no longer in business.
315336
OPERATING_STATUS_PERMANENTLY_CLOSED = 3;
316337

317-
// The Place is temporarily closed and expected to reopen in the future.
338+
// The place is temporarily closed and expected to reopen in the future.
318339
OPERATING_STATUS_TEMPORARILY_CLOSED = 4;
319340
}
320341

321342
// Price level of the place.
322343
enum PriceLevel {
323-
// Place price level is unspecified or unknown.
344+
// Not specified. This value should not be used.
324345
PRICE_LEVEL_UNSPECIFIED = 0;
325346

326347
// Place provides free services.

0 commit comments

Comments
 (0)