google-apis-chat_v1 0.90.0 → 0.92.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 +8 -0
- data/lib/google/apis/chat_v1/classes.rb +536 -434
- data/lib/google/apis/chat_v1/gem_version.rb +2 -2
- data/lib/google/apis/chat_v1/representations.rb +28 -0
- data/lib/google/apis/chat_v1/service.rb +396 -221
- data/lib/google/apis/chat_v1.rb +6 -0
- metadata +3 -3
@@ -91,12 +91,12 @@ module Google
|
|
91
91
|
end
|
92
92
|
|
93
93
|
# Uploads an attachment. For an example, see [Upload media as a file attachment](
|
94
|
-
# https://developers.google.com/chat/
|
95
|
-
# Requires user [authentication](https://developers.google.com/chat/
|
96
|
-
#
|
97
|
-
# t supported. For details, see [File types blocked by
|
98
|
-
# support.google.com/chat/answer/7651457?&co=GENIE.Platform%
|
99
|
-
# 20types%20blocked%20in%20Google%20Chat).
|
94
|
+
# https://developers.google.com/workspace/chat/upload-media-attachments).
|
95
|
+
# Requires user [authentication](https://developers.google.com/workspace/chat/
|
96
|
+
# authenticate-authorize-chat-user). You can upload attachments up to 200 MB.
|
97
|
+
# Certain file types aren't supported. For details, see [File types blocked by
|
98
|
+
# Google Chat](https://support.google.com/chat/answer/7651457?&co=GENIE.Platform%
|
99
|
+
# 3DDesktop#File%20types%20blocked%20in%20Google%20Chat).
|
100
100
|
# @param [String] parent
|
101
101
|
# Required. Resource name of the Chat space in which the attachment is uploaded.
|
102
102
|
# Format "spaces/`space`".
|
@@ -140,11 +140,11 @@ module Google
|
|
140
140
|
execute_or_queue_command(command, &block)
|
141
141
|
end
|
142
142
|
|
143
|
-
# Completes the [import process](https://developers.google.com/chat/
|
143
|
+
# Completes the [import process](https://developers.google.com/workspace/chat/
|
144
144
|
# import-data) for the specified space and makes it visible to users. Requires
|
145
145
|
# app authentication and domain-wide delegation. For more information, see [
|
146
|
-
# Authorize Google Chat apps to import data](https://developers.google.com/
|
147
|
-
#
|
146
|
+
# Authorize Google Chat apps to import data](https://developers.google.com/
|
147
|
+
# workspace/chat/authorize-import).
|
148
148
|
# @param [String] name
|
149
149
|
# Required. Resource name of the import mode space. Format: `spaces/`space``
|
150
150
|
# @param [Google::Apis::ChatV1::CompleteImportSpaceRequest] complete_import_space_request_object
|
@@ -178,11 +178,12 @@ module Google
|
|
178
178
|
end
|
179
179
|
|
180
180
|
# Creates a named space. Spaces grouped by topics aren't supported. For an
|
181
|
-
# example, see [Create a space](https://developers.google.com/chat/
|
182
|
-
# spaces
|
181
|
+
# example, see [Create a space](https://developers.google.com/workspace/chat/
|
182
|
+
# create-spaces). If you receive the error message `ALREADY_EXISTS` when
|
183
183
|
# creating a space, try a different `displayName`. An existing space within the
|
184
184
|
# Google Workspace organization might already use this display name. Requires [
|
185
|
-
# user authentication](https://developers.google.com/chat/
|
185
|
+
# user authentication](https://developers.google.com/workspace/chat/authenticate-
|
186
|
+
# authorize-chat-user).
|
186
187
|
# @param [Google::Apis::ChatV1::Space] space_object
|
187
188
|
# @param [String] request_id
|
188
189
|
# Optional. A unique identifier for this request. A random UUID is recommended.
|
@@ -221,9 +222,9 @@ module Google
|
|
221
222
|
# Deletes a named space. Always performs a cascading delete, which means that
|
222
223
|
# the space's child resources—like messages posted in the space and memberships
|
223
224
|
# in the space—are also deleted. For an example, see [Delete a space](https://
|
224
|
-
# developers.google.com/chat/
|
225
|
-
# authentication](https://developers.google.com/chat/
|
226
|
-
# a user who has permission to delete the space.
|
225
|
+
# developers.google.com/workspace/chat/delete-spaces). Requires [user
|
226
|
+
# authentication](https://developers.google.com/workspace/chat/authenticate-
|
227
|
+
# authorize-chat-user) from a user who has permission to delete the space.
|
227
228
|
# @param [String] name
|
228
229
|
# Required. Resource name of the space to delete. Format: `spaces/`space``
|
229
230
|
# @param [String] fields
|
@@ -256,14 +257,14 @@ module Google
|
|
256
257
|
# Returns the existing direct message with the specified user. If no direct
|
257
258
|
# message space is found, returns a `404 NOT_FOUND` error. For an example, see [
|
258
259
|
# Find a direct message](/chat/api/guides/v1/spaces/find-direct-message). With [
|
259
|
-
# user authentication](https://developers.google.com/chat/
|
260
|
-
# returns the direct message space between the specified
|
261
|
-
# authenticated user. With [app authentication](https://developers.
|
262
|
-
#
|
263
|
-
# between the specified user and the calling Chat app. Requires [
|
264
|
-
# authentication](https://developers.google.com/chat/
|
265
|
-
# app authentication](https://developers.google.com/
|
266
|
-
#
|
260
|
+
# user authentication](https://developers.google.com/workspace/chat/authenticate-
|
261
|
+
# authorize-chat-user), returns the direct message space between the specified
|
262
|
+
# user and the authenticated user. With [app authentication](https://developers.
|
263
|
+
# google.com/workspace/chat/authenticate-authorize-chat-app), returns the direct
|
264
|
+
# message space between the specified user and the calling Chat app. Requires [
|
265
|
+
# user authentication](https://developers.google.com/workspace/chat/authenticate-
|
266
|
+
# authorize-chat-user) or [app authentication](https://developers.google.com/
|
267
|
+
# workspace/chat/authenticate-authorize-chat-app).
|
267
268
|
# @param [String] name
|
268
269
|
# Required. Resource name of the user to find direct message with. Format: `
|
269
270
|
# users/`user``, where ``user`` is either the `id` for the [person](https://
|
@@ -272,9 +273,9 @@ module Google
|
|
272
273
|
# rest/v1/users) in the Directory API. For example, if the People API profile ID
|
273
274
|
# is `123456789`, you can find a direct message with that person by using `users/
|
274
275
|
# 123456789` as the `name`. When [authenticated as a user](https://developers.
|
275
|
-
# google.com/chat/
|
276
|
-
#
|
277
|
-
# the email of the Google Chat user.
|
276
|
+
# google.com/workspace/chat/authenticate-authorize-chat-user), you can use the
|
277
|
+
# email as an alias for ``user``. For example, `users/example@gmail.com` where `
|
278
|
+
# example@gmail.com` is the email of the Google Chat user.
|
278
279
|
# @param [String] fields
|
279
280
|
# Selector specifying which fields to include in a partial response.
|
280
281
|
# @param [String] quota_user
|
@@ -302,12 +303,12 @@ module Google
|
|
302
303
|
execute_or_queue_command(command, &block)
|
303
304
|
end
|
304
305
|
|
305
|
-
# Returns details about a space. For an example, see [Get a space](
|
306
|
-
# developers.google.com/chat/
|
307
|
-
# (https://developers.google.com/chat/
|
308
|
-
# authentication](https://developers.google.com/
|
309
|
-
#
|
310
|
-
#
|
306
|
+
# Returns details about a space. For an example, see [Get details about a space](
|
307
|
+
# https://developers.google.com/workspace/chat/get-spaces). Requires [
|
308
|
+
# authentication](https://developers.google.com/workspace/chat/authenticate-
|
309
|
+
# authorize). Supports [app authentication](https://developers.google.com/
|
310
|
+
# workspace/chat/authenticate-authorize-chat-app) and [user authentication](
|
311
|
+
# https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
311
312
|
# @param [String] name
|
312
313
|
# Required. Resource name of the space, in the form "spaces/*". Format: `spaces/`
|
313
314
|
# space``
|
@@ -340,21 +341,22 @@ module Google
|
|
340
341
|
|
341
342
|
# Lists spaces the caller is a member of. Group chats and DMs aren't listed
|
342
343
|
# until the first message is sent. For an example, see [List spaces](https://
|
343
|
-
# developers.google.com/chat/
|
344
|
-
#
|
345
|
-
# app authentication](https://developers.google.com/chat/
|
346
|
-
#
|
347
|
-
#
|
348
|
-
# Group chats and DMs aren't listed until the
|
344
|
+
# developers.google.com/workspace/chat/list-spaces). Requires [authentication](
|
345
|
+
# https://developers.google.com/workspace/chat/authenticate-authorize). Supports
|
346
|
+
# [app authentication](https://developers.google.com/workspace/chat/authenticate-
|
347
|
+
# authorize-chat-app) and [user authentication](https://developers.google.com/
|
348
|
+
# workspace/chat/authenticate-authorize-chat-user). Lists spaces visible to the
|
349
|
+
# caller or authenticated user. Group chats and DMs aren't listed until the
|
350
|
+
# first message is sent.
|
349
351
|
# @param [String] filter
|
350
352
|
# Optional. A query filter. You can filter spaces by the space type ([`
|
351
|
-
# space_type`](https://developers.google.com/chat/api/reference/rest/
|
352
|
-
# spacetype)). To filter by space type, you must specify valid enum
|
353
|
-
# as `SPACE` or `GROUP_CHAT` (the `space_type` can't be `
|
354
|
-
# . To query for multiple space types, use the `OR`
|
355
|
-
# following queries are valid: ``` space_type = "
|
356
|
-
# OR spaceType = "DIRECT_MESSAGE" ``` Invalid
|
357
|
-
# with an `INVALID_ARGUMENT` error.
|
353
|
+
# space_type`](https://developers.google.com/workspace/chat/api/reference/rest/
|
354
|
+
# v1/spaces#spacetype)). To filter by space type, you must specify valid enum
|
355
|
+
# value, such as `SPACE` or `GROUP_CHAT` (the `space_type` can't be `
|
356
|
+
# SPACE_TYPE_UNSPECIFIED`). To query for multiple space types, use the `OR`
|
357
|
+
# operator. For example, the following queries are valid: ``` space_type = "
|
358
|
+
# SPACE" spaceType = "GROUP_CHAT" OR spaceType = "DIRECT_MESSAGE" ``` Invalid
|
359
|
+
# queries are rejected by the server with an `INVALID_ARGUMENT` error.
|
358
360
|
# @param [Fixnum] page_size
|
359
361
|
# Optional. The maximum number of spaces to return. The service might return
|
360
362
|
# fewer than this value. If unspecified, at most 100 spaces are returned. The
|
@@ -395,11 +397,11 @@ module Google
|
|
395
397
|
end
|
396
398
|
|
397
399
|
# Updates a space. For an example, see [Update a space](https://developers.
|
398
|
-
# google.com/chat/
|
399
|
-
#
|
400
|
-
#
|
401
|
-
#
|
402
|
-
#
|
400
|
+
# google.com/workspace/chat/update-spaces). If you're updating the `displayName`
|
401
|
+
# field and receive the error message `ALREADY_EXISTS`, try a different display
|
402
|
+
# name.. An existing space within the Google Workspace organization might
|
403
|
+
# already use this display name. Requires [user authentication](https://
|
404
|
+
# developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
403
405
|
# @param [String] name
|
404
406
|
# Resource name of the space. Format: `spaces/`space``
|
405
407
|
# @param [Google::Apis::ChatV1::Space] space_object
|
@@ -459,32 +461,32 @@ module Google
|
|
459
461
|
|
460
462
|
# Creates a space and adds specified users to it. The calling user is
|
461
463
|
# automatically added to the space, and shouldn't be specified as a membership
|
462
|
-
# in the request. For an example, see [Set up a space](
|
463
|
-
# com/chat/
|
464
|
-
# add memberships with the appropriate `member.name` in
|
465
|
-
# To add a human user, use `users/`user``, where ``user
|
466
|
-
# address for the user. For users in the same Workspace
|
467
|
-
# can also be the `id` for the person from the People API,
|
468
|
-
# user in the Directory API. For example, if the People API
|
469
|
-
# for `user@example.com` is `123456789`, you can add the user
|
470
|
-
# setting the `membership.member.name` to `users/user@example.
|
471
|
-
# 123456789`. For a space or group chat, if the caller blocks or
|
472
|
-
# some members, then those members aren't added to the created
|
473
|
-
# a direct message (DM) between the calling user and another
|
474
|
-
# exactly one membership to represent the human user. If one
|
475
|
-
# other, the request fails and the DM isn't created. To create a
|
476
|
-
# calling user and the calling app, set `Space.singleUserBotDm`
|
477
|
-
# don't specify any memberships. You can only use this method to
|
478
|
-
# with the calling app. To add the calling app as a member of a
|
479
|
-
# existing DM between two human users, see [
|
480
|
-
# developers.google.com/chat/
|
481
|
-
# exists between two users, even when one user blocks the other
|
482
|
-
# request is made, then the existing DM is returned. Spaces with
|
483
|
-
# replies aren't supported. If you receive the error message `
|
484
|
-
# when setting up a space, try a different `displayName`. An
|
485
|
-
# within the Google Workspace organization might already use this
|
486
|
-
# Requires [user authentication](https://developers.google.com/
|
487
|
-
#
|
464
|
+
# in the request. For an example, see [Set up a space with initial members](
|
465
|
+
# https://developers.google.com/workspace/chat/set-up-spaces). To specify the
|
466
|
+
# human members to add, add memberships with the appropriate `member.name` in
|
467
|
+
# the `SetUpSpaceRequest`. To add a human user, use `users/`user``, where ``user`
|
468
|
+
# ` can be the email address for the user. For users in the same Workspace
|
469
|
+
# organization ``user`` can also be the `id` for the person from the People API,
|
470
|
+
# or the `id` for the user in the Directory API. For example, if the People API
|
471
|
+
# Person profile ID for `user@example.com` is `123456789`, you can add the user
|
472
|
+
# to the space by setting the `membership.member.name` to `users/user@example.
|
473
|
+
# com` or `users/123456789`. For a space or group chat, if the caller blocks or
|
474
|
+
# is blocked by some members, then those members aren't added to the created
|
475
|
+
# space. To create a direct message (DM) between the calling user and another
|
476
|
+
# human user, specify exactly one membership to represent the human user. If one
|
477
|
+
# user blocks the other, the request fails and the DM isn't created. To create a
|
478
|
+
# DM between the calling user and the calling app, set `Space.singleUserBotDm`
|
479
|
+
# to `true` and don't specify any memberships. You can only use this method to
|
480
|
+
# set up a DM with the calling app. To add the calling app as a member of a
|
481
|
+
# space or an existing DM between two human users, see [Invite or add a user or
|
482
|
+
# app to a space](https://developers.google.com/workspace/chat/create-members).
|
483
|
+
# If a DM already exists between two users, even when one user blocks the other
|
484
|
+
# at the time a request is made, then the existing DM is returned. Spaces with
|
485
|
+
# threaded replies aren't supported. If you receive the error message `
|
486
|
+
# ALREADY_EXISTS` when setting up a space, try a different `displayName`. An
|
487
|
+
# existing space within the Google Workspace organization might already use this
|
488
|
+
# display name. Requires [user authentication](https://developers.google.com/
|
489
|
+
# workspace/chat/authenticate-authorize-chat-user).
|
488
490
|
# @param [Google::Apis::ChatV1::SetUpSpaceRequest] set_up_space_request_object
|
489
491
|
# @param [String] fields
|
490
492
|
# Selector specifying which fields to include in a partial response.
|
@@ -515,22 +517,23 @@ module Google
|
|
515
517
|
end
|
516
518
|
|
517
519
|
# Creates a human membership or app membership for the calling app. Creating
|
518
|
-
# memberships for other apps isn't supported. For an example, see [
|
519
|
-
#
|
520
|
-
# When creating a membership, if the specified
|
521
|
-
# policy turned off, then they're invited, and must
|
522
|
-
# before joining. Otherwise, creating a membership
|
523
|
-
# the specified space. Requires [user authentication]
|
524
|
-
# com/chat/
|
525
|
-
# membership.member.name` in the `
|
526
|
-
# app to a space or a direct
|
527
|
-
#
|
528
|
-
#
|
529
|
-
#
|
530
|
-
#
|
531
|
-
#
|
532
|
-
#
|
533
|
-
# user@example.com` or `
|
520
|
+
# memberships for other apps isn't supported. For an example, see [Invite or add
|
521
|
+
# a user or a Google Chat app to a space](https://developers.google.com/
|
522
|
+
# workspace/chat/create-members). When creating a membership, if the specified
|
523
|
+
# member has their auto-accept policy turned off, then they're invited, and must
|
524
|
+
# accept the space invitation before joining. Otherwise, creating a membership
|
525
|
+
# adds the member directly to the specified space. Requires [user authentication]
|
526
|
+
# (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
527
|
+
# . To specify the member to add, set the `membership.member.name` in the `
|
528
|
+
# CreateMembershipRequest`: - To add the calling app to a space or a direct
|
529
|
+
# message between two human users, use `users/app`. Unable to add other apps to
|
530
|
+
# the space. - To add a human user, use `users/`user``, where ``user`` can be
|
531
|
+
# the email address for the user. For users in the same Workspace organization ``
|
532
|
+
# user`` can also be the `id` for the person from the People API, or the `id`
|
533
|
+
# for the user in the Directory API. For example, if the People API Person
|
534
|
+
# profile ID for `user@example.com` is `123456789`, you can add the user to the
|
535
|
+
# space by setting the `membership.member.name` to `users/user@example.com` or `
|
536
|
+
# users/123456789`.
|
534
537
|
# @param [String] parent
|
535
538
|
# Required. The resource name of the space for which to create the membership.
|
536
539
|
# Format: spaces/`space`
|
@@ -564,9 +567,10 @@ module Google
|
|
564
567
|
execute_or_queue_command(command, &block)
|
565
568
|
end
|
566
569
|
|
567
|
-
# Deletes a membership. For an example, see [
|
568
|
-
# developers.google.com/chat/
|
569
|
-
# authentication](https://developers.google.com/chat/
|
570
|
+
# Deletes a membership. For an example, see [Remove a user or a Google Chat app
|
571
|
+
# from a space](https://developers.google.com/workspace/chat/delete-members).
|
572
|
+
# Requires [user authentication](https://developers.google.com/workspace/chat/
|
573
|
+
# authenticate-authorize-chat-user).
|
570
574
|
# @param [String] name
|
571
575
|
# Required. Resource name of the membership to delete. Chat apps can delete
|
572
576
|
# human users' or their own memberships. Chat apps can't delete other apps'
|
@@ -604,20 +608,23 @@ module Google
|
|
604
608
|
execute_or_queue_command(command, &block)
|
605
609
|
end
|
606
610
|
|
607
|
-
# Returns details about a membership. For an example, see [Get a
|
608
|
-
# https://developers.google.com/
|
609
|
-
#
|
610
|
-
#
|
611
|
-
#
|
612
|
-
#
|
611
|
+
# Returns details about a membership. For an example, see [Get details about a
|
612
|
+
# user's or Google Chat app's membership](https://developers.google.com/
|
613
|
+
# workspace/chat/get-members). Requires [authentication](https://developers.
|
614
|
+
# google.com/workspace/chat/authenticate-authorize). Supports [app
|
615
|
+
# authentication](https://developers.google.com/workspace/chat/authenticate-
|
616
|
+
# authorize-chat-app) and [user authentication](https://developers.google.com/
|
617
|
+
# workspace/chat/authenticate-authorize-chat-user).
|
613
618
|
# @param [String] name
|
614
619
|
# Required. Resource name of the membership to retrieve. To get the app's own
|
615
|
-
# membership
|
616
|
-
#
|
617
|
-
#
|
618
|
-
#
|
619
|
-
#
|
620
|
-
# email
|
620
|
+
# membership [by using user authentication](https://developers.google.com/
|
621
|
+
# workspace/chat/authenticate-authorize-chat-user), you can optionally use `
|
622
|
+
# spaces/`space`/members/app`. Format: `spaces/`space`/members/`member`` or `
|
623
|
+
# spaces/`space`/members/app` When [authenticated as a user](https://developers.
|
624
|
+
# google.com/workspace/chat/authenticate-authorize-chat-user), you can use the
|
625
|
+
# user's email as an alias for ``member``. For example, `spaces/`space`/members/
|
626
|
+
# example@gmail.com` where `example@gmail.com` is the email of the Google Chat
|
627
|
+
# user.
|
621
628
|
# @param [String] fields
|
622
629
|
# Selector specifying which fields to include in a partial response.
|
623
630
|
# @param [String] quota_user
|
@@ -645,33 +652,34 @@ module Google
|
|
645
652
|
execute_or_queue_command(command, &block)
|
646
653
|
end
|
647
654
|
|
648
|
-
# Lists memberships in a space. For an example, see [List
|
649
|
-
# developers.google.com/chat/
|
650
|
-
# with [app authentication](https://developers.google.com/
|
651
|
-
#
|
652
|
-
#
|
653
|
-
# [User authentication](https://developers.
|
654
|
-
# lists memberships
|
655
|
-
# Requires [authentication](
|
656
|
-
#
|
657
|
-
#
|
658
|
-
# chat
|
655
|
+
# Lists memberships in a space. For an example, see [List users and Google Chat
|
656
|
+
# apps in a space](https://developers.google.com/workspace/chat/list-members).
|
657
|
+
# Listing memberships with [app authentication](https://developers.google.com/
|
658
|
+
# workspace/chat/authenticate-authorize-chat-app) lists memberships in spaces
|
659
|
+
# that the Chat app has access to, but excludes Chat app memberships, including
|
660
|
+
# its own. Listing memberships with [User authentication](https://developers.
|
661
|
+
# google.com/workspace/chat/authenticate-authorize-chat-user) lists memberships
|
662
|
+
# in spaces that the authenticated user has access to. Requires [authentication](
|
663
|
+
# https://developers.google.com/workspace/chat/authenticate-authorize). Supports
|
664
|
+
# [app authentication](https://developers.google.com/workspace/chat/authenticate-
|
665
|
+
# authorize-chat-app) and [user authentication](https://developers.google.com/
|
666
|
+
# workspace/chat/authenticate-authorize-chat-user).
|
659
667
|
# @param [String] parent
|
660
668
|
# Required. The resource name of the space for which to fetch a membership list.
|
661
669
|
# Format: spaces/`space`
|
662
670
|
# @param [String] filter
|
663
671
|
# Optional. A query filter. You can filter memberships by a member's role ([`
|
664
|
-
# role`](https://developers.google.com/chat/api/reference/rest/v1/
|
665
|
-
# membershiprole)) and type ([`member.type`](https://developers.
|
666
|
-
# api/reference/rest/v1/User#type)). To filter by role,
|
667
|
-
# ROLE_MEMBER` or `ROLE_MANAGER`. To filter by type, set `member.
|
668
|
-
# or `BOT`. To filter by both role and type, use the `AND`
|
669
|
-
# by either role or type, use the `OR` operator. For example,
|
670
|
-
# queries are valid: ``` role = "ROLE_MANAGER" OR role = "
|
671
|
-
# type = "HUMAN" AND role = "ROLE_MANAGER" ``` The following
|
672
|
-
# ``` member.type = "HUMAN" AND member.type = "BOT" role = "
|
673
|
-
# role = "ROLE_MEMBER" ``` Invalid queries are rejected by the
|
674
|
-
# INVALID_ARGUMENT` error.
|
672
|
+
# role`](https://developers.google.com/workspace/chat/api/reference/rest/v1/
|
673
|
+
# spaces.members#membershiprole)) and type ([`member.type`](https://developers.
|
674
|
+
# google.com/workspace/chat/api/reference/rest/v1/User#type)). To filter by role,
|
675
|
+
# set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`. To filter by type, set `member.
|
676
|
+
# type` to `HUMAN` or `BOT`. To filter by both role and type, use the `AND`
|
677
|
+
# operator. To filter by either role or type, use the `OR` operator. For example,
|
678
|
+
# the following queries are valid: ``` role = "ROLE_MANAGER" OR role = "
|
679
|
+
# ROLE_MEMBER" member.type = "HUMAN" AND role = "ROLE_MANAGER" ``` The following
|
680
|
+
# queries are invalid: ``` member.type = "HUMAN" AND member.type = "BOT" role = "
|
681
|
+
# ROLE_MANAGER" AND role = "ROLE_MEMBER" ``` Invalid queries are rejected by the
|
682
|
+
# server with an `INVALID_ARGUMENT` error.
|
675
683
|
# @param [Fixnum] page_size
|
676
684
|
# Optional. The maximum number of memberships to return. The service might
|
677
685
|
# return fewer than this value. If unspecified, at most 100 memberships are
|
@@ -692,8 +700,8 @@ module Google
|
|
692
700
|
# Optional. When `true`, also returns memberships associated with invited
|
693
701
|
# members, in addition to other types of memberships. If a filter is set,
|
694
702
|
# invited memberships that don't match the filter criteria aren't returned.
|
695
|
-
# Currently requires [user authentication](https://developers.google.com/
|
696
|
-
#
|
703
|
+
# Currently requires [user authentication](https://developers.google.com/
|
704
|
+
# workspace/chat/authenticate-authorize-chat-user).
|
697
705
|
# @param [String] fields
|
698
706
|
# Selector specifying which fields to include in a partial response.
|
699
707
|
# @param [String] quota_user
|
@@ -726,10 +734,50 @@ module Google
|
|
726
734
|
execute_or_queue_command(command, &block)
|
727
735
|
end
|
728
736
|
|
729
|
-
#
|
730
|
-
#
|
731
|
-
#
|
732
|
-
#
|
737
|
+
# Updates a membership. Requires [user authentication](https://developers.google.
|
738
|
+
# com/workspace/chat/authenticate-authorize-chat-user).
|
739
|
+
# @param [String] name
|
740
|
+
# Resource name of the membership, assigned by the server. Format: `spaces/`
|
741
|
+
# space`/members/`member``
|
742
|
+
# @param [Google::Apis::ChatV1::Membership] membership_object
|
743
|
+
# @param [String] update_mask
|
744
|
+
# Required. The field paths to update. Separate multiple values with commas or
|
745
|
+
# use `*` to update all field paths. Currently supported field paths: - `role`
|
746
|
+
# @param [String] fields
|
747
|
+
# Selector specifying which fields to include in a partial response.
|
748
|
+
# @param [String] quota_user
|
749
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
750
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
751
|
+
# @param [Google::Apis::RequestOptions] options
|
752
|
+
# Request-specific options
|
753
|
+
#
|
754
|
+
# @yield [result, err] Result & error if block supplied
|
755
|
+
# @yieldparam result [Google::Apis::ChatV1::Membership] parsed result object
|
756
|
+
# @yieldparam err [StandardError] error object if request failed
|
757
|
+
#
|
758
|
+
# @return [Google::Apis::ChatV1::Membership]
|
759
|
+
#
|
760
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
761
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
762
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
763
|
+
def patch_space_member(name, membership_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
764
|
+
command = make_simple_command(:patch, 'v1/{+name}', options)
|
765
|
+
command.request_representation = Google::Apis::ChatV1::Membership::Representation
|
766
|
+
command.request_object = membership_object
|
767
|
+
command.response_representation = Google::Apis::ChatV1::Membership::Representation
|
768
|
+
command.response_class = Google::Apis::ChatV1::Membership
|
769
|
+
command.params['name'] = name unless name.nil?
|
770
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
771
|
+
command.query['fields'] = fields unless fields.nil?
|
772
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
773
|
+
execute_or_queue_command(command, &block)
|
774
|
+
end
|
775
|
+
|
776
|
+
# Creates a message in a Google Chat space. The maximum message size, including
|
777
|
+
# text and cards, is 32,000 bytes. For an example, see [Send a message](https://
|
778
|
+
# developers.google.com/workspace/chat/create-messages). Calling this method
|
779
|
+
# requires [authentication](https://developers.google.com/workspace/chat/
|
780
|
+
# authenticate-authorize) and supports the following authentication types: - For
|
733
781
|
# text messages, user authentication or app authentication are supported. - For
|
734
782
|
# card messages, only app authentication is supported. (Only Chat apps can
|
735
783
|
# create card messages.)
|
@@ -746,7 +794,7 @@ module Google
|
|
746
794
|
# Contains up to 63 characters and only lowercase letters, numbers, and hyphens.
|
747
795
|
# * Is unique within a space. A Chat app can't use the same custom ID for
|
748
796
|
# different messages. For details, see [Name a message](https://developers.
|
749
|
-
# google.com/chat/
|
797
|
+
# google.com/workspace/chat/create-messages#name_a_created_message).
|
750
798
|
# @param [String] message_reply_option
|
751
799
|
# Optional. Specifies whether a message starts a thread or replies to one. Only
|
752
800
|
# supported in named spaces.
|
@@ -757,8 +805,8 @@ module Google
|
|
757
805
|
# Optional. Deprecated: Use thread.thread_key instead. ID for the thread.
|
758
806
|
# Supports up to 4000 characters. To start or add to a thread, create a message
|
759
807
|
# and specify a `threadKey` or the thread.name. For example usage, see [Start or
|
760
|
-
# reply to a message thread](https://developers.google.com/chat/
|
761
|
-
# messages
|
808
|
+
# reply to a message thread](https://developers.google.com/workspace/chat/create-
|
809
|
+
# messages#create-message-thread).
|
762
810
|
# @param [String] fields
|
763
811
|
# Selector specifying which fields to include in a partial response.
|
764
812
|
# @param [String] quota_user
|
@@ -793,24 +841,26 @@ module Google
|
|
793
841
|
end
|
794
842
|
|
795
843
|
# Deletes a message. For an example, see [Delete a message](https://developers.
|
796
|
-
# google.com/chat/
|
797
|
-
#
|
798
|
-
# authentication](https://developers.google.com/chat/
|
799
|
-
#
|
800
|
-
#
|
801
|
-
# messages created by the calling Chat
|
844
|
+
# google.com/workspace/chat/delete-messages). Requires [authentication](https://
|
845
|
+
# developers.google.com/workspace/chat/authenticate-authorize). Supports [app
|
846
|
+
# authentication](https://developers.google.com/workspace/chat/authenticate-
|
847
|
+
# authorize-chat-app) and [user authentication](https://developers.google.com/
|
848
|
+
# workspace/chat/authenticate-authorize-chat-user). When using app
|
849
|
+
# authentication, requests can only delete messages created by the calling Chat
|
850
|
+
# app.
|
802
851
|
# @param [String] name
|
803
852
|
# Required. Resource name of the message. Format: `spaces/`space`/messages/`
|
804
853
|
# message`` If you've set a custom ID for your message, you can use the value
|
805
854
|
# from the `clientAssignedMessageId` field for ``message``. For details, see [
|
806
|
-
# Name a message] (https://developers.google.com/chat/
|
807
|
-
#
|
855
|
+
# Name a message] (https://developers.google.com/workspace/chat/create-messages#
|
856
|
+
# name_a_created_message).
|
808
857
|
# @param [Boolean] force
|
809
858
|
# When `true`, deleting a message also deletes its threaded replies. When `false`
|
810
859
|
# , if a message has threaded replies, deletion fails. Only applies when [
|
811
|
-
# authenticating as a user](https://developers.google.com/chat/
|
812
|
-
#
|
813
|
-
# google.com/chat/
|
860
|
+
# authenticating as a user](https://developers.google.com/workspace/chat/
|
861
|
+
# authenticate-authorize-chat-user). Has no effect when [authenticating as a
|
862
|
+
# Chat app] (https://developers.google.com/workspace/chat/authenticate-authorize-
|
863
|
+
# chat-app).
|
814
864
|
# @param [String] fields
|
815
865
|
# Selector specifying which fields to include in a partial response.
|
816
866
|
# @param [String] quota_user
|
@@ -839,19 +889,19 @@ module Google
|
|
839
889
|
execute_or_queue_command(command, &block)
|
840
890
|
end
|
841
891
|
|
842
|
-
# Returns details about a message. For an example, see [
|
843
|
-
# developers.google.com/chat/
|
844
|
-
# authentication](https://developers.google.com/chat/
|
845
|
-
# app authentication](https://developers.google.com/
|
846
|
-
#
|
847
|
-
#
|
848
|
-
# space.
|
892
|
+
# Returns details about a message. For an example, see [Get details about a
|
893
|
+
# message](https://developers.google.com/workspace/chat/get-messages). Requires [
|
894
|
+
# authentication](https://developers.google.com/workspace/chat/authenticate-
|
895
|
+
# authorize). Supports [app authentication](https://developers.google.com/
|
896
|
+
# workspace/chat/authenticate-authorize-chat-app) and [user authentication](
|
897
|
+
# https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
898
|
+
# Note: Might return a message from a blocked member or space.
|
849
899
|
# @param [String] name
|
850
900
|
# Required. Resource name of the message. Format: `spaces/`space`/messages/`
|
851
901
|
# message`` If you've set a custom ID for your message, you can use the value
|
852
902
|
# from the `clientAssignedMessageId` field for ``message``. For details, see [
|
853
|
-
# Name a message] (https://developers.google.com/chat/
|
854
|
-
#
|
903
|
+
# Name a message] (https://developers.google.com/workspace/chat/create-messages#
|
904
|
+
# name_a_created_message).
|
855
905
|
# @param [String] fields
|
856
906
|
# Selector specifying which fields to include in a partial response.
|
857
907
|
# @param [String] quota_user
|
@@ -882,7 +932,7 @@ module Google
|
|
882
932
|
# Lists messages in a space that the caller is a member of, including messages
|
883
933
|
# from blocked members and spaces. For an example, see [List messages](/chat/api/
|
884
934
|
# guides/v1/messages/list). Requires [user authentication](https://developers.
|
885
|
-
# google.com/chat/
|
935
|
+
# google.com/workspace/chat/authenticate-authorize-chat-user).
|
886
936
|
# @param [String] parent
|
887
937
|
# Required. The resource name of the space to list messages from. Format: `
|
888
938
|
# spaces/`space``
|
@@ -958,13 +1008,13 @@ module Google
|
|
958
1008
|
# Updates a message. There's a difference between the `patch` and `update`
|
959
1009
|
# methods. The `patch` method uses a `patch` request while the `update` method
|
960
1010
|
# uses a `put` request. We recommend using the `patch` method. For an example,
|
961
|
-
# see [Update a message](https://developers.google.com/chat/
|
962
|
-
# messages
|
963
|
-
#
|
964
|
-
#
|
965
|
-
# developers.google.com/chat/
|
966
|
-
# authentication, requests can only update
|
967
|
-
# app.
|
1011
|
+
# see [Update a message](https://developers.google.com/workspace/chat/update-
|
1012
|
+
# messages). Requires [authentication](https://developers.google.com/workspace/
|
1013
|
+
# chat/authenticate-authorize). Supports [app authentication](https://developers.
|
1014
|
+
# google.com/workspace/chat/authenticate-authorize-chat-app) and [user
|
1015
|
+
# authentication](https://developers.google.com/workspace/chat/authenticate-
|
1016
|
+
# authorize-chat-user). When using app authentication, requests can only update
|
1017
|
+
# messages created by the calling Chat app.
|
968
1018
|
# @param [String] name
|
969
1019
|
# Resource name of the message. Format: `spaces/`space`/messages/`message``
|
970
1020
|
# Where ``space`` is the ID of the space where the message is posted and ``
|
@@ -973,13 +1023,13 @@ module Google
|
|
973
1023
|
# create a message, you can use this ID to specify the message in a request by
|
974
1024
|
# replacing ``message`` with the value from the `clientAssignedMessageId` field.
|
975
1025
|
# For example, `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details,
|
976
|
-
# see [Name a message](https://developers.google.com/chat/
|
977
|
-
#
|
1026
|
+
# see [Name a message](https://developers.google.com/workspace/chat/create-
|
1027
|
+
# messages#name_a_created_message).
|
978
1028
|
# @param [Google::Apis::ChatV1::Message] message_object
|
979
1029
|
# @param [Boolean] allow_missing
|
980
1030
|
# Optional. If `true` and the message isn't found, a new message is created and `
|
981
1031
|
# updateMask` is ignored. The specified message ID must be [client-assigned](
|
982
|
-
# https://developers.google.com/chat/
|
1032
|
+
# https://developers.google.com/workspace/chat/create-messages#
|
983
1033
|
# name_a_created_message) or the request fails.
|
984
1034
|
# @param [String] update_mask
|
985
1035
|
# Required. The field paths to update. Separate multiple values with commas or
|
@@ -1022,13 +1072,13 @@ module Google
|
|
1022
1072
|
# Updates a message. There's a difference between the `patch` and `update`
|
1023
1073
|
# methods. The `patch` method uses a `patch` request while the `update` method
|
1024
1074
|
# uses a `put` request. We recommend using the `patch` method. For an example,
|
1025
|
-
# see [Update a message](https://developers.google.com/chat/
|
1026
|
-
# messages
|
1027
|
-
#
|
1028
|
-
#
|
1029
|
-
# developers.google.com/chat/
|
1030
|
-
# authentication, requests can only update
|
1031
|
-
# app.
|
1075
|
+
# see [Update a message](https://developers.google.com/workspace/chat/update-
|
1076
|
+
# messages). Requires [authentication](https://developers.google.com/workspace/
|
1077
|
+
# chat/authenticate-authorize). Supports [app authentication](https://developers.
|
1078
|
+
# google.com/workspace/chat/authenticate-authorize-chat-app) and [user
|
1079
|
+
# authentication](https://developers.google.com/workspace/chat/authenticate-
|
1080
|
+
# authorize-chat-user). When using app authentication, requests can only update
|
1081
|
+
# messages created by the calling Chat app.
|
1032
1082
|
# @param [String] name
|
1033
1083
|
# Resource name of the message. Format: `spaces/`space`/messages/`message``
|
1034
1084
|
# Where ``space`` is the ID of the space where the message is posted and ``
|
@@ -1037,13 +1087,13 @@ module Google
|
|
1037
1087
|
# create a message, you can use this ID to specify the message in a request by
|
1038
1088
|
# replacing ``message`` with the value from the `clientAssignedMessageId` field.
|
1039
1089
|
# For example, `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details,
|
1040
|
-
# see [Name a message](https://developers.google.com/chat/
|
1041
|
-
#
|
1090
|
+
# see [Name a message](https://developers.google.com/workspace/chat/create-
|
1091
|
+
# messages#name_a_created_message).
|
1042
1092
|
# @param [Google::Apis::ChatV1::Message] message_object
|
1043
1093
|
# @param [Boolean] allow_missing
|
1044
1094
|
# Optional. If `true` and the message isn't found, a new message is created and `
|
1045
1095
|
# updateMask` is ignored. The specified message ID must be [client-assigned](
|
1046
|
-
# https://developers.google.com/chat/
|
1096
|
+
# https://developers.google.com/workspace/chat/create-messages#
|
1047
1097
|
# name_a_created_message) or the request fails.
|
1048
1098
|
# @param [String] update_mask
|
1049
1099
|
# Required. The field paths to update. Separate multiple values with commas or
|
@@ -1084,11 +1134,11 @@ module Google
|
|
1084
1134
|
end
|
1085
1135
|
|
1086
1136
|
# Gets the metadata of a message attachment. The attachment data is fetched
|
1087
|
-
# using the [media API](https://developers.google.com/chat/api/
|
1088
|
-
# media/download). For an example, see [Get
|
1089
|
-
# developers.google.com/chat/
|
1090
|
-
# app authentication](https://developers.google.com/
|
1091
|
-
#
|
1137
|
+
# using the [media API](https://developers.google.com/workspace/chat/api/
|
1138
|
+
# reference/rest/v1/media/download). For an example, see [Get metadata about a
|
1139
|
+
# message attachment](https://developers.google.com/workspace/chat/get-media-
|
1140
|
+
# attachments). Requires [app authentication](https://developers.google.com/
|
1141
|
+
# workspace/chat/authenticate-authorize-chat-app).
|
1092
1142
|
# @param [String] name
|
1093
1143
|
# Required. Resource name of the attachment, in the form `spaces/*/messages/*/
|
1094
1144
|
# attachments/*`.
|
@@ -1119,10 +1169,10 @@ module Google
|
|
1119
1169
|
execute_or_queue_command(command, &block)
|
1120
1170
|
end
|
1121
1171
|
|
1122
|
-
# Creates a reaction and adds it to a message.
|
1123
|
-
# reaction](https://developers.google.
|
1124
|
-
# Requires [user authentication](https://
|
1125
|
-
#
|
1172
|
+
# Creates a reaction and adds it to a message. Only unicode emojis are supported.
|
1173
|
+
# For an example, see [Add a reaction to a message](https://developers.google.
|
1174
|
+
# com/workspace/chat/create-reactions). Requires [user authentication](https://
|
1175
|
+
# developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
1126
1176
|
# @param [String] parent
|
1127
1177
|
# Required. The message where the reaction is created. Format: `spaces/`space`/
|
1128
1178
|
# messages/`message``
|
@@ -1156,9 +1206,10 @@ module Google
|
|
1156
1206
|
execute_or_queue_command(command, &block)
|
1157
1207
|
end
|
1158
1208
|
|
1159
|
-
# Deletes a reaction to a message.
|
1160
|
-
#
|
1161
|
-
# authentication](https://developers.google.
|
1209
|
+
# Deletes a reaction to a message. Only unicode emojis are supported. For an
|
1210
|
+
# example, see [Delete a reaction](https://developers.google.com/workspace/chat/
|
1211
|
+
# delete-reactions). Requires [user authentication](https://developers.google.
|
1212
|
+
# com/workspace/chat/authenticate-authorize-chat-user).
|
1162
1213
|
# @param [String] name
|
1163
1214
|
# Required. Name of the reaction to delete. Format: `spaces/`space`/messages/`
|
1164
1215
|
# message`/reactions/`reaction``
|
@@ -1189,33 +1240,34 @@ module Google
|
|
1189
1240
|
execute_or_queue_command(command, &block)
|
1190
1241
|
end
|
1191
1242
|
|
1192
|
-
# Lists reactions to a message. For an example, see [List reactions
|
1193
|
-
# developers.google.com/chat/
|
1194
|
-
# authentication](https://developers.google.com/chat/
|
1243
|
+
# Lists reactions to a message. For an example, see [List reactions for a
|
1244
|
+
# message](https://developers.google.com/workspace/chat/list-reactions).
|
1245
|
+
# Requires [user authentication](https://developers.google.com/workspace/chat/
|
1246
|
+
# authenticate-authorize-chat-user).
|
1195
1247
|
# @param [String] parent
|
1196
1248
|
# Required. The message users reacted to. Format: `spaces/`space`/messages/`
|
1197
1249
|
# message``
|
1198
1250
|
# @param [String] filter
|
1199
1251
|
# Optional. A query filter. You can filter reactions by [emoji](https://
|
1200
|
-
# developers.google.com/chat/api/reference/rest/v1/Emoji) (either `
|
1201
|
-
# or `emoji.custom_emoji.uid`) and [user](https://developers.
|
1202
|
-
# api/reference/rest/v1/User) (`user.name`). To filter
|
1203
|
-
# emojis or users, join similar fields with the `OR`
|
1204
|
-
# unicode = "🙂" OR emoji.unicode = "👍"` and `user.name =
|
1205
|
-
# name = "users/BBBBBB"`. To filter reactions by emoji
|
1206
|
-
# operator, such as `emoji.unicode = "🙂" AND user.name =
|
1207
|
-
# your query uses both `AND` and `OR`, group them with
|
1208
|
-
# the following queries are valid: ``` user.name = "
|
1209
|
-
# "🙂" emoji.custom_emoji.uid = "`uid`" emoji.
|
1210
|
-
#
|
1211
|
-
#
|
1212
|
-
# "`uid`") AND user.name = "users/`
|
1213
|
-
# ```
|
1214
|
-
#
|
1215
|
-
# emoji.unicode = "🙂" OR
|
1216
|
-
#
|
1217
|
-
# "users/`user`" ``` Invalid
|
1218
|
-
# INVALID_ARGUMENT` error.
|
1252
|
+
# developers.google.com/workspace/chat/api/reference/rest/v1/Emoji) (either `
|
1253
|
+
# emoji.unicode` or `emoji.custom_emoji.uid`) and [user](https://developers.
|
1254
|
+
# google.com/workspace/chat/api/reference/rest/v1/User) (`user.name`). To filter
|
1255
|
+
# reactions for multiple emojis or users, join similar fields with the `OR`
|
1256
|
+
# operator, such as `emoji.unicode = "🙂" OR emoji.unicode = "👍"` and `user.name =
|
1257
|
+
# "users/AAAAAA" OR user.name = "users/BBBBBB"`. To filter reactions by emoji
|
1258
|
+
# and user, use the `AND` operator, such as `emoji.unicode = "🙂" AND user.name =
|
1259
|
+
# "users/AAAAAA"`. If your query uses both `AND` and `OR`, group them with
|
1260
|
+
# parentheses. For example, the following queries are valid: ``` user.name = "
|
1261
|
+
# users/`user`" emoji.unicode = "🙂" emoji.custom_emoji.uid = "`uid`" emoji.
|
1262
|
+
# unicode = "🙂" OR emoji.unicode = "👍" emoji.unicode = "🙂" OR emoji.custom_emoji.
|
1263
|
+
# uid = "`uid`" emoji.unicode = "🙂" AND user.name = "users/`user`" (emoji.
|
1264
|
+
# unicode = "🙂" OR emoji.custom_emoji.uid = "`uid`") AND user.name = "users/`
|
1265
|
+
# user`" ``` The following queries are invalid: ``` emoji.unicode = "🙂" AND
|
1266
|
+
# emoji.unicode = "👍" emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "`uid`"
|
1267
|
+
# emoji.unicode = "🙂" OR user.name = "users/`user`" emoji.unicode = "🙂" OR emoji.
|
1268
|
+
# custom_emoji.uid = "`uid`" OR user.name = "users/`user`" emoji.unicode = "🙂"
|
1269
|
+
# OR emoji.custom_emoji.uid = "`uid`" AND user.name = "users/`user`" ``` Invalid
|
1270
|
+
# queries are rejected by the server with an `INVALID_ARGUMENT` error.
|
1219
1271
|
# @param [Fixnum] page_size
|
1220
1272
|
# Optional. The maximum number of reactions returned. The service can return
|
1221
1273
|
# fewer reactions than this value. If unspecified, the default value is 25. The
|
@@ -1261,10 +1313,10 @@ module Google
|
|
1261
1313
|
# resource that changed. For example, if you request an event about a new
|
1262
1314
|
# message but the message was later updated, the server returns the updated `
|
1263
1315
|
# Message` resource in the event payload. Requires [user authentication](https://
|
1264
|
-
# developers.google.com/chat/
|
1265
|
-
# authenticated user must be a member of the space. For an example,
|
1266
|
-
# details about an event from a Google Chat space](https://developers.
|
1267
|
-
# workspace/chat/get-space-event).
|
1316
|
+
# developers.google.com/workspace/chat/authenticate-authorize-chat-user). To get
|
1317
|
+
# an event, the authenticated user must be a member of the space. For an example,
|
1318
|
+
# see [Get details about an event from a Google Chat space](https://developers.
|
1319
|
+
# google.com/workspace/chat/get-space-event).
|
1268
1320
|
# @param [String] name
|
1269
1321
|
# Required. The resource name of the space event. Format: `spaces/`space`/
|
1270
1322
|
# spaceEvents/`spaceEvent``
|
@@ -1302,10 +1354,10 @@ module Google
|
|
1302
1354
|
# returns `Membership` resources that contain the latest membership details. If
|
1303
1355
|
# new members were removed during the requested period, the event payload
|
1304
1356
|
# contains an empty `Membership` resource. Requires [user authentication](https:/
|
1305
|
-
# /developers.google.com/chat/
|
1306
|
-
# authenticated user must be a member of the space. For an
|
1307
|
-
# events from a Google Chat space](https://developers.google.
|
1308
|
-
# list-space-events).
|
1357
|
+
# /developers.google.com/workspace/chat/authenticate-authorize-chat-user). To
|
1358
|
+
# list events, the authenticated user must be a member of the space. For an
|
1359
|
+
# example, see [List events from a Google Chat space](https://developers.google.
|
1360
|
+
# com/workspace/chat/list-space-events).
|
1309
1361
|
# @param [String] parent
|
1310
1362
|
# Required. Resource name of the [Google Chat space](https://developers.google.
|
1311
1363
|
# com/workspace/chat/api/reference/rest/v1/spaces) where the events occurred.
|
@@ -1374,6 +1426,129 @@ module Google
|
|
1374
1426
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1375
1427
|
execute_or_queue_command(command, &block)
|
1376
1428
|
end
|
1429
|
+
|
1430
|
+
# Returns details about a user's read state within a space, used to identify
|
1431
|
+
# read and unread messages. Requires [user authentication](https://developers.
|
1432
|
+
# google.com/workspace/chat/authenticate-authorize-chat-user).
|
1433
|
+
# @param [String] name
|
1434
|
+
# Required. Resource name of the space read state to retrieve. Only supports
|
1435
|
+
# getting read state for the calling user. To refer to the calling user, set one
|
1436
|
+
# of the following: - The `me` alias. For example, `users/me/spaces/`space`/
|
1437
|
+
# spaceReadState`. - Their Workspace email address. For example, `users/user@
|
1438
|
+
# example.com/spaces/`space`/spaceReadState`. - Their user id. For example, `
|
1439
|
+
# users/123456789/spaces/`space`/spaceReadState`. Format: users/`user`/spaces/`
|
1440
|
+
# space`/spaceReadState
|
1441
|
+
# @param [String] fields
|
1442
|
+
# Selector specifying which fields to include in a partial response.
|
1443
|
+
# @param [String] quota_user
|
1444
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1445
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1446
|
+
# @param [Google::Apis::RequestOptions] options
|
1447
|
+
# Request-specific options
|
1448
|
+
#
|
1449
|
+
# @yield [result, err] Result & error if block supplied
|
1450
|
+
# @yieldparam result [Google::Apis::ChatV1::SpaceReadState] parsed result object
|
1451
|
+
# @yieldparam err [StandardError] error object if request failed
|
1452
|
+
#
|
1453
|
+
# @return [Google::Apis::ChatV1::SpaceReadState]
|
1454
|
+
#
|
1455
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1456
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1457
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1458
|
+
def get_user_space_space_read_state(name, fields: nil, quota_user: nil, options: nil, &block)
|
1459
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
1460
|
+
command.response_representation = Google::Apis::ChatV1::SpaceReadState::Representation
|
1461
|
+
command.response_class = Google::Apis::ChatV1::SpaceReadState
|
1462
|
+
command.params['name'] = name unless name.nil?
|
1463
|
+
command.query['fields'] = fields unless fields.nil?
|
1464
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1465
|
+
execute_or_queue_command(command, &block)
|
1466
|
+
end
|
1467
|
+
|
1468
|
+
# Updates a user's read state within a space, used to identify read and unread
|
1469
|
+
# messages. Requires [user authentication](https://developers.google.com/
|
1470
|
+
# workspace/chat/authenticate-authorize-chat-user).
|
1471
|
+
# @param [String] name
|
1472
|
+
# Resource name of the space read state. Format: `users/`user`/spaces/`space`/
|
1473
|
+
# spaceReadState`
|
1474
|
+
# @param [Google::Apis::ChatV1::SpaceReadState] space_read_state_object
|
1475
|
+
# @param [String] update_mask
|
1476
|
+
# Required. The field paths to update. Currently supported field paths: - `
|
1477
|
+
# last_read_time` When the `last_read_time` is before the latest message create
|
1478
|
+
# time, the space appears as unread in the UI. To mark the space as read, set `
|
1479
|
+
# last_read_time` to any value later (larger) than the latest message create
|
1480
|
+
# time. The `last_read_time` is coerced to match the latest message create time.
|
1481
|
+
# Note that the space read state only affects the read state of messages that
|
1482
|
+
# are visible in the space's top-level conversation. Replies in threads are
|
1483
|
+
# unaffected by this timestamp, and instead rely on the thread read state.
|
1484
|
+
# @param [String] fields
|
1485
|
+
# Selector specifying which fields to include in a partial response.
|
1486
|
+
# @param [String] quota_user
|
1487
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1488
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1489
|
+
# @param [Google::Apis::RequestOptions] options
|
1490
|
+
# Request-specific options
|
1491
|
+
#
|
1492
|
+
# @yield [result, err] Result & error if block supplied
|
1493
|
+
# @yieldparam result [Google::Apis::ChatV1::SpaceReadState] parsed result object
|
1494
|
+
# @yieldparam err [StandardError] error object if request failed
|
1495
|
+
#
|
1496
|
+
# @return [Google::Apis::ChatV1::SpaceReadState]
|
1497
|
+
#
|
1498
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1499
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1500
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1501
|
+
def update_user_space_space_read_state(name, space_read_state_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1502
|
+
command = make_simple_command(:patch, 'v1/{+name}', options)
|
1503
|
+
command.request_representation = Google::Apis::ChatV1::SpaceReadState::Representation
|
1504
|
+
command.request_object = space_read_state_object
|
1505
|
+
command.response_representation = Google::Apis::ChatV1::SpaceReadState::Representation
|
1506
|
+
command.response_class = Google::Apis::ChatV1::SpaceReadState
|
1507
|
+
command.params['name'] = name unless name.nil?
|
1508
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
1509
|
+
command.query['fields'] = fields unless fields.nil?
|
1510
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1511
|
+
execute_or_queue_command(command, &block)
|
1512
|
+
end
|
1513
|
+
|
1514
|
+
# Returns details about a user's read state within a thread, used to identify
|
1515
|
+
# read and unread messages. Requires [user authentication](https://developers.
|
1516
|
+
# google.com/workspace/chat/authenticate-authorize-chat-user).
|
1517
|
+
# @param [String] name
|
1518
|
+
# Required. Resource name of the thread read state to retrieve. Only supports
|
1519
|
+
# getting read state for the calling user. To refer to the calling user, set one
|
1520
|
+
# of the following: - The `me` alias. For example, `users/me/spaces/`space`/
|
1521
|
+
# threads/`thread`/threadReadState`. - Their Workspace email address. For
|
1522
|
+
# example, `users/user@example.com/spaces/`space`/threads/`thread`/
|
1523
|
+
# threadReadState`. - Their user id. For example, `users/123456789/spaces/`space`
|
1524
|
+
# /threads/`thread`/threadReadState`. Format: users/`user`/spaces/`space`/
|
1525
|
+
# threads/`thread`/threadReadState
|
1526
|
+
# @param [String] fields
|
1527
|
+
# Selector specifying which fields to include in a partial response.
|
1528
|
+
# @param [String] quota_user
|
1529
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1530
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1531
|
+
# @param [Google::Apis::RequestOptions] options
|
1532
|
+
# Request-specific options
|
1533
|
+
#
|
1534
|
+
# @yield [result, err] Result & error if block supplied
|
1535
|
+
# @yieldparam result [Google::Apis::ChatV1::ThreadReadState] parsed result object
|
1536
|
+
# @yieldparam err [StandardError] error object if request failed
|
1537
|
+
#
|
1538
|
+
# @return [Google::Apis::ChatV1::ThreadReadState]
|
1539
|
+
#
|
1540
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1541
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1542
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1543
|
+
def get_user_space_thread_thread_read_state(name, fields: nil, quota_user: nil, options: nil, &block)
|
1544
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
1545
|
+
command.response_representation = Google::Apis::ChatV1::ThreadReadState::Representation
|
1546
|
+
command.response_class = Google::Apis::ChatV1::ThreadReadState
|
1547
|
+
command.params['name'] = name unless name.nil?
|
1548
|
+
command.query['fields'] = fields unless fields.nil?
|
1549
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1550
|
+
execute_or_queue_command(command, &block)
|
1551
|
+
end
|
1377
1552
|
|
1378
1553
|
protected
|
1379
1554
|
|