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
4 changes: 4 additions & 0 deletions packages/google-apps-chat/google/apps/chat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@
from google.apps.chat_v1.types.annotation import (
Annotation,
AnnotationType,
CalendarEventLinkData,
ChatSpaceLinkData,
CustomEmojiMetadata,
DriveLinkData,
MeetSpaceLinkData,
RichLinkMetadata,
SlashCommandMetadata,
UserMentionMetadata,
Expand Down Expand Up @@ -151,9 +153,11 @@
"ChatServiceAsyncClient",
"ActionStatus",
"Annotation",
"CalendarEventLinkData",
"ChatSpaceLinkData",
"CustomEmojiMetadata",
"DriveLinkData",
"MeetSpaceLinkData",
"RichLinkMetadata",
"SlashCommandMetadata",
"UserMentionMetadata",
Expand Down
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.6" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
4 changes: 4 additions & 0 deletions packages/google-apps-chat/google/apps/chat_v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@
from .types.annotation import (
Annotation,
AnnotationType,
CalendarEventLinkData,
ChatSpaceLinkData,
CustomEmojiMetadata,
DriveLinkData,
MeetSpaceLinkData,
RichLinkMetadata,
SlashCommandMetadata,
UserMentionMetadata,
Expand Down Expand Up @@ -150,6 +152,7 @@
"AttachedGif",
"Attachment",
"AttachmentDataRef",
"CalendarEventLinkData",
"CardWithId",
"ChatServiceClient",
"ChatSpaceLinkData",
Expand Down Expand Up @@ -200,6 +203,7 @@
"ListSpacesRequest",
"ListSpacesResponse",
"MatchedUrl",
"MeetSpaceLinkData",
"Membership",
"MembershipBatchCreatedEventData",
"MembershipBatchDeletedEventData",
Expand Down
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.6" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@
from .annotation import (
Annotation,
AnnotationType,
CalendarEventLinkData,
ChatSpaceLinkData,
CustomEmojiMetadata,
DriveLinkData,
MeetSpaceLinkData,
RichLinkMetadata,
SlashCommandMetadata,
UserMentionMetadata,
Expand Down Expand Up @@ -137,9 +139,11 @@
__all__ = (
"ActionStatus",
"Annotation",
"CalendarEventLinkData",
"ChatSpaceLinkData",
"CustomEmojiMetadata",
"DriveLinkData",
"MeetSpaceLinkData",
"RichLinkMetadata",
"SlashCommandMetadata",
"UserMentionMetadata",
Expand Down
135 changes: 131 additions & 4 deletions packages/google-apps-chat/google/apps/chat_v1/types/annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
"CustomEmojiMetadata",
"DriveLinkData",
"ChatSpaceLinkData",
"MeetSpaceLinkData",
"CalendarEventLinkData",
},
)

Expand Down Expand Up @@ -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 <https://developers.google.com/workspace/chat/format-messages>`__.

Example plain-text message body:
Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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.
Expand All @@ -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``.
"""

Expand All @@ -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,
Expand All @@ -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):
Expand Down Expand Up @@ -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 <https://developers.google.com/workspace/calendar/api/v3/reference/calendars>`__
of the linked Calendar.
event_id (str):
The `Event
identifier <https://developers.google.com/workspace/calendar/api/v3/reference/events>`__
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))
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,10 @@ class Message(proto.Message):
`Card
builder <https://addons.gsuite.google.com/uikit/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
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.6"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down
Loading