Skip to content

Commit f37bfb8

Browse files
Google APIscopybara-github
authored andcommitted
docs: clarify behavior of primary types and weekday text
PiperOrigin-RevId: 777751281
1 parent fe97877 commit f37bfb8

File tree

2 files changed

+34
-11
lines changed

2 files changed

+34
-11
lines changed

google/maps/places/v1/place.proto

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,31 @@ message Place {
177177
optional bool open_now = 1;
178178

179179
// The periods that this place is open during the week. The periods are in
180-
// chronological order, starting with Sunday in the place-local timezone. An
181-
// empty (but not absent) value indicates a place that is never open, e.g.
180+
// chronological order, in the place-local timezone. An empty (but not
181+
// absent) value indicates a place that is never open, e.g.
182182
// because it is closed temporarily for renovations.
183+
//
184+
// The starting day of `periods` is NOT fixed and should not be assumed to
185+
// be Sunday. The API determines the start day based on a variety of
186+
// factors. For example, for a 24/7 business, the first period may begin on
187+
// the day of the request. For other businesses, it might be the first day
188+
// of the week that they are open.
189+
//
190+
// NOTE: The ordering of the `periods` array is independent of the ordering
191+
// of the `weekday_descriptions` array. Do not assume they will begin on the
192+
// same day.
183193
repeated Period periods = 2;
184194

185195
// Localized strings describing the opening hours of this place, one string
186-
// for each day of the week. Will be empty if the hours are unknown or
187-
// could not be converted to localized text. Example: "Sun: 18:00–06:00"
196+
// for each day of the week.
197+
//
198+
// NOTE: The order of the days and the start of the week is determined by
199+
// the locale (language and region). The ordering of the `periods` array is
200+
// independent of the ordering of the `weekday_descriptions` array. Do not
201+
// assume they will begin on the same day.
202+
//
203+
// Will be empty if the hours are unknown or could not be converted to
204+
// localized text. Example: "Sun: 18:00–06:00"
188205
repeated string weekday_descriptions = 3;
189206

190207
// A type string used to identify the type of secondary hours.
@@ -405,17 +422,22 @@ message Place {
405422
// https://developers.google.com/maps/documentation/places/web-service/place-types
406423
repeated string types = 5;
407424

408-
// The primary type of the given result. This type must one of the Places API
409-
// supported types. For example, "restaurant", "cafe", "airport", etc. A
425+
// The primary type of the given result. This type must be one of the Places
426+
// API supported types. For example, "restaurant", "cafe", "airport", etc. A
410427
// place can only have a single primary type. For the complete list of
411428
// possible values, see Table A and Table B at
412-
// https://developers.google.com/maps/documentation/places/web-service/place-types
429+
// https://developers.google.com/maps/documentation/places/web-service/place-types.
430+
// The primary type may be missing if the place's primary type is not a
431+
// supported type. When a primary type is present, it is always one of the
432+
// types in the `types` field.
413433
string primary_type = 50;
414434

415435
// The display name of the primary type, localized to the request language if
416436
// applicable. For the complete list of possible values, see Table A and Table
417437
// B at
418-
// https://developers.google.com/maps/documentation/places/web-service/place-types
438+
// https://developers.google.com/maps/documentation/places/web-service/place-types.
439+
// The primary type may be missing if the place's primary type is not a
440+
// supported type.
419441
google.type.LocalizedText primary_type_display_name = 32;
420442

421443
// A human-readable phone number for the place, in national format.

google/maps/places/v1/places_service.proto

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@ option objc_class_prefix = "GMPSV1";
4141
option php_namespace = "Google\\Maps\\Places\\V1";
4242

4343
// Service definition for the Places API.
44-
// Note: every request (except for Autocomplete requests) requires a field mask
45-
// set outside of the request proto (`all/*`, is not assumed). The field mask
46-
// can be set via the HTTP header `X-Goog-FieldMask`. See:
44+
// Note: every request (except for Autocomplete and GetPhotoMedia requests)
45+
// requires a field mask set outside of the request proto (`all/*`, is not
46+
// assumed). The field mask can be set via the HTTP header `X-Goog-FieldMask`.
47+
// See:
4748
// https://developers.google.com/maps/documentation/places/web-service/choose-fields
4849
service Places {
4950
option (google.api.default_host) = "places.googleapis.com";

0 commit comments

Comments
 (0)