Skip to content

Commit

Permalink
docs: Update doc for SetUpSpace in service ChatService to support…
Browse files Browse the repository at this point in the history
… group members (#7478)

docs: Update doc for `CreateMembership` in service `ChatService` to support group members
docs: Update doc for field `group_member` in message `google.chat.v1.Membership`
PiperOrigin-RevId: 646951938
Source-Link: googleapis/googleapis@ac0973e
Source-Link: googleapis/googleapis-gen@2b187e2
Copy-Tag: eyJwIjoiQXBwc0NoYXQvLk93bEJvdC55YW1sIiwiaCI6IjJiMTg3ZTI5YTNkMTkwNGQzZTU5ODFiYjNjOGI3YWI3MGEwMDIzOTMifQ==
  • Loading branch information
gcf-owl-bot[bot] authored Jun 26, 2024
1 parent be90106 commit b0b072f
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 16 deletions.
12 changes: 11 additions & 1 deletion AppsChat/samples/V1/ChatServiceClient/create_membership.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
* 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.
* 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
Expand All @@ -54,6 +55,15 @@
* the space by setting the `membership.member.name` to
* `users/user@example.com` 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 `group@example.com`, 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.
*
* @param string $formattedParent The resource name of the space for which to create the
* membership.
*
Expand Down
11 changes: 11 additions & 0 deletions AppsChat/samples/V1/ChatServiceClient/set_up_space.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@
* you can add the user to the space by setting the `membership.member.name`
* to `users/user@example.com` or `users/123456789`.
*
* To specify the Google groups to add, add memberships with the
* appropriate `membership.group_member.name`. To add or invite a Google
* group, 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 `group@example.com`, then
* you can add the group to the 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 a named space or group chat, if the caller blocks, or is blocked
* by some members, or doesn't have permission to add some members, then
* those members aren't added to the created space.
Expand Down
23 changes: 22 additions & 1 deletion AppsChat/src/Chat/V1/Client/ChatServiceClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,8 @@ public function completeImportSpace(
* 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.
* 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
Expand All @@ -497,6 +498,15 @@ public function completeImportSpace(
* the space by setting the `membership.member.name` to
* `users/user@example.com` 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 `group@example.com`, 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.
*
* The async variant is {@see ChatServiceClient::createMembershipAsync()} .
*
* @example samples/V1/ChatServiceClient/create_membership.php
Expand Down Expand Up @@ -1162,6 +1172,17 @@ public function listSpaces(ListSpacesRequest $request, array $callOptions = []):
* you can add the user to the space by setting the `membership.member.name`
* to `users/user@example.com` or `users/123456789`.
*
* To specify the Google groups to add, add memberships with the
* appropriate `membership.group_member.name`. To add or invite a Google
* group, 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 `group@example.com`, then
* you can add the group to the 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 a named space or group chat, if the caller blocks, or is blocked
* by some members, or doesn't have permission to add some members, then
* those members aren't added to the created space.
Expand Down
6 changes: 0 additions & 6 deletions AppsChat/src/Chat/V1/Membership.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 20 additions & 8 deletions AppsChat/src/Chat/V1/SetUpSpaceRequest.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b0b072f

Please sign in to comment.