google-apis-chat_v1 0.46.0 → 0.47.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.
@@ -53,8 +53,8 @@ module Google
53
53
  # Legacy path for creating message. Calling these will result in a BadRequest
54
54
  # response.
55
55
  # @param [String] parent
56
- # Required. Space resource name, in the form "spaces/*". Example: spaces/
57
- # AAAAAAAAAAA
56
+ # Required. The resource name of the space in which to create a message. Format:
57
+ # spaces/`space`
58
58
  # @param [Google::Apis::ChatV1::Message] message_object
59
59
  # @param [String] message_id
60
60
  # Optional. A custom name for a Chat message assigned at creation. Must start
@@ -63,14 +63,17 @@ module Google
63
63
  # message with the specified value. For example usage, see [Name a created
64
64
  # message](https://developers.google.com/chat/api/guides/crudl/messages#
65
65
  # name_a_created_message).
66
+ # @param [String] message_reply_option
67
+ # Optional. Specifies whether a message starts a thread or replies to one. Only
68
+ # supported in named spaces.
66
69
  # @param [String] request_id
67
70
  # Optional. A unique request ID for this message. Specifying an existing request
68
71
  # ID returns the message created with that ID instead of creating a new message.
69
72
  # @param [String] thread_key
70
- # Optional. Opaque thread identifier. To start or add to a thread, create a
71
- # message and specify a `threadKey` instead of thread.name. (Setting thread.name
72
- # has no effect.) The first message with a given `threadKey` starts a new thread.
73
- # Subsequent messages with the same `threadKey` post into the same thread.
73
+ # Optional. Deprecated: Use thread.thread_key instead. Opaque thread identifier.
74
+ # To start or add to a thread, create a message and specify a `threadKey` or the
75
+ # thread.name. For example usage, see [Start or reply to a message thread](/chat/
76
+ # api/guides/crudl/messages#start_or_reply_to_a_message_thread).
74
77
  # @param [String] fields
75
78
  # Selector specifying which fields to include in a partial response.
76
79
  # @param [String] quota_user
@@ -88,7 +91,7 @@ module Google
88
91
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
89
92
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
90
93
  # @raise [Google::Apis::AuthorizationError] Authorization is required
91
- def messages_dm(parent, message_object = nil, message_id: nil, request_id: nil, thread_key: nil, fields: nil, quota_user: nil, options: nil, &block)
94
+ def messages_dm(parent, message_object = nil, message_id: nil, message_reply_option: nil, request_id: nil, thread_key: nil, fields: nil, quota_user: nil, options: nil, &block)
92
95
  command = make_simple_command(:post, 'v1/{+parent}/messages', options)
93
96
  command.request_representation = Google::Apis::ChatV1::Message::Representation
94
97
  command.request_object = message_object
@@ -96,6 +99,7 @@ module Google
96
99
  command.response_class = Google::Apis::ChatV1::Message
97
100
  command.params['parent'] = parent unless parent.nil?
98
101
  command.query['messageId'] = message_id unless message_id.nil?
102
+ command.query['messageReplyOption'] = message_reply_option unless message_reply_option.nil?
99
103
  command.query['requestId'] = request_id unless request_id.nil?
100
104
  command.query['threadKey'] = thread_key unless thread_key.nil?
101
105
  command.query['fields'] = fields unless fields.nil?
@@ -106,8 +110,8 @@ module Google
106
110
  # Legacy path for creating message. Calling these will result in a BadRequest
107
111
  # response.
108
112
  # @param [String] parent
109
- # Required. Space resource name, in the form "spaces/*". Example: spaces/
110
- # AAAAAAAAAAA
113
+ # Required. The resource name of the space in which to create a message. Format:
114
+ # spaces/`space`
111
115
  # @param [Google::Apis::ChatV1::Message] message_object
112
116
  # @param [String] message_id
113
117
  # Optional. A custom name for a Chat message assigned at creation. Must start
@@ -116,14 +120,17 @@ module Google
116
120
  # message with the specified value. For example usage, see [Name a created
117
121
  # message](https://developers.google.com/chat/api/guides/crudl/messages#
118
122
  # name_a_created_message).
123
+ # @param [String] message_reply_option
124
+ # Optional. Specifies whether a message starts a thread or replies to one. Only
125
+ # supported in named spaces.
119
126
  # @param [String] request_id
120
127
  # Optional. A unique request ID for this message. Specifying an existing request
121
128
  # ID returns the message created with that ID instead of creating a new message.
122
129
  # @param [String] thread_key
123
- # Optional. Opaque thread identifier. To start or add to a thread, create a
124
- # message and specify a `threadKey` instead of thread.name. (Setting thread.name
125
- # has no effect.) The first message with a given `threadKey` starts a new thread.
126
- # Subsequent messages with the same `threadKey` post into the same thread.
130
+ # Optional. Deprecated: Use thread.thread_key instead. Opaque thread identifier.
131
+ # To start or add to a thread, create a message and specify a `threadKey` or the
132
+ # thread.name. For example usage, see [Start or reply to a message thread](/chat/
133
+ # api/guides/crudl/messages#start_or_reply_to_a_message_thread).
127
134
  # @param [String] fields
128
135
  # Selector specifying which fields to include in a partial response.
129
136
  # @param [String] quota_user
@@ -141,7 +148,7 @@ module Google
141
148
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
142
149
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
143
150
  # @raise [Google::Apis::AuthorizationError] Authorization is required
144
- def webhooks_dm(parent, message_object = nil, message_id: nil, request_id: nil, thread_key: nil, fields: nil, quota_user: nil, options: nil, &block)
151
+ def webhooks_dm(parent, message_object = nil, message_id: nil, message_reply_option: nil, request_id: nil, thread_key: nil, fields: nil, quota_user: nil, options: nil, &block)
145
152
  command = make_simple_command(:post, 'v1/{+parent}/webhooks', options)
146
153
  command.request_representation = Google::Apis::ChatV1::Message::Representation
147
154
  command.request_object = message_object
@@ -149,6 +156,7 @@ module Google
149
156
  command.response_class = Google::Apis::ChatV1::Message
150
157
  command.params['parent'] = parent unless parent.nil?
151
158
  command.query['messageId'] = message_id unless message_id.nil?
159
+ command.query['messageReplyOption'] = message_reply_option unless message_reply_option.nil?
152
160
  command.query['requestId'] = request_id unless request_id.nil?
153
161
  command.query['threadKey'] = thread_key unless thread_key.nil?
154
162
  command.query['fields'] = fields unless fields.nil?
@@ -159,8 +167,8 @@ module Google
159
167
  # Legacy path for creating message. Calling these will result in a BadRequest
160
168
  # response.
161
169
  # @param [String] parent
162
- # Required. Space resource name, in the form "spaces/*". Example: spaces/
163
- # AAAAAAAAAAA
170
+ # Required. The resource name of the space in which to create a message. Format:
171
+ # spaces/`space`
164
172
  # @param [Google::Apis::ChatV1::Message] message_object
165
173
  # @param [String] message_id
166
174
  # Optional. A custom name for a Chat message assigned at creation. Must start
@@ -169,14 +177,17 @@ module Google
169
177
  # message with the specified value. For example usage, see [Name a created
170
178
  # message](https://developers.google.com/chat/api/guides/crudl/messages#
171
179
  # name_a_created_message).
180
+ # @param [String] message_reply_option
181
+ # Optional. Specifies whether a message starts a thread or replies to one. Only
182
+ # supported in named spaces.
172
183
  # @param [String] request_id
173
184
  # Optional. A unique request ID for this message. Specifying an existing request
174
185
  # ID returns the message created with that ID instead of creating a new message.
175
186
  # @param [String] thread_key
176
- # Optional. Opaque thread identifier. To start or add to a thread, create a
177
- # message and specify a `threadKey` instead of thread.name. (Setting thread.name
178
- # has no effect.) The first message with a given `threadKey` starts a new thread.
179
- # Subsequent messages with the same `threadKey` post into the same thread.
187
+ # Optional. Deprecated: Use thread.thread_key instead. Opaque thread identifier.
188
+ # To start or add to a thread, create a message and specify a `threadKey` or the
189
+ # thread.name. For example usage, see [Start or reply to a message thread](/chat/
190
+ # api/guides/crudl/messages#start_or_reply_to_a_message_thread).
180
191
  # @param [String] fields
181
192
  # Selector specifying which fields to include in a partial response.
182
193
  # @param [String] quota_user
@@ -194,7 +205,7 @@ module Google
194
205
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
195
206
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
196
207
  # @raise [Google::Apis::AuthorizationError] Authorization is required
197
- def messages_dm_conversation(parent, message_object = nil, message_id: nil, request_id: nil, thread_key: nil, fields: nil, quota_user: nil, options: nil, &block)
208
+ def messages_dm_conversation(parent, message_object = nil, message_id: nil, message_reply_option: nil, request_id: nil, thread_key: nil, fields: nil, quota_user: nil, options: nil, &block)
198
209
  command = make_simple_command(:post, 'v1/{+parent}/messages', options)
199
210
  command.request_representation = Google::Apis::ChatV1::Message::Representation
200
211
  command.request_object = message_object
@@ -202,6 +213,7 @@ module Google
202
213
  command.response_class = Google::Apis::ChatV1::Message
203
214
  command.params['parent'] = parent unless parent.nil?
204
215
  command.query['messageId'] = message_id unless message_id.nil?
216
+ command.query['messageReplyOption'] = message_reply_option unless message_reply_option.nil?
205
217
  command.query['requestId'] = request_id unless request_id.nil?
206
218
  command.query['threadKey'] = thread_key unless thread_key.nil?
207
219
  command.query['fields'] = fields unless fields.nil?
@@ -250,8 +262,8 @@ module Google
250
262
  # Legacy path for creating message. Calling these will result in a BadRequest
251
263
  # response.
252
264
  # @param [String] parent
253
- # Required. Space resource name, in the form "spaces/*". Example: spaces/
254
- # AAAAAAAAAAA
265
+ # Required. The resource name of the space in which to create a message. Format:
266
+ # spaces/`space`
255
267
  # @param [Google::Apis::ChatV1::Message] message_object
256
268
  # @param [String] message_id
257
269
  # Optional. A custom name for a Chat message assigned at creation. Must start
@@ -260,14 +272,17 @@ module Google
260
272
  # message with the specified value. For example usage, see [Name a created
261
273
  # message](https://developers.google.com/chat/api/guides/crudl/messages#
262
274
  # name_a_created_message).
275
+ # @param [String] message_reply_option
276
+ # Optional. Specifies whether a message starts a thread or replies to one. Only
277
+ # supported in named spaces.
263
278
  # @param [String] request_id
264
279
  # Optional. A unique request ID for this message. Specifying an existing request
265
280
  # ID returns the message created with that ID instead of creating a new message.
266
281
  # @param [String] thread_key
267
- # Optional. Opaque thread identifier. To start or add to a thread, create a
268
- # message and specify a `threadKey` instead of thread.name. (Setting thread.name
269
- # has no effect.) The first message with a given `threadKey` starts a new thread.
270
- # Subsequent messages with the same `threadKey` post into the same thread.
282
+ # Optional. Deprecated: Use thread.thread_key instead. Opaque thread identifier.
283
+ # To start or add to a thread, create a message and specify a `threadKey` or the
284
+ # thread.name. For example usage, see [Start or reply to a message thread](/chat/
285
+ # api/guides/crudl/messages#start_or_reply_to_a_message_thread).
271
286
  # @param [String] fields
272
287
  # Selector specifying which fields to include in a partial response.
273
288
  # @param [String] quota_user
@@ -285,7 +300,7 @@ module Google
285
300
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
286
301
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
287
302
  # @raise [Google::Apis::AuthorizationError] Authorization is required
288
- def messages_room(parent, message_object = nil, message_id: nil, request_id: nil, thread_key: nil, fields: nil, quota_user: nil, options: nil, &block)
303
+ def messages_room(parent, message_object = nil, message_id: nil, message_reply_option: nil, request_id: nil, thread_key: nil, fields: nil, quota_user: nil, options: nil, &block)
289
304
  command = make_simple_command(:post, 'v1/{+parent}/messages', options)
290
305
  command.request_representation = Google::Apis::ChatV1::Message::Representation
291
306
  command.request_object = message_object
@@ -293,6 +308,7 @@ module Google
293
308
  command.response_class = Google::Apis::ChatV1::Message
294
309
  command.params['parent'] = parent unless parent.nil?
295
310
  command.query['messageId'] = message_id unless message_id.nil?
311
+ command.query['messageReplyOption'] = message_reply_option unless message_reply_option.nil?
296
312
  command.query['requestId'] = request_id unless request_id.nil?
297
313
  command.query['threadKey'] = thread_key unless thread_key.nil?
298
314
  command.query['fields'] = fields unless fields.nil?
@@ -303,8 +319,8 @@ module Google
303
319
  # Legacy path for creating message. Calling these will result in a BadRequest
304
320
  # response.
305
321
  # @param [String] parent
306
- # Required. Space resource name, in the form "spaces/*". Example: spaces/
307
- # AAAAAAAAAAA
322
+ # Required. The resource name of the space in which to create a message. Format:
323
+ # spaces/`space`
308
324
  # @param [Google::Apis::ChatV1::Message] message_object
309
325
  # @param [String] message_id
310
326
  # Optional. A custom name for a Chat message assigned at creation. Must start
@@ -313,14 +329,17 @@ module Google
313
329
  # message with the specified value. For example usage, see [Name a created
314
330
  # message](https://developers.google.com/chat/api/guides/crudl/messages#
315
331
  # name_a_created_message).
332
+ # @param [String] message_reply_option
333
+ # Optional. Specifies whether a message starts a thread or replies to one. Only
334
+ # supported in named spaces.
316
335
  # @param [String] request_id
317
336
  # Optional. A unique request ID for this message. Specifying an existing request
318
337
  # ID returns the message created with that ID instead of creating a new message.
319
338
  # @param [String] thread_key
320
- # Optional. Opaque thread identifier. To start or add to a thread, create a
321
- # message and specify a `threadKey` instead of thread.name. (Setting thread.name
322
- # has no effect.) The first message with a given `threadKey` starts a new thread.
323
- # Subsequent messages with the same `threadKey` post into the same thread.
339
+ # Optional. Deprecated: Use thread.thread_key instead. Opaque thread identifier.
340
+ # To start or add to a thread, create a message and specify a `threadKey` or the
341
+ # thread.name. For example usage, see [Start or reply to a message thread](/chat/
342
+ # api/guides/crudl/messages#start_or_reply_to_a_message_thread).
324
343
  # @param [String] fields
325
344
  # Selector specifying which fields to include in a partial response.
326
345
  # @param [String] quota_user
@@ -338,7 +357,7 @@ module Google
338
357
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
339
358
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
340
359
  # @raise [Google::Apis::AuthorizationError] Authorization is required
341
- def webhooks_room(parent, message_object = nil, message_id: nil, request_id: nil, thread_key: nil, fields: nil, quota_user: nil, options: nil, &block)
360
+ def webhooks_room(parent, message_object = nil, message_id: nil, message_reply_option: nil, request_id: nil, thread_key: nil, fields: nil, quota_user: nil, options: nil, &block)
342
361
  command = make_simple_command(:post, 'v1/{+parent}/webhooks', options)
343
362
  command.request_representation = Google::Apis::ChatV1::Message::Representation
344
363
  command.request_object = message_object
@@ -346,6 +365,7 @@ module Google
346
365
  command.response_class = Google::Apis::ChatV1::Message
347
366
  command.params['parent'] = parent unless parent.nil?
348
367
  command.query['messageId'] = message_id unless message_id.nil?
368
+ command.query['messageReplyOption'] = message_reply_option unless message_reply_option.nil?
349
369
  command.query['requestId'] = request_id unless request_id.nil?
350
370
  command.query['threadKey'] = thread_key unless thread_key.nil?
351
371
  command.query['fields'] = fields unless fields.nil?
@@ -356,8 +376,8 @@ module Google
356
376
  # Legacy path for creating message. Calling these will result in a BadRequest
357
377
  # response.
358
378
  # @param [String] parent
359
- # Required. Space resource name, in the form "spaces/*". Example: spaces/
360
- # AAAAAAAAAAA
379
+ # Required. The resource name of the space in which to create a message. Format:
380
+ # spaces/`space`
361
381
  # @param [Google::Apis::ChatV1::Message] message_object
362
382
  # @param [String] message_id
363
383
  # Optional. A custom name for a Chat message assigned at creation. Must start
@@ -366,14 +386,17 @@ module Google
366
386
  # message with the specified value. For example usage, see [Name a created
367
387
  # message](https://developers.google.com/chat/api/guides/crudl/messages#
368
388
  # name_a_created_message).
389
+ # @param [String] message_reply_option
390
+ # Optional. Specifies whether a message starts a thread or replies to one. Only
391
+ # supported in named spaces.
369
392
  # @param [String] request_id
370
393
  # Optional. A unique request ID for this message. Specifying an existing request
371
394
  # ID returns the message created with that ID instead of creating a new message.
372
395
  # @param [String] thread_key
373
- # Optional. Opaque thread identifier. To start or add to a thread, create a
374
- # message and specify a `threadKey` instead of thread.name. (Setting thread.name
375
- # has no effect.) The first message with a given `threadKey` starts a new thread.
376
- # Subsequent messages with the same `threadKey` post into the same thread.
396
+ # Optional. Deprecated: Use thread.thread_key instead. Opaque thread identifier.
397
+ # To start or add to a thread, create a message and specify a `threadKey` or the
398
+ # thread.name. For example usage, see [Start or reply to a message thread](/chat/
399
+ # api/guides/crudl/messages#start_or_reply_to_a_message_thread).
377
400
  # @param [String] fields
378
401
  # Selector specifying which fields to include in a partial response.
379
402
  # @param [String] quota_user
@@ -391,7 +414,7 @@ module Google
391
414
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
392
415
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
393
416
  # @raise [Google::Apis::AuthorizationError] Authorization is required
394
- def messages_room_conversation(parent, message_object = nil, message_id: nil, request_id: nil, thread_key: nil, fields: nil, quota_user: nil, options: nil, &block)
417
+ def messages_room_conversation(parent, message_object = nil, message_id: nil, message_reply_option: nil, request_id: nil, thread_key: nil, fields: nil, quota_user: nil, options: nil, &block)
395
418
  command = make_simple_command(:post, 'v1/{+parent}/messages', options)
396
419
  command.request_representation = Google::Apis::ChatV1::Message::Representation
397
420
  command.request_object = message_object
@@ -399,6 +422,7 @@ module Google
399
422
  command.response_class = Google::Apis::ChatV1::Message
400
423
  command.params['parent'] = parent unless parent.nil?
401
424
  command.query['messageId'] = message_id unless message_id.nil?
425
+ command.query['messageReplyOption'] = message_reply_option unless message_reply_option.nil?
402
426
  command.query['requestId'] = request_id unless request_id.nil?
403
427
  command.query['threadKey'] = thread_key unless thread_key.nil?
404
428
  command.query['fields'] = fields unless fields.nil?
@@ -406,8 +430,14 @@ module Google
406
430
  execute_or_queue_command(command, &block)
407
431
  end
408
432
 
409
- # Returns a space. Requires [service account authentication](https://developers.
410
- # google.com/chat/api/guides/auth/service-accounts).
433
+ # Returns a space. Requires [authentication](https://developers.google.com/chat/
434
+ # api/guides/auth). Fully supports [service account authentication](https://
435
+ # developers.google.com/chat/api/guides/auth/service-accounts). Supports [user
436
+ # authentication](https://developers.google.com/chat/api/guides/auth/users) as
437
+ # part of the [Google Workspace Developer Preview Program](https://developers.
438
+ # google.com/workspace/preview), which grants early access to certain features. [
439
+ # User authentication](https://developers.google.com/chat/api/guides/auth/users)
440
+ # requires the `chat.spaces` or `chat.spaces.readonly` authorization scope.
411
441
  # @param [String] name
412
442
  # Required. Resource name of the space, in the form "spaces/*". Format: spaces/`
413
443
  # space`
@@ -438,14 +468,27 @@ module Google
438
468
  execute_or_queue_command(command, &block)
439
469
  end
440
470
 
441
- # Lists spaces the caller is a member of. Requires [service account
471
+ # Lists spaces the caller is a member of. Requires [authentication](https://
472
+ # developers.google.com/chat/api/guides/auth). Fully supports [service account
442
473
  # authentication](https://developers.google.com/chat/api/guides/auth/service-
443
- # accounts).
474
+ # accounts). Supports [user authentication](https://developers.google.com/chat/
475
+ # api/guides/auth/users) as part of the [Google Workspace Developer Preview
476
+ # Program](https://developers.google.com/workspace/preview), which grants early
477
+ # access to certain features. [User authentication](https://developers.google.
478
+ # com/chat/api/guides/auth/users) requires the `chat.spaces` or `chat.spaces.
479
+ # readonly` authorization scope. Lists spaces visible to the caller or
480
+ # authenticated user. Group chats and DMs aren't listed until the first message
481
+ # is sent.
444
482
  # @param [Fixnum] page_size
445
- # Optional. Requested page size. The value is capped at 1000. Server may return
446
- # fewer results than requested. If unspecified, server will default to 100.
483
+ # Optional. The maximum number of spaces to return. The service may return fewer
484
+ # than this value. If unspecified, at most 100 spaces are returned. The maximum
485
+ # value is 1000; values above 1000 are coerced to 1000. Negative values return
486
+ # an INVALID_ARGUMENT error.
447
487
  # @param [String] page_token
448
- # Optional. A token identifying a page of results the server should return.
488
+ # Optional. A page token, received from a previous list spaces call. Provide
489
+ # this to retrieve the subsequent page. When paginating, the filter value should
490
+ # match the call that provided the page token. Passing a different value may
491
+ # lead to unexpected results.
449
492
  # @param [String] fields
450
493
  # Selector specifying which fields to include in a partial response.
451
494
  # @param [String] quota_user
@@ -477,8 +520,8 @@ module Google
477
520
  # Legacy path for creating message. Calling these will result in a BadRequest
478
521
  # response.
479
522
  # @param [String] parent
480
- # Required. Space resource name, in the form "spaces/*". Example: spaces/
481
- # AAAAAAAAAAA
523
+ # Required. The resource name of the space in which to create a message. Format:
524
+ # spaces/`space`
482
525
  # @param [Google::Apis::ChatV1::Message] message_object
483
526
  # @param [String] message_id
484
527
  # Optional. A custom name for a Chat message assigned at creation. Must start
@@ -487,14 +530,17 @@ module Google
487
530
  # message with the specified value. For example usage, see [Name a created
488
531
  # message](https://developers.google.com/chat/api/guides/crudl/messages#
489
532
  # name_a_created_message).
533
+ # @param [String] message_reply_option
534
+ # Optional. Specifies whether a message starts a thread or replies to one. Only
535
+ # supported in named spaces.
490
536
  # @param [String] request_id
491
537
  # Optional. A unique request ID for this message. Specifying an existing request
492
538
  # ID returns the message created with that ID instead of creating a new message.
493
539
  # @param [String] thread_key
494
- # Optional. Opaque thread identifier. To start or add to a thread, create a
495
- # message and specify a `threadKey` instead of thread.name. (Setting thread.name
496
- # has no effect.) The first message with a given `threadKey` starts a new thread.
497
- # Subsequent messages with the same `threadKey` post into the same thread.
540
+ # Optional. Deprecated: Use thread.thread_key instead. Opaque thread identifier.
541
+ # To start or add to a thread, create a message and specify a `threadKey` or the
542
+ # thread.name. For example usage, see [Start or reply to a message thread](/chat/
543
+ # api/guides/crudl/messages#start_or_reply_to_a_message_thread).
498
544
  # @param [String] fields
499
545
  # Selector specifying which fields to include in a partial response.
500
546
  # @param [String] quota_user
@@ -512,7 +558,7 @@ module Google
512
558
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
513
559
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
514
560
  # @raise [Google::Apis::AuthorizationError] Authorization is required
515
- def webhooks_space(parent, message_object = nil, message_id: nil, request_id: nil, thread_key: nil, fields: nil, quota_user: nil, options: nil, &block)
561
+ def webhooks_space(parent, message_object = nil, message_id: nil, message_reply_option: nil, request_id: nil, thread_key: nil, fields: nil, quota_user: nil, options: nil, &block)
516
562
  command = make_simple_command(:post, 'v1/{+parent}/webhooks', options)
517
563
  command.request_representation = Google::Apis::ChatV1::Message::Representation
518
564
  command.request_object = message_object
@@ -520,6 +566,7 @@ module Google
520
566
  command.response_class = Google::Apis::ChatV1::Message
521
567
  command.params['parent'] = parent unless parent.nil?
522
568
  command.query['messageId'] = message_id unless message_id.nil?
569
+ command.query['messageReplyOption'] = message_reply_option unless message_reply_option.nil?
523
570
  command.query['requestId'] = request_id unless request_id.nil?
524
571
  command.query['threadKey'] = thread_key unless thread_key.nil?
525
572
  command.query['fields'] = fields unless fields.nil?
@@ -527,8 +574,16 @@ module Google
527
574
  execute_or_queue_command(command, &block)
528
575
  end
529
576
 
530
- # Returns a membership. Requires [service account authentication](https://
531
- # developers.google.com/chat/api/guides/auth/service-accounts).
577
+ # [Developer Preview](https://developers.google.com/workspace/preview): Returns
578
+ # a membership. Requires [authentication](https://developers.google.com/chat/api/
579
+ # guides/auth/). Fully supports [service account authentication](https://
580
+ # developers.google.com/chat/api/guides/auth/service-accounts). Supports [user
581
+ # authentication](https://developers.google.com/chat/api/guides/auth/users) as
582
+ # part of the [Google Workspace Developer Preview Program](https://developers.
583
+ # google.com/workspace/preview), which grants early access to certain features. [
584
+ # User authentication](https://developers.google.com/chat/api/guides/auth/users)
585
+ # requires the `chat.memberships` or `chat.memberships.readonly` authorization
586
+ # scope.
532
587
  # @param [String] name
533
588
  # Required. Resource name of the membership to retrieve. Format: spaces/`space`/
534
589
  # members/`member`
@@ -559,17 +614,29 @@ module Google
559
614
  execute_or_queue_command(command, &block)
560
615
  end
561
616
 
562
- # Lists human memberships in a space for joined members. Requires [service
563
- # account authentication](https://developers.google.com/chat/api/guides/auth/
564
- # service-accounts).
617
+ # [Developer Preview](https://developers.google.com/workspace/preview): Lists
618
+ # memberships in a space. Requires [authentication](https://developers.google.
619
+ # com/chat/api/guides/auth/). Fully supports [service account authentication](
620
+ # https://developers.google.com/chat/api/guides/auth/service-accounts). Supports
621
+ # [user authentication](https://developers.google.com/chat/api/guides/auth/users)
622
+ # as part of the [Google Workspace Developer Preview Program](https://
623
+ # developers.google.com/workspace/preview), which grants early access to certain
624
+ # features. [User authentication](https://developers.google.com/chat/api/guides/
625
+ # auth/users) requires the `chat.memberships` or `chat.memberships.readonly`
626
+ # authorization scope.
565
627
  # @param [String] parent
566
628
  # Required. The resource name of the space for which to fetch a membership list.
567
629
  # Format: spaces/`space`
568
630
  # @param [Fixnum] page_size
569
- # Requested page size. The value is capped at 1000. Server may return fewer
570
- # results than requested. If unspecified, server will default to 100.
631
+ # The maximum number of memberships to return. The service may return fewer than
632
+ # this value. If unspecified, at most 100 memberships are returned. The maximum
633
+ # value is 1000; values above 1000 are coerced to 1000. Negative values return
634
+ # an INVALID_ARGUMENT error.
571
635
  # @param [String] page_token
572
- # A token identifying a page of results the server should return.
636
+ # A page token, received from a previous list memberships call. Provide this to
637
+ # retrieve the subsequent page. When paginating, all other parameters provided
638
+ # should match the call that provided the page token. Passing different values
639
+ # to the other parameters may lead to unexpected results.
573
640
  # @param [String] fields
574
641
  # Selector specifying which fields to include in a partial response.
575
642
  # @param [String] quota_user
@@ -599,11 +666,19 @@ module Google
599
666
  execute_or_queue_command(command, &block)
600
667
  end
601
668
 
602
- # Creates a message. Requires [service account authentication](https://
603
- # developers.google.com/chat/api/guides/auth/service-accounts).
669
+ # Creates a message. For example usage, see [Create a message](https://
670
+ # developers.google.com/chat/api/guides/crudl/messages#create_a_message).
671
+ # Requires [authentication](https://developers.google.com/chat/api/guides/auth).
672
+ # Fully supports [service account authentication](https://developers.google.com/
673
+ # chat/api/guides/auth/service-accounts). Supports [user authentication](https://
674
+ # developers.google.com/chat/api/guides/auth/users) as part of the [Google
675
+ # Workspace Developer Preview Program](https://developers.google.com/workspace/
676
+ # preview), which grants early access to certain features. [User authentication](
677
+ # https://developers.google.com/chat/api/guides/auth/users) requires the `chat.
678
+ # messages` or `chat.messages.create` authorization scope.
604
679
  # @param [String] parent
605
- # Required. Space resource name, in the form "spaces/*". Example: spaces/
606
- # AAAAAAAAAAA
680
+ # Required. The resource name of the space in which to create a message. Format:
681
+ # spaces/`space`
607
682
  # @param [Google::Apis::ChatV1::Message] message_object
608
683
  # @param [String] message_id
609
684
  # Optional. A custom name for a Chat message assigned at creation. Must start
@@ -612,14 +687,17 @@ module Google
612
687
  # message with the specified value. For example usage, see [Name a created
613
688
  # message](https://developers.google.com/chat/api/guides/crudl/messages#
614
689
  # name_a_created_message).
690
+ # @param [String] message_reply_option
691
+ # Optional. Specifies whether a message starts a thread or replies to one. Only
692
+ # supported in named spaces.
615
693
  # @param [String] request_id
616
694
  # Optional. A unique request ID for this message. Specifying an existing request
617
695
  # ID returns the message created with that ID instead of creating a new message.
618
696
  # @param [String] thread_key
619
- # Optional. Opaque thread identifier. To start or add to a thread, create a
620
- # message and specify a `threadKey` instead of thread.name. (Setting thread.name
621
- # has no effect.) The first message with a given `threadKey` starts a new thread.
622
- # Subsequent messages with the same `threadKey` post into the same thread.
697
+ # Optional. Deprecated: Use thread.thread_key instead. Opaque thread identifier.
698
+ # To start or add to a thread, create a message and specify a `threadKey` or the
699
+ # thread.name. For example usage, see [Start or reply to a message thread](/chat/
700
+ # api/guides/crudl/messages#start_or_reply_to_a_message_thread).
623
701
  # @param [String] fields
624
702
  # Selector specifying which fields to include in a partial response.
625
703
  # @param [String] quota_user
@@ -637,7 +715,7 @@ module Google
637
715
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
638
716
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
639
717
  # @raise [Google::Apis::AuthorizationError] Authorization is required
640
- def create_space_message(parent, message_object = nil, message_id: nil, request_id: nil, thread_key: nil, fields: nil, quota_user: nil, options: nil, &block)
718
+ def create_space_message(parent, message_object = nil, message_id: nil, message_reply_option: nil, request_id: nil, thread_key: nil, fields: nil, quota_user: nil, options: nil, &block)
641
719
  command = make_simple_command(:post, 'v1/{+parent}/messages', options)
642
720
  command.request_representation = Google::Apis::ChatV1::Message::Representation
643
721
  command.request_object = message_object
@@ -645,6 +723,7 @@ module Google
645
723
  command.response_class = Google::Apis::ChatV1::Message
646
724
  command.params['parent'] = parent unless parent.nil?
647
725
  command.query['messageId'] = message_id unless message_id.nil?
726
+ command.query['messageReplyOption'] = message_reply_option unless message_reply_option.nil?
648
727
  command.query['requestId'] = request_id unless request_id.nil?
649
728
  command.query['threadKey'] = thread_key unless thread_key.nil?
650
729
  command.query['fields'] = fields unless fields.nil?
@@ -652,8 +731,16 @@ module Google
652
731
  execute_or_queue_command(command, &block)
653
732
  end
654
733
 
655
- # Deletes a message. Requires [service account authentication](https://
656
- # developers.google.com/chat/api/guides/auth/service-accounts).
734
+ # Deletes a message. For example usage, see [Delete a message](https://
735
+ # developers.google.com/chat/api/guides/crudl/messages#delete_a_message).
736
+ # Requires [authentication](https://developers.google.com/chat/api/guides/auth).
737
+ # Fully supports [service account authentication](https://developers.google.com/
738
+ # chat/api/guides/auth/service-accounts). Supports [user authentication](https://
739
+ # developers.google.com/chat/api/guides/auth/users) as part of the [Google
740
+ # Workspace Developer Preview Program](https://developers.google.com/workspace/
741
+ # preview), which grants early access to certain features. [User authentication](
742
+ # https://developers.google.com/chat/api/guides/auth/users) requires the `chat.
743
+ # messages` authorization scope.
657
744
  # @param [String] name
658
745
  # Required. Resource name of the message to be deleted, in the form "spaces/*/
659
746
  # messages/*" Example: spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB
@@ -684,8 +771,17 @@ module Google
684
771
  execute_or_queue_command(command, &block)
685
772
  end
686
773
 
687
- # Returns a message. Requires [service account authentication](https://
688
- # developers.google.com/chat/api/guides/auth/service-accounts).
774
+ # Returns a message. For example usage, see [Read a message](https://developers.
775
+ # google.com/chat/api/guides/crudl/messages#read_a_message). Requires [
776
+ # authentication](https://developers.google.com/chat/api/guides/auth). Fully
777
+ # supports [Service account authentication](https://developers.google.com/chat/
778
+ # api/guides/auth/service-accounts). Supports [user authentication](https://
779
+ # developers.google.com/chat/api/guides/auth/users) as part of the [Google
780
+ # Workspace Developer Preview Program](https://developers.google.com/workspace/
781
+ # preview), which grants early access to certain features. [User authentication](
782
+ # https://developers.google.com/chat/api/guides/auth/users) requires the `chat.
783
+ # messages` or `chat.messages.readonly` authorization scope. Note: Might return
784
+ # a message from a blocked member or space.
689
785
  # @param [String] name
690
786
  # Required. Resource name of the message to retrieve. Format: spaces/`space`/
691
787
  # messages/`message` If the message begins with `client-`, then it has a custom
@@ -720,8 +816,70 @@ module Google
720
816
  execute_or_queue_command(command, &block)
721
817
  end
722
818
 
723
- # Updates a message. Requires [service account authentication](https://
724
- # developers.google.com/chat/api/guides/auth/service-accounts).
819
+ # Updates a message. For example usage, see [Update a message](https://
820
+ # developers.google.com/chat/api/guides/crudl/messages#update_a_message).
821
+ # Requires [authentication](https://developers.google.com/chat/api/guides/auth/).
822
+ # Fully supports [service account authentication](https://developers.google.com/
823
+ # chat/api/guides/auth/service-accounts). Supports [user authentication](https://
824
+ # developers.google.com/chat/api/guides/auth/users) as part of the [Google
825
+ # Workspace Developer Preview Program](https://developers.google.com/workspace/
826
+ # preview), which grants early access to certain features. [User authentication](
827
+ # https://developers.google.com/chat/api/guides/auth/users) requires the `chat.
828
+ # messages` authorization scope.
829
+ # @param [String] name
830
+ # Resource name in the form `spaces/*/messages/*`. Example: `spaces/AAAAAAAAAAA/
831
+ # messages/BBBBBBBBBBB.BBBBBBBBBBB`
832
+ # @param [Google::Apis::ChatV1::Message] message_object
833
+ # @param [Boolean] allow_missing
834
+ # Optional. If `true` and the message is not found, a new message is created and
835
+ # `updateMask` is ignored. The specified message ID must be [client-assigned](
836
+ # https://developers.google.com/chat/api/guides/crudl/messages#
837
+ # name_a_created_message) or the request fails.
838
+ # @param [String] update_mask
839
+ # Required. The field paths to update. Separate multiple values with commas.
840
+ # Currently supported field paths: - text - cards (Requires [service account
841
+ # authentication](/chat/api/guides/auth/service-accounts).) - cards_v2
842
+ # @param [String] fields
843
+ # Selector specifying which fields to include in a partial response.
844
+ # @param [String] quota_user
845
+ # Available to use for quota purposes for server-side applications. Can be any
846
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
847
+ # @param [Google::Apis::RequestOptions] options
848
+ # Request-specific options
849
+ #
850
+ # @yield [result, err] Result & error if block supplied
851
+ # @yieldparam result [Google::Apis::ChatV1::Message] parsed result object
852
+ # @yieldparam err [StandardError] error object if request failed
853
+ #
854
+ # @return [Google::Apis::ChatV1::Message]
855
+ #
856
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
857
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
858
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
859
+ def patch_space_message(name, message_object = nil, allow_missing: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
860
+ command = make_simple_command(:patch, 'v1/{+name}', options)
861
+ command.request_representation = Google::Apis::ChatV1::Message::Representation
862
+ command.request_object = message_object
863
+ command.response_representation = Google::Apis::ChatV1::Message::Representation
864
+ command.response_class = Google::Apis::ChatV1::Message
865
+ command.params['name'] = name unless name.nil?
866
+ command.query['allowMissing'] = allow_missing unless allow_missing.nil?
867
+ command.query['updateMask'] = update_mask unless update_mask.nil?
868
+ command.query['fields'] = fields unless fields.nil?
869
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
870
+ execute_or_queue_command(command, &block)
871
+ end
872
+
873
+ # Updates a message. For example usage, see [Update a message](https://
874
+ # developers.google.com/chat/api/guides/crudl/messages#update_a_message).
875
+ # Requires [authentication](https://developers.google.com/chat/api/guides/auth/).
876
+ # Fully supports [service account authentication](https://developers.google.com/
877
+ # chat/api/guides/auth/service-accounts). Supports [user authentication](https://
878
+ # developers.google.com/chat/api/guides/auth/users) as part of the [Google
879
+ # Workspace Developer Preview Program](https://developers.google.com/workspace/
880
+ # preview), which grants early access to certain features. [User authentication](
881
+ # https://developers.google.com/chat/api/guides/auth/users) requires the `chat.
882
+ # messages` authorization scope.
725
883
  # @param [String] name
726
884
  # Resource name in the form `spaces/*/messages/*`. Example: `spaces/AAAAAAAAAAA/
727
885
  # messages/BBBBBBBBBBB.BBBBBBBBBBB`