Skip to content

Commit bde4694

Browse files
docs: [google-maps-places] Change comments in some fields in Places API (googleapis#13635)
- [ ] Regenerate this pull request now. feat: Add postal_address and time_zone to Place PiperOrigin-RevId: 735444062 Source-Link: googleapis/googleapis@b3d8e7d Source-Link: https://github.com/googleapis/googleapis-gen/commit/8f1517bd8b3aa56c655360fe182d15b9ae9dde74 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtcGxhY2VzLy5Pd2xCb3QueWFtbCIsImgiOiI4ZjE1MTdiZDhiM2FhNTZjNjU1MzYwZmUxODJkMTViOWFlOWRkZTc0In0= --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 3609c90 commit bde4694

File tree

4 files changed

+35
-4
lines changed

4 files changed

+35
-4
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@
4444
OptionalRetry = Union[retries.AsyncRetry, object, None] # type: ignore
4545

4646
from google.geo.type.types import viewport
47+
from google.type import datetime_pb2 # type: ignore
4748
from google.type import latlng_pb2 # type: ignore
4849
from google.type import localized_text_pb2 # type: ignore
50+
from google.type import postal_address_pb2 # type: ignore
4951

5052
from google.maps.places_v1.types import (
5153
contextual_content,

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@
6161
_LOGGER = std_logging.getLogger(__name__)
6262

6363
from google.geo.type.types import viewport
64+
from google.type import datetime_pb2 # type: ignore
6465
from google.type import latlng_pb2 # type: ignore
6566
from google.type import localized_text_pb2 # type: ignore
67+
from google.type import postal_address_pb2 # type: ignore
6668

6769
from google.maps.places_v1.types import (
6870
contextual_content,

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

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@
2020
from google.geo.type.types import viewport as ggt_viewport
2121
from google.protobuf import timestamp_pb2 # type: ignore
2222
from google.type import date_pb2 # type: ignore
23+
from google.type import datetime_pb2 # type: ignore
2324
from google.type import latlng_pb2 # type: ignore
2425
from google.type import localized_text_pb2 # type: ignore
26+
from google.type import postal_address_pb2 # type: ignore
2527
import proto # type: ignore
2628

2729
from google.maps.places_v1.types import content_block, ev_charging
@@ -111,6 +113,8 @@ class Place(proto.Message):
111113
short_formatted_address (str):
112114
A short, human-readable address for this
113115
place.
116+
postal_address (google.type.postal_address_pb2.PostalAddress):
117+
The address in postal address format.
114118
address_components (MutableSequence[google.maps.places_v1.types.Place.AddressComponent]):
115119
Repeated components for each locality level. Note the
116120
following facts about the address_components[] array:
@@ -157,7 +161,14 @@ class Place(proto.Message):
157161
relevance. A maximum of 5 reviews can be
158162
returned.
159163
regular_opening_hours (google.maps.places_v1.types.Place.OpeningHours):
160-
The regular hours of operation.
164+
The regular hours of operation. Note that if a place is
165+
always open (24 hours), the ``close`` field will not be set.
166+
Clients can rely on always open (24 hours) being represented
167+
as an
168+
[open][google.maps.places.v1.Place.OpeningHours.Period.open]
169+
period containing [day][Point.day] with value ``0``,
170+
[hour][Point.hour] with value ``0``, and
171+
[minute][Point.minute] with value ``0``.
161172
utc_offset_minutes (int):
162173
Number of minutes this place's timezone is
163174
currently offset from UTC. This is expressed in
@@ -166,6 +177,9 @@ class Place(proto.Message):
166177
minutes.
167178
168179
This field is a member of `oneof`_ ``_utc_offset_minutes``.
180+
time_zone (google.type.datetime_pb2.TimeZone):
181+
IANA Time Zone Database time zone. For example
182+
"America/New_York".
169183
photos (MutableSequence[google.maps.places_v1.types.Photo]):
170184
Information (including references) about
171185
photos of this place. A maximum of 10 photos can
@@ -174,7 +188,7 @@ class Place(proto.Message):
174188
The place's address in adr microformat:
175189
http://microformats.org/wiki/adr.
176190
business_status (google.maps.places_v1.types.Place.BusinessStatus):
177-
191+
The business status for the place.
178192
price_level (google.maps.places_v1.types.PriceLevel):
179193
Price level of the place.
180194
attributions (MutableSequence[google.maps.places_v1.types.Place.Attribution]):
@@ -579,11 +593,12 @@ class Point(proto.Message):
579593
580594
This field is a member of `oneof`_ ``_day``.
581595
hour (int):
582-
The hour in 2 digits. Ranges from 00 to 23.
596+
The hour in 24 hour format. Ranges from 0 to
597+
23.
583598
584599
This field is a member of `oneof`_ ``_hour``.
585600
minute (int):
586-
The minute in 2 digits. Ranges from 00 to 59.
601+
The minute. Ranges from 0 to 59.
587602
588603
This field is a member of `oneof`_ ``_minute``.
589604
date (google.type.date_pb2.Date):
@@ -1009,6 +1024,11 @@ class ContainingPlace(proto.Message):
10091024
proto.STRING,
10101025
number=51,
10111026
)
1027+
postal_address: postal_address_pb2.PostalAddress = proto.Field(
1028+
proto.MESSAGE,
1029+
number=90,
1030+
message=postal_address_pb2.PostalAddress,
1031+
)
10121032
address_components: MutableSequence[AddressComponent] = proto.RepeatedField(
10131033
proto.MESSAGE,
10141034
number=10,
@@ -1056,6 +1076,11 @@ class ContainingPlace(proto.Message):
10561076
number=22,
10571077
optional=True,
10581078
)
1079+
time_zone: datetime_pb2.TimeZone = proto.Field(
1080+
proto.MESSAGE,
1081+
number=88,
1082+
message=datetime_pb2.TimeZone,
1083+
)
10591084
photos: MutableSequence[photo.Photo] = proto.RepeatedField(
10601085
proto.MESSAGE,
10611086
number=54,

packages/google-maps-places/tests/unit/gapic/places_v1/test_places.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,10 @@
5252
from google.auth.exceptions import MutualTLSChannelError
5353
from google.geo.type.types import viewport
5454
from google.oauth2 import service_account
55+
from google.type import datetime_pb2 # type: ignore
5556
from google.type import latlng_pb2 # type: ignore
5657
from google.type import localized_text_pb2 # type: ignore
58+
from google.type import postal_address_pb2 # type: ignore
5759

5860
from google.maps.places_v1.services.places import (
5961
PlacesAsyncClient,

0 commit comments

Comments
 (0)