-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: [google-maps-places] add
generative_summary
and `area_summary…
…` for place summaries (#12709) - [ ] Regenerate this pull request now. BEGIN_COMMIT_OVERRIDE feat: add `generative_summary` and `area_summary` for place summaries feat: add `contextual_contents` field for contextual search results docs: `included_primary_types` supports type collections `(regions)` and `(cities)` END_COMMIT_OVERRIDE Introduces Place summaries and Contextual Search Results features. PiperOrigin-RevId: 634816526 Source-Link: googleapis/googleapis@badabdc Source-Link: googleapis/googleapis-gen@bec34dc Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtcGxhY2VzLy5Pd2xCb3QueWFtbCIsImgiOiJiZWMzNGRjODczODBjMjdhNzI3MWE0ZDRmOWViZWRmODRlODFmODMxIn0= --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Victor Chudnovsky <vchudnov@google.com>
- Loading branch information
1 parent
c5affe1
commit 46d0d9f
Showing
11 changed files
with
474 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
packages/google-maps-places/google/maps/places_v1/types/content_block.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2024 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
from __future__ import annotations | ||
|
||
from typing import MutableMapping, MutableSequence | ||
|
||
from google.type import localized_text_pb2 # type: ignore | ||
import proto # type: ignore | ||
|
||
from google.maps.places_v1.types import reference | ||
|
||
__protobuf__ = proto.module( | ||
package="google.maps.places.v1", | ||
manifest={ | ||
"ContentBlock", | ||
}, | ||
) | ||
|
||
|
||
class ContentBlock(proto.Message): | ||
r"""A block of content that can be served individually. | ||
Attributes: | ||
topic (str): | ||
The topic of the content, for example | ||
"overview" or "restaurant". | ||
content (google.type.localized_text_pb2.LocalizedText): | ||
Content related to the topic. | ||
references (google.maps.places_v1.types.References): | ||
Experimental: See | ||
https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative | ||
for more details. | ||
References that are related to this block of | ||
content. | ||
""" | ||
|
||
topic: str = proto.Field( | ||
proto.STRING, | ||
number=1, | ||
) | ||
content: localized_text_pb2.LocalizedText = proto.Field( | ||
proto.MESSAGE, | ||
number=2, | ||
message=localized_text_pb2.LocalizedText, | ||
) | ||
references: reference.References = proto.Field( | ||
proto.MESSAGE, | ||
number=3, | ||
message=reference.References, | ||
) | ||
|
||
|
||
__all__ = tuple(sorted(__protobuf__.manifest)) |
Oops, something went wrong.