@google-apps/chat 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.7.0](https://github.com/googleapis/google-cloud-node/compare/chat-v0.6.0...chat-v0.7.0) (2024-07-22)
4
+
5
+
6
+ ### Features
7
+
8
+ * [chat] add GetSpaceEvent and ListSpaceEvents APIs ([#5546](https://github.com/googleapis/google-cloud-node/issues/5546)) ([40e0811](https://github.com/googleapis/google-cloud-node/commit/40e0811598fbf2c92eee5875b2ab2c3e2be18064))
9
+
10
+ ## [0.6.0](https://github.com/googleapis/google-cloud-node/compare/chat-v0.5.0...chat-v0.6.0) (2024-07-10)
11
+
12
+
13
+ ### Features
14
+
15
+ * [chat] Add doc for Discoverable Space support for GA launch ([#5525](https://github.com/googleapis/google-cloud-node/issues/5525)) ([9a80089](https://github.com/googleapis/google-cloud-node/commit/9a80089d974280420e269f24aba563f4adceb4c3))
16
+
3
17
  ## [0.5.0](https://github.com/googleapis/google-cloud-node/compare/chat-v0.4.0...chat-v0.5.0) (2024-05-21)
4
18
 
5
19
 
package/README.md CHANGED
@@ -140,11 +140,13 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
140
140
  | Chat_service.get_membership | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.get_membership.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.get_membership.js,packages/google-chat/samples/README.md) |
141
141
  | Chat_service.get_message | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.get_message.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.get_message.js,packages/google-chat/samples/README.md) |
142
142
  | Chat_service.get_space | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.get_space.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.get_space.js,packages/google-chat/samples/README.md) |
143
+ | Chat_service.get_space_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.get_space_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.get_space_event.js,packages/google-chat/samples/README.md) |
143
144
  | Chat_service.get_space_read_state | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.get_space_read_state.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.get_space_read_state.js,packages/google-chat/samples/README.md) |
144
145
  | Chat_service.get_thread_read_state | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.get_thread_read_state.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.get_thread_read_state.js,packages/google-chat/samples/README.md) |
145
146
  | Chat_service.list_memberships | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.list_memberships.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.list_memberships.js,packages/google-chat/samples/README.md) |
146
147
  | Chat_service.list_messages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.list_messages.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.list_messages.js,packages/google-chat/samples/README.md) |
147
148
  | Chat_service.list_reactions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.list_reactions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.list_reactions.js,packages/google-chat/samples/README.md) |
149
+ | Chat_service.list_space_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.list_space_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.list_space_events.js,packages/google-chat/samples/README.md) |
148
150
  | Chat_service.list_spaces | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.list_spaces.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.list_spaces.js,packages/google-chat/samples/README.md) |
149
151
  | Chat_service.set_up_space | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.set_up_space.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.set_up_space.js,packages/google-chat/samples/README.md) |
150
152
  | Chat_service.update_membership | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.update_membership.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-chat/samples/generated/v1/chat_service.update_membership.js,packages/google-chat/samples/README.md) |
@@ -48,7 +48,7 @@ message Attachment {
48
48
  }
49
49
 
50
50
  // Resource name of the attachment, in the form
51
- // `spaces/*/messages/*/attachments/*`.
51
+ // `spaces/{space}/messages/{message}/attachments/{attachment}`.
52
52
  string name = 1;
53
53
 
54
54
  // Output only. The original file name for the content, not the full path.
@@ -103,7 +103,7 @@ message AttachmentDataRef {
103
103
  // Request to get an attachment.
104
104
  message GetAttachmentRequest {
105
105
  // Required. Resource name of the attachment, in the form
106
- // `spaces/*/messages/*/attachments/*`.
106
+ // `spaces/{space}/messages/{message}/attachments/{attachment}`.
107
107
  string name = 1 [
108
108
  (google.api.field_behavior) = REQUIRED,
109
109
  (google.api.resource_reference) = { type: "chat.googleapis.com/Attachment" }
@@ -23,6 +23,7 @@ import "google/chat/v1/membership.proto";
23
23
  import "google/chat/v1/message.proto";
24
24
  import "google/chat/v1/reaction.proto";
25
25
  import "google/chat/v1/space.proto";
26
+ import "google/chat/v1/space_event.proto";
26
27
  import "google/chat/v1/space_read_state.proto";
27
28
  import "google/chat/v1/space_setup.proto";
28
29
  import "google/chat/v1/thread_read_state.proto";
@@ -42,6 +43,11 @@ option ruby_package = "Google::Apps::Chat::V1";
42
43
  service ChatService {
43
44
  option (google.api.default_host) = "chat.googleapis.com";
44
45
  option (google.api.oauth_scopes) =
46
+ "https://www.googleapis.com/auth/chat.admin.delete,"
47
+ "https://www.googleapis.com/auth/chat.admin.memberships,"
48
+ "https://www.googleapis.com/auth/chat.admin.memberships.readonly,"
49
+ "https://www.googleapis.com/auth/chat.admin.spaces,"
50
+ "https://www.googleapis.com/auth/chat.admin.spaces.readonly,"
45
51
  "https://www.googleapis.com/auth/chat.bot,"
46
52
  "https://www.googleapis.com/auth/chat.delete,"
47
53
  "https://www.googleapis.com/auth/chat.import,"
@@ -253,6 +259,9 @@ service ChatService {
253
259
  // Lists spaces visible to the caller or authenticated user. Group chats
254
260
  // and DMs aren't listed until the first message is sent.
255
261
  //
262
+ // To list all named spaces by Google Workspace organization, use the
263
+ // [`spaces.search()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/search)
264
+ // method using Workspace administrator privileges instead.
256
265
  rpc ListSpaces(ListSpacesRequest) returns (ListSpacesResponse) {
257
266
  option (google.api.http) = {
258
267
  get: "/v1/spaces"
@@ -311,6 +320,17 @@ service ChatService {
311
320
  // you can add the user to the space by setting the `membership.member.name`
312
321
  // to `users/user@example.com` or `users/123456789`.
313
322
  //
323
+ // To specify the Google groups to add, add memberships with the
324
+ // appropriate `membership.group_member.name`. To add or invite a Google
325
+ // group, use `groups/{group}`, where `{group}` is the `id` for the group from
326
+ // the Cloud Identity Groups API. For example, you can use [Cloud Identity
327
+ // Groups lookup
328
+ // API](https://cloud.google.com/identity/docs/reference/rest/v1/groups/lookup)
329
+ // to retrieve the ID `123456789` for group email `group@example.com`, then
330
+ // you can add the group to the space by setting the
331
+ // `membership.group_member.name` to `groups/123456789`. Group email is not
332
+ // supported, and Google groups can only be added as members in named spaces.
333
+ //
314
334
  // For a named space or group chat, if the caller blocks, or is blocked
315
335
  // by some members, or doesn't have permission to add some members, then
316
336
  // those members aren't added to the created space.
@@ -427,7 +447,8 @@ service ChatService {
427
447
  // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
428
448
  //
429
449
  // To specify the member to add, set the `membership.member.name` for the
430
- // human or app member.
450
+ // human or app member, or set the `membership.group_member.name` for the
451
+ // group member.
431
452
  //
432
453
  // - To add the calling app to a space or a direct message between two human
433
454
  // users, use `users/app`. Unable to add other
@@ -440,6 +461,15 @@ service ChatService {
440
461
  // profile ID for `user@example.com` is `123456789`, you can add the user to
441
462
  // the space by setting the `membership.member.name` to
442
463
  // `users/user@example.com` or `users/123456789`.
464
+ //
465
+ // - To add or invite a Google group in a named space, use
466
+ // `groups/{group}`, where `{group}` is the `id` for the group from the Cloud
467
+ // Identity Groups API. For example, you can use [Cloud Identity Groups lookup
468
+ // API](https://cloud.google.com/identity/docs/reference/rest/v1/groups/lookup)
469
+ // to retrieve the ID `123456789` for group email `group@example.com`, then
470
+ // you can add or invite the group to a named space by setting the
471
+ // `membership.group_member.name` to `groups/123456789`. Group email is not
472
+ // supported, and Google groups can only be added as members in named spaces.
443
473
  rpc CreateMembership(CreateMembershipRequest) returns (Membership) {
444
474
  option (google.api.http) = {
445
475
  post: "/v1/{parent=spaces/*}/members"
@@ -555,4 +585,47 @@ service ChatService {
555
585
  };
556
586
  option (google.api.method_signature) = "name";
557
587
  }
588
+
589
+ // Returns an event from a Google Chat space. The [event
590
+ // payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload)
591
+ // contains the most recent version of the resource that changed. For example,
592
+ // if you request an event about a new message but the message was later
593
+ // updated, the server returns the updated `Message` resource in the event
594
+ // payload.
595
+ //
596
+ // Requires [user
597
+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
598
+ // To get an event, the authenticated user must be a member of the space.
599
+ //
600
+ // For an example, see [Get details about an
601
+ // event from a Google Chat
602
+ // space](https://developers.google.com/workspace/chat/get-space-event).
603
+ rpc GetSpaceEvent(GetSpaceEventRequest) returns (SpaceEvent) {
604
+ option (google.api.http) = {
605
+ get: "/v1/{name=spaces/*/spaceEvents/*}"
606
+ };
607
+ option (google.api.method_signature) = "name";
608
+ }
609
+
610
+ // Lists events from a Google Chat space. For each event, the
611
+ // [payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload)
612
+ // contains the most recent version of the Chat resource. For example, if you
613
+ // list events about new space members, the server returns `Membership`
614
+ // resources that contain the latest membership details. If new members were
615
+ // removed during the requested period, the event payload contains an empty
616
+ // `Membership` resource.
617
+ //
618
+ // Requires [user
619
+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
620
+ // To list events, the authenticated user must be a member of the space.
621
+ //
622
+ // For an example, see [List events from a Google Chat
623
+ // space](https://developers.google.com/workspace/chat/list-space-events).
624
+ rpc ListSpaceEvents(ListSpaceEventsRequest)
625
+ returns (ListSpaceEventsResponse) {
626
+ option (google.api.http) = {
627
+ get: "/v1/{parent=spaces/*}/spaceEvents"
628
+ };
629
+ option (google.api.method_signature) = "parent,filter";
630
+ }
558
631
  }
@@ -0,0 +1,177 @@
1
+ // Copyright 2024 Google LLC
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ syntax = "proto3";
16
+
17
+ package google.chat.v1;
18
+
19
+ import "google/api/field_behavior.proto";
20
+ import "google/chat/v1/membership.proto";
21
+ import "google/chat/v1/message.proto";
22
+ import "google/chat/v1/reaction.proto";
23
+ import "google/chat/v1/space.proto";
24
+
25
+ option csharp_namespace = "Google.Apps.Chat.V1";
26
+ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
27
+ option java_multiple_files = true;
28
+ option java_outer_classname = "EventPayloadProto";
29
+ option java_package = "com.google.chat.v1";
30
+ option objc_class_prefix = "DYNAPIProto";
31
+ option php_namespace = "Google\\Apps\\Chat\\V1";
32
+ option ruby_package = "Google::Apps::Chat::V1";
33
+
34
+ // Event payload for a new membership.
35
+ //
36
+ // Event type: `google.workspace.chat.membership.v1.created`.
37
+ message MembershipCreatedEventData {
38
+ // The new membership.
39
+ Membership membership = 1;
40
+ }
41
+
42
+ // Event payload for a deleted membership.
43
+ //
44
+ // Event type: `google.workspace.chat.membership.v1.deleted`
45
+ message MembershipDeletedEventData {
46
+ // The deleted membership. Only the `name` and `state` fields are populated.
47
+ Membership membership = 1;
48
+ }
49
+
50
+ // Event payload for an updated membership.
51
+ //
52
+ // Event type: `google.workspace.chat.membership.v1.updated`
53
+ message MembershipUpdatedEventData {
54
+ // The updated membership.
55
+ Membership membership = 1;
56
+ }
57
+
58
+ // Event payload for multiple new memberships.
59
+ //
60
+ // Event type: `google.workspace.chat.membership.v1.batchCreated`
61
+ message MembershipBatchCreatedEventData {
62
+ // A list of new memberships.
63
+ repeated MembershipCreatedEventData memberships = 1;
64
+ }
65
+
66
+ // Event payload for multiple updated memberships.
67
+ //
68
+ // Event type: `google.workspace.chat.membership.v1.batchUpdated`
69
+ message MembershipBatchUpdatedEventData {
70
+ // A list of updated memberships.
71
+ repeated MembershipUpdatedEventData memberships = 1;
72
+ }
73
+
74
+ // Event payload for multiple deleted memberships.
75
+ //
76
+ // Event type: `google.workspace.chat.membership.v1.batchDeleted`
77
+ message MembershipBatchDeletedEventData {
78
+ // A list of deleted memberships.
79
+ repeated MembershipDeletedEventData memberships = 1;
80
+ }
81
+
82
+ // Event payload for a new message.
83
+ //
84
+ // Event type: `google.workspace.chat.message.v1.created`
85
+ message MessageCreatedEventData {
86
+ // The new message.
87
+ Message message = 1;
88
+ }
89
+
90
+ // Event payload for an updated message.
91
+ //
92
+ // Event type: `google.workspace.chat.message.v1.updated`
93
+ message MessageUpdatedEventData {
94
+ // The updated message.
95
+ Message message = 1;
96
+ }
97
+
98
+ // Event payload for a deleted message.
99
+ //
100
+ // Event type: `google.workspace.chat.message.v1.deleted`
101
+ message MessageDeletedEventData {
102
+ // The deleted message. Only the `name`, `createTime`, `deleteTime`, and
103
+ // `deletionMetadata` fields are populated.
104
+ Message message = 1;
105
+ }
106
+
107
+ // Event payload for multiple new messages.
108
+ //
109
+ // Event type: `google.workspace.chat.message.v1.batchCreated`
110
+ message MessageBatchCreatedEventData {
111
+ // A list of new messages.
112
+ repeated MessageCreatedEventData messages = 1;
113
+ }
114
+
115
+ // Event payload for multiple updated messages.
116
+ //
117
+ // Event type: `google.workspace.chat.message.v1.batchUpdated`
118
+ message MessageBatchUpdatedEventData {
119
+ // A list of updated messages.
120
+ repeated MessageUpdatedEventData messages = 1;
121
+ }
122
+
123
+ // Event payload for multiple deleted messages.
124
+ //
125
+ // Event type: `google.workspace.chat.message.v1.batchDeleted`
126
+ message MessageBatchDeletedEventData {
127
+ // A list of deleted messages.
128
+ repeated MessageDeletedEventData messages = 1;
129
+ }
130
+
131
+ // Event payload for an updated space.
132
+ //
133
+ // Event type: `google.workspace.chat.space.v1.updated`
134
+ message SpaceUpdatedEventData {
135
+ // The updated space.
136
+ Space space = 1;
137
+ }
138
+
139
+ // Event payload for multiple updates to a space.
140
+ //
141
+ // Event type: `google.workspace.chat.space.v1.batchUpdated`
142
+ message SpaceBatchUpdatedEventData {
143
+ // A list of updated spaces.
144
+ repeated SpaceUpdatedEventData spaces = 1;
145
+ }
146
+
147
+ // Event payload for a new reaction.
148
+ //
149
+ // Event type: `google.workspace.chat.reaction.v1.created`
150
+ message ReactionCreatedEventData {
151
+ // The new reaction.
152
+ Reaction reaction = 1;
153
+ }
154
+
155
+ // Event payload for a deleted reaction.
156
+ //
157
+ // Type: `google.workspace.chat.reaction.v1.deleted`
158
+ message ReactionDeletedEventData {
159
+ // The deleted reaction.
160
+ Reaction reaction = 1;
161
+ }
162
+
163
+ // Event payload for multiple new reactions.
164
+ //
165
+ // Event type: `google.workspace.chat.reaction.v1.batchCreated`
166
+ message ReactionBatchCreatedEventData {
167
+ // A list of new reactions.
168
+ repeated ReactionCreatedEventData reactions = 1;
169
+ }
170
+
171
+ // Event payload for multiple deleted reactions.
172
+ //
173
+ // Event type: `google.workspace.chat.reaction.v1.batchDeleted`
174
+ message ReactionBatchDeletedEventData {
175
+ // A list of deleted reactions.
176
+ repeated ReactionDeletedEventData reactions = 1;
177
+ }
@@ -106,8 +106,6 @@ message Membership {
106
106
  User member = 3;
107
107
 
108
108
  // 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.
111
109
  Group group_member = 5;
112
110
  }
113
111
 
@@ -217,16 +215,23 @@ message ListMembershipsRequest {
217
215
  //
218
216
  // To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`.
219
217
  //
220
- // To filter by type, set `member.type` to `HUMAN` or `BOT`.
218
+ // To filter by type, set `member.type` to `HUMAN` or `BOT`. Developer
219
+ // Preview: You can also filter for `member.type` using the `!=` operator.
221
220
  //
222
221
  // To filter by both role and type, use the `AND` operator. To filter by
223
222
  // either role or type, use the `OR` operator.
224
223
  //
224
+ // Either `member.type = "HUMAN"` or `member.type != "BOT"` is required
225
+ // when `use_admin_access` is set to true. Other member type filters will be
226
+ // rejected.
227
+ //
225
228
  // For example, the following queries are valid:
226
229
  //
227
230
  // ```
228
231
  // role = "ROLE_MANAGER" OR role = "ROLE_MEMBER"
229
232
  // member.type = "HUMAN" AND role = "ROLE_MANAGER"
233
+ //
234
+ // member.type != "BOT"
230
235
  // ```
231
236
  //
232
237
  // The following queries are invalid:
@@ -236,7 +241,6 @@ message ListMembershipsRequest {
236
241
  // role = "ROLE_MANAGER" AND role = "ROLE_MEMBER"
237
242
  // ```
238
243
  //
239
- //
240
244
  // Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
241
245
  // error.
242
246
  string filter = 5 [(google.api.field_behavior) = OPTIONAL];
@@ -103,6 +103,39 @@ message Space {
103
103
  string guidelines = 2;
104
104
  }
105
105
 
106
+ // Represents the [access
107
+ // setting](https://support.google.com/chat/answer/11971020) of the space.
108
+ message AccessSettings {
109
+ // Represents the access state of the space.
110
+ enum AccessState {
111
+ // Access state is unknown or not supported in this API.
112
+ ACCESS_STATE_UNSPECIFIED = 0;
113
+
114
+ // Space is discoverable by added or invited members or groups.
115
+ PRIVATE = 1;
116
+
117
+ // Space is discoverable by the selected [target
118
+ // audience](https://support.google.com/a/answer/9934697), as well as
119
+ // added or invited members or groups.
120
+ DISCOVERABLE = 2;
121
+ }
122
+
123
+ // Output only. Indicates the access state of the space.
124
+ AccessState access_state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
125
+
126
+ // Optional. The resource name of the [target
127
+ // audience](https://support.google.com/a/answer/9934697) who can discover
128
+ // the space, join the space, and preview the messages in the space. For
129
+ // details, see [Make a space discoverable to a target
130
+ // audience](https://developers.google.com/workspace/chat/space-target-audience).
131
+ //
132
+ // Format: `audiences/{audience}`
133
+ //
134
+ // To use the default target audience for the Google Workspace organization,
135
+ // set to `audiences/default`.
136
+ string audience = 3 [(google.api.field_behavior) = OPTIONAL];
137
+ }
138
+
106
139
  // Resource name of the space.
107
140
  //
108
141
  // Format: `spaces/{space}`
@@ -192,6 +225,14 @@ message Space {
192
225
  //
193
226
  // To support admin install, your Chat app must feature direct messaging.
194
227
  bool admin_installed = 19 [(google.api.field_behavior) = OUTPUT_ONLY];
228
+
229
+ // Optional. Specifies the [access
230
+ // setting](https://support.google.com/chat/answer/11971020) of the space.
231
+ // Only populated when the `space_type` is `SPACE`.
232
+ AccessSettings access_settings = 23 [(google.api.field_behavior) = OPTIONAL];
233
+
234
+ // Output only. The URI for a user to access the space.
235
+ string space_uri = 25 [(google.api.field_behavior) = OUTPUT_ONLY];
195
236
  }
196
237
 
197
238
  // A request to create a named space.
@@ -270,7 +311,7 @@ message ListSpacesResponse {
270
311
 
271
312
  // A request to return a single space.
272
313
  message GetSpaceRequest {
273
- // Required. Resource name of the space, in the form "spaces/*".
314
+ // Required. Resource name of the space, in the form `spaces/{space}`.
274
315
  //
275
316
  // Format: `spaces/{space}`
276
317
  string name = 1 [
@@ -325,6 +366,7 @@ message UpdateSpaceRequest {
325
366
  // the display name is optional if the existing space already has the `SPACE`
326
367
  // type. Trying to update the space type in other ways results in an invalid
327
368
  // argument error).
369
+ // `space_type` is not supported with admin access.
328
370
  //
329
371
  // - `space_details`
330
372
  //
@@ -333,12 +375,27 @@ message UpdateSpaceRequest {
333
375
  // allows users to change their history
334
376
  // setting](https://support.google.com/a/answer/7664184).
335
377
  // Warning: mutually exclusive with all other field paths.)
378
+ // `space_history_state` is not supported with admin access.
379
+ //
380
+ // - `access_settings.audience` (Supports changing the [access
381
+ // setting](https://support.google.com/chat/answer/11971020) of who can
382
+ // discover the space, join the space, and preview the messages in space. If
383
+ // no audience is specified in the access setting, the space's access setting
384
+ // is updated to private. Warning: mutually exclusive with all other field
385
+ // paths.)
386
+ // `access_settings.audience` is not supported with admin access.
336
387
  //
337
- // - Developer Preview: `access_settings.audience` (Supports changing the
338
- // [access setting](https://support.google.com/chat/answer/11971020) of a
339
- // space. If no audience is specified in the access setting, the space's
340
- // access setting is updated to restricted. Warning: mutually exclusive with
341
- // all other field paths.)
388
+ // - Developer Preview: Supports changing the [permission
389
+ // settings](https://support.google.com/chat/answer/13340792) of a space,
390
+ // supported field paths
391
+ // include: `permission_settings.manage_members_and_groups`,
392
+ // `permission_settings.modify_space_details`,
393
+ // `permission_settings.toggle_history`,
394
+ // `permission_settings.use_at_mention_all`,
395
+ // `permission_settings.manage_apps`, `permission_settings.manage_webhooks`,
396
+ // `permission_settings.reply_messages`
397
+ // (Warning: mutually exclusive with all other non-permission settings field
398
+ // paths). `permission_settings` is not supported with admin access.
342
399
  google.protobuf.FieldMask update_mask = 2;
343
400
  }
344
401