google-apis-chat_v1 0.46.0 → 0.48.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/google/apis/chat_v1/classes.rb +422 -195
- data/lib/google/apis/chat_v1/gem_version.rb +3 -3
- data/lib/google/apis/chat_v1/representations.rb +4 -2
- data/lib/google/apis/chat_v1/service.rb +240 -79
- data/lib/google/apis/chat_v1.rb +18 -0
- metadata +5 -5
@@ -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.
|
57
|
-
#
|
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.
|
71
|
-
# message and specify a `threadKey`
|
72
|
-
#
|
73
|
-
#
|
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.
|
110
|
-
#
|
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.
|
124
|
-
# message and specify a `threadKey`
|
125
|
-
#
|
126
|
-
#
|
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.
|
163
|
-
#
|
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.
|
177
|
-
# message and specify a `threadKey`
|
178
|
-
#
|
179
|
-
#
|
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.
|
254
|
-
#
|
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.
|
268
|
-
# message and specify a `threadKey`
|
269
|
-
#
|
270
|
-
#
|
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.
|
307
|
-
#
|
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.
|
321
|
-
# message and specify a `threadKey`
|
322
|
-
#
|
323
|
-
#
|
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.
|
360
|
-
#
|
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.
|
374
|
-
# message and specify a `threadKey`
|
375
|
-
#
|
376
|
-
#
|
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 [
|
410
|
-
#
|
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 [
|
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.
|
446
|
-
#
|
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
|
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.
|
481
|
-
#
|
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.
|
495
|
-
# message and specify a `threadKey`
|
496
|
-
#
|
497
|
-
#
|
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
|
-
#
|
531
|
-
# developers.google.com/chat/api/
|
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
|
-
#
|
563
|
-
#
|
564
|
-
#
|
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
|
-
#
|
570
|
-
#
|
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
|
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,22 @@ module Google
|
|
599
666
|
execute_or_queue_command(command, &block)
|
600
667
|
end
|
601
668
|
|
602
|
-
# Creates a message.
|
603
|
-
# developers.google.com/chat/api/guides/
|
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. Because Chat provides
|
679
|
+
# authentication for [webhooks](https://developers.google.com/chat/how-tos/
|
680
|
+
# webhooks) as part of the URL that's generated when a webhook is registered,
|
681
|
+
# webhooks can create messages without a service account or user authentication.
|
604
682
|
# @param [String] parent
|
605
|
-
# Required.
|
606
|
-
#
|
683
|
+
# Required. The resource name of the space in which to create a message. Format:
|
684
|
+
# spaces/`space`
|
607
685
|
# @param [Google::Apis::ChatV1::Message] message_object
|
608
686
|
# @param [String] message_id
|
609
687
|
# Optional. A custom name for a Chat message assigned at creation. Must start
|
@@ -612,14 +690,17 @@ module Google
|
|
612
690
|
# message with the specified value. For example usage, see [Name a created
|
613
691
|
# message](https://developers.google.com/chat/api/guides/crudl/messages#
|
614
692
|
# name_a_created_message).
|
693
|
+
# @param [String] message_reply_option
|
694
|
+
# Optional. Specifies whether a message starts a thread or replies to one. Only
|
695
|
+
# supported in named spaces.
|
615
696
|
# @param [String] request_id
|
616
697
|
# Optional. A unique request ID for this message. Specifying an existing request
|
617
698
|
# ID returns the message created with that ID instead of creating a new message.
|
618
699
|
# @param [String] thread_key
|
619
|
-
# Optional.
|
620
|
-
# message and specify a `threadKey`
|
621
|
-
#
|
622
|
-
#
|
700
|
+
# Optional. Deprecated: Use thread.thread_key instead. Opaque thread identifier.
|
701
|
+
# To start or add to a thread, create a message and specify a `threadKey` or the
|
702
|
+
# thread.name. For example usage, see [Start or reply to a message thread](/chat/
|
703
|
+
# api/guides/crudl/messages#start_or_reply_to_a_message_thread).
|
623
704
|
# @param [String] fields
|
624
705
|
# Selector specifying which fields to include in a partial response.
|
625
706
|
# @param [String] quota_user
|
@@ -637,7 +718,7 @@ module Google
|
|
637
718
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
638
719
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
639
720
|
# @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)
|
721
|
+
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
722
|
command = make_simple_command(:post, 'v1/{+parent}/messages', options)
|
642
723
|
command.request_representation = Google::Apis::ChatV1::Message::Representation
|
643
724
|
command.request_object = message_object
|
@@ -645,6 +726,7 @@ module Google
|
|
645
726
|
command.response_class = Google::Apis::ChatV1::Message
|
646
727
|
command.params['parent'] = parent unless parent.nil?
|
647
728
|
command.query['messageId'] = message_id unless message_id.nil?
|
729
|
+
command.query['messageReplyOption'] = message_reply_option unless message_reply_option.nil?
|
648
730
|
command.query['requestId'] = request_id unless request_id.nil?
|
649
731
|
command.query['threadKey'] = thread_key unless thread_key.nil?
|
650
732
|
command.query['fields'] = fields unless fields.nil?
|
@@ -652,8 +734,16 @@ module Google
|
|
652
734
|
execute_or_queue_command(command, &block)
|
653
735
|
end
|
654
736
|
|
655
|
-
# Deletes a message.
|
656
|
-
# developers.google.com/chat/api/guides/
|
737
|
+
# Deletes a message. For example usage, see [Delete a message](https://
|
738
|
+
# developers.google.com/chat/api/guides/crudl/messages#delete_a_message).
|
739
|
+
# Requires [authentication](https://developers.google.com/chat/api/guides/auth).
|
740
|
+
# Fully supports [service account authentication](https://developers.google.com/
|
741
|
+
# chat/api/guides/auth/service-accounts). Supports [user authentication](https://
|
742
|
+
# developers.google.com/chat/api/guides/auth/users) as part of the [Google
|
743
|
+
# Workspace Developer Preview Program](https://developers.google.com/workspace/
|
744
|
+
# preview), which grants early access to certain features. [User authentication](
|
745
|
+
# https://developers.google.com/chat/api/guides/auth/users) requires the `chat.
|
746
|
+
# messages` authorization scope.
|
657
747
|
# @param [String] name
|
658
748
|
# Required. Resource name of the message to be deleted, in the form "spaces/*/
|
659
749
|
# messages/*" Example: spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB
|
@@ -684,8 +774,17 @@ module Google
|
|
684
774
|
execute_or_queue_command(command, &block)
|
685
775
|
end
|
686
776
|
|
687
|
-
# Returns a message.
|
688
|
-
#
|
777
|
+
# Returns a message. For example usage, see [Read a message](https://developers.
|
778
|
+
# google.com/chat/api/guides/crudl/messages#read_a_message). Requires [
|
779
|
+
# authentication](https://developers.google.com/chat/api/guides/auth). Fully
|
780
|
+
# supports [Service account authentication](https://developers.google.com/chat/
|
781
|
+
# api/guides/auth/service-accounts). Supports [user authentication](https://
|
782
|
+
# developers.google.com/chat/api/guides/auth/users) as part of the [Google
|
783
|
+
# Workspace Developer Preview Program](https://developers.google.com/workspace/
|
784
|
+
# preview), which grants early access to certain features. [User authentication](
|
785
|
+
# https://developers.google.com/chat/api/guides/auth/users) requires the `chat.
|
786
|
+
# messages` or `chat.messages.readonly` authorization scope. Note: Might return
|
787
|
+
# a message from a blocked member or space.
|
689
788
|
# @param [String] name
|
690
789
|
# Required. Resource name of the message to retrieve. Format: spaces/`space`/
|
691
790
|
# messages/`message` If the message begins with `client-`, then it has a custom
|
@@ -720,8 +819,70 @@ module Google
|
|
720
819
|
execute_or_queue_command(command, &block)
|
721
820
|
end
|
722
821
|
|
723
|
-
# Updates a message.
|
724
|
-
# developers.google.com/chat/api/guides/
|
822
|
+
# Updates a message. For example usage, see [Update a message](https://
|
823
|
+
# developers.google.com/chat/api/guides/crudl/messages#update_a_message).
|
824
|
+
# Requires [authentication](https://developers.google.com/chat/api/guides/auth/).
|
825
|
+
# Fully supports [service account authentication](https://developers.google.com/
|
826
|
+
# chat/api/guides/auth/service-accounts). Supports [user authentication](https://
|
827
|
+
# developers.google.com/chat/api/guides/auth/users) as part of the [Google
|
828
|
+
# Workspace Developer Preview Program](https://developers.google.com/workspace/
|
829
|
+
# preview), which grants early access to certain features. [User authentication](
|
830
|
+
# https://developers.google.com/chat/api/guides/auth/users) requires the `chat.
|
831
|
+
# messages` authorization scope.
|
832
|
+
# @param [String] name
|
833
|
+
# Resource name in the form `spaces/*/messages/*`. Example: `spaces/AAAAAAAAAAA/
|
834
|
+
# messages/BBBBBBBBBBB.BBBBBBBBBBB`
|
835
|
+
# @param [Google::Apis::ChatV1::Message] message_object
|
836
|
+
# @param [Boolean] allow_missing
|
837
|
+
# Optional. If `true` and the message is not found, a new message is created and
|
838
|
+
# `updateMask` is ignored. The specified message ID must be [client-assigned](
|
839
|
+
# https://developers.google.com/chat/api/guides/crudl/messages#
|
840
|
+
# name_a_created_message) or the request fails.
|
841
|
+
# @param [String] update_mask
|
842
|
+
# Required. The field paths to update. Separate multiple values with commas.
|
843
|
+
# Currently supported field paths: - text - cards (Requires [service account
|
844
|
+
# authentication](/chat/api/guides/auth/service-accounts).) - cards_v2
|
845
|
+
# @param [String] fields
|
846
|
+
# Selector specifying which fields to include in a partial response.
|
847
|
+
# @param [String] quota_user
|
848
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
849
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
850
|
+
# @param [Google::Apis::RequestOptions] options
|
851
|
+
# Request-specific options
|
852
|
+
#
|
853
|
+
# @yield [result, err] Result & error if block supplied
|
854
|
+
# @yieldparam result [Google::Apis::ChatV1::Message] parsed result object
|
855
|
+
# @yieldparam err [StandardError] error object if request failed
|
856
|
+
#
|
857
|
+
# @return [Google::Apis::ChatV1::Message]
|
858
|
+
#
|
859
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
860
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
861
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
862
|
+
def patch_space_message(name, message_object = nil, allow_missing: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
863
|
+
command = make_simple_command(:patch, 'v1/{+name}', options)
|
864
|
+
command.request_representation = Google::Apis::ChatV1::Message::Representation
|
865
|
+
command.request_object = message_object
|
866
|
+
command.response_representation = Google::Apis::ChatV1::Message::Representation
|
867
|
+
command.response_class = Google::Apis::ChatV1::Message
|
868
|
+
command.params['name'] = name unless name.nil?
|
869
|
+
command.query['allowMissing'] = allow_missing unless allow_missing.nil?
|
870
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
871
|
+
command.query['fields'] = fields unless fields.nil?
|
872
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
873
|
+
execute_or_queue_command(command, &block)
|
874
|
+
end
|
875
|
+
|
876
|
+
# Updates a message. For example usage, see [Update a message](https://
|
877
|
+
# developers.google.com/chat/api/guides/crudl/messages#update_a_message).
|
878
|
+
# Requires [authentication](https://developers.google.com/chat/api/guides/auth/).
|
879
|
+
# Fully supports [service account authentication](https://developers.google.com/
|
880
|
+
# chat/api/guides/auth/service-accounts). Supports [user authentication](https://
|
881
|
+
# developers.google.com/chat/api/guides/auth/users) as part of the [Google
|
882
|
+
# Workspace Developer Preview Program](https://developers.google.com/workspace/
|
883
|
+
# preview), which grants early access to certain features. [User authentication](
|
884
|
+
# https://developers.google.com/chat/api/guides/auth/users) requires the `chat.
|
885
|
+
# messages` authorization scope.
|
725
886
|
# @param [String] name
|
726
887
|
# Resource name in the form `spaces/*/messages/*`. Example: `spaces/AAAAAAAAAAA/
|
727
888
|
# messages/BBBBBBBBBBB.BBBBBBBBBBB`
|