Skip to content

Commit ac0973e

Browse files
Google APIscopybara-github
authored andcommitted
docs: Update doc for SetUpSpace in service ChatService to support group members
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
1 parent 2a7d78f commit ac0973e

3 files changed

Lines changed: 28 additions & 5 deletions

File tree

google/chat/v1/chat_service.proto

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,17 @@ service ChatService {
311311
// you can add the user to the space by setting the `membership.member.name`
312312
// to `users/user@example.com` or `users/123456789`.
313313
//
314+
// To specify the Google groups to add, add memberships with the
315+
// appropriate `membership.group_member.name`. To add or invite a Google
316+
// group, use `groups/{group}`, where `{group}` is the `id` for the group from
317+
// the Cloud Identity Groups API. For example, you can use [Cloud Identity
318+
// Groups lookup
319+
// API](https://cloud.google.com/identity/docs/reference/rest/v1/groups/lookup)
320+
// to retrieve the ID `123456789` for group email `group@example.com`, then
321+
// you can add the group to the space by setting the
322+
// `membership.group_member.name` to `groups/123456789`. Group email is not
323+
// supported, and Google groups can only be added as members in named spaces.
324+
//
314325
// For a named space or group chat, if the caller blocks, or is blocked
315326
// by some members, or doesn't have permission to add some members, then
316327
// those members aren't added to the created space.
@@ -427,7 +438,8 @@ service ChatService {
427438
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
428439
//
429440
// To specify the member to add, set the `membership.member.name` for the
430-
// human or app member.
441+
// human or app member, or set the `membership.group_member.name` for the
442+
// group member.
431443
//
432444
// - To add the calling app to a space or a direct message between two human
433445
// users, use `users/app`. Unable to add other
@@ -440,6 +452,15 @@ service ChatService {
440452
// profile ID for `user@example.com` is `123456789`, you can add the user to
441453
// the space by setting the `membership.member.name` to
442454
// `users/user@example.com` or `users/123456789`.
455+
//
456+
// - To add or invite a Google group in a named space, use
457+
// `groups/{group}`, where `{group}` is the `id` for the group from the Cloud
458+
// Identity Groups API. For example, you can use [Cloud Identity Groups lookup
459+
// API](https://cloud.google.com/identity/docs/reference/rest/v1/groups/lookup)
460+
// to retrieve the ID `123456789` for group email `group@example.com`, then
461+
// you can add or invite the group to a named space by setting the
462+
// `membership.group_member.name` to `groups/123456789`. Group email is not
463+
// supported, and Google groups can only be added as members in named spaces.
443464
rpc CreateMembership(CreateMembershipRequest) returns (Membership) {
444465
option (google.api.http) = {
445466
post: "/v1/{parent=spaces/*}/members"

google/chat/v1/membership.proto

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@ message Membership {
106106
User member = 3;
107107

108108
// The Google Group the membership corresponds to.
109-
// Only supports read operations. Other operations, like
110-
// creating or updating a membership, aren't currently supported.
111109
Group group_member = 5;
112110
}
113111

google/chat/v1/space_setup.proto

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ message SetUpSpaceRequest {
6464
// authenticated user returns an error.
6565
string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
6666

67-
// Optional. The Google Chat users to invite to join the space. Omit the
68-
// calling user, as they are added automatically.
67+
// Optional. The Google Chat users or groups to invite to join the space. Omit
68+
// the calling user, as they are added automatically.
6969
//
7070
// The set currently allows up to 20 memberships (in addition to the caller).
7171
//
@@ -78,6 +78,10 @@ message SetUpSpaceRequest {
7878
// To invite Gmail users or users from external Google Workspace domains,
7979
// user's email must be used for `{user}`.
8080
//
81+
// For Google group membership, the `Membership.group_member` field must
82+
// contain a `group` with `name` populated (format `groups/{group}`). You
83+
// can only add Google groups when setting `Space.spaceType` to `SPACE`.
84+
//
8185
// Optional when setting `Space.spaceType` to `SPACE`.
8286
//
8387
// Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at

0 commit comments

Comments
 (0)