google-apis-chat_v1 0.91.0 → 0.93.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f37dbc3a21ed798197277a6a30068b8eca1e757933c72ca36bb96ec24bd7b32c
4
- data.tar.gz: af08170199c07ee8e40786bc9c0e93b8e6f6e38c2c6cf66e15cc16b5d2126fba
3
+ metadata.gz: d695ed770d4eac168d2478f8aa44a2c8fb9616d3d5037a97fe6b4f1baaa62a56
4
+ data.tar.gz: 10b64c895c40b8d8de8c4fa72c021bdbf6a1dde74f15dab8bd53644790d91475
5
5
  SHA512:
6
- metadata.gz: 8955f795c0dff00e4dcee0f1985da489b76918acc62d210fb704ade239c73f7f267547a6c75eaaa5fdeffd65fa2c7f7f0e51c3448f9a6d347c9e3b16cce206b7
7
- data.tar.gz: b7deb6c4b715e7275157c75a3b0d2800b6bade816d100c7d6c3f8f78f03597e5047e92c21fd198650b178ed8f78cb9e00c3279d9ed3556cacece9bd6d72ffcef
6
+ metadata.gz: b68641d231734f34a9b7ab48496790c0611f41f0272bae5ab04ef04b5e743784d865355fe3aef39791b64c69c0c3b6e35066e1b30f58b543393925c6773131e8
7
+ data.tar.gz: fa3cf6731e93668f5a4c4d69dbcee840d6d14217e24c8cc8dd068824db136515bb8f12ebc542252ae79f6e3897775b5ecb63d19128846fd7a1c6bbb7cf3b77dc
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Release history for google-apis-chat_v1
2
2
 
3
+ ### v0.93.0 (2024-05-26)
4
+
5
+ * Regenerated from discovery document revision 20240519
6
+ * Regenerated using generator version 0.15.0
7
+
8
+ ### v0.92.0 (2024-04-28)
9
+
10
+ * Regenerated from discovery document revision 20240423
11
+
3
12
  ### v0.91.0 (2024-04-21)
4
13
 
5
14
  * Regenerated from discovery document revision 20240416
@@ -249,8 +249,8 @@ module Google
249
249
  # @return [Google::Apis::ChatV1::DriveDataRef]
250
250
  attr_accessor :drive_data_ref
251
251
 
252
- # Resource name of the attachment, in the form `spaces/*/messages/*/attachments/*
253
- # `.
252
+ # Resource name of the attachment, in the form `spaces/`space`/messages/`message`
253
+ # /attachments/`attachment``.
254
254
  # Corresponds to the JSON property `name`
255
255
  # @return [String]
256
256
  attr_accessor :name
@@ -752,7 +752,7 @@ module Google
752
752
  class CustomEmoji
753
753
  include Google::Apis::Core::Hashable
754
754
 
755
- # Unique key for the custom emoji resource.
755
+ # Output only. Unique key for the custom emoji resource.
756
756
  # Corresponds to the JSON property `uid`
757
757
  # @return [String]
758
758
  attr_accessor :uid
@@ -884,8 +884,9 @@ module Google
884
884
  # @return [String]
885
885
  attr_accessor :event_time
886
886
 
887
- # For `CARD_CLICKED` interaction events, whether the user interacted with a [
888
- # dialog](https://developers.google.com/workspace/chat/dialogs).
887
+ # For `CARD_CLICKED` and `MESSAGE` interaction events, whether the user is
888
+ # interacting with or about to interact with a [dialog](https://developers.
889
+ # google.com/workspace/chat/dialogs).
889
890
  # Corresponds to the JSON property `isDialogEvent`
890
891
  # @return [Boolean]
891
892
  attr_accessor :is_dialog_event
@@ -4403,20 +4404,20 @@ module Google
4403
4404
 
4404
4405
  # Optional. The Google Chat users to invite to join the space. Omit the calling
4405
4406
  # user, as they are added automatically. The set currently allows up to 20
4406
- # memberships (in addition to the caller). The `Membership.member` field must
4407
- # contain a `user` with `name` populated (format: `users/`user``) and `type` set
4408
- # to `User.Type.HUMAN`. You can only add human users when setting up a space (
4409
- # adding Chat apps is only supported for direct message setup with the calling
4410
- # app). You can also add members using the user's email as an alias for `user`.
4411
- # For example, the `user.name` can be `users/example@gmail.com`." To invite
4412
- # Gmail users or users from external Google Workspace domains, user's email must
4413
- # be used for ``user``. Optional when setting `Space.spaceType` to `SPACE`.
4414
- # Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at least
4415
- # two memberships. Required when setting `Space.spaceType` to `DIRECT_MESSAGE`
4416
- # with a human user, along with exactly one membership. Must be empty when
4417
- # creating a 1:1 conversation between a human and the calling Chat app (when
4418
- # setting `Space.spaceType` to `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `
4419
- # true`).
4407
+ # memberships (in addition to the caller). For human membership, the `Membership.
4408
+ # member` field must contain a `user` with `name` populated (format: `users/`
4409
+ # user``) and `type` set to `User.Type.HUMAN`. You can only add human users when
4410
+ # setting up a space (adding Chat apps is only supported for direct message
4411
+ # setup with the calling app). You can also add members using the user's email
4412
+ # as an alias for `user`. For example, the `user.name` can be `users/example@
4413
+ # gmail.com`. To invite Gmail users or users from external Google Workspace
4414
+ # domains, user's email must be used for ``user``. Optional when setting `Space.
4415
+ # spaceType` to `SPACE`. Required when setting `Space.spaceType` to `GROUP_CHAT`,
4416
+ # along with at least two memberships. Required when setting `Space.spaceType`
4417
+ # to `DIRECT_MESSAGE` with a human user, along with exactly one membership. Must
4418
+ # be empty when creating a 1:1 conversation between a human and the calling Chat
4419
+ # app (when setting `Space.spaceType` to `DIRECT_MESSAGE` and `Space.
4420
+ # singleUserBotDm` to `true`).
4420
4421
  # Corresponds to the JSON property `memberships`
4421
4422
  # @return [Array<Google::Apis::ChatV1::Membership>]
4422
4423
  attr_accessor :memberships
@@ -4519,11 +4520,11 @@ module Google
4519
4520
  class Space
4520
4521
  include Google::Apis::Core::Hashable
4521
4522
 
4522
- # Output only. Whether the Chat app was installed by a Google Workspace
4523
- # administrator. Administrators can install a Chat app for their domain,
4524
- # organizational unit, or a group of users. Administrators can only install Chat
4525
- # apps for direct messaging between users and the app. To support admin install,
4526
- # your app must feature direct messaging.
4523
+ # Output only. For direct message (DM) spaces with a Chat app, whether the space
4524
+ # was created by a Google Workspace administrator. Administrators can install
4525
+ # and set up a direct message with a Chat app on behalf of users in their
4526
+ # organization. To support admin install, your Chat app must feature direct
4527
+ # messaging.
4527
4528
  # Corresponds to the JSON property `adminInstalled`
4528
4529
  # @return [Boolean]
4529
4530
  attr_accessor :admin_installed
@@ -4896,6 +4897,34 @@ module Google
4896
4897
  end
4897
4898
  end
4898
4899
 
4900
+ # A user's read state within a space, used to identify read and unread messages.
4901
+ class SpaceReadState
4902
+ include Google::Apis::Core::Hashable
4903
+
4904
+ # Optional. The time when the user's space read state was updated. Usually this
4905
+ # corresponds with either the timestamp of the last read message, or a timestamp
4906
+ # specified by the user to mark the last read position in a space.
4907
+ # Corresponds to the JSON property `lastReadTime`
4908
+ # @return [String]
4909
+ attr_accessor :last_read_time
4910
+
4911
+ # Resource name of the space read state. Format: `users/`user`/spaces/`space`/
4912
+ # spaceReadState`
4913
+ # Corresponds to the JSON property `name`
4914
+ # @return [String]
4915
+ attr_accessor :name
4916
+
4917
+ def initialize(**args)
4918
+ update!(**args)
4919
+ end
4920
+
4921
+ # Update properties of this object
4922
+ def update!(**args)
4923
+ @last_read_time = args[:last_read_time] if args.key?(:last_read_time)
4924
+ @name = args[:name] if args.key?(:name)
4925
+ end
4926
+ end
4927
+
4899
4928
  # Event payload for an updated space. Event type: `google.workspace.chat.space.
4900
4929
  # v1.updated`
4901
4930
  class SpaceUpdatedEventData
@@ -5061,6 +5090,33 @@ module Google
5061
5090
  end
5062
5091
  end
5063
5092
 
5093
+ # A user's read state within a thread, used to identify read and unread messages.
5094
+ class ThreadReadState
5095
+ include Google::Apis::Core::Hashable
5096
+
5097
+ # The time when the user's thread read state was updated. Usually this
5098
+ # corresponds with the timestamp of the last read message in a thread.
5099
+ # Corresponds to the JSON property `lastReadTime`
5100
+ # @return [String]
5101
+ attr_accessor :last_read_time
5102
+
5103
+ # Resource name of the thread read state. Format: `users/`user`/spaces/`space`/
5104
+ # threads/`thread`/threadReadState`
5105
+ # Corresponds to the JSON property `name`
5106
+ # @return [String]
5107
+ attr_accessor :name
5108
+
5109
+ def initialize(**args)
5110
+ update!(**args)
5111
+ end
5112
+
5113
+ # Update properties of this object
5114
+ def update!(**args)
5115
+ @last_read_time = args[:last_read_time] if args.key?(:last_read_time)
5116
+ @name = args[:name] if args.key?(:name)
5117
+ end
5118
+ end
5119
+
5064
5120
  # Time input values.
5065
5121
  class TimeInput
5066
5122
  include Google::Apis::Core::Hashable
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module ChatV1
18
18
  # Version of the google-apis-chat_v1 gem
19
- GEM_VERSION = "0.91.0"
19
+ GEM_VERSION = "0.93.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
- GENERATOR_VERSION = "0.14.0"
22
+ GENERATOR_VERSION = "0.15.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20240416"
25
+ REVISION = "20240519"
26
26
  end
27
27
  end
28
28
  end
@@ -694,6 +694,12 @@ module Google
694
694
  include Google::Apis::Core::JsonObjectSupport
695
695
  end
696
696
 
697
+ class SpaceReadState
698
+ class Representation < Google::Apis::Core::JsonRepresentation; end
699
+
700
+ include Google::Apis::Core::JsonObjectSupport
701
+ end
702
+
697
703
  class SpaceUpdatedEventData
698
704
  class Representation < Google::Apis::Core::JsonRepresentation; end
699
705
 
@@ -730,6 +736,12 @@ module Google
730
736
  include Google::Apis::Core::JsonObjectSupport
731
737
  end
732
738
 
739
+ class ThreadReadState
740
+ class Representation < Google::Apis::Core::JsonRepresentation; end
741
+
742
+ include Google::Apis::Core::JsonObjectSupport
743
+ end
744
+
733
745
  class TimeInput
734
746
  class Representation < Google::Apis::Core::JsonRepresentation; end
735
747
 
@@ -1997,6 +2009,14 @@ module Google
1997
2009
  end
1998
2010
  end
1999
2011
 
2012
+ class SpaceReadState
2013
+ # @private
2014
+ class Representation < Google::Apis::Core::JsonRepresentation
2015
+ property :last_read_time, as: 'lastReadTime'
2016
+ property :name, as: 'name'
2017
+ end
2018
+ end
2019
+
2000
2020
  class SpaceUpdatedEventData
2001
2021
  # @private
2002
2022
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -2045,6 +2065,14 @@ module Google
2045
2065
  end
2046
2066
  end
2047
2067
 
2068
+ class ThreadReadState
2069
+ # @private
2070
+ class Representation < Google::Apis::Core::JsonRepresentation
2071
+ property :last_read_time, as: 'lastReadTime'
2072
+ property :name, as: 'name'
2073
+ end
2074
+ end
2075
+
2048
2076
  class TimeInput
2049
2077
  # @private
2050
2078
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -310,8 +310,8 @@ module Google
310
310
  # workspace/chat/authenticate-authorize-chat-app) and [user authentication](
311
311
  # https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
312
312
  # @param [String] name
313
- # Required. Resource name of the space, in the form "spaces/*". Format: `spaces/`
314
- # space``
313
+ # Required. Resource name of the space, in the form `spaces/`space``. Format: `
314
+ # spaces/`space``
315
315
  # @param [String] fields
316
316
  # Selector specifying which fields to include in a partial response.
317
317
  # @param [String] quota_user
@@ -347,7 +347,9 @@ module Google
347
347
  # authorize-chat-app) and [user authentication](https://developers.google.com/
348
348
  # workspace/chat/authenticate-authorize-chat-user). Lists spaces visible to the
349
349
  # caller or authenticated user. Group chats and DMs aren't listed until the
350
- # first message is sent.
350
+ # first message is sent. To list all named spaces by Google Workspace
351
+ # organization, use the `spaces.search()` method using Workspace administrator
352
+ # privileges instead.
351
353
  # @param [String] filter
352
354
  # Optional. A query filter. You can filter spaces by the space type ([`
353
355
  # space_type`](https://developers.google.com/workspace/chat/api/reference/rest/
@@ -463,30 +465,31 @@ module Google
463
465
  # automatically added to the space, and shouldn't be specified as a membership
464
466
  # in the request. For an example, see [Set up a space with initial members](
465
467
  # 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).
468
+ # human members to add, add memberships with the appropriate `membership.member.
469
+ # name`. To add a human user, use `users/`user``, where ``user`` can be the
470
+ # email address for the user. For users in the same Workspace organization ``
471
+ # user`` can also be the `id` for the person from the People API, or the `id`
472
+ # for the user in the Directory API. For example, if the People API Person
473
+ # profile ID for `user@example.com` is `123456789`, you can add the user to the
474
+ # space by setting the `membership.member.name` to `users/user@example.com` or `
475
+ # users/123456789`. For a named space or group chat, if the caller blocks, or is
476
+ # blocked by some members, or doesn't have permission to add some members, then
477
+ # those members aren't added to the created space. To create a direct message (
478
+ # DM) between the calling user and another human user, specify exactly one
479
+ # membership to represent the human user. If one user blocks the other, the
480
+ # request fails and the DM isn't created. To create a DM between the calling
481
+ # user and the calling app, set `Space.singleUserBotDm` to `true` and don't
482
+ # specify any memberships. You can only use this method to set up a DM with the
483
+ # calling app. To add the calling app as a member of a space or an existing DM
484
+ # between two human users, see [Invite or add a user or app to a space](https://
485
+ # developers.google.com/workspace/chat/create-members). If a DM already exists
486
+ # between two users, even when one user blocks the other at the time a request
487
+ # is made, then the existing DM is returned. Spaces with threaded replies aren't
488
+ # supported. If you receive the error message `ALREADY_EXISTS` when setting up a
489
+ # space, try a different `displayName`. An existing space within the Google
490
+ # Workspace organization might already use this display name. Requires [user
491
+ # authentication](https://developers.google.com/workspace/chat/authenticate-
492
+ # authorize-chat-user).
490
493
  # @param [Google::Apis::ChatV1::SetUpSpaceRequest] set_up_space_request_object
491
494
  # @param [String] fields
492
495
  # Selector specifying which fields to include in a partial response.
@@ -524,16 +527,15 @@ module Google
524
527
  # accept the space invitation before joining. Otherwise, creating a membership
525
528
  # adds the member directly to the specified space. Requires [user authentication]
526
529
  # (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`.
530
+ # . To specify the member to add, set the `membership.member.name` for the human
531
+ # or app member. - To add the calling app to a space or a direct message between
532
+ # two human users, use `users/app`. Unable to add other apps to the space. - To
533
+ # add a human user, use `users/`user``, where ``user`` can be the email address
534
+ # for the user. For users in the same Workspace organization ``user`` can also
535
+ # be the `id` for the person from the People API, or the `id` for the user in
536
+ # the Directory API. For example, if the People API Person profile ID for `user@
537
+ # example.com` is `123456789`, you can add the user to the space by setting the `
538
+ # membership.member.name` to `users/user@example.com` or `users/123456789`.
537
539
  # @param [String] parent
538
540
  # Required. The resource name of the space for which to create the membership.
539
541
  # Format: spaces/`space`
@@ -673,13 +675,16 @@ module Google
673
675
  # spaces.members#membershiprole)) and type ([`member.type`](https://developers.
674
676
  # google.com/workspace/chat/api/reference/rest/v1/User#type)). To filter by role,
675
677
  # 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.
678
+ # type` to `HUMAN` or `BOT`. Developer Preview: You can also filter for `member.
679
+ # type` using the `!=` operator. To filter by both role and type, use the `AND`
680
+ # operator. To filter by either role or type, use the `OR` operator. Either `
681
+ # member.type = "HUMAN"` or `member.type != "BOT"` is required when `
682
+ # use_admin_access` is set to true. Other member type filters will be rejected.
683
+ # For example, the following queries are valid: ``` role = "ROLE_MANAGER" OR
684
+ # role = "ROLE_MEMBER" member.type = "HUMAN" AND role = "ROLE_MANAGER" member.
685
+ # type != "BOT" ``` The following queries are invalid: ``` member.type = "HUMAN"
686
+ # AND member.type = "BOT" role = "ROLE_MANAGER" AND role = "ROLE_MEMBER" ```
687
+ # Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.
683
688
  # @param [Fixnum] page_size
684
689
  # Optional. The maximum number of memberships to return. The service might
685
690
  # return fewer than this value. If unspecified, at most 100 memberships are
@@ -734,8 +739,10 @@ module Google
734
739
  execute_or_queue_command(command, &block)
735
740
  end
736
741
 
737
- # Updates a membership. Requires [user authentication](https://developers.google.
738
- # com/workspace/chat/authenticate-authorize-chat-user).
742
+ # Updates a membership. For an example, see [Update a user's membership in a
743
+ # space](https://developers.google.com/workspace/chat/update-members). Requires [
744
+ # user authentication](https://developers.google.com/workspace/chat/authenticate-
745
+ # authorize-chat-user).
739
746
  # @param [String] name
740
747
  # Resource name of the membership, assigned by the server. Format: `spaces/`
741
748
  # space`/members/`member``
@@ -773,9 +780,10 @@ module Google
773
780
  execute_or_queue_command(command, &block)
774
781
  end
775
782
 
776
- # Creates a message in a Google Chat space. For an example, see [Send a message](
777
- # https://developers.google.com/workspace/chat/create-messages). Calling this
778
- # method requires [authentication](https://developers.google.com/workspace/chat/
783
+ # Creates a message in a Google Chat space. The maximum message size, including
784
+ # text and cards, is 32,000 bytes. For an example, see [Send a message](https://
785
+ # developers.google.com/workspace/chat/create-messages). Calling this method
786
+ # requires [authentication](https://developers.google.com/workspace/chat/
779
787
  # authenticate-authorize) and supports the following authentication types: - For
780
788
  # text messages, user authentication or app authentication are supported. - For
781
789
  # card messages, only app authentication is supported. (Only Chat apps can
@@ -1139,8 +1147,8 @@ module Google
1139
1147
  # attachments). Requires [app authentication](https://developers.google.com/
1140
1148
  # workspace/chat/authenticate-authorize-chat-app).
1141
1149
  # @param [String] name
1142
- # Required. Resource name of the attachment, in the form `spaces/*/messages/*/
1143
- # attachments/*`.
1150
+ # Required. Resource name of the attachment, in the form `spaces/`space`/
1151
+ # messages/`message`/attachments/`attachment``.
1144
1152
  # @param [String] fields
1145
1153
  # Selector specifying which fields to include in a partial response.
1146
1154
  # @param [String] quota_user
@@ -1425,6 +1433,135 @@ module Google
1425
1433
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1426
1434
  execute_or_queue_command(command, &block)
1427
1435
  end
1436
+
1437
+ # Returns details about a user's read state within a space, used to identify
1438
+ # read and unread messages. For an example, see [Get details about a user's
1439
+ # space read state](https://developers.google.com/workspace/chat/get-space-read-
1440
+ # state). Requires [user authentication](https://developers.google.com/workspace/
1441
+ # chat/authenticate-authorize-chat-user).
1442
+ # @param [String] name
1443
+ # Required. Resource name of the space read state to retrieve. Only supports
1444
+ # getting read state for the calling user. To refer to the calling user, set one
1445
+ # of the following: - The `me` alias. For example, `users/me/spaces/`space`/
1446
+ # spaceReadState`. - Their Workspace email address. For example, `users/user@
1447
+ # example.com/spaces/`space`/spaceReadState`. - Their user id. For example, `
1448
+ # users/123456789/spaces/`space`/spaceReadState`. Format: users/`user`/spaces/`
1449
+ # space`/spaceReadState
1450
+ # @param [String] fields
1451
+ # Selector specifying which fields to include in a partial response.
1452
+ # @param [String] quota_user
1453
+ # Available to use for quota purposes for server-side applications. Can be any
1454
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1455
+ # @param [Google::Apis::RequestOptions] options
1456
+ # Request-specific options
1457
+ #
1458
+ # @yield [result, err] Result & error if block supplied
1459
+ # @yieldparam result [Google::Apis::ChatV1::SpaceReadState] parsed result object
1460
+ # @yieldparam err [StandardError] error object if request failed
1461
+ #
1462
+ # @return [Google::Apis::ChatV1::SpaceReadState]
1463
+ #
1464
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1465
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1466
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1467
+ def get_user_space_space_read_state(name, fields: nil, quota_user: nil, options: nil, &block)
1468
+ command = make_simple_command(:get, 'v1/{+name}', options)
1469
+ command.response_representation = Google::Apis::ChatV1::SpaceReadState::Representation
1470
+ command.response_class = Google::Apis::ChatV1::SpaceReadState
1471
+ command.params['name'] = name unless name.nil?
1472
+ command.query['fields'] = fields unless fields.nil?
1473
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1474
+ execute_or_queue_command(command, &block)
1475
+ end
1476
+
1477
+ # Updates a user's read state within a space, used to identify read and unread
1478
+ # messages. For an example, see [Update a user's space read state](https://
1479
+ # developers.google.com/workspace/chat/update-space-read-state). Requires [user
1480
+ # authentication](https://developers.google.com/workspace/chat/authenticate-
1481
+ # authorize-chat-user).
1482
+ # @param [String] name
1483
+ # Resource name of the space read state. Format: `users/`user`/spaces/`space`/
1484
+ # spaceReadState`
1485
+ # @param [Google::Apis::ChatV1::SpaceReadState] space_read_state_object
1486
+ # @param [String] update_mask
1487
+ # Required. The field paths to update. Currently supported field paths: - `
1488
+ # last_read_time` When the `last_read_time` is before the latest message create
1489
+ # time, the space appears as unread in the UI. To mark the space as read, set `
1490
+ # last_read_time` to any value later (larger) than the latest message create
1491
+ # time. The `last_read_time` is coerced to match the latest message create time.
1492
+ # Note that the space read state only affects the read state of messages that
1493
+ # are visible in the space's top-level conversation. Replies in threads are
1494
+ # unaffected by this timestamp, and instead rely on the thread read state.
1495
+ # @param [String] fields
1496
+ # Selector specifying which fields to include in a partial response.
1497
+ # @param [String] quota_user
1498
+ # Available to use for quota purposes for server-side applications. Can be any
1499
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1500
+ # @param [Google::Apis::RequestOptions] options
1501
+ # Request-specific options
1502
+ #
1503
+ # @yield [result, err] Result & error if block supplied
1504
+ # @yieldparam result [Google::Apis::ChatV1::SpaceReadState] parsed result object
1505
+ # @yieldparam err [StandardError] error object if request failed
1506
+ #
1507
+ # @return [Google::Apis::ChatV1::SpaceReadState]
1508
+ #
1509
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1510
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1511
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1512
+ def update_user_space_space_read_state(name, space_read_state_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1513
+ command = make_simple_command(:patch, 'v1/{+name}', options)
1514
+ command.request_representation = Google::Apis::ChatV1::SpaceReadState::Representation
1515
+ command.request_object = space_read_state_object
1516
+ command.response_representation = Google::Apis::ChatV1::SpaceReadState::Representation
1517
+ command.response_class = Google::Apis::ChatV1::SpaceReadState
1518
+ command.params['name'] = name unless name.nil?
1519
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1520
+ command.query['fields'] = fields unless fields.nil?
1521
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1522
+ execute_or_queue_command(command, &block)
1523
+ end
1524
+
1525
+ # Returns details about a user's read state within a thread, used to identify
1526
+ # read and unread messages. For an example, see [Get details about a user's
1527
+ # thread read state](https://developers.google.com/workspace/chat/get-thread-
1528
+ # read-state). Requires [user authentication](https://developers.google.com/
1529
+ # workspace/chat/authenticate-authorize-chat-user).
1530
+ # @param [String] name
1531
+ # Required. Resource name of the thread read state to retrieve. Only supports
1532
+ # getting read state for the calling user. To refer to the calling user, set one
1533
+ # of the following: - The `me` alias. For example, `users/me/spaces/`space`/
1534
+ # threads/`thread`/threadReadState`. - Their Workspace email address. For
1535
+ # example, `users/user@example.com/spaces/`space`/threads/`thread`/
1536
+ # threadReadState`. - Their user id. For example, `users/123456789/spaces/`space`
1537
+ # /threads/`thread`/threadReadState`. Format: users/`user`/spaces/`space`/
1538
+ # threads/`thread`/threadReadState
1539
+ # @param [String] fields
1540
+ # Selector specifying which fields to include in a partial response.
1541
+ # @param [String] quota_user
1542
+ # Available to use for quota purposes for server-side applications. Can be any
1543
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1544
+ # @param [Google::Apis::RequestOptions] options
1545
+ # Request-specific options
1546
+ #
1547
+ # @yield [result, err] Result & error if block supplied
1548
+ # @yieldparam result [Google::Apis::ChatV1::ThreadReadState] parsed result object
1549
+ # @yieldparam err [StandardError] error object if request failed
1550
+ #
1551
+ # @return [Google::Apis::ChatV1::ThreadReadState]
1552
+ #
1553
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1554
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1555
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1556
+ def get_user_space_thread_thread_read_state(name, fields: nil, quota_user: nil, options: nil, &block)
1557
+ command = make_simple_command(:get, 'v1/{+name}', options)
1558
+ command.response_representation = Google::Apis::ChatV1::ThreadReadState::Representation
1559
+ command.response_class = Google::Apis::ChatV1::ThreadReadState
1560
+ command.params['name'] = name unless name.nil?
1561
+ command.query['fields'] = fields unless fields.nil?
1562
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1563
+ execute_or_queue_command(command, &block)
1564
+ end
1428
1565
 
1429
1566
  protected
1430
1567
 
@@ -39,7 +39,7 @@ module Google
39
39
  # Import spaces, messages, and memberships into Google Chat.
40
40
  AUTH_CHAT_IMPORT = 'https://www.googleapis.com/auth/chat.import'
41
41
 
42
- # View, add, and remove members from conversations in Google Chat
42
+ # View, add, update, and remove members from conversations in Google Chat
43
43
  AUTH_CHAT_MEMBERSHIPS = 'https://www.googleapis.com/auth/chat.memberships'
44
44
 
45
45
  # Add and remove itself from conversations in Google Chat
@@ -74,6 +74,12 @@ module Google
74
74
 
75
75
  # View chat and spaces in Google Chat
76
76
  AUTH_CHAT_SPACES_READONLY = 'https://www.googleapis.com/auth/chat.spaces.readonly'
77
+
78
+ # View and modify last read time for Google Chat conversations
79
+ AUTH_CHAT_USERS_READSTATE = 'https://www.googleapis.com/auth/chat.users.readstate'
80
+
81
+ # View last read time for Google Chat conversations
82
+ AUTH_CHAT_USERS_READSTATE_READONLY = 'https://www.googleapis.com/auth/chat.users.readstate.readonly'
77
83
  end
78
84
  end
79
85
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-chat_v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.91.0
4
+ version: 0.93.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-21 00:00:00.000000000 Z
11
+ date: 2024-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.14.0
19
+ version: 0.15.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.14.0
29
+ version: 0.15.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -58,7 +58,7 @@ licenses:
58
58
  metadata:
59
59
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
60
60
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-chat_v1/CHANGELOG.md
61
- documentation_uri: https://googleapis.dev/ruby/google-apis-chat_v1/v0.91.0
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-chat_v1/v0.93.0
62
62
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-chat_v1
63
63
  post_install_message:
64
64
  rdoc_options: []