Skip to content

Commit cf3183e

Browse files
docs: [google-maps-places] clarify behavior of primary types and weekday text (#14050)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 777751281 Source-Link: googleapis/googleapis@f37bfb8 Source-Link: googleapis/googleapis-gen@d842591 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtcGxhY2VzLy5Pd2xCb3QueWFtbCIsImgiOiJkODQyNTkxYjFiN2E5NTUzNTEyZWY1NTA4OTMwYjM5OTA2MWFhMDVhIn0= --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 5a27ea2 commit cf3183e

File tree

8 files changed

+56
-37
lines changed

8 files changed

+56
-37
lines changed

packages/google-maps-places/google/maps/places/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.2.1" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-maps-places/google/maps/places_v1/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.2.1" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-maps-places/google/maps/places_v1/services/places/async_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@
7979

8080
class PlacesAsyncClient:
8181
"""Service definition for the Places API. Note: every request (except
82-
for Autocomplete requests) requires a field mask set outside of the
83-
request proto (``all/*``, is not assumed). The field mask can be set
84-
via the HTTP header ``X-Goog-FieldMask``. See:
82+
for Autocomplete and GetPhotoMedia requests) requires a field mask
83+
set outside of the request proto (``all/*``, is not assumed). The
84+
field mask can be set via the HTTP header ``X-Goog-FieldMask``. See:
8585
https://developers.google.com/maps/documentation/places/web-service/choose-fields
8686
"""
8787

packages/google-maps-places/google/maps/places_v1/services/places/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ def get_transport_class(
123123

124124
class PlacesClient(metaclass=PlacesClientMeta):
125125
"""Service definition for the Places API. Note: every request (except
126-
for Autocomplete requests) requires a field mask set outside of the
127-
request proto (``all/*``, is not assumed). The field mask can be set
128-
via the HTTP header ``X-Goog-FieldMask``. See:
126+
for Autocomplete and GetPhotoMedia requests) requires a field mask
127+
set outside of the request proto (``all/*``, is not assumed). The
128+
field mask can be set via the HTTP header ``X-Goog-FieldMask``. See:
129129
https://developers.google.com/maps/documentation/places/web-service/choose-fields
130130
"""
131131

packages/google-maps-places/google/maps/places_v1/services/places/transports/grpc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ class PlacesGrpcTransport(PlacesTransport):
111111
"""gRPC backend transport for Places.
112112
113113
Service definition for the Places API. Note: every request (except
114-
for Autocomplete requests) requires a field mask set outside of the
115-
request proto (``all/*``, is not assumed). The field mask can be set
116-
via the HTTP header ``X-Goog-FieldMask``. See:
114+
for Autocomplete and GetPhotoMedia requests) requires a field mask
115+
set outside of the request proto (``all/*``, is not assumed). The
116+
field mask can be set via the HTTP header ``X-Goog-FieldMask``. See:
117117
https://developers.google.com/maps/documentation/places/web-service/choose-fields
118118
119119
This class defines the same methods as the primary client, so the

packages/google-maps-places/google/maps/places_v1/services/places/transports/grpc_asyncio.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ class PlacesGrpcAsyncIOTransport(PlacesTransport):
117117
"""gRPC AsyncIO backend transport for Places.
118118
119119
Service definition for the Places API. Note: every request (except
120-
for Autocomplete requests) requires a field mask set outside of the
121-
request proto (``all/*``, is not assumed). The field mask can be set
122-
via the HTTP header ``X-Goog-FieldMask``. See:
120+
for Autocomplete and GetPhotoMedia requests) requires a field mask
121+
set outside of the request proto (``all/*``, is not assumed). The
122+
field mask can be set via the HTTP header ``X-Goog-FieldMask``. See:
123123
https://developers.google.com/maps/documentation/places/web-service/choose-fields
124124
125125
This class defines the same methods as the primary client, so the

packages/google-maps-places/google/maps/places_v1/services/places/transports/rest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -372,9 +372,9 @@ class PlacesRestTransport(_BasePlacesRestTransport):
372372
"""REST backend synchronous transport for Places.
373373
374374
Service definition for the Places API. Note: every request (except
375-
for Autocomplete requests) requires a field mask set outside of the
376-
request proto (``all/*``, is not assumed). The field mask can be set
377-
via the HTTP header ``X-Goog-FieldMask``. See:
375+
for Autocomplete and GetPhotoMedia requests) requires a field mask
376+
set outside of the request proto (``all/*``, is not assumed). The
377+
field mask can be set via the HTTP header ``X-Goog-FieldMask``. See:
378378
https://developers.google.com/maps/documentation/places/web-service/choose-fields
379379
380380
This class defines the same methods as the primary client, so the

packages/google-maps-places/google/maps/places_v1/types/place.py

Lines changed: 39 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -89,19 +89,23 @@ class Place(proto.Message):
8989
and Table B at
9090
https://developers.google.com/maps/documentation/places/web-service/place-types
9191
primary_type (str):
92-
The primary type of the given result. This
93-
type must one of the Places API supported types.
94-
For example, "restaurant", "cafe", "airport",
95-
etc. A place can only have a single primary
96-
type. For the complete list of possible values,
97-
see Table A and Table B at
98-
https://developers.google.com/maps/documentation/places/web-service/place-types
92+
The primary type of the given result. This type must be one
93+
of the Places API supported types. For example,
94+
"restaurant", "cafe", "airport", etc. A place can only have
95+
a single primary type. For the complete list of possible
96+
values, see Table A and Table B at
97+
https://developers.google.com/maps/documentation/places/web-service/place-types.
98+
The primary type may be missing if the place's primary type
99+
is not a supported type. When a primary type is present, it
100+
is always one of the types in the ``types`` field.
99101
primary_type_display_name (google.type.localized_text_pb2.LocalizedText):
100102
The display name of the primary type,
101103
localized to the request language if applicable.
102104
For the complete list of possible values, see
103105
Table A and Table B at
104-
https://developers.google.com/maps/documentation/places/web-service/place-types
106+
https://developers.google.com/maps/documentation/places/web-service/place-types.
107+
The primary type may be missing if the place's
108+
primary type is not a supported type.
105109
national_phone_number (str):
106110
A human-readable phone number for the place,
107111
in national format.
@@ -494,19 +498,34 @@ class OpeningHours(proto.Message):
494498
495499
This field is a member of `oneof`_ ``_open_now``.
496500
periods (MutableSequence[google.maps.places_v1.types.Place.OpeningHours.Period]):
497-
The periods that this place is open during
498-
the week. The periods are in chronological
499-
order, starting with Sunday in the place-local
500-
timezone. An empty (but not absent) value
501-
indicates a place that is never open, e.g.
502-
because it is closed temporarily for
503-
renovations.
501+
The periods that this place is open during the week. The
502+
periods are in chronological order, in the place-local
503+
timezone. An empty (but not absent) value indicates a place
504+
that is never open, e.g. because it is closed temporarily
505+
for renovations.
506+
507+
The starting day of ``periods`` is NOT fixed and should not
508+
be assumed to be Sunday. The API determines the start day
509+
based on a variety of factors. For example, for a 24/7
510+
business, the first period may begin on the day of the
511+
request. For other businesses, it might be the first day of
512+
the week that they are open.
513+
514+
NOTE: The ordering of the ``periods`` array is independent
515+
of the ordering of the ``weekday_descriptions`` array. Do
516+
not assume they will begin on the same day.
504517
weekday_descriptions (MutableSequence[str]):
505-
Localized strings describing the opening
506-
hours of this place, one string for each day of
507-
the week. Will be empty if the hours are
508-
unknown or could not be converted to localized
509-
text. Example: "Sun: 18:00–06:00".
518+
Localized strings describing the opening hours of this
519+
place, one string for each day of the week.
520+
521+
NOTE: The order of the days and the start of the week is
522+
determined by the locale (language and region). The ordering
523+
of the ``periods`` array is independent of the ordering of
524+
the ``weekday_descriptions`` array. Do not assume they will
525+
begin on the same day.
526+
527+
Will be empty if the hours are unknown or could not be
528+
converted to localized text. Example: "Sun: 18:00–06:00".
510529
secondary_hours_type (google.maps.places_v1.types.Place.OpeningHours.SecondaryHoursType):
511530
A type string used to identify the type of
512531
secondary hours.

0 commit comments

Comments
 (0)