-
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-apps-chat] Add doc for permission settings & announceme…
…nt space support (#13120) BEGIN_COMMIT_OVERRIDE feat: Removed deprecated api versions END_COMMIT_OVERRIDE - [ ] Regenerate this pull request now. feat: Add doc for import mode external users support docs: Messages API dev docs improvement docs: Memberships API dev docs improvement docs: Discoverable space docs improvement PiperOrigin-RevId: 681521060 Source-Link: googleapis/googleapis@c472cf7 Source-Link: googleapis/googleapis-gen@a905bb2 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWFwcHMtY2hhdC8uT3dsQm90LnlhbWwiLCJoIjoiYTkwNWJiMjJjOTY4ZWJkZGVkMTM2YjI4MmVmMDczOTkyZmMxNDBjNSJ9 --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: ohmayr <[email protected]> Co-authored-by: ohmayr <[email protected]>
- Loading branch information
1 parent
eeab5c1
commit 3881914
Showing
18 changed files
with
862 additions
and
499 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
271 changes: 151 additions & 120 deletions
271
packages/google-apps-chat/google/apps/chat_v1/services/chat_service/async_client.py
Large diffs are not rendered by default.
Oops, something went wrong.
273 changes: 152 additions & 121 deletions
273
packages/google-apps-chat/google/apps/chat_v1/services/chat_service/client.py
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -254,19 +254,36 @@ def create_message( | |
) -> Callable[[gc_message.CreateMessageRequest], gc_message.Message]: | ||
r"""Return a callable for the create message method over gRPC. | ||
Creates a message in a Google Chat space. The maximum message | ||
size, including text and cards, is 32,000 bytes. For an example, | ||
see `Send a | ||
Creates a message in a Google Chat space. For an example, see | ||
`Send a | ||
message <https://developers.google.com/workspace/chat/create-messages>`__. | ||
Calling this method requires | ||
`authentication <https://developers.google.com/workspace/chat/authenticate-authorize>`__ | ||
and supports the following authentication types: | ||
The ``create()`` method requires either user or app | ||
authentication. Chat attributes the message sender differently | ||
depending on the type of authentication that you use in your | ||
request. | ||
- For text messages, user authentication or app authentication | ||
are supported. | ||
- For card messages, only app authentication is supported. | ||
(Only Chat apps can create card messages.) | ||
The following image shows how Chat attributes a message when you | ||
use app authentication. Chat displays the Chat app as the | ||
message sender. The content of the message can contain text | ||
(``text``), cards (``cardsV2``), and accessory widgets | ||
(``accessoryWidgets``). | ||
|Message sent with app authentication gRPC| | ||
The following image shows how Chat attributes a message when you | ||
use user authentication. Chat displays the user as the message | ||
sender and attributes the Chat app to the message by displaying | ||
its name. The content of message can only contain text | ||
(``text``). | ||
|Message sent with user authentication gRPC| | ||
The maximum message size, including the message contents, is | ||
32,000 bytes. | ||
.. |Message sent with app authentication gRPC| image:: https://developers.google.com/workspace/chat/images/message-app-auth.svg | ||
.. |Message sent with user authentication gRPC| image:: https://developers.google.com/workspace/chat/images/message-user-auth.svg | ||
Returns: | ||
Callable[[~.CreateMessageRequest], | ||
|
@@ -293,9 +310,12 @@ def list_messages( | |
r"""Return a callable for the list messages method over gRPC. | ||
Lists messages in a space that the caller is a member of, | ||
including messages from blocked members and spaces. For an | ||
example, see `List | ||
messages </chat/api/guides/v1/messages/list>`__. Requires `user | ||
including messages from blocked members and spaces. If you list | ||
messages from a space with no messages, the response is an empty | ||
object. When using a REST/HTTP interface, the response contains | ||
an empty JSON object, ``{}``. For an example, see `List | ||
messages <https://developers.google.com/workspace/chat/api/guides/v1/messages/list>`__. | ||
Requires `user | ||
authentication <https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>`__. | ||
Returns: | ||
|
@@ -686,15 +706,21 @@ def get_space(self) -> Callable[[space.GetSpaceRequest], space.Space]: | |
def create_space(self) -> Callable[[gc_space.CreateSpaceRequest], gc_space.Space]: | ||
r"""Return a callable for the create space method over gRPC. | ||
Creates a named space. Spaces grouped by topics aren't | ||
supported. For an example, see `Create a | ||
Creates a space with no members. Can be used to create a named | ||
space. Spaces grouped by topics aren't supported. For an | ||
example, see `Create a | ||
space <https://developers.google.com/workspace/chat/create-spaces>`__. | ||
If you receive the error message ``ALREADY_EXISTS`` when | ||
creating a space, try a different ``displayName``. An existing | ||
space within the Google Workspace organization might already use | ||
this display name. | ||
If you're a member of the `Developer Preview | ||
program <https://developers.google.com/workspace/preview>`__, | ||
you can create a group chat in import mode using | ||
``spaceType.GROUP_CHAT``. | ||
Requires `user | ||
authentication <https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>`__. | ||
|
@@ -944,46 +970,25 @@ def create_membership( | |
) -> Callable[[gc_membership.CreateMembershipRequest], gc_membership.Membership]: | ||
r"""Return a callable for the create membership method over gRPC. | ||
Creates a human membership or app membership for the calling | ||
app. Creating memberships for other apps isn't supported. For an | ||
example, see `Invite or add a user or a Google Chat app to a | ||
space <https://developers.google.com/workspace/chat/create-members>`__. | ||
When creating a membership, if the specified member has their | ||
auto-accept policy turned off, then they're invited, and must | ||
accept the space invitation before joining. Otherwise, creating | ||
a membership adds the member directly to the specified space. | ||
Requires `user | ||
Creates a membership for the calling Chat app, a user, or a | ||
Google Group. Creating memberships for other Chat apps isn't | ||
supported. When creating a membership, if the specified member | ||
has their auto-accept policy turned off, then they're invited, | ||
and must accept the space invitation before joining. Otherwise, | ||
creating a membership adds the member directly to the specified | ||
space. Requires `user | ||
authentication <https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>`__. | ||
To specify the member to add, set the ``membership.member.name`` | ||
for the human or app member, or set the | ||
``membership.group_member.name`` for the group member. | ||
- To add the calling app to a space or a direct message between | ||
two human users, use ``users/app``. Unable to add other apps | ||
to the space. | ||
- To add a human user, use ``users/{user}``, where ``{user}`` | ||
can be the email address for the user. For users in the same | ||
Workspace organization ``{user}`` can also be the ``id`` for | ||
the person from the People API, or the ``id`` for the user in | ||
the Directory API. For example, if the People API Person | ||
profile ID for ``[email protected]`` is ``123456789``, you can | ||
add the user to the space by setting the | ||
``membership.member.name`` to ``users/[email protected]`` or | ||
``users/123456789``. | ||
- To add or invite a Google group in a named space, use | ||
``groups/{group}``, where ``{group}`` is the ``id`` for the | ||
group from the Cloud Identity Groups API. For example, you | ||
can use `Cloud Identity Groups lookup | ||
API <https://cloud.google.com/identity/docs/reference/rest/v1/groups/lookup>`__ | ||
to retrieve the ID ``123456789`` for group email | ||
``[email protected]``, then you can add or invite the group | ||
to a named space by setting the | ||
``membership.group_member.name`` to ``groups/123456789``. | ||
Group email is not supported, and Google groups can only be | ||
added as members in named spaces. | ||
For example usage, see: | ||
- `Invite or add a user to a | ||
space <https://developers.google.com/workspace/chat/create-members#create-user-membership>`__. | ||
- `Invite or add a Google Group to a | ||
space <https://developers.google.com/workspace/chat/create-members#create-group-membership>`__. | ||
- `Add the Chat app to a | ||
space <https://developers.google.com/workspace/chat/create-members#create-membership-calling-api>`__. | ||
Returns: | ||
Callable[[~.CreateMembershipRequest], | ||
|
@@ -1271,6 +1276,9 @@ def get_space_event( | |
message was later updated, the server returns the updated | ||
``Message`` resource in the event payload. | ||
Note: The ``permissionSettings`` field is not returned in the | ||
Space object of the Space event data for this request. | ||
Requires `user | ||
authentication <https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>`__. | ||
To get an event, the authenticated user must be a member of the | ||
|
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 |
---|---|---|
|
@@ -258,19 +258,36 @@ def create_message( | |
) -> Callable[[gc_message.CreateMessageRequest], Awaitable[gc_message.Message]]: | ||
r"""Return a callable for the create message method over gRPC. | ||
Creates a message in a Google Chat space. The maximum message | ||
size, including text and cards, is 32,000 bytes. For an example, | ||
see `Send a | ||
Creates a message in a Google Chat space. For an example, see | ||
`Send a | ||
message <https://developers.google.com/workspace/chat/create-messages>`__. | ||
Calling this method requires | ||
`authentication <https://developers.google.com/workspace/chat/authenticate-authorize>`__ | ||
and supports the following authentication types: | ||
The ``create()`` method requires either user or app | ||
authentication. Chat attributes the message sender differently | ||
depending on the type of authentication that you use in your | ||
request. | ||
- For text messages, user authentication or app authentication | ||
are supported. | ||
- For card messages, only app authentication is supported. | ||
(Only Chat apps can create card messages.) | ||
The following image shows how Chat attributes a message when you | ||
use app authentication. Chat displays the Chat app as the | ||
message sender. The content of the message can contain text | ||
(``text``), cards (``cardsV2``), and accessory widgets | ||
(``accessoryWidgets``). | ||
|Message sent with app authentication async gRPC| | ||
The following image shows how Chat attributes a message when you | ||
use user authentication. Chat displays the user as the message | ||
sender and attributes the Chat app to the message by displaying | ||
its name. The content of message can only contain text | ||
(``text``). | ||
|Message sent with user authentication async gRPC| | ||
The maximum message size, including the message contents, is | ||
32,000 bytes. | ||
.. |Message sent with app authentication async gRPC| image:: https://developers.google.com/workspace/chat/images/message-app-auth.svg | ||
.. |Message sent with user authentication async gRPC| image:: https://developers.google.com/workspace/chat/images/message-user-auth.svg | ||
Returns: | ||
Callable[[~.CreateMessageRequest], | ||
|
@@ -299,9 +316,12 @@ def list_messages( | |
r"""Return a callable for the list messages method over gRPC. | ||
Lists messages in a space that the caller is a member of, | ||
including messages from blocked members and spaces. For an | ||
example, see `List | ||
messages </chat/api/guides/v1/messages/list>`__. Requires `user | ||
including messages from blocked members and spaces. If you list | ||
messages from a space with no messages, the response is an empty | ||
object. When using a REST/HTTP interface, the response contains | ||
an empty JSON object, ``{}``. For an example, see `List | ||
messages <https://developers.google.com/workspace/chat/api/guides/v1/messages/list>`__. | ||
Requires `user | ||
authentication <https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>`__. | ||
Returns: | ||
|
@@ -698,15 +718,21 @@ def create_space( | |
) -> Callable[[gc_space.CreateSpaceRequest], Awaitable[gc_space.Space]]: | ||
r"""Return a callable for the create space method over gRPC. | ||
Creates a named space. Spaces grouped by topics aren't | ||
supported. For an example, see `Create a | ||
Creates a space with no members. Can be used to create a named | ||
space. Spaces grouped by topics aren't supported. For an | ||
example, see `Create a | ||
space <https://developers.google.com/workspace/chat/create-spaces>`__. | ||
If you receive the error message ``ALREADY_EXISTS`` when | ||
creating a space, try a different ``displayName``. An existing | ||
space within the Google Workspace organization might already use | ||
this display name. | ||
If you're a member of the `Developer Preview | ||
program <https://developers.google.com/workspace/preview>`__, | ||
you can create a group chat in import mode using | ||
``spaceType.GROUP_CHAT``. | ||
Requires `user | ||
authentication <https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>`__. | ||
|
@@ -964,46 +990,25 @@ def create_membership( | |
]: | ||
r"""Return a callable for the create membership method over gRPC. | ||
Creates a human membership or app membership for the calling | ||
app. Creating memberships for other apps isn't supported. For an | ||
example, see `Invite or add a user or a Google Chat app to a | ||
space <https://developers.google.com/workspace/chat/create-members>`__. | ||
When creating a membership, if the specified member has their | ||
auto-accept policy turned off, then they're invited, and must | ||
accept the space invitation before joining. Otherwise, creating | ||
a membership adds the member directly to the specified space. | ||
Requires `user | ||
Creates a membership for the calling Chat app, a user, or a | ||
Google Group. Creating memberships for other Chat apps isn't | ||
supported. When creating a membership, if the specified member | ||
has their auto-accept policy turned off, then they're invited, | ||
and must accept the space invitation before joining. Otherwise, | ||
creating a membership adds the member directly to the specified | ||
space. Requires `user | ||
authentication <https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>`__. | ||
To specify the member to add, set the ``membership.member.name`` | ||
for the human or app member, or set the | ||
``membership.group_member.name`` for the group member. | ||
- To add the calling app to a space or a direct message between | ||
two human users, use ``users/app``. Unable to add other apps | ||
to the space. | ||
- To add a human user, use ``users/{user}``, where ``{user}`` | ||
can be the email address for the user. For users in the same | ||
Workspace organization ``{user}`` can also be the ``id`` for | ||
the person from the People API, or the ``id`` for the user in | ||
the Directory API. For example, if the People API Person | ||
profile ID for ``[email protected]`` is ``123456789``, you can | ||
add the user to the space by setting the | ||
``membership.member.name`` to ``users/[email protected]`` or | ||
``users/123456789``. | ||
- To add or invite a Google group in a named space, use | ||
``groups/{group}``, where ``{group}`` is the ``id`` for the | ||
group from the Cloud Identity Groups API. For example, you | ||
can use `Cloud Identity Groups lookup | ||
API <https://cloud.google.com/identity/docs/reference/rest/v1/groups/lookup>`__ | ||
to retrieve the ID ``123456789`` for group email | ||
``[email protected]``, then you can add or invite the group | ||
to a named space by setting the | ||
``membership.group_member.name`` to ``groups/123456789``. | ||
Group email is not supported, and Google groups can only be | ||
added as members in named spaces. | ||
For example usage, see: | ||
- `Invite or add a user to a | ||
space <https://developers.google.com/workspace/chat/create-members#create-user-membership>`__. | ||
- `Invite or add a Google Group to a | ||
space <https://developers.google.com/workspace/chat/create-members#create-group-membership>`__. | ||
- `Add the Chat app to a | ||
space <https://developers.google.com/workspace/chat/create-members#create-membership-calling-api>`__. | ||
Returns: | ||
Callable[[~.CreateMembershipRequest], | ||
|
@@ -1301,6 +1306,9 @@ def get_space_event( | |
message was later updated, the server returns the updated | ||
``Message`` resource in the event payload. | ||
Note: The ``permissionSettings`` field is not returned in the | ||
Space object of the Space event data for this request. | ||
Requires `user | ||
authentication <https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>`__. | ||
To get an event, the authenticated user must be a member of the | ||
|
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
Oops, something went wrong.