You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/ChatServiceClient.java
+62-6Lines changed: 62 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -307,6 +307,7 @@
307
307
* <td><p> SetUpSpace</td>
308
308
* <td><p> Creates a space and adds specified users to it. The calling user is automatically added to the space, and shouldn't be specified as a membership in the request. For an example, see [Set up a space with initial members](https://developers.google.com/workspace/chat/set-up-spaces).
309
309
* <p> To specify the human members to add, add memberships with the appropriate `membership.member.name`. 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 `user{@literal @}example.com` is `123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user{@literal @}example.com` or `users/123456789`.
310
+
* <p> 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{@literal @}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.
310
311
* <p> 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.
311
312
* <p> To create a direct message (DM) between the calling user and another human user, specify exactly one membership to represent the human user. If one user blocks the other, the request fails and the DM isn't created.
312
313
* <p> To create a DM between the calling user and the calling app, set `Space.singleUserBotDm` to `true` and don't specify any memberships. You can only use this method to set up a DM with the calling app. To add the calling app as a member of a space or an existing DM between two human users, see [Invite or add a user or app to a space](https://developers.google.com/workspace/chat/create-members).
@@ -397,9 +398,10 @@
397
398
* <tr>
398
399
* <td><p> CreateMembership</td>
399
400
* <td><p> 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 authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
400
-
* <p> To specify the member to add, set the `membership.member.name` for the human or app member.
401
+
* <p> 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.
401
402
* <p> - 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.
402
-
* <p> - 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 `user{@literal @}example.com` is `123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user{@literal @}example.com` or `users/123456789`.</td>
403
+
* <p> - 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 `user{@literal @}example.com` is `123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user{@literal @}example.com` or `users/123456789`.
404
+
* <p> - 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{@literal @}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.</td>
403
405
* <td>
404
406
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
405
407
* <ul>
@@ -2546,6 +2548,15 @@ public final UnaryCallable<CreateSpaceRequest, Space> createSpaceCallable() {
2546
2548
* you can add the user to the space by setting the `membership.member.name` to
2547
2549
* `users/user{@literal @}example.com` or `users/123456789`.
2548
2550
*
2551
+
* <p>To specify the Google groups to add, add memberships with the appropriate
2552
+
* `membership.group_member.name`. To add or invite a Google group, use `groups/{group}`, where
2553
+
* `{group}` is the `id` for the group from the Cloud Identity Groups API. For example, you can
2554
+
* use [Cloud Identity Groups lookup
2555
+
* API](https://cloud.google.com/identity/docs/reference/rest/v1/groups/lookup) to retrieve the ID
2556
+
* `123456789` for group email `group{@literal @}example.com`, then you can add the group to the
2557
+
* space by setting the `membership.group_member.name` to `groups/123456789`. Group email is not
2558
+
* supported, and Google groups can only be added as members in named spaces.
2559
+
*
2549
2560
* <p>For a named space or group chat, if the caller blocks, or is blocked by some members, or
2550
2561
* doesn't have permission to add some members, then those members aren't added to the created
2551
2562
* space.
@@ -2610,6 +2621,15 @@ public final Space setUpSpace(SetUpSpaceRequest request) {
2610
2621
* you can add the user to the space by setting the `membership.member.name` to
2611
2622
* `users/user{@literal @}example.com` or `users/123456789`.
2612
2623
*
2624
+
* <p>To specify the Google groups to add, add memberships with the appropriate
2625
+
* `membership.group_member.name`. To add or invite a Google group, use `groups/{group}`, where
2626
+
* `{group}` is the `id` for the group from the Cloud Identity Groups API. For example, you can
2627
+
* use [Cloud Identity Groups lookup
2628
+
* API](https://cloud.google.com/identity/docs/reference/rest/v1/groups/lookup) to retrieve the ID
2629
+
* `123456789` for group email `group{@literal @}example.com`, then you can add the group to the
2630
+
* space by setting the `membership.group_member.name` to `groups/123456789`. Group email is not
2631
+
* supported, and Google groups can only be added as members in named spaces.
2632
+
*
2613
2633
* <p>For a named space or group chat, if the caller blocks, or is blocked by some members, or
2614
2634
* doesn't have permission to add some members, then those members aren't added to the created
2615
2635
* space.
@@ -3072,7 +3092,8 @@ public final UnaryCallable<FindDirectMessageRequest, Space> findDirectMessageCal
3072
3092
* adds the member directly to the specified space. Requires [user
0 commit comments