diff --git a/packages/google-apps-chat/google/apps/chat/__init__.py b/packages/google-apps-chat/google/apps/chat/__init__.py index 750627d91bb9..0a5ddc0db23d 100644 --- a/packages/google-apps-chat/google/apps/chat/__init__.py +++ b/packages/google-apps-chat/google/apps/chat/__init__.py @@ -26,9 +26,11 @@ from google.apps.chat_v1.types.annotation import ( Annotation, AnnotationType, + CalendarEventLinkData, ChatSpaceLinkData, CustomEmojiMetadata, DriveLinkData, + MeetSpaceLinkData, RichLinkMetadata, SlashCommandMetadata, UserMentionMetadata, @@ -151,9 +153,11 @@ "ChatServiceAsyncClient", "ActionStatus", "Annotation", + "CalendarEventLinkData", "ChatSpaceLinkData", "CustomEmojiMetadata", "DriveLinkData", + "MeetSpaceLinkData", "RichLinkMetadata", "SlashCommandMetadata", "UserMentionMetadata", diff --git a/packages/google-apps-chat/google/apps/chat/gapic_version.py b/packages/google-apps-chat/google/apps/chat/gapic_version.py index 9650dd3a514f..20a9cd975b02 100644 --- a/packages/google-apps-chat/google/apps/chat/gapic_version.py +++ b/packages/google-apps-chat/google/apps/chat/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.2.6" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-apps-chat/google/apps/chat_v1/__init__.py b/packages/google-apps-chat/google/apps/chat_v1/__init__.py index 55cde29befaa..ba80dac4e858 100644 --- a/packages/google-apps-chat/google/apps/chat_v1/__init__.py +++ b/packages/google-apps-chat/google/apps/chat_v1/__init__.py @@ -23,9 +23,11 @@ from .types.annotation import ( Annotation, AnnotationType, + CalendarEventLinkData, ChatSpaceLinkData, CustomEmojiMetadata, DriveLinkData, + MeetSpaceLinkData, RichLinkMetadata, SlashCommandMetadata, UserMentionMetadata, @@ -150,6 +152,7 @@ "AttachedGif", "Attachment", "AttachmentDataRef", + "CalendarEventLinkData", "CardWithId", "ChatServiceClient", "ChatSpaceLinkData", @@ -200,6 +203,7 @@ "ListSpacesRequest", "ListSpacesResponse", "MatchedUrl", + "MeetSpaceLinkData", "Membership", "MembershipBatchCreatedEventData", "MembershipBatchDeletedEventData", diff --git a/packages/google-apps-chat/google/apps/chat_v1/gapic_version.py b/packages/google-apps-chat/google/apps/chat_v1/gapic_version.py index 9650dd3a514f..20a9cd975b02 100644 --- a/packages/google-apps-chat/google/apps/chat_v1/gapic_version.py +++ b/packages/google-apps-chat/google/apps/chat_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.2.6" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-apps-chat/google/apps/chat_v1/types/__init__.py b/packages/google-apps-chat/google/apps/chat_v1/types/__init__.py index 3d92f479f648..68048bc1193c 100644 --- a/packages/google-apps-chat/google/apps/chat_v1/types/__init__.py +++ b/packages/google-apps-chat/google/apps/chat_v1/types/__init__.py @@ -17,9 +17,11 @@ from .annotation import ( Annotation, AnnotationType, + CalendarEventLinkData, ChatSpaceLinkData, CustomEmojiMetadata, DriveLinkData, + MeetSpaceLinkData, RichLinkMetadata, SlashCommandMetadata, UserMentionMetadata, @@ -137,9 +139,11 @@ __all__ = ( "ActionStatus", "Annotation", + "CalendarEventLinkData", "ChatSpaceLinkData", "CustomEmojiMetadata", "DriveLinkData", + "MeetSpaceLinkData", "RichLinkMetadata", "SlashCommandMetadata", "UserMentionMetadata", diff --git a/packages/google-apps-chat/google/apps/chat_v1/types/annotation.py b/packages/google-apps-chat/google/apps/chat_v1/types/annotation.py index b277e9cf5ce5..baaf7b3dd2f7 100644 --- a/packages/google-apps-chat/google/apps/chat_v1/types/annotation.py +++ b/packages/google-apps-chat/google/apps/chat_v1/types/annotation.py @@ -33,6 +33,8 @@ "CustomEmojiMetadata", "DriveLinkData", "ChatSpaceLinkData", + "MeetSpaceLinkData", + "CalendarEventLinkData", }, ) @@ -60,8 +62,10 @@ class AnnotationType(proto.Enum): class Annotation(proto.Message): - r"""Output only. Annotations associated with the plain-text body of the - message. To add basic formatting to a text message, see `Format text + r"""Output only. Annotations can be associated with the plain-text body + of the message or with chips that link to Google Workspace resources + like Google Docs or Sheets with ``start_index`` and ``length`` of 0. + To add basic formatting to a text message, see `Format text messages `__. Example plain-text message body: @@ -107,7 +111,8 @@ class Annotation(proto.Message): This field is a member of `oneof`_ ``_start_index``. length (int): Length of the substring in the plain-text - message body this annotation corresponds to. + message body this annotation corresponds to. If + not present, indicates a length of 0. user_mention (google.apps.chat_v1.types.UserMentionMetadata): The metadata of user mention. @@ -260,7 +265,10 @@ class Type(proto.Enum): class RichLinkMetadata(proto.Message): - r"""A rich link to a resource. + r"""A rich link to a resource. Rich links can be associated with the + plain-text body of the message or represent chips that link to + Google Workspace resources like Google Docs or Sheets with + ``start_index`` and ``length`` of 0. This message has `oneof`_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. @@ -281,6 +289,14 @@ class RichLinkMetadata(proto.Message): chat_space_link_data (google.apps.chat_v1.types.ChatSpaceLinkData): Data for a chat space link. + This field is a member of `oneof`_ ``data``. + meet_space_link_data (google.apps.chat_v1.types.MeetSpaceLinkData): + Data for a Meet space link. + + This field is a member of `oneof`_ ``data``. + calendar_event_link_data (google.apps.chat_v1.types.CalendarEventLinkData): + Data for a Calendar event link. + This field is a member of `oneof`_ ``data``. """ @@ -295,10 +311,18 @@ class RichLinkType(proto.Enum): CHAT_SPACE (2): A Chat space rich link type. For example, a space smart chip. + MEET_SPACE (4): + A Meet message rich link type. For example, a + Meet chip. + CALENDAR_EVENT (5): + A Calendar message rich link type. For + example, a Calendar chip. """ RICH_LINK_TYPE_UNSPECIFIED = 0 DRIVE_FILE = 1 CHAT_SPACE = 2 + MEET_SPACE = 4 + CALENDAR_EVENT = 5 uri: str = proto.Field( proto.STRING, @@ -321,6 +345,18 @@ class RichLinkType(proto.Enum): oneof="data", message="ChatSpaceLinkData", ) + meet_space_link_data: "MeetSpaceLinkData" = proto.Field( + proto.MESSAGE, + number=5, + oneof="data", + message="MeetSpaceLinkData", + ) + calendar_event_link_data: "CalendarEventLinkData" = proto.Field( + proto.MESSAGE, + number=6, + oneof="data", + message="CalendarEventLinkData", + ) class CustomEmojiMetadata(proto.Message): @@ -394,4 +430,95 @@ class ChatSpaceLinkData(proto.Message): ) +class MeetSpaceLinkData(proto.Message): + r"""Data for Meet space links. + + Attributes: + meeting_code (str): + Meeting code of the linked Meet space. + type_ (google.apps.chat_v1.types.MeetSpaceLinkData.Type): + Indicates the type of the Meet space. + huddle_status (google.apps.chat_v1.types.MeetSpaceLinkData.HuddleStatus): + Optional. Output only. If the Meet is a + Huddle, indicates the status of the huddle. + Otherwise, this is unset. + """ + + class Type(proto.Enum): + r"""The type of the Meet space. + + Values: + TYPE_UNSPECIFIED (0): + Default value for the enum. Don't use. + MEETING (1): + The Meet space is a meeting. + HUDDLE (2): + The Meet space is a huddle. + """ + TYPE_UNSPECIFIED = 0 + MEETING = 1 + HUDDLE = 2 + + class HuddleStatus(proto.Enum): + r"""The status of the huddle + + Values: + HUDDLE_STATUS_UNSPECIFIED (0): + Default value for the enum. Don't use. + STARTED (1): + The huddle has started. + ENDED (2): + The huddle has ended. In this case the Meet + space URI and identifiers will no longer be + valid. + MISSED (3): + The huddle has been missed. In this case the + Meet space URI and identifiers will no longer be + valid. + """ + HUDDLE_STATUS_UNSPECIFIED = 0 + STARTED = 1 + ENDED = 2 + MISSED = 3 + + meeting_code: str = proto.Field( + proto.STRING, + number=1, + ) + type_: Type = proto.Field( + proto.ENUM, + number=2, + enum=Type, + ) + huddle_status: HuddleStatus = proto.Field( + proto.ENUM, + number=3, + enum=HuddleStatus, + ) + + +class CalendarEventLinkData(proto.Message): + r"""Data for Calendar event links. + + Attributes: + calendar_id (str): + The `Calendar + identifier `__ + of the linked Calendar. + event_id (str): + The `Event + identifier `__ + of the linked Calendar event. + """ + + calendar_id: str = proto.Field( + proto.STRING, + number=1, + ) + event_id: str = proto.Field( + proto.STRING, + number=2, + ) + + __all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/packages/google-apps-chat/google/apps/chat_v1/types/message.py b/packages/google-apps-chat/google/apps/chat_v1/types/message.py index 8068df120493..25c2de27fd08 100644 --- a/packages/google-apps-chat/google/apps/chat_v1/types/message.py +++ b/packages/google-apps-chat/google/apps/chat_v1/types/message.py @@ -161,8 +161,10 @@ class Message(proto.Message): `Card builder `__ annotations (MutableSequence[google.apps.chat_v1.types.Annotation]): - Output only. Annotations associated with the ``text`` in - this message. + Output only. Annotations can be associated with the + plain-text body of the message or with chips that link to + Google Workspace resources like Google Docs or Sheets with + ``start_index`` and ``length`` of 0. thread (google.apps.chat_v1.types.Thread): The thread the message belongs to. For example usage, see `Start or reply to a message diff --git a/packages/google-apps-chat/samples/generated_samples/snippet_metadata_google.chat.v1.json b/packages/google-apps-chat/samples/generated_samples/snippet_metadata_google.chat.v1.json index 6c34cd40c90e..1f7b60d64e72 100644 --- a/packages/google-apps-chat/samples/generated_samples/snippet_metadata_google.chat.v1.json +++ b/packages/google-apps-chat/samples/generated_samples/snippet_metadata_google.chat.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-apps-chat", - "version": "0.2.6" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-apps-chat/tests/unit/gapic/chat_v1/test_chat_service.py b/packages/google-apps-chat/tests/unit/gapic/chat_v1/test_chat_service.py index 07e89d43243b..8f73e5136661 100644 --- a/packages/google-apps-chat/tests/unit/gapic/chat_v1/test_chat_service.py +++ b/packages/google-apps-chat/tests/unit/gapic/chat_v1/test_chat_service.py @@ -22186,6 +22186,15 @@ def test_create_message_rest_call_success(request_type): "thread": "thread_value", "message": "message_value", }, + "meet_space_link_data": { + "meeting_code": "meeting_code_value", + "type_": 1, + "huddle_status": 1, + }, + "calendar_event_link_data": { + "calendar_id": "calendar_id_value", + "event_id": "event_id_value", + }, }, "custom_emoji_metadata": { "custom_emoji": { @@ -23302,6 +23311,15 @@ def test_update_message_rest_call_success(request_type): "thread": "thread_value", "message": "message_value", }, + "meet_space_link_data": { + "meeting_code": "meeting_code_value", + "type_": 1, + "huddle_status": 1, + }, + "calendar_event_link_data": { + "calendar_id": "calendar_id_value", + "event_id": "event_id_value", + }, }, "custom_emoji_metadata": { "custom_emoji": {