google-apis-chat_v1 0.45.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,17 +53,27 @@ 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
+ # @param [String] message_id
60
+ # Optional. A custom name for a Chat message assigned at creation. Must start
61
+ # with `client-` and contain only lowercase letters, numbers, and hyphens up to
62
+ # 63 characters in length. Specify this field to get, update, or delete the
63
+ # message with the specified value. For example usage, see [Name a created
64
+ # message](https://developers.google.com/chat/api/guides/crudl/messages#
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.
59
69
  # @param [String] request_id
60
70
  # Optional. A unique request ID for this message. Specifying an existing request
61
71
  # ID returns the message created with that ID instead of creating a new message.
62
72
  # @param [String] thread_key
63
- # Optional. Opaque thread identifier. To start or add to a thread, create a
64
- # message and specify a `threadKey` instead of thread.name. (Setting thread.name
65
- # has no effect.) The first message with a given `threadKey` starts a new thread.
66
- # 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).
67
77
  # @param [String] fields
68
78
  # Selector specifying which fields to include in a partial response.
69
79
  # @param [String] quota_user
@@ -81,13 +91,15 @@ module Google
81
91
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
82
92
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
83
93
  # @raise [Google::Apis::AuthorizationError] Authorization is required
84
- def messages_dm(parent, message_object = 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)
85
95
  command = make_simple_command(:post, 'v1/{+parent}/messages', options)
86
96
  command.request_representation = Google::Apis::ChatV1::Message::Representation
87
97
  command.request_object = message_object
88
98
  command.response_representation = Google::Apis::ChatV1::Message::Representation
89
99
  command.response_class = Google::Apis::ChatV1::Message
90
100
  command.params['parent'] = parent unless parent.nil?
101
+ command.query['messageId'] = message_id unless message_id.nil?
102
+ command.query['messageReplyOption'] = message_reply_option unless message_reply_option.nil?
91
103
  command.query['requestId'] = request_id unless request_id.nil?
92
104
  command.query['threadKey'] = thread_key unless thread_key.nil?
93
105
  command.query['fields'] = fields unless fields.nil?
@@ -98,17 +110,27 @@ module Google
98
110
  # Legacy path for creating message. Calling these will result in a BadRequest
99
111
  # response.
100
112
  # @param [String] parent
101
- # Required. Space resource name, in the form "spaces/*". Example: spaces/
102
- # AAAAAAAAAAA
113
+ # Required. The resource name of the space in which to create a message. Format:
114
+ # spaces/`space`
103
115
  # @param [Google::Apis::ChatV1::Message] message_object
116
+ # @param [String] message_id
117
+ # Optional. A custom name for a Chat message assigned at creation. Must start
118
+ # with `client-` and contain only lowercase letters, numbers, and hyphens up to
119
+ # 63 characters in length. Specify this field to get, update, or delete the
120
+ # message with the specified value. For example usage, see [Name a created
121
+ # message](https://developers.google.com/chat/api/guides/crudl/messages#
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.
104
126
  # @param [String] request_id
105
127
  # Optional. A unique request ID for this message. Specifying an existing request
106
128
  # ID returns the message created with that ID instead of creating a new message.
107
129
  # @param [String] thread_key
108
- # Optional. Opaque thread identifier. To start or add to a thread, create a
109
- # message and specify a `threadKey` instead of thread.name. (Setting thread.name
110
- # has no effect.) The first message with a given `threadKey` starts a new thread.
111
- # 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).
112
134
  # @param [String] fields
113
135
  # Selector specifying which fields to include in a partial response.
114
136
  # @param [String] quota_user
@@ -126,13 +148,15 @@ module Google
126
148
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
127
149
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
128
150
  # @raise [Google::Apis::AuthorizationError] Authorization is required
129
- def webhooks_dm(parent, message_object = 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)
130
152
  command = make_simple_command(:post, 'v1/{+parent}/webhooks', options)
131
153
  command.request_representation = Google::Apis::ChatV1::Message::Representation
132
154
  command.request_object = message_object
133
155
  command.response_representation = Google::Apis::ChatV1::Message::Representation
134
156
  command.response_class = Google::Apis::ChatV1::Message
135
157
  command.params['parent'] = parent unless parent.nil?
158
+ command.query['messageId'] = message_id unless message_id.nil?
159
+ command.query['messageReplyOption'] = message_reply_option unless message_reply_option.nil?
136
160
  command.query['requestId'] = request_id unless request_id.nil?
137
161
  command.query['threadKey'] = thread_key unless thread_key.nil?
138
162
  command.query['fields'] = fields unless fields.nil?
@@ -143,17 +167,27 @@ module Google
143
167
  # Legacy path for creating message. Calling these will result in a BadRequest
144
168
  # response.
145
169
  # @param [String] parent
146
- # Required. Space resource name, in the form "spaces/*". Example: spaces/
147
- # AAAAAAAAAAA
170
+ # Required. The resource name of the space in which to create a message. Format:
171
+ # spaces/`space`
148
172
  # @param [Google::Apis::ChatV1::Message] message_object
173
+ # @param [String] message_id
174
+ # Optional. A custom name for a Chat message assigned at creation. Must start
175
+ # with `client-` and contain only lowercase letters, numbers, and hyphens up to
176
+ # 63 characters in length. Specify this field to get, update, or delete the
177
+ # message with the specified value. For example usage, see [Name a created
178
+ # message](https://developers.google.com/chat/api/guides/crudl/messages#
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.
149
183
  # @param [String] request_id
150
184
  # Optional. A unique request ID for this message. Specifying an existing request
151
185
  # ID returns the message created with that ID instead of creating a new message.
152
186
  # @param [String] thread_key
153
- # Optional. Opaque thread identifier. To start or add to a thread, create a
154
- # message and specify a `threadKey` instead of thread.name. (Setting thread.name
155
- # has no effect.) The first message with a given `threadKey` starts a new thread.
156
- # 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).
157
191
  # @param [String] fields
158
192
  # Selector specifying which fields to include in a partial response.
159
193
  # @param [String] quota_user
@@ -171,13 +205,15 @@ module Google
171
205
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
172
206
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
173
207
  # @raise [Google::Apis::AuthorizationError] Authorization is required
174
- def messages_dm_conversation(parent, message_object = 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)
175
209
  command = make_simple_command(:post, 'v1/{+parent}/messages', options)
176
210
  command.request_representation = Google::Apis::ChatV1::Message::Representation
177
211
  command.request_object = message_object
178
212
  command.response_representation = Google::Apis::ChatV1::Message::Representation
179
213
  command.response_class = Google::Apis::ChatV1::Message
180
214
  command.params['parent'] = parent unless parent.nil?
215
+ command.query['messageId'] = message_id unless message_id.nil?
216
+ command.query['messageReplyOption'] = message_reply_option unless message_reply_option.nil?
181
217
  command.query['requestId'] = request_id unless request_id.nil?
182
218
  command.query['threadKey'] = thread_key unless thread_key.nil?
183
219
  command.query['fields'] = fields unless fields.nil?
@@ -226,17 +262,27 @@ module Google
226
262
  # Legacy path for creating message. Calling these will result in a BadRequest
227
263
  # response.
228
264
  # @param [String] parent
229
- # Required. Space resource name, in the form "spaces/*". Example: spaces/
230
- # AAAAAAAAAAA
265
+ # Required. The resource name of the space in which to create a message. Format:
266
+ # spaces/`space`
231
267
  # @param [Google::Apis::ChatV1::Message] message_object
268
+ # @param [String] message_id
269
+ # Optional. A custom name for a Chat message assigned at creation. Must start
270
+ # with `client-` and contain only lowercase letters, numbers, and hyphens up to
271
+ # 63 characters in length. Specify this field to get, update, or delete the
272
+ # message with the specified value. For example usage, see [Name a created
273
+ # message](https://developers.google.com/chat/api/guides/crudl/messages#
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.
232
278
  # @param [String] request_id
233
279
  # Optional. A unique request ID for this message. Specifying an existing request
234
280
  # ID returns the message created with that ID instead of creating a new message.
235
281
  # @param [String] thread_key
236
- # Optional. Opaque thread identifier. To start or add to a thread, create a
237
- # message and specify a `threadKey` instead of thread.name. (Setting thread.name
238
- # has no effect.) The first message with a given `threadKey` starts a new thread.
239
- # 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).
240
286
  # @param [String] fields
241
287
  # Selector specifying which fields to include in a partial response.
242
288
  # @param [String] quota_user
@@ -254,13 +300,15 @@ module Google
254
300
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
255
301
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
256
302
  # @raise [Google::Apis::AuthorizationError] Authorization is required
257
- def messages_room(parent, message_object = 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)
258
304
  command = make_simple_command(:post, 'v1/{+parent}/messages', options)
259
305
  command.request_representation = Google::Apis::ChatV1::Message::Representation
260
306
  command.request_object = message_object
261
307
  command.response_representation = Google::Apis::ChatV1::Message::Representation
262
308
  command.response_class = Google::Apis::ChatV1::Message
263
309
  command.params['parent'] = parent unless parent.nil?
310
+ command.query['messageId'] = message_id unless message_id.nil?
311
+ command.query['messageReplyOption'] = message_reply_option unless message_reply_option.nil?
264
312
  command.query['requestId'] = request_id unless request_id.nil?
265
313
  command.query['threadKey'] = thread_key unless thread_key.nil?
266
314
  command.query['fields'] = fields unless fields.nil?
@@ -271,17 +319,27 @@ module Google
271
319
  # Legacy path for creating message. Calling these will result in a BadRequest
272
320
  # response.
273
321
  # @param [String] parent
274
- # Required. Space resource name, in the form "spaces/*". Example: spaces/
275
- # AAAAAAAAAAA
322
+ # Required. The resource name of the space in which to create a message. Format:
323
+ # spaces/`space`
276
324
  # @param [Google::Apis::ChatV1::Message] message_object
325
+ # @param [String] message_id
326
+ # Optional. A custom name for a Chat message assigned at creation. Must start
327
+ # with `client-` and contain only lowercase letters, numbers, and hyphens up to
328
+ # 63 characters in length. Specify this field to get, update, or delete the
329
+ # message with the specified value. For example usage, see [Name a created
330
+ # message](https://developers.google.com/chat/api/guides/crudl/messages#
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.
277
335
  # @param [String] request_id
278
336
  # Optional. A unique request ID for this message. Specifying an existing request
279
337
  # ID returns the message created with that ID instead of creating a new message.
280
338
  # @param [String] thread_key
281
- # Optional. Opaque thread identifier. To start or add to a thread, create a
282
- # message and specify a `threadKey` instead of thread.name. (Setting thread.name
283
- # has no effect.) The first message with a given `threadKey` starts a new thread.
284
- # 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).
285
343
  # @param [String] fields
286
344
  # Selector specifying which fields to include in a partial response.
287
345
  # @param [String] quota_user
@@ -299,13 +357,15 @@ module Google
299
357
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
300
358
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
301
359
  # @raise [Google::Apis::AuthorizationError] Authorization is required
302
- def webhooks_room(parent, message_object = 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)
303
361
  command = make_simple_command(:post, 'v1/{+parent}/webhooks', options)
304
362
  command.request_representation = Google::Apis::ChatV1::Message::Representation
305
363
  command.request_object = message_object
306
364
  command.response_representation = Google::Apis::ChatV1::Message::Representation
307
365
  command.response_class = Google::Apis::ChatV1::Message
308
366
  command.params['parent'] = parent unless parent.nil?
367
+ command.query['messageId'] = message_id unless message_id.nil?
368
+ command.query['messageReplyOption'] = message_reply_option unless message_reply_option.nil?
309
369
  command.query['requestId'] = request_id unless request_id.nil?
310
370
  command.query['threadKey'] = thread_key unless thread_key.nil?
311
371
  command.query['fields'] = fields unless fields.nil?
@@ -316,17 +376,27 @@ module Google
316
376
  # Legacy path for creating message. Calling these will result in a BadRequest
317
377
  # response.
318
378
  # @param [String] parent
319
- # Required. Space resource name, in the form "spaces/*". Example: spaces/
320
- # AAAAAAAAAAA
379
+ # Required. The resource name of the space in which to create a message. Format:
380
+ # spaces/`space`
321
381
  # @param [Google::Apis::ChatV1::Message] message_object
382
+ # @param [String] message_id
383
+ # Optional. A custom name for a Chat message assigned at creation. Must start
384
+ # with `client-` and contain only lowercase letters, numbers, and hyphens up to
385
+ # 63 characters in length. Specify this field to get, update, or delete the
386
+ # message with the specified value. For example usage, see [Name a created
387
+ # message](https://developers.google.com/chat/api/guides/crudl/messages#
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.
322
392
  # @param [String] request_id
323
393
  # Optional. A unique request ID for this message. Specifying an existing request
324
394
  # ID returns the message created with that ID instead of creating a new message.
325
395
  # @param [String] thread_key
326
- # Optional. Opaque thread identifier. To start or add to a thread, create a
327
- # message and specify a `threadKey` instead of thread.name. (Setting thread.name
328
- # has no effect.) The first message with a given `threadKey` starts a new thread.
329
- # 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).
330
400
  # @param [String] fields
331
401
  # Selector specifying which fields to include in a partial response.
332
402
  # @param [String] quota_user
@@ -344,13 +414,15 @@ module Google
344
414
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
345
415
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
346
416
  # @raise [Google::Apis::AuthorizationError] Authorization is required
347
- def messages_room_conversation(parent, message_object = 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)
348
418
  command = make_simple_command(:post, 'v1/{+parent}/messages', options)
349
419
  command.request_representation = Google::Apis::ChatV1::Message::Representation
350
420
  command.request_object = message_object
351
421
  command.response_representation = Google::Apis::ChatV1::Message::Representation
352
422
  command.response_class = Google::Apis::ChatV1::Message
353
423
  command.params['parent'] = parent unless parent.nil?
424
+ command.query['messageId'] = message_id unless message_id.nil?
425
+ command.query['messageReplyOption'] = message_reply_option unless message_reply_option.nil?
354
426
  command.query['requestId'] = request_id unless request_id.nil?
355
427
  command.query['threadKey'] = thread_key unless thread_key.nil?
356
428
  command.query['fields'] = fields unless fields.nil?
@@ -358,8 +430,14 @@ module Google
358
430
  execute_or_queue_command(command, &block)
359
431
  end
360
432
 
361
- # Returns a space. Requires [service account authentication](https://developers.
362
- # 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.
363
441
  # @param [String] name
364
442
  # Required. Resource name of the space, in the form "spaces/*". Format: spaces/`
365
443
  # space`
@@ -390,14 +468,27 @@ module Google
390
468
  execute_or_queue_command(command, &block)
391
469
  end
392
470
 
393
- # 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
394
473
  # authentication](https://developers.google.com/chat/api/guides/auth/service-
395
- # 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.
396
482
  # @param [Fixnum] page_size
397
- # Optional. Requested page size. The value is capped at 1000. Server may return
398
- # 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.
399
487
  # @param [String] page_token
400
- # 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.
401
492
  # @param [String] fields
402
493
  # Selector specifying which fields to include in a partial response.
403
494
  # @param [String] quota_user
@@ -429,17 +520,27 @@ module Google
429
520
  # Legacy path for creating message. Calling these will result in a BadRequest
430
521
  # response.
431
522
  # @param [String] parent
432
- # Required. Space resource name, in the form "spaces/*". Example: spaces/
433
- # AAAAAAAAAAA
523
+ # Required. The resource name of the space in which to create a message. Format:
524
+ # spaces/`space`
434
525
  # @param [Google::Apis::ChatV1::Message] message_object
526
+ # @param [String] message_id
527
+ # Optional. A custom name for a Chat message assigned at creation. Must start
528
+ # with `client-` and contain only lowercase letters, numbers, and hyphens up to
529
+ # 63 characters in length. Specify this field to get, update, or delete the
530
+ # message with the specified value. For example usage, see [Name a created
531
+ # message](https://developers.google.com/chat/api/guides/crudl/messages#
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.
435
536
  # @param [String] request_id
436
537
  # Optional. A unique request ID for this message. Specifying an existing request
437
538
  # ID returns the message created with that ID instead of creating a new message.
438
539
  # @param [String] thread_key
439
- # Optional. Opaque thread identifier. To start or add to a thread, create a
440
- # message and specify a `threadKey` instead of thread.name. (Setting thread.name
441
- # has no effect.) The first message with a given `threadKey` starts a new thread.
442
- # 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).
443
544
  # @param [String] fields
444
545
  # Selector specifying which fields to include in a partial response.
445
546
  # @param [String] quota_user
@@ -457,13 +558,15 @@ module Google
457
558
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
458
559
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
459
560
  # @raise [Google::Apis::AuthorizationError] Authorization is required
460
- def webhooks_space(parent, message_object = 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)
461
562
  command = make_simple_command(:post, 'v1/{+parent}/webhooks', options)
462
563
  command.request_representation = Google::Apis::ChatV1::Message::Representation
463
564
  command.request_object = message_object
464
565
  command.response_representation = Google::Apis::ChatV1::Message::Representation
465
566
  command.response_class = Google::Apis::ChatV1::Message
466
567
  command.params['parent'] = parent unless parent.nil?
568
+ command.query['messageId'] = message_id unless message_id.nil?
569
+ command.query['messageReplyOption'] = message_reply_option unless message_reply_option.nil?
467
570
  command.query['requestId'] = request_id unless request_id.nil?
468
571
  command.query['threadKey'] = thread_key unless thread_key.nil?
469
572
  command.query['fields'] = fields unless fields.nil?
@@ -471,8 +574,16 @@ module Google
471
574
  execute_or_queue_command(command, &block)
472
575
  end
473
576
 
474
- # Returns a membership. Requires [service account authentication](https://
475
- # 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.
476
587
  # @param [String] name
477
588
  # Required. Resource name of the membership to retrieve. Format: spaces/`space`/
478
589
  # members/`member`
@@ -503,16 +614,29 @@ module Google
503
614
  execute_or_queue_command(command, &block)
504
615
  end
505
616
 
506
- # Lists human memberships in a space. Requires [service account authentication](
507
- # https://developers.google.com/chat/api/guides/auth/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.
508
627
  # @param [String] parent
509
628
  # Required. The resource name of the space for which to fetch a membership list.
510
629
  # Format: spaces/`space`
511
630
  # @param [Fixnum] page_size
512
- # Requested page size. The value is capped at 1000. Server may return fewer
513
- # 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.
514
635
  # @param [String] page_token
515
- # 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.
516
640
  # @param [String] fields
517
641
  # Selector specifying which fields to include in a partial response.
518
642
  # @param [String] quota_user
@@ -542,20 +666,38 @@ module Google
542
666
  execute_or_queue_command(command, &block)
543
667
  end
544
668
 
545
- # Creates a message. Requires [service account authentication](https://
546
- # 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.
547
679
  # @param [String] parent
548
- # Required. Space resource name, in the form "spaces/*". Example: spaces/
549
- # AAAAAAAAAAA
680
+ # Required. The resource name of the space in which to create a message. Format:
681
+ # spaces/`space`
550
682
  # @param [Google::Apis::ChatV1::Message] message_object
683
+ # @param [String] message_id
684
+ # Optional. A custom name for a Chat message assigned at creation. Must start
685
+ # with `client-` and contain only lowercase letters, numbers, and hyphens up to
686
+ # 63 characters in length. Specify this field to get, update, or delete the
687
+ # message with the specified value. For example usage, see [Name a created
688
+ # message](https://developers.google.com/chat/api/guides/crudl/messages#
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.
551
693
  # @param [String] request_id
552
694
  # Optional. A unique request ID for this message. Specifying an existing request
553
695
  # ID returns the message created with that ID instead of creating a new message.
554
696
  # @param [String] thread_key
555
- # Optional. Opaque thread identifier. To start or add to a thread, create a
556
- # message and specify a `threadKey` instead of thread.name. (Setting thread.name
557
- # has no effect.) The first message with a given `threadKey` starts a new thread.
558
- # 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).
559
701
  # @param [String] fields
560
702
  # Selector specifying which fields to include in a partial response.
561
703
  # @param [String] quota_user
@@ -573,13 +715,15 @@ module Google
573
715
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
574
716
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
575
717
  # @raise [Google::Apis::AuthorizationError] Authorization is required
576
- def create_space_message(parent, message_object = 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)
577
719
  command = make_simple_command(:post, 'v1/{+parent}/messages', options)
578
720
  command.request_representation = Google::Apis::ChatV1::Message::Representation
579
721
  command.request_object = message_object
580
722
  command.response_representation = Google::Apis::ChatV1::Message::Representation
581
723
  command.response_class = Google::Apis::ChatV1::Message
582
724
  command.params['parent'] = parent unless parent.nil?
725
+ command.query['messageId'] = message_id unless message_id.nil?
726
+ command.query['messageReplyOption'] = message_reply_option unless message_reply_option.nil?
583
727
  command.query['requestId'] = request_id unless request_id.nil?
584
728
  command.query['threadKey'] = thread_key unless thread_key.nil?
585
729
  command.query['fields'] = fields unless fields.nil?
@@ -587,8 +731,16 @@ module Google
587
731
  execute_or_queue_command(command, &block)
588
732
  end
589
733
 
590
- # Deletes a message. Requires [service account authentication](https://
591
- # 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.
592
744
  # @param [String] name
593
745
  # Required. Resource name of the message to be deleted, in the form "spaces/*/
594
746
  # messages/*" Example: spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB
@@ -619,11 +771,24 @@ module Google
619
771
  execute_or_queue_command(command, &block)
620
772
  end
621
773
 
622
- # Returns a message. Requires [service account authentication](https://
623
- # 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.
624
785
  # @param [String] name
625
- # Required. Resource name of the message to be retrieved, in the form "spaces/*/
626
- # messages/*". Example: spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB
786
+ # Required. Resource name of the message to retrieve. Format: spaces/`space`/
787
+ # messages/`message` If the message begins with `client-`, then it has a custom
788
+ # name assigned by a Chat app that created it with the Chat REST API. That Chat
789
+ # app (but not others) can pass the custom name to get, update, or delete the
790
+ # message. To learn more, see [create and name a message] (https://developers.
791
+ # google.com/chat/api/guides/crudl/messages#name_a_created_message).
627
792
  # @param [String] fields
628
793
  # Selector specifying which fields to include in a partial response.
629
794
  # @param [String] quota_user
@@ -651,12 +816,79 @@ module Google
651
816
  execute_or_queue_command(command, &block)
652
817
  end
653
818
 
654
- # Updates a message. Requires [service account authentication](https://
655
- # 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.
656
883
  # @param [String] name
657
884
  # Resource name in the form `spaces/*/messages/*`. Example: `spaces/AAAAAAAAAAA/
658
885
  # messages/BBBBBBBBBBB.BBBBBBBBBBB`
659
886
  # @param [Google::Apis::ChatV1::Message] message_object
887
+ # @param [Boolean] allow_missing
888
+ # Optional. If `true` and the message is not found, a new message is created and
889
+ # `updateMask` is ignored. The specified message ID must be [client-assigned](
890
+ # https://developers.google.com/chat/api/guides/crudl/messages#
891
+ # name_a_created_message) or the request fails.
660
892
  # @param [String] update_mask
661
893
  # Required. The field paths to update. Separate multiple values with commas.
662
894
  # Currently supported field paths: - text - cards (Requires [service account
@@ -678,13 +910,14 @@ module Google
678
910
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
679
911
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
680
912
  # @raise [Google::Apis::AuthorizationError] Authorization is required
681
- def update_space_message(name, message_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
913
+ def update_space_message(name, message_object = nil, allow_missing: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
682
914
  command = make_simple_command(:put, 'v1/{+name}', options)
683
915
  command.request_representation = Google::Apis::ChatV1::Message::Representation
684
916
  command.request_object = message_object
685
917
  command.response_representation = Google::Apis::ChatV1::Message::Representation
686
918
  command.response_class = Google::Apis::ChatV1::Message
687
919
  command.params['name'] = name unless name.nil?
920
+ command.query['allowMissing'] = allow_missing unless allow_missing.nil?
688
921
  command.query['updateMask'] = update_mask unless update_mask.nil?
689
922
  command.query['fields'] = fields unless fields.nil?
690
923
  command.query['quotaUser'] = quota_user unless quota_user.nil?