Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.2.8" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.2.8" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -1232,6 +1232,9 @@ async def sample_update_message():
- ``accessory_widgets`` (Requires `app
authentication </chat/api/guides/auth/service-accounts>`__.)

- ``quoted_message_metadata`` (Only allows removal of
the quoted message.)

This corresponds to the ``update_mask`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1808,6 +1808,9 @@ def sample_update_message():
- ``accessory_widgets`` (Requires `app
authentication </chat/api/guides/auth/service-accounts>`__.)

- ``quoted_message_metadata`` (Only allows removal of
the quoted message.)

This corresponds to the ``update_mask`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
Expand Down
46 changes: 37 additions & 9 deletions packages/google-apps-chat/google/apps/chat_v1/types/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,19 @@ class Message(proto.Message):
Output only. Information about a deleted message. A message
is deleted when ``delete_time`` is set.
quoted_message_metadata (google.apps.chat_v1.types.QuotedMessageMetadata):
Output only. Information about a message
that's quoted by a Google Chat user in a space.
Google Chat users can quote a message to reply
to it.
Optional. Information about a message that another message
quotes.

When you create a message, you can quote messages within the
same thread, or quote a root message to create a new root
message. However, you can't quote a message reply from a
different thread.

When you update a message, you can't add or replace the
``quotedMessageMetadata`` field, but you can remove it.

For example usage, see `Quote another
message <https://developers.google.com/workspace/chat/create-messages#quote-a-message>`__.
attached_gifs (MutableSequence[google.apps.chat_v1.types.AttachedGif]):
Output only. GIF images that are attached to
the message.
Expand Down Expand Up @@ -397,17 +406,33 @@ class AttachedGif(proto.Message):


class QuotedMessageMetadata(proto.Message):
r"""Information about a quoted message.
r"""Information about a message that another message quotes.

When you create a message, you can quote messages within the same
thread, or quote a root message to create a new root message.
However, you can't quote a message reply from a different thread.

When you update a message, you can't add or replace the
``quotedMessageMetadata`` field, but you can remove it.

For example usage, see `Quote another
message <https://developers.google.com/workspace/chat/create-messages#quote-a-message>`__.

Attributes:
name (str):
Output only. Resource name of the quoted message.
Required. Resource name of the message that is quoted.

Format: ``spaces/{space}/messages/{message}``
last_update_time (google.protobuf.timestamp_pb2.Timestamp):
Output only. The timestamp when the quoted
message was created or when the quoted message
was last updated.
Required. The timestamp when the quoted message was created
or when the quoted message was last updated.

If the message was edited, use this field,
``last_update_time``. If the message was never edited, use
``create_time``.

If ``last_update_time`` doesn't match the latest version of
the quoted message, the request fails.
"""

name: str = proto.Field(
Expand Down Expand Up @@ -679,6 +704,9 @@ class UpdateMessageRequest(proto.Message):

- ``accessory_widgets`` (Requires `app
authentication </chat/api/guides/auth/service-accounts>`__.)

- ``quoted_message_metadata`` (Only allows removal of the
quoted message.)
allow_missing (bool):
Optional. If ``true`` and the message isn't found, a new
message is created and ``updateMask`` is ignored. The
Expand Down
3 changes: 2 additions & 1 deletion packages/google-apps-chat/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@
def mypy(session):
"""Run the type checker."""
session.install(
"mypy",
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2410): Use the latest version of mypy
"mypy<1.16.0",
"types-requests",
"types-protobuf",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-apps-chat",
"version": "0.2.8"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Loading