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.
@@ -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/api/guides/v1/media-and-attachments/upload).
95
- # Requires user [authentication](https://developers.google.com/chat/api/guides/
96
- # auth/users). You can upload attachments up to 200 MB. Certain file types aren'
97
- # t supported. For details, see [File types blocked by Google Chat](https://
98
- # support.google.com/chat/answer/7651457?&co=GENIE.Platform%3DDesktop#File%
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/api/guides/
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/chat/
147
- # api/guides/authorize-import).
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/api/guides/v1/
182
- # spaces/create). If you receive the error message `ALREADY_EXISTS` when
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/api/guides/auth/users).
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/api/guides/v1/spaces/delete). Requires [user
225
- # authentication](https://developers.google.com/chat/api/guides/auth/users) from
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/api/guides/auth/users),
260
- # returns the direct message space between the specified user and the
261
- # authenticated user. With [app authentication](https://developers.google.com/
262
- # chat/api/guides/auth/service-accounts), returns the direct message space
263
- # between the specified user and the calling Chat app. Requires [user
264
- # authentication](https://developers.google.com/chat/api/guides/auth/users) or [
265
- # app authentication](https://developers.google.com/chat/api/guides/auth/service-
266
- # accounts).
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/api/guides/auth/users), you can use the email as an alias for `
276
- # `user``. For example, `users/example@gmail.com` where `example@gmail.com` is
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](https://
306
- # developers.google.com/chat/api/guides/v1/spaces/get). Requires [authentication]
307
- # (https://developers.google.com/chat/api/guides/auth). Supports [app
308
- # authentication](https://developers.google.com/chat/api/guides/auth/service-
309
- # accounts) and [user authentication](https://developers.google.com/chat/api/
310
- # guides/auth/users).
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/api/guides/v1/spaces/list). Requires [
344
- # authentication](https://developers.google.com/chat/api/guides/auth). Supports [
345
- # app authentication](https://developers.google.com/chat/api/guides/auth/service-
346
- # accounts) and [user authentication](https://developers.google.com/chat/api/
347
- # guides/auth/users). Lists spaces visible to the caller or authenticated user.
348
- # Group chats and DMs aren't listed until the first message is sent.
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/v1/spaces#
352
- # spacetype)). To filter by space type, you must specify valid enum value, such
353
- # as `SPACE` or `GROUP_CHAT` (the `space_type` can't be `SPACE_TYPE_UNSPECIFIED`)
354
- # . To query for multiple space types, use the `OR` operator. For example, the
355
- # following queries are valid: ``` space_type = "SPACE" spaceType = "GROUP_CHAT"
356
- # OR spaceType = "DIRECT_MESSAGE" ``` Invalid queries are rejected by the server
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/api/guides/v1/spaces/update). If you're updating the `
399
- # displayName` field and receive the error message `ALREADY_EXISTS`, try a
400
- # different display name.. An existing space within the Google Workspace
401
- # organization might already use this display name. Requires [user
402
- # authentication](https://developers.google.com/chat/api/guides/auth/users).
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](https://developers.google.
463
- # com/chat/api/guides/v1/spaces/set-up). To specify the human members to add,
464
- # add memberships with the appropriate `member.name` in the `SetUpSpaceRequest`.
465
- # To add a human user, use `users/`user``, where ``user`` can be the email
466
- # address for the user. For users in the same Workspace organization ``user``
467
- # can also be the `id` for the person from the People API, or the `id` for the
468
- # user in the Directory API. For example, if the People API Person profile ID
469
- # for `user@example.com` is `123456789`, you can add the user to the space by
470
- # setting the `membership.member.name` to `users/user@example.com` or `users/
471
- # 123456789`. For a space or group chat, if the caller blocks or is blocked by
472
- # some members, then those members aren't added to the created space. To create
473
- # a direct message (DM) between the calling user and another human user, specify
474
- # exactly one membership to represent the human user. If one user blocks the
475
- # other, the request fails and the DM isn't created. To create a DM between the
476
- # calling user and the calling app, set `Space.singleUserBotDm` to `true` and
477
- # don't specify any memberships. You can only use this method to set up a DM
478
- # with the calling app. To add the calling app as a member of a space or an
479
- # existing DM between two human users, see [create a membership](https://
480
- # developers.google.com/chat/api/guides/v1/members/create). If a DM already
481
- # exists between two users, even when one user blocks the other at the time a
482
- # request is made, then the existing DM is returned. Spaces with threaded
483
- # replies aren't supported. If you receive the error message `ALREADY_EXISTS`
484
- # when setting up a space, try a different `displayName`. An existing space
485
- # within the Google Workspace organization might already use this display name.
486
- # Requires [user authentication](https://developers.google.com/chat/api/guides/
487
- # auth/users).
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 [ Create a
519
- # membership](https://developers.google.com/chat/api/guides/v1/members/create).
520
- # When creating a membership, if the specified member has their auto-accept
521
- # policy turned off, then they're invited, and must accept the space invitation
522
- # before joining. Otherwise, creating a membership adds the member directly to
523
- # the specified space. Requires [user authentication](https://developers.google.
524
- # com/chat/api/guides/auth/users). To specify the member to add, set the `
525
- # membership.member.name` in the `CreateMembershipRequest`: - To add the calling
526
- # app to a space or a direct message between two human users, use `users/app`.
527
- # Unable to add other apps to the space. - To add a human user, use `users/`user`
528
- # `, where ``user`` can be the email address for the user. For users in the same
529
- # Workspace organization ``user`` can also be the `id` for the person from the
530
- # People API, or the `id` for the user in the Directory API. For example, if the
531
- # People API Person profile ID for `user@example.com` is `123456789`, you can
532
- # add the user to the space by setting the `membership.member.name` to `users/
533
- # user@example.com` or `users/123456789`.
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 [Delete a membership](https://
568
- # developers.google.com/chat/api/guides/v1/members/delete). Requires [user
569
- # authentication](https://developers.google.com/chat/api/guides/auth/users).
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 membership](
608
- # https://developers.google.com/chat/api/guides/v1/members/get). Requires [
609
- # authentication](https://developers.google.com/chat/api/guides/auth). Supports [
610
- # app authentication](https://developers.google.com/chat/api/guides/auth/service-
611
- # accounts) and [user authentication](https://developers.google.com/chat/api/
612
- # guides/auth/users).
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, you can optionally use `spaces/`space`/members/app`. Format: `
616
- # spaces/`space`/members/`member`` or `spaces/`space`/members/app` When [
617
- # authenticated as a user](https://developers.google.com/chat/api/guides/auth/
618
- # users), you can use the user's email as an alias for ``member``. For example, `
619
- # spaces/`space`/members/example@gmail.com` where `example@gmail.com` is the
620
- # email of the Google Chat user.
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 memberships](https://
649
- # developers.google.com/chat/api/guides/v1/members/list). Listing memberships
650
- # with [app authentication](https://developers.google.com/chat/api/guides/auth/
651
- # service-accounts) lists memberships in spaces that the Chat app has access to,
652
- # but excludes Chat app memberships, including its own. Listing memberships with
653
- # [User authentication](https://developers.google.com/chat/api/guides/auth/users)
654
- # lists memberships in spaces that the authenticated user has access to.
655
- # Requires [authentication](https://developers.google.com/chat/api/guides/auth).
656
- # Supports [app authentication](https://developers.google.com/chat/api/guides/
657
- # auth/service-accounts) and [user authentication](https://developers.google.com/
658
- # chat/api/guides/auth/users).
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/spaces.members#
665
- # membershiprole)) and type ([`member.type`](https://developers.google.com/chat/
666
- # api/reference/rest/v1/User#type)). To filter by role, set `role` to `
667
- # ROLE_MEMBER` or `ROLE_MANAGER`. To filter by type, set `member.type` to `HUMAN`
668
- # or `BOT`. To filter by both role and type, use the `AND` operator. To filter
669
- # by either role or type, use the `OR` operator. For example, the following
670
- # queries are valid: ``` role = "ROLE_MANAGER" OR role = "ROLE_MEMBER" member.
671
- # type = "HUMAN" AND role = "ROLE_MANAGER" ``` The following queries are invalid:
672
- # ``` member.type = "HUMAN" AND member.type = "BOT" role = "ROLE_MANAGER" AND
673
- # role = "ROLE_MEMBER" ``` Invalid queries are rejected by the server with an `
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/chat/
696
- # api/guides/auth/users).
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
- # Creates a message in a Google Chat space. For an example, see [Create a
730
- # message](https://developers.google.com/chat/api/guides/v1/messages/create).
731
- # Calling this method requires [authentication](https://developers.google.com/
732
- # chat/api/guides/auth) and supports the following authentication types: - For
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/api/guides/v1/messages/create#name_a_created_message).
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/api/guides/v1/
761
- # messages/create#create-message-thread).
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/api/guides/v1/messages/delete). Requires [authentication](
797
- # https://developers.google.com/chat/api/guides/auth). Supports [app
798
- # authentication](https://developers.google.com/chat/api/guides/auth/service-
799
- # accounts) and [user authentication](https://developers.google.com/chat/api/
800
- # guides/auth/users). When using app authentication, requests can only delete
801
- # messages created by the calling Chat app.
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/api/guides/v1/messages/
807
- # create#name_a_created_message).
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/api/guides/auth/
812
- # users). Has no effect when [authenticating as a Chat app] (https://developers.
813
- # google.com/chat/api/guides/auth/service-accounts).
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 [Read a message](https://
843
- # developers.google.com/chat/api/guides/v1/messages/get). Requires [
844
- # authentication](https://developers.google.com/chat/api/guides/auth). Supports [
845
- # app authentication](https://developers.google.com/chat/api/guides/auth/service-
846
- # accounts) and [user authentication](https://developers.google.com/chat/api/
847
- # guides/auth/users). Note: Might return a message from a blocked member or
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/api/guides/v1/messages/
854
- # create#name_a_created_message).
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/api/guides/auth/users).
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/api/guides/v1/
962
- # messages/update). Requires [authentication](https://developers.google.com/chat/
963
- # api/guides/auth). Supports [app authentication](https://developers.google.com/
964
- # chat/api/guides/auth/service-accounts) and [user authentication](https://
965
- # developers.google.com/chat/api/guides/auth/users). When using app
966
- # authentication, requests can only update messages created by the calling Chat
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/api/guides/v1/messages/
977
- # create#name_a_created_message).
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/api/guides/v1/messages/create#
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/api/guides/v1/
1026
- # messages/update). Requires [authentication](https://developers.google.com/chat/
1027
- # api/guides/auth). Supports [app authentication](https://developers.google.com/
1028
- # chat/api/guides/auth/service-accounts) and [user authentication](https://
1029
- # developers.google.com/chat/api/guides/auth/users). When using app
1030
- # authentication, requests can only update messages created by the calling Chat
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/api/guides/v1/messages/
1041
- # create#name_a_created_message).
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/api/guides/v1/messages/create#
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/reference/rest/v1/
1088
- # media/download). For an example, see [Get a message attachment](https://
1089
- # developers.google.com/chat/api/guides/v1/media-and-attachments/get). Requires [
1090
- # app authentication](https://developers.google.com/chat/api/guides/auth/service-
1091
- # accounts).
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. For an example, see [Create a
1123
- # reaction](https://developers.google.com/chat/api/guides/v1/reactions/create).
1124
- # Requires [user authentication](https://developers.google.com/chat/api/guides/
1125
- # auth/users). Only unicode emoji are supported.
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. For an example, see [Delete a reaction](https:
1160
- # //developers.google.com/chat/api/guides/v1/reactions/delete). Requires [user
1161
- # authentication](https://developers.google.com/chat/api/guides/auth/users).
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](https://
1193
- # developers.google.com/chat/api/guides/v1/reactions/list). Requires [user
1194
- # authentication](https://developers.google.com/chat/api/guides/auth/users).
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 `emoji.unicode`
1201
- # or `emoji.custom_emoji.uid`) and [user](https://developers.google.com/chat/
1202
- # api/reference/rest/v1/User) (`user.name`). To filter reactions for multiple
1203
- # emojis or users, join similar fields with the `OR` operator, such as `emoji.
1204
- # unicode = "🙂" OR emoji.unicode = "👍"` and `user.name = "users/AAAAAA" OR user.
1205
- # name = "users/BBBBBB"`. To filter reactions by emoji and user, use the `AND`
1206
- # operator, such as `emoji.unicode = "🙂" AND user.name = "users/AAAAAA"`. If
1207
- # your query uses both `AND` and `OR`, group them with parentheses. For example,
1208
- # the following queries are valid: ``` user.name = "users/`user`" emoji.unicode =
1209
- # "🙂" emoji.custom_emoji.uid = "`uid`" emoji.unicode = "🙂" OR emoji.unicode = "👍
1210
- # " emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "`uid`" emoji.unicode = "🙂"
1211
- # AND user.name = "users/`user`" (emoji.unicode = "🙂" OR emoji.custom_emoji.uid =
1212
- # "`uid`") AND user.name = "users/`user`" ``` The following queries are invalid:
1213
- # ``` emoji.unicode = "🙂" AND emoji.unicode = "👍" emoji.unicode = "🙂" AND emoji.
1214
- # custom_emoji.uid = "`uid`" emoji.unicode = "🙂" OR user.name = "users/`user`"
1215
- # emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "`uid`" OR user.name = "users/`
1216
- # user`" emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "`uid`" AND user.name =
1217
- # "users/`user`" ``` Invalid queries are rejected by the server with an `
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/api/guides/auth/users). To get an event, the
1265
- # authenticated user must be a member of the space. For an example, see [Get
1266
- # details about an event from a Google Chat space](https://developers.google.com/
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/api/guides/auth/users). To list events, the
1306
- # authenticated user must be a member of the space. For an example, see [List
1307
- # events from a Google Chat space](https://developers.google.com/workspace/chat/
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