google-apis-chat_v1 0.149.0 → 0.150.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2aedfbf1c6b3d1fc132d1538a517f01c24ca6aecfb9f448495c2d3686caf8b25
4
- data.tar.gz: 1a93ac08861808090ba2bc440d52a9d2c41294776c3a4e0a0d9ff5a353e647d1
3
+ metadata.gz: d3856cf6db1d5e56b5afdd5074c058f35bb9924421f4ff6c7f622ac22d20f5dc
4
+ data.tar.gz: 2b8dec4bc97193c758f0aa80f183fee8c9ab543c89683bcbb683d79d8e5f13f7
5
5
  SHA512:
6
- metadata.gz: d09ab92a5e027b7634204dc5517757bf6d54634da00ae77c3f55c2d6388acd691a7e9f392f2b71c0aa088467ab159eaff3c777d0a9f70a5748b6f71f6f64378b
7
- data.tar.gz: 22174968827440265357f1671f24422f5ae69f5825f0faa3f207c14e446dc132442eeab0ab88a622911796d81281e01ec4b2c5bb64c97989f55241608e2d004f
6
+ metadata.gz: b6116cbd536de712b3a7be06b0e35f7c0a1c91df0b56e677ebe13c28fd2315fc229266ea3e48d24e813939f68856b57336442726b31c86e465749b725e8c04d9
7
+ data.tar.gz: fce7e1458d0291d72e5e529d4faa53a6ff462c8a45f63d54678cd8df445f61e31883fc4d7589288f907978fe78bc68c01e1b9edd2e933bb9c30ab7523d9a2429
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release history for google-apis-chat_v1
2
2
 
3
+ ### v0.150.0 (2026-06-28)
4
+
5
+ * Regenerated from discovery document revision 20260623
6
+
3
7
  ### v0.149.0 (2026-06-14)
4
8
 
5
9
  * Regenerated from discovery document revision 20260607
@@ -389,6 +389,51 @@ module Google
389
389
  end
390
390
  end
391
391
 
392
+ # Represents a user's current availability information in Google Chat, including
393
+ # their state (for example, Active, Away, Do Not Disturb) and any custom status.
394
+ class Availability
395
+ include Google::Apis::Core::Hashable
396
+
397
+ # Represents a user's custom status in Google Chat. This includes a short text
398
+ # message with an optional emoji that a user sets to give more context about
399
+ # their availability.
400
+ # Corresponds to the JSON property `customStatus`
401
+ # @return [Google::Apis::ChatV1::CustomStatus]
402
+ attr_accessor :custom_status
403
+
404
+ # Metadata associated with the `DO_NOT_DISTURB` availability state, specifying
405
+ # when the state is set to expire.
406
+ # Corresponds to the JSON property `doNotDisturbMetadata`
407
+ # @return [Google::Apis::ChatV1::DoNotDisturbMetadata]
408
+ attr_accessor :do_not_disturb_metadata
409
+
410
+ # Identifier. Resource name of the user's availability. Format: `users/`user`/
411
+ # availability` ``user`` is the id for the Person in the People API or Admin SDK
412
+ # directory API. For example, `users/123456789`. The user's email address or `me`
413
+ # can also be used as an alias to refer to the caller. For example, `users/user@
414
+ # example.com` or `users/me`.
415
+ # Corresponds to the JSON property `name`
416
+ # @return [String]
417
+ attr_accessor :name
418
+
419
+ # Output only. The user's current availability state.
420
+ # Corresponds to the JSON property `state`
421
+ # @return [String]
422
+ attr_accessor :state
423
+
424
+ def initialize(**args)
425
+ update!(**args)
426
+ end
427
+
428
+ # Update properties of this object
429
+ def update!(**args)
430
+ @custom_status = args[:custom_status] if args.key?(:custom_status)
431
+ @do_not_disturb_metadata = args[:do_not_disturb_metadata] if args.key?(:do_not_disturb_metadata)
432
+ @name = args[:name] if args.key?(:name)
433
+ @state = args[:state] if args.key?(:state)
434
+ end
435
+ end
436
+
392
437
  # A button. Can be a text button or an image button.
393
438
  class Button
394
439
  include Google::Apis::Core::Hashable
@@ -1050,6 +1095,46 @@ module Google
1050
1095
  end
1051
1096
  end
1052
1097
 
1098
+ # Represents a user's custom status in Google Chat. This includes a short text
1099
+ # message with an optional emoji that a user sets to give more context about
1100
+ # their availability.
1101
+ class CustomStatus
1102
+ include Google::Apis::Core::Hashable
1103
+
1104
+ # An emoji that is used as a reaction to a message.
1105
+ # Corresponds to the JSON property `emoji`
1106
+ # @return [Google::Apis::ChatV1::Emoji]
1107
+ attr_accessor :emoji
1108
+
1109
+ # The timestamp when the custom status expires.
1110
+ # Corresponds to the JSON property `expireTime`
1111
+ # @return [String]
1112
+ attr_accessor :expire_time
1113
+
1114
+ # Required. The text of the custom status. This will be a string with maximum
1115
+ # length of 64.
1116
+ # Corresponds to the JSON property `text`
1117
+ # @return [String]
1118
+ attr_accessor :text
1119
+
1120
+ # Input only. The time-to-live duration after which the custom status expires.
1121
+ # Corresponds to the JSON property `ttl`
1122
+ # @return [String]
1123
+ attr_accessor :ttl
1124
+
1125
+ def initialize(**args)
1126
+ update!(**args)
1127
+ end
1128
+
1129
+ # Update properties of this object
1130
+ def update!(**args)
1131
+ @emoji = args[:emoji] if args.key?(:emoji)
1132
+ @expire_time = args[:expire_time] if args.key?(:expire_time)
1133
+ @text = args[:text] if args.key?(:text)
1134
+ @ttl = args[:ttl] if args.key?(:ttl)
1135
+ end
1136
+ end
1137
+
1053
1138
  # Date input values.
1054
1139
  class DateInput
1055
1140
  include Google::Apis::Core::Hashable
@@ -1345,6 +1430,27 @@ module Google
1345
1430
  end
1346
1431
  end
1347
1432
 
1433
+ # Metadata associated with the `DO_NOT_DISTURB` availability state, specifying
1434
+ # when the state is set to expire.
1435
+ class DoNotDisturbMetadata
1436
+ include Google::Apis::Core::Hashable
1437
+
1438
+ # Output only. Timestamp until which the user should be marked as DO_NOT_DISTURB.
1439
+ # This can be maximum of 1 year in the future.
1440
+ # Corresponds to the JSON property `expirationTime`
1441
+ # @return [String]
1442
+ attr_accessor :expiration_time
1443
+
1444
+ def initialize(**args)
1445
+ update!(**args)
1446
+ end
1447
+
1448
+ # Update properties of this object
1449
+ def update!(**args)
1450
+ @expiration_time = args[:expiration_time] if args.key?(:expiration_time)
1451
+ end
1452
+ end
1453
+
1348
1454
  # A reference to the data of a drive attachment.
1349
1455
  class DriveDataRef
1350
1456
  include Google::Apis::Core::Hashable
@@ -4877,6 +4983,71 @@ module Google
4877
4983
  end
4878
4984
  end
4879
4985
 
4986
+ # Request message for the `MarkAsActive` method.
4987
+ class MarkAsActiveRequest
4988
+ include Google::Apis::Core::Hashable
4989
+
4990
+ # The absolute timestamp when the ACTIVE state expires.
4991
+ # Corresponds to the JSON property `expireTime`
4992
+ # @return [String]
4993
+ attr_accessor :expire_time
4994
+
4995
+ # The duration from the current time until the ACTIVE state expires. Using a
4996
+ # short TTL can effectively reset the user's state to be based on activity after
4997
+ # this brief duration.
4998
+ # Corresponds to the JSON property `ttl`
4999
+ # @return [String]
5000
+ attr_accessor :ttl
5001
+
5002
+ def initialize(**args)
5003
+ update!(**args)
5004
+ end
5005
+
5006
+ # Update properties of this object
5007
+ def update!(**args)
5008
+ @expire_time = args[:expire_time] if args.key?(:expire_time)
5009
+ @ttl = args[:ttl] if args.key?(:ttl)
5010
+ end
5011
+ end
5012
+
5013
+ # Request message for the `MarkAsAway` method.
5014
+ class MarkAsAwayRequest
5015
+ include Google::Apis::Core::Hashable
5016
+
5017
+ def initialize(**args)
5018
+ update!(**args)
5019
+ end
5020
+
5021
+ # Update properties of this object
5022
+ def update!(**args)
5023
+ end
5024
+ end
5025
+
5026
+ # Request message for the `MarkAsDoNotDisturb` method.
5027
+ class MarkAsDoNotDisturbRequest
5028
+ include Google::Apis::Core::Hashable
5029
+
5030
+ # The absolute timestamp when the DND state expires.
5031
+ # Corresponds to the JSON property `expireTime`
5032
+ # @return [String]
5033
+ attr_accessor :expire_time
5034
+
5035
+ # The duration from the current time until the DND state expires.
5036
+ # Corresponds to the JSON property `ttl`
5037
+ # @return [String]
5038
+ attr_accessor :ttl
5039
+
5040
+ def initialize(**args)
5041
+ update!(**args)
5042
+ end
5043
+
5044
+ # Update properties of this object
5045
+ def update!(**args)
5046
+ @expire_time = args[:expire_time] if args.key?(:expire_time)
5047
+ @ttl = args[:ttl] if args.key?(:ttl)
5048
+ end
5049
+ end
5050
+
4880
5051
  # A matched URL in a Chat message. Chat apps can preview matched URLs. For more
4881
5052
  # information, see [Preview links](https://developers.google.com/chat/how-tos/
4882
5053
  # preview-links).
@@ -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.149.0"
19
+ GEM_VERSION = "0.150.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
22
  GENERATOR_VERSION = "0.19.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20260607"
25
+ REVISION = "20260623"
26
26
  end
27
27
  end
28
28
  end
@@ -82,6 +82,12 @@ module Google
82
82
  include Google::Apis::Core::JsonObjectSupport
83
83
  end
84
84
 
85
+ class Availability
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+
88
+ include Google::Apis::Core::JsonObjectSupport
89
+ end
90
+
85
91
  class Button
86
92
  class Representation < Google::Apis::Core::JsonRepresentation; end
87
93
 
@@ -178,6 +184,12 @@ module Google
178
184
  include Google::Apis::Core::JsonObjectSupport
179
185
  end
180
186
 
187
+ class CustomStatus
188
+ class Representation < Google::Apis::Core::JsonRepresentation; end
189
+
190
+ include Google::Apis::Core::JsonObjectSupport
191
+ end
192
+
181
193
  class DateInput
182
194
  class Representation < Google::Apis::Core::JsonRepresentation; end
183
195
 
@@ -214,6 +226,12 @@ module Google
214
226
  include Google::Apis::Core::JsonObjectSupport
215
227
  end
216
228
 
229
+ class DoNotDisturbMetadata
230
+ class Representation < Google::Apis::Core::JsonRepresentation; end
231
+
232
+ include Google::Apis::Core::JsonObjectSupport
233
+ end
234
+
217
235
  class DriveDataRef
218
236
  class Representation < Google::Apis::Core::JsonRepresentation; end
219
237
 
@@ -658,6 +676,24 @@ module Google
658
676
  include Google::Apis::Core::JsonObjectSupport
659
677
  end
660
678
 
679
+ class MarkAsActiveRequest
680
+ class Representation < Google::Apis::Core::JsonRepresentation; end
681
+
682
+ include Google::Apis::Core::JsonObjectSupport
683
+ end
684
+
685
+ class MarkAsAwayRequest
686
+ class Representation < Google::Apis::Core::JsonRepresentation; end
687
+
688
+ include Google::Apis::Core::JsonObjectSupport
689
+ end
690
+
691
+ class MarkAsDoNotDisturbRequest
692
+ class Representation < Google::Apis::Core::JsonRepresentation; end
693
+
694
+ include Google::Apis::Core::JsonObjectSupport
695
+ end
696
+
661
697
  class MatchedUrl
662
698
  class Representation < Google::Apis::Core::JsonRepresentation; end
663
699
 
@@ -1142,6 +1178,18 @@ module Google
1142
1178
  end
1143
1179
  end
1144
1180
 
1181
+ class Availability
1182
+ # @private
1183
+ class Representation < Google::Apis::Core::JsonRepresentation
1184
+ property :custom_status, as: 'customStatus', class: Google::Apis::ChatV1::CustomStatus, decorator: Google::Apis::ChatV1::CustomStatus::Representation
1185
+
1186
+ property :do_not_disturb_metadata, as: 'doNotDisturbMetadata', class: Google::Apis::ChatV1::DoNotDisturbMetadata, decorator: Google::Apis::ChatV1::DoNotDisturbMetadata::Representation
1187
+
1188
+ property :name, as: 'name'
1189
+ property :state, as: 'state'
1190
+ end
1191
+ end
1192
+
1145
1193
  class Button
1146
1194
  # @private
1147
1195
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1295,6 +1343,17 @@ module Google
1295
1343
  end
1296
1344
  end
1297
1345
 
1346
+ class CustomStatus
1347
+ # @private
1348
+ class Representation < Google::Apis::Core::JsonRepresentation
1349
+ property :emoji, as: 'emoji', class: Google::Apis::ChatV1::Emoji, decorator: Google::Apis::ChatV1::Emoji::Representation
1350
+
1351
+ property :expire_time, as: 'expireTime'
1352
+ property :text, as: 'text'
1353
+ property :ttl, as: 'ttl'
1354
+ end
1355
+ end
1356
+
1298
1357
  class DateInput
1299
1358
  # @private
1300
1359
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1363,6 +1422,13 @@ module Google
1363
1422
  end
1364
1423
  end
1365
1424
 
1425
+ class DoNotDisturbMetadata
1426
+ # @private
1427
+ class Representation < Google::Apis::Core::JsonRepresentation
1428
+ property :expiration_time, as: 'expirationTime'
1429
+ end
1430
+ end
1431
+
1366
1432
  class DriveDataRef
1367
1433
  # @private
1368
1434
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -2193,6 +2259,28 @@ module Google
2193
2259
  end
2194
2260
  end
2195
2261
 
2262
+ class MarkAsActiveRequest
2263
+ # @private
2264
+ class Representation < Google::Apis::Core::JsonRepresentation
2265
+ property :expire_time, as: 'expireTime'
2266
+ property :ttl, as: 'ttl'
2267
+ end
2268
+ end
2269
+
2270
+ class MarkAsAwayRequest
2271
+ # @private
2272
+ class Representation < Google::Apis::Core::JsonRepresentation
2273
+ end
2274
+ end
2275
+
2276
+ class MarkAsDoNotDisturbRequest
2277
+ # @private
2278
+ class Representation < Google::Apis::Core::JsonRepresentation
2279
+ property :expire_time, as: 'expireTime'
2280
+ property :ttl, as: 'ttl'
2281
+ end
2282
+ end
2283
+
2196
2284
  class MatchedUrl
2197
2285
  # @private
2198
2286
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -837,6 +837,7 @@ module Google
837
837
  # chat/search-manage-admin). When `use_admin_access` is set to `false`, the
838
838
  # results are limited to spaces where the calling user is a joined member. To
839
839
  # search with administrator privileges, set `use_admin_access` to `true`.
840
+ # Setting `use_admin_access` to `false` is available under Developer Preview.
840
841
  # Supports the following types of [authentication](https://developers.google.com/
841
842
  # workspace/chat/authenticate-authorize): - [User authentication](https://
842
843
  # developers.google.com/workspace/chat/authenticate-authorize-chat-user) with
@@ -879,49 +880,53 @@ module Google
879
880
  # `display_name` - `external_user_allowed` `create_time` and `last_active_time`
880
881
  # accept a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339)
881
882
  # format and the supported comparison operators are: `=`, `<`, `>`, `<=`, `>=`. `
882
- # customer` is required and is used to indicate which customer to fetch spaces
883
- # from. `customers/my_customer` is the only supported value. `display_name` only
884
- # accepts the `HAS` (`:`) operator. The text to match is first tokenized into
885
- # tokens and each token is prefix-matched case-insensitively and independently
886
- # as a substring anywhere in the space's `display_name`. For example, `Fun Eve`
887
- # matches `Fun event` or `The evening was fun`, but not `notFun event` or `even`.
888
- # When `useAdminAccess` is set to `false`, `display_name` is required to
889
- # retrieve meaningful results. Otherwise, the default behavior is to return an
890
- # empty response. `external_user_allowed` accepts either `true` or `false`. `
891
- # space_history_state` only accepts values from the [`historyState`] (https://
892
- # developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.
893
- # HistoryState) field of a `space` resource. `space_type` is required and the
894
- # only valid value is `SPACE`. Across different fields, only `AND` operators are
895
- # supported. A valid example is `space_type = "SPACE" AND display_name:"Hello"`
896
- # and an invalid example is `space_type = "SPACE" OR display_name:"Hello"`.
897
- # Among the same field, `space_type` doesn't support `AND` or `OR` operators. `
898
- # display_name`, 'space_history_state', and 'external_user_allowed' only support
899
- # `OR` operators. `last_active_time` and `create_time` support both `AND` and `
900
- # OR` operators. `AND` can only be used to represent an interval, such as `
901
- # last_active_time < "2022-01-01T00:00:00+00:00" AND last_active_time > "2023-01-
902
- # 01T00:00:00+00:00"`. The following example queries are valid when `
903
- # useAdminAccess` is set to `true`: ``` customer = "customers/my_customer" AND
904
- # space_type = "SPACE" customer = "customers/my_customer" AND space_type = "
905
- # SPACE" AND display_name:"Hello World" customer = "customers/my_customer" AND
906
- # space_type = "SPACE" AND (last_active_time < "2020-01-01T00:00:00+00:00" OR
907
- # last_active_time > "2022-01-01T00:00:00+00:00") customer = "customers/
908
- # my_customer" AND space_type = "SPACE" AND (display_name:"Hello World" OR
909
- # display_name:"Fun event") AND (last_active_time > "2020-01-01T00:00:00+00:00"
910
- # AND last_active_time < "2022-01-01T00:00:00+00:00") customer = "customers/
911
- # my_customer" AND space_type = "SPACE" AND (create_time > "2019-01-01T00:00:00+
912
- # 00:00" AND create_time < "2020-01-01T00:00:00+00:00") AND (
913
- # external_user_allowed = "true") AND (space_history_state = "HISTORY_ON" OR
883
+ # customer` is required when `useAdminAccess` is set to `true`, and is used to
884
+ # indicate which customer to fetch spaces from. `customers/my_customer` is the
885
+ # only supported value. `display_name` only accepts the `HAS` (`:`) operator.
886
+ # The text to match is first tokenized into tokens and each token is prefix-
887
+ # matched case-insensitively and independently as a substring anywhere in the
888
+ # space's `display_name`. For example, `Fun Eve` matches `Fun event` or `The
889
+ # evening was fun`, but not `notFun event` or `even`. When `useAdminAccess` is
890
+ # set to `false`, `display_name` is required to retrieve meaningful results.
891
+ # Otherwise, the default behavior is to return an empty response. `
892
+ # external_user_allowed` accepts either `true` or `false`. `space_history_state`
893
+ # only accepts values from the [`historyState`] (https://developers.google.com/
894
+ # workspace/chat/api/reference/rest/v1/spaces#Space.HistoryState) field of a `
895
+ # space` resource. `space_type` is required when `useAdminAccess` is set to `
896
+ # true`, and the only valid value is `SPACE`. Across different fields, only `AND`
897
+ # operators are supported. A valid example is `space_type = "SPACE" AND
898
+ # display_name:"Hello"` and an invalid example is `space_type = "SPACE" OR
899
+ # display_name:"Hello"`. Among the same field, `space_type` doesn't support `AND`
900
+ # or `OR` operators. `display_name`, 'space_history_state', and '
901
+ # external_user_allowed' only support `OR` operators. `last_active_time` and `
902
+ # create_time` support both `AND` and `OR` operators. `AND` can only be used to
903
+ # represent an interval, such as `last_active_time < "2022-01-01T00:00:00+00:00"
904
+ # AND last_active_time > "2023-01-01T00:00:00+00:00"`. The following example
905
+ # queries are valid when `useAdminAccess` is set to `true`: ``` customer = "
906
+ # customers/my_customer" AND space_type = "SPACE" customer = "customers/
907
+ # my_customer" AND space_type = "SPACE" AND display_name:"Hello World" customer =
908
+ # "customers/my_customer" AND space_type = "SPACE" AND (last_active_time < "
909
+ # 2020-01-01T00:00:00+00:00" OR last_active_time > "2022-01-01T00:00:00+00:00")
910
+ # customer = "customers/my_customer" AND space_type = "SPACE" AND (display_name:"
911
+ # Hello World" OR display_name:"Fun event") AND (last_active_time > "2020-01-
912
+ # 01T00:00:00+00:00" AND last_active_time < "2022-01-01T00:00:00+00:00")
913
+ # customer = "customers/my_customer" AND space_type = "SPACE" AND (create_time >
914
+ # "2019-01-01T00:00:00+00:00" AND create_time < "2020-01-01T00:00:00+00:00") AND
915
+ # (external_user_allowed = "true") AND (space_history_state = "HISTORY_ON" OR
914
916
  # space_history_state = "HISTORY_OFF") ``` The following example queries are
915
917
  # valid when `useAdminAccess` is set to `false`: ``` display_name:"Hello World" (
916
- # display_name:"Hello" OR display_name:"Fun") (external_user_allowed = "true") (
917
- # external_user_allowed = "true" AND display_name:"Hello") ```
918
+ # display_name:"Hello" OR display_name:"Fun") (external_user_allowed = "true") //
919
+ # Returns an empty response. (external_user_allowed = "true" AND display_name:"
920
+ # Hello") ```
918
921
  # @param [Boolean] use_admin_access
919
922
  # When `true`, the method runs using the user's Google Workspace administrator
920
923
  # privileges. The calling user must be a Google Workspace administrator with the
921
924
  # [manage chat and spaces conversations privilege](https://support.google.com/a/
922
925
  # answer/13369245). Requires either the `chat.admin.spaces.readonly` or `chat.
923
926
  # admin.spaces` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/
924
- # authenticate-authorize#chat-api-scopes).
927
+ # authenticate-authorize#chat-api-scopes). Setting `use_admin_access` to `false`
928
+ # is available under Developer Preview. [Developer Preview](https://developers.
929
+ # google.com/workspace/preview).
925
930
  # @param [String] fields
926
931
  # Selector specifying which fields to include in a partial response.
927
932
  # @param [String] quota_user
@@ -2156,6 +2161,226 @@ module Google
2156
2161
  execute_or_queue_command(command, &block)
2157
2162
  end
2158
2163
 
2164
+ # Returns availability information for a human user in Google Chat. For example,
2165
+ # this can be used to check if a user is online or away, or to retrieve their
2166
+ # custom status message. This method only retrieves the authenticated user's
2167
+ # availability. Requires [user authentication](https://developers.google.com/
2168
+ # workspace/chat/authenticate-authorize-chat-user) with one of the following [
2169
+ # authorization scopes](https://developers.google.com/workspace/chat/
2170
+ # authenticate-authorize#chat-api-scopes): - `https://www.googleapis.com/auth/
2171
+ # chat.users.availability.readonly` - `https://www.googleapis.com/auth/chat.
2172
+ # users.availability`
2173
+ # @param [String] name
2174
+ # Required. The resource name of the availability to retrieve. Format: users/`
2175
+ # user`/availability ``user`` is the id for the Person in the People API or
2176
+ # Admin SDK directory API. For example, `users/123456789`. The user's email
2177
+ # address or `me` can also be used as an alias to refer to the caller. For
2178
+ # example, `users/user@example.com` or `users/me`.
2179
+ # @param [String] fields
2180
+ # Selector specifying which fields to include in a partial response.
2181
+ # @param [String] quota_user
2182
+ # Available to use for quota purposes for server-side applications. Can be any
2183
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2184
+ # @param [Google::Apis::RequestOptions] options
2185
+ # Request-specific options
2186
+ #
2187
+ # @yield [result, err] Result & error if block supplied
2188
+ # @yieldparam result [Google::Apis::ChatV1::Availability] parsed result object
2189
+ # @yieldparam err [StandardError] error object if request failed
2190
+ #
2191
+ # @return [Google::Apis::ChatV1::Availability]
2192
+ #
2193
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2194
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2195
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2196
+ def get_user_availability_availability(name, fields: nil, quota_user: nil, options: nil, &block)
2197
+ command = make_simple_command(:get, 'v1/{+name}', options)
2198
+ command.response_representation = Google::Apis::ChatV1::Availability::Representation
2199
+ command.response_class = Google::Apis::ChatV1::Availability
2200
+ command.params['name'] = name unless name.nil?
2201
+ command.query['fields'] = fields unless fields.nil?
2202
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2203
+ execute_or_queue_command(command, &block)
2204
+ end
2205
+
2206
+ # Marks user as `ACTIVE` in Google Chat. Sets the user's availability state to `
2207
+ # ACTIVE`. The `ACTIVE` state lasts until the specified expiration, at which
2208
+ # point the user's state becomes `AWAY`. Note that if the user is actively using
2209
+ # Chat, the `ACTIVE` state duration may extend beyond the provided expiration.
2210
+ # This method only updates the authenticated user's availability. Requires [user
2211
+ # authentication](https://developers.google.com/workspace/chat/authenticate-
2212
+ # authorize-chat-user) with [authorization scope](https://developers.google.com/
2213
+ # workspace/chat/authenticate-authorize#chat-api-scopes): - `https://www.
2214
+ # googleapis.com/auth/chat.users.availability`
2215
+ # @param [String] name
2216
+ # Required. The resource name of the availability to mark as active. Format:
2217
+ # users/`user`/availability ``user`` is the id for the Person in the People API
2218
+ # or Admin SDK directory API. For example, `users/123456789`. The user's email
2219
+ # address or `me` can also be used as an alias to refer to the caller. For
2220
+ # example, `users/user@example.com` or `users/me`.
2221
+ # @param [Google::Apis::ChatV1::MarkAsActiveRequest] mark_as_active_request_object
2222
+ # @param [String] fields
2223
+ # Selector specifying which fields to include in a partial response.
2224
+ # @param [String] quota_user
2225
+ # Available to use for quota purposes for server-side applications. Can be any
2226
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2227
+ # @param [Google::Apis::RequestOptions] options
2228
+ # Request-specific options
2229
+ #
2230
+ # @yield [result, err] Result & error if block supplied
2231
+ # @yieldparam result [Google::Apis::ChatV1::Availability] parsed result object
2232
+ # @yieldparam err [StandardError] error object if request failed
2233
+ #
2234
+ # @return [Google::Apis::ChatV1::Availability]
2235
+ #
2236
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2237
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2238
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2239
+ def mark_availability_as_active(name, mark_as_active_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2240
+ command = make_simple_command(:post, 'v1/{+name}:markAsActive', options)
2241
+ command.request_representation = Google::Apis::ChatV1::MarkAsActiveRequest::Representation
2242
+ command.request_object = mark_as_active_request_object
2243
+ command.response_representation = Google::Apis::ChatV1::Availability::Representation
2244
+ command.response_class = Google::Apis::ChatV1::Availability
2245
+ command.params['name'] = name unless name.nil?
2246
+ command.query['fields'] = fields unless fields.nil?
2247
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2248
+ execute_or_queue_command(command, &block)
2249
+ end
2250
+
2251
+ # Marks user as `AWAY` in Google Chat. Sets the user's state to away and is not
2252
+ # affected by the user's activity. This method only updates the authenticated
2253
+ # user's availability. Requires [user authentication](https://developers.google.
2254
+ # com/workspace/chat/authenticate-authorize-chat-user) with [authorization scope]
2255
+ # (https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-
2256
+ # scopes): - `https://www.googleapis.com/auth/chat.users.availability`
2257
+ # @param [String] name
2258
+ # Required. The resource name of the availability to mark as away. Format: users/
2259
+ # `user`/availability ``user`` is the id for the Person in the People API or
2260
+ # Admin SDK directory API. For example, `users/123456789`. The user's email
2261
+ # address or `me` can also be used as an alias to refer to the caller. For
2262
+ # example, `users/user@example.com` or `users/me`.
2263
+ # @param [Google::Apis::ChatV1::MarkAsAwayRequest] mark_as_away_request_object
2264
+ # @param [String] fields
2265
+ # Selector specifying which fields to include in a partial response.
2266
+ # @param [String] quota_user
2267
+ # Available to use for quota purposes for server-side applications. Can be any
2268
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2269
+ # @param [Google::Apis::RequestOptions] options
2270
+ # Request-specific options
2271
+ #
2272
+ # @yield [result, err] Result & error if block supplied
2273
+ # @yieldparam result [Google::Apis::ChatV1::Availability] parsed result object
2274
+ # @yieldparam err [StandardError] error object if request failed
2275
+ #
2276
+ # @return [Google::Apis::ChatV1::Availability]
2277
+ #
2278
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2279
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2280
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2281
+ def mark_availability_as_away(name, mark_as_away_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2282
+ command = make_simple_command(:post, 'v1/{+name}:markAsAway', options)
2283
+ command.request_representation = Google::Apis::ChatV1::MarkAsAwayRequest::Representation
2284
+ command.request_object = mark_as_away_request_object
2285
+ command.response_representation = Google::Apis::ChatV1::Availability::Representation
2286
+ command.response_class = Google::Apis::ChatV1::Availability
2287
+ command.params['name'] = name unless name.nil?
2288
+ command.query['fields'] = fields unless fields.nil?
2289
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2290
+ execute_or_queue_command(command, &block)
2291
+ end
2292
+
2293
+ # Marks user as`DO_NOT_DISTURB` in Google Chat. Sets a user's availability state
2294
+ # to `DO_NOT_DISTURB` until a specified expiration time. When in `DO_NOT_DISTURB`
2295
+ # , users typically won't receive notifications. This method only updates the
2296
+ # authenticated user's availability. Requires [user authentication](https://
2297
+ # developers.google.com/workspace/chat/authenticate-authorize-chat-user) with [
2298
+ # authorization scope](https://developers.google.com/workspace/chat/authenticate-
2299
+ # authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.
2300
+ # availability`
2301
+ # @param [String] name
2302
+ # Required. The resource name of the availability to mark as Do Not Disturb.
2303
+ # Format: users/`user`/availability ``user`` is the id for the Person in the
2304
+ # People API or Admin SDK directory API. For example, `users/123456789`. The
2305
+ # user's email address or `me` can also be used as an alias to refer to the
2306
+ # caller. For example, `users/user@example.com` or `users/me`.
2307
+ # @param [Google::Apis::ChatV1::MarkAsDoNotDisturbRequest] mark_as_do_not_disturb_request_object
2308
+ # @param [String] fields
2309
+ # Selector specifying which fields to include in a partial response.
2310
+ # @param [String] quota_user
2311
+ # Available to use for quota purposes for server-side applications. Can be any
2312
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2313
+ # @param [Google::Apis::RequestOptions] options
2314
+ # Request-specific options
2315
+ #
2316
+ # @yield [result, err] Result & error if block supplied
2317
+ # @yieldparam result [Google::Apis::ChatV1::Availability] parsed result object
2318
+ # @yieldparam err [StandardError] error object if request failed
2319
+ #
2320
+ # @return [Google::Apis::ChatV1::Availability]
2321
+ #
2322
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2323
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2324
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2325
+ def mark_availability_as_do_not_disturb(name, mark_as_do_not_disturb_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2326
+ command = make_simple_command(:post, 'v1/{+name}:markAsDoNotDisturb', options)
2327
+ command.request_representation = Google::Apis::ChatV1::MarkAsDoNotDisturbRequest::Representation
2328
+ command.request_object = mark_as_do_not_disturb_request_object
2329
+ command.response_representation = Google::Apis::ChatV1::Availability::Representation
2330
+ command.response_class = Google::Apis::ChatV1::Availability
2331
+ command.params['name'] = name unless name.nil?
2332
+ command.query['fields'] = fields unless fields.nil?
2333
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2334
+ execute_or_queue_command(command, &block)
2335
+ end
2336
+
2337
+ # Updates availability information for a human user. Only the `custom_status`
2338
+ # field can be updated through this method. This method only updates the
2339
+ # authenticated user's availability. Requires [user authentication](https://
2340
+ # developers.google.com/workspace/chat/authenticate-authorize-chat-user) with
2341
+ # one of the following [authorization scopes](https://developers.google.com/
2342
+ # workspace/chat/authenticate-authorize#chat-api-scopes): - `https://www.
2343
+ # googleapis.com/auth/chat.users.availability`
2344
+ # @param [String] name
2345
+ # Identifier. Resource name of the user's availability. Format: `users/`user`/
2346
+ # availability` ``user`` is the id for the Person in the People API or Admin SDK
2347
+ # directory API. For example, `users/123456789`. The user's email address or `me`
2348
+ # can also be used as an alias to refer to the caller. For example, `users/user@
2349
+ # example.com` or `users/me`.
2350
+ # @param [Google::Apis::ChatV1::Availability] availability_object
2351
+ # @param [String] update_mask
2352
+ # Required. The list of fields to update. The only field that can be updated is `
2353
+ # custom_status`.
2354
+ # @param [String] fields
2355
+ # Selector specifying which fields to include in a partial response.
2356
+ # @param [String] quota_user
2357
+ # Available to use for quota purposes for server-side applications. Can be any
2358
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2359
+ # @param [Google::Apis::RequestOptions] options
2360
+ # Request-specific options
2361
+ #
2362
+ # @yield [result, err] Result & error if block supplied
2363
+ # @yieldparam result [Google::Apis::ChatV1::Availability] parsed result object
2364
+ # @yieldparam err [StandardError] error object if request failed
2365
+ #
2366
+ # @return [Google::Apis::ChatV1::Availability]
2367
+ #
2368
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2369
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2370
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2371
+ def update_user_availability_availability(name, availability_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
2372
+ command = make_simple_command(:patch, 'v1/{+name}', options)
2373
+ command.request_representation = Google::Apis::ChatV1::Availability::Representation
2374
+ command.request_object = availability_object
2375
+ command.response_representation = Google::Apis::ChatV1::Availability::Representation
2376
+ command.response_class = Google::Apis::ChatV1::Availability
2377
+ command.params['name'] = name unless name.nil?
2378
+ command.query['updateMask'] = update_mask unless update_mask.nil?
2379
+ command.query['fields'] = fields unless fields.nil?
2380
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2381
+ execute_or_queue_command(command, &block)
2382
+ end
2383
+
2159
2384
  # Creates a section in Google Chat. Sections help users group conversations and
2160
2385
  # customize the list of spaces displayed in Chat navigation panel. Only sections
2161
2386
  # of type `CUSTOM_SECTION` can be created. For details, see [Create and organize
@@ -117,6 +117,12 @@ module Google
117
117
  # View chat and spaces in Google Chat
118
118
  AUTH_CHAT_SPACES_READONLY = 'https://www.googleapis.com/auth/chat.spaces.readonly'
119
119
 
120
+ # See and change your availability status in Google Chat.
121
+ AUTH_CHAT_USERS_AVAILABILITY = 'https://www.googleapis.com/auth/chat.users.availability'
122
+
123
+ # See your availability status in Google Chat.
124
+ AUTH_CHAT_USERS_AVAILABILITY_READONLY = 'https://www.googleapis.com/auth/chat.users.availability.readonly'
125
+
120
126
  # View and modify last read time for Google Chat conversations
121
127
  AUTH_CHAT_USERS_READSTATE = 'https://www.googleapis.com/auth/chat.users.readstate'
122
128
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-chat_v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.149.0
4
+ version: 0.150.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
@@ -57,7 +57,7 @@ licenses:
57
57
  metadata:
58
58
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
59
59
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-chat_v1/CHANGELOG.md
60
- documentation_uri: https://googleapis.dev/ruby/google-apis-chat_v1/v0.149.0
60
+ documentation_uri: https://googleapis.dev/ruby/google-apis-chat_v1/v0.150.0
61
61
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-chat_v1
62
62
  rdoc_options: []
63
63
  require_paths: