google-apis-chat_v1 0.101.0 → 0.103.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: 7801b30ffb1eca865e0bbf13678f6a0610d9b1fe4499304a263f82229bb7ba63
4
- data.tar.gz: 8fe5e57f1fc8aef283787ceb68216aa226f27fbfb5d2f82a65e000a9ede47ea8
3
+ metadata.gz: 9299c746df7364f6dac6b8ce99ca758b252e9dbd8cd5cdebc137ccd53183df52
4
+ data.tar.gz: f60c2cc0f9cd13a95ccc5986a5da0761e04ca979097646744f45193ce6858bc0
5
5
  SHA512:
6
- metadata.gz: e025df779920dd2221e65355e4fa9847f45d431686fbcad334042837a07905e4fec57df7bdff516baaabd14240e14b9da525f5fc6a4b783e535c50d8ec9a14d2
7
- data.tar.gz: c0e896fec5d4046a5016e56a466297673f137ba0a5ab7b324d109077c1455c83616af264e90274d3091f67fa8763fb460d5f43494f218e60ffde1ddebd403a9d
6
+ metadata.gz: 293d49333586d6f87b88475c0cd53d31c7d10cce7aa3d5ee0696e7b09de350956c9bd591716b3e37e9ade78cc883b1afc8dffc1ef435f1ff117ab24c8390ee42
7
+ data.tar.gz: 9da5a760b2ecabde3cc6c24b2e0080b4e5698007a45fc6b0a4a30435ad4b534388a18ced701b7542c4a92bd0a464ae060326fa7bb18092c1651f47d9dc8d3f41
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Release history for google-apis-chat_v1
2
2
 
3
+ ### v0.103.0 (2024-09-01)
4
+
5
+ * Regenerated from discovery document revision 20240825
6
+
7
+ ### v0.102.0 (2024-08-25)
8
+
9
+ * Regenerated from discovery document revision 20240818
10
+
3
11
  ### v0.101.0 (2024-08-18)
4
12
 
5
13
  * Regenerated from discovery document revision 20240813
@@ -3732,6 +3732,33 @@ module Google
3732
3732
  end
3733
3733
  end
3734
3734
 
3735
+ # [Developer Preview](https://developers.google.com/workspace/preview).
3736
+ # Represents the count of memberships of a space, grouped into categories.
3737
+ class MembershipCount
3738
+ include Google::Apis::Core::Hashable
3739
+
3740
+ # Count of human users that have directly joined the space, not counting users
3741
+ # joined by having membership in a joined group.
3742
+ # Corresponds to the JSON property `joinedDirectHumanUserCount`
3743
+ # @return [Fixnum]
3744
+ attr_accessor :joined_direct_human_user_count
3745
+
3746
+ # Count of all groups that have directly joined the space.
3747
+ # Corresponds to the JSON property `joinedGroupCount`
3748
+ # @return [Fixnum]
3749
+ attr_accessor :joined_group_count
3750
+
3751
+ def initialize(**args)
3752
+ update!(**args)
3753
+ end
3754
+
3755
+ # Update properties of this object
3756
+ def update!(**args)
3757
+ @joined_direct_human_user_count = args[:joined_direct_human_user_count] if args.key?(:joined_direct_human_user_count)
3758
+ @joined_group_count = args[:joined_group_count] if args.key?(:joined_group_count)
3759
+ end
3760
+ end
3761
+
3735
3762
  # Event payload for a new membership. Event type: `google.workspace.chat.
3736
3763
  # membership.v1.created`.
3737
3764
  class MembershipCreatedEventData
@@ -3848,9 +3875,9 @@ module Google
3848
3875
  # rest/v1/cards). Only Chat apps can create cards. If your Chat app [
3849
3876
  # authenticates as a user](https://developers.google.com/workspace/chat/
3850
3877
  # authenticate-authorize-chat-user), the messages can't contain cards. To learn
3851
- # about cards and how to create them, see [Send card messages](https://
3852
- # developers.google.com/workspace/chat/create-messages#create). [Card builder](
3853
- # https://addons.gsuite.google.com/uikit/builder)
3878
+ # how to create a message that contains cards, see [Send a message](https://
3879
+ # developers.google.com/workspace/chat/create-messages). [Card builder](https://
3880
+ # addons.gsuite.google.com/uikit/builder)
3854
3881
  # Corresponds to the JSON property `cardsV2`
3855
3882
  # @return [Array<Google::Apis::ChatV1::CardWithId>]
3856
3883
  attr_accessor :cards_v2
@@ -3977,9 +4004,8 @@ module Google
3977
4004
  # generates a [preview chip](https://developers.google.com/workspace/chat/
3978
4005
  # preview-links). You can also [@mention a Google Chat user](https://developers.
3979
4006
  # google.com/workspace/chat/format-messages#messages-@mention), or everyone in
3980
- # the space. To learn about creating text messages, see [Send a text message](
3981
- # https://developers.google.com/workspace/chat/create-messages#create-text-
3982
- # messages).
4007
+ # the space. To learn about creating text messages, see [Send a message](https://
4008
+ # developers.google.com/workspace/chat/create-messages).
3983
4009
  # Corresponds to the JSON property `text`
3984
4010
  # @return [String]
3985
4011
  attr_accessor :text
@@ -4376,6 +4402,39 @@ module Google
4376
4402
  end
4377
4403
  end
4378
4404
 
4405
+ # Response with a list of spaces corresponding to the search spaces request.
4406
+ class SearchSpacesResponse
4407
+ include Google::Apis::Core::Hashable
4408
+
4409
+ # A token that can be used to retrieve the next page. If this field is empty,
4410
+ # there are no subsequent pages.
4411
+ # Corresponds to the JSON property `nextPageToken`
4412
+ # @return [String]
4413
+ attr_accessor :next_page_token
4414
+
4415
+ # A page of the requested spaces.
4416
+ # Corresponds to the JSON property `spaces`
4417
+ # @return [Array<Google::Apis::ChatV1::Space>]
4418
+ attr_accessor :spaces
4419
+
4420
+ # The total number of spaces that match the query, across all pages. If the
4421
+ # result is over 10,000 spaces, this value is an estimate.
4422
+ # Corresponds to the JSON property `totalSize`
4423
+ # @return [Fixnum]
4424
+ attr_accessor :total_size
4425
+
4426
+ def initialize(**args)
4427
+ update!(**args)
4428
+ end
4429
+
4430
+ # Update properties of this object
4431
+ def update!(**args)
4432
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
4433
+ @spaces = args[:spaces] if args.key?(:spaces)
4434
+ @total_size = args[:total_size] if args.key?(:total_size)
4435
+ end
4436
+ end
4437
+
4379
4438
  # A section contains a collection of widgets that are rendered (vertically) in
4380
4439
  # the order that they are specified. Across all platforms, cards have a narrow
4381
4440
  # fixed width, so there's currently no need for layout properties (for example,
@@ -4606,7 +4665,24 @@ module Google
4606
4665
  attr_accessor :import_mode
4607
4666
  alias_method :import_mode?, :import_mode
4608
4667
 
4609
- # Resource name of the space. Format: `spaces/`space``
4668
+ # Output only. Timestamp of the last message in the space. [Developer Preview](
4669
+ # https://developers.google.com/workspace/preview).
4670
+ # Corresponds to the JSON property `lastActiveTime`
4671
+ # @return [String]
4672
+ attr_accessor :last_active_time
4673
+
4674
+ # [Developer Preview](https://developers.google.com/workspace/preview).
4675
+ # Represents the count of memberships of a space, grouped into categories.
4676
+ # Corresponds to the JSON property `membershipCount`
4677
+ # @return [Google::Apis::ChatV1::MembershipCount]
4678
+ attr_accessor :membership_count
4679
+
4680
+ # Resource name of the space. Format: `spaces/`space`` Where ``space``
4681
+ # represents the system-assigned ID for the space. You can obtain the space ID
4682
+ # by calling the [`spaces.list()`](https://developers.google.com/workspace/chat/
4683
+ # api/reference/rest/v1/spaces/list) method or from the space URL. For example,
4684
+ # if the space URL is `https://mail.google.com/mail/u/0/#chat/space/AAAAAAAAA`,
4685
+ # the space ID is `AAAAAAAAA`.
4610
4686
  # Corresponds to the JSON property `name`
4611
4687
  # @return [String]
4612
4688
  attr_accessor :name
@@ -4667,6 +4743,8 @@ module Google
4667
4743
  @display_name = args[:display_name] if args.key?(:display_name)
4668
4744
  @external_user_allowed = args[:external_user_allowed] if args.key?(:external_user_allowed)
4669
4745
  @import_mode = args[:import_mode] if args.key?(:import_mode)
4746
+ @last_active_time = args[:last_active_time] if args.key?(:last_active_time)
4747
+ @membership_count = args[:membership_count] if args.key?(:membership_count)
4670
4748
  @name = args[:name] if args.key?(:name)
4671
4749
  @single_user_bot_dm = args[:single_user_bot_dm] if args.key?(:single_user_bot_dm)
4672
4750
  @space_details = args[:space_details] if args.key?(:space_details)
@@ -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.101.0"
19
+ GEM_VERSION = "0.103.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
22
  GENERATOR_VERSION = "0.15.1"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20240813"
25
+ REVISION = "20240825"
26
26
  end
27
27
  end
28
28
  end
@@ -526,6 +526,12 @@ module Google
526
526
  include Google::Apis::Core::JsonObjectSupport
527
527
  end
528
528
 
529
+ class MembershipCount
530
+ class Representation < Google::Apis::Core::JsonRepresentation; end
531
+
532
+ include Google::Apis::Core::JsonObjectSupport
533
+ end
534
+
529
535
  class MembershipCreatedEventData
530
536
  class Representation < Google::Apis::Core::JsonRepresentation; end
531
537
 
@@ -640,6 +646,12 @@ module Google
640
646
  include Google::Apis::Core::JsonObjectSupport
641
647
  end
642
648
 
649
+ class SearchSpacesResponse
650
+ class Representation < Google::Apis::Core::JsonRepresentation; end
651
+
652
+ include Google::Apis::Core::JsonObjectSupport
653
+ end
654
+
643
655
  class Section
644
656
  class Representation < Google::Apis::Core::JsonRepresentation; end
645
657
 
@@ -1690,6 +1702,14 @@ module Google
1690
1702
  end
1691
1703
  end
1692
1704
 
1705
+ class MembershipCount
1706
+ # @private
1707
+ class Representation < Google::Apis::Core::JsonRepresentation
1708
+ property :joined_direct_human_user_count, as: 'joinedDirectHumanUserCount'
1709
+ property :joined_group_count, as: 'joinedGroupCount'
1710
+ end
1711
+ end
1712
+
1693
1713
  class MembershipCreatedEventData
1694
1714
  # @private
1695
1715
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1888,6 +1908,16 @@ module Google
1888
1908
  end
1889
1909
  end
1890
1910
 
1911
+ class SearchSpacesResponse
1912
+ # @private
1913
+ class Representation < Google::Apis::Core::JsonRepresentation
1914
+ property :next_page_token, as: 'nextPageToken'
1915
+ collection :spaces, as: 'spaces', class: Google::Apis::ChatV1::Space, decorator: Google::Apis::ChatV1::Space::Representation
1916
+
1917
+ property :total_size, as: 'totalSize'
1918
+ end
1919
+ end
1920
+
1891
1921
  class Section
1892
1922
  # @private
1893
1923
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1945,6 +1975,9 @@ module Google
1945
1975
  property :display_name, as: 'displayName'
1946
1976
  property :external_user_allowed, as: 'externalUserAllowed'
1947
1977
  property :import_mode, as: 'importMode'
1978
+ property :last_active_time, as: 'lastActiveTime'
1979
+ property :membership_count, as: 'membershipCount', class: Google::Apis::ChatV1::MembershipCount, decorator: Google::Apis::ChatV1::MembershipCount::Representation
1980
+
1948
1981
  property :name, as: 'name'
1949
1982
  property :single_user_bot_dm, as: 'singleUserBotDm'
1950
1983
  property :space_details, as: 'spaceDetails', class: Google::Apis::ChatV1::SpaceDetails, decorator: Google::Apis::ChatV1::SpaceDetails::Representation
@@ -227,6 +227,13 @@ module Google
227
227
  # authorize-chat-user) from a user who has permission to delete the space.
228
228
  # @param [String] name
229
229
  # Required. Resource name of the space to delete. Format: `spaces/`space``
230
+ # @param [Boolean] use_admin_access
231
+ # [Developer Preview](https://developers.google.com/workspace/preview). When `
232
+ # true`, the method runs using the user's Google Workspace administrator
233
+ # privileges. The calling user must be a Google Workspace administrator with the
234
+ # [manage chat and spaces conversations privilege](https://support.google.com/a/
235
+ # answer/13369245). Requires the `chat.admin.delete` [OAuth 2.0 scope](https://
236
+ # developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
230
237
  # @param [String] fields
231
238
  # Selector specifying which fields to include in a partial response.
232
239
  # @param [String] quota_user
@@ -244,11 +251,12 @@ module Google
244
251
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
245
252
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
246
253
  # @raise [Google::Apis::AuthorizationError] Authorization is required
247
- def delete_space(name, fields: nil, quota_user: nil, options: nil, &block)
254
+ def delete_space(name, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
248
255
  command = make_simple_command(:delete, 'v1/{+name}', options)
249
256
  command.response_representation = Google::Apis::ChatV1::Empty::Representation
250
257
  command.response_class = Google::Apis::ChatV1::Empty
251
258
  command.params['name'] = name unless name.nil?
259
+ command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil?
252
260
  command.query['fields'] = fields unless fields.nil?
253
261
  command.query['quotaUser'] = quota_user unless quota_user.nil?
254
262
  execute_or_queue_command(command, &block)
@@ -312,6 +320,14 @@ module Google
312
320
  # @param [String] name
313
321
  # Required. Resource name of the space, in the form `spaces/`space``. Format: `
314
322
  # spaces/`space``
323
+ # @param [Boolean] use_admin_access
324
+ # [Developer Preview](https://developers.google.com/workspace/preview). When `
325
+ # true`, the method runs using the user's Google Workspace administrator
326
+ # privileges. The calling user must be a Google Workspace administrator with the
327
+ # [manage chat and spaces conversations privilege](https://support.google.com/a/
328
+ # answer/13369245). Requires the `chat.admin.spaces` or `chat.admin.spaces.
329
+ # readonly` [OAuth 2.0 scopes](https://developers.google.com/workspace/chat/
330
+ # authenticate-authorize#chat-api-scopes).
315
331
  # @param [String] fields
316
332
  # Selector specifying which fields to include in a partial response.
317
333
  # @param [String] quota_user
@@ -329,11 +345,12 @@ module Google
329
345
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
330
346
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
331
347
  # @raise [Google::Apis::AuthorizationError] Authorization is required
332
- def get_space(name, fields: nil, quota_user: nil, options: nil, &block)
348
+ def get_space(name, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
333
349
  command = make_simple_command(:get, 'v1/{+name}', options)
334
350
  command.response_representation = Google::Apis::ChatV1::Space::Representation
335
351
  command.response_class = Google::Apis::ChatV1::Space
336
352
  command.params['name'] = name unless name.nil?
353
+ command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil?
337
354
  command.query['fields'] = fields unless fields.nil?
338
355
  command.query['quotaUser'] = quota_user unless quota_user.nil?
339
356
  execute_or_queue_command(command, &block)
@@ -406,7 +423,12 @@ module Google
406
423
  # already use this display name. Requires [user authentication](https://
407
424
  # developers.google.com/workspace/chat/authenticate-authorize-chat-user).
408
425
  # @param [String] name
409
- # Resource name of the space. Format: `spaces/`space``
426
+ # Resource name of the space. Format: `spaces/`space`` Where ``space``
427
+ # represents the system-assigned ID for the space. You can obtain the space ID
428
+ # by calling the [`spaces.list()`](https://developers.google.com/workspace/chat/
429
+ # api/reference/rest/v1/spaces/list) method or from the space URL. For example,
430
+ # if the space URL is `https://mail.google.com/mail/u/0/#chat/space/AAAAAAAAA`,
431
+ # the space ID is `AAAAAAAAA`.
410
432
  # @param [Google::Apis::ChatV1::Space] space_object
411
433
  # @param [String] update_mask
412
434
  # Required. The updated field paths, comma separated if there are multiple. You
@@ -446,6 +468,15 @@ module Google
446
468
  # permission_settings.reply_messages` (Warning: mutually exclusive with all
447
469
  # other non-permission settings field paths). `permission_settings` is not
448
470
  # supported with admin access.
471
+ # @param [Boolean] use_admin_access
472
+ # [Developer Preview](https://developers.google.com/workspace/preview). When `
473
+ # true`, the method runs using the user's Google Workspace administrator
474
+ # privileges. The calling user must be a Google Workspace administrator with the
475
+ # [manage chat and spaces conversations privilege](https://support.google.com/a/
476
+ # answer/13369245). Requires the `chat.admin.spaces` [OAuth 2.0 scope](https://
477
+ # developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
478
+ # Some `FieldMask` values are not supported using admin access. For details, see
479
+ # the description of `update_mask`.
449
480
  # @param [String] fields
450
481
  # Selector specifying which fields to include in a partial response.
451
482
  # @param [String] quota_user
@@ -463,7 +494,7 @@ module Google
463
494
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
464
495
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
465
496
  # @raise [Google::Apis::AuthorizationError] Authorization is required
466
- def patch_space(name, space_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
497
+ def patch_space(name, space_object = nil, update_mask: nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
467
498
  command = make_simple_command(:patch, 'v1/{+name}', options)
468
499
  command.request_representation = Google::Apis::ChatV1::Space::Representation
469
500
  command.request_object = space_object
@@ -471,6 +502,108 @@ module Google
471
502
  command.response_class = Google::Apis::ChatV1::Space
472
503
  command.params['name'] = name unless name.nil?
473
504
  command.query['updateMask'] = update_mask unless update_mask.nil?
505
+ command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil?
506
+ command.query['fields'] = fields unless fields.nil?
507
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
508
+ execute_or_queue_command(command, &block)
509
+ end
510
+
511
+ # [Developer Preview](https://developers.google.com/workspace/preview). Returns
512
+ # a list of spaces based on a user's search. Requires [user authentication](
513
+ # https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
514
+ # The user must be an administrator for the Google Workspace organization. In
515
+ # the request, set `use_admin_access` to `true`.
516
+ # @param [String] order_by
517
+ # Optional. How the list of spaces is ordered. Supported attributes to order by
518
+ # are: - `membership_count.joined_direct_human_user_count` — Denotes the count
519
+ # of human users that have directly joined a space. - `last_active_time` —
520
+ # Denotes the time when last eligible item is added to any topic of this space. -
521
+ # `create_time` — Denotes the time of the space creation. Valid ordering
522
+ # operation values are: - `ASC` for ascending. Default value. - `DESC` for
523
+ # descending. The supported syntax are: - `membership_count.
524
+ # joined_direct_human_user_count DESC` - `membership_count.
525
+ # joined_direct_human_user_count ASC` - `last_active_time DESC` - `
526
+ # last_active_time ASC` - `create_time DESC` - `create_time ASC`
527
+ # @param [Fixnum] page_size
528
+ # The maximum number of spaces to return. The service may return fewer than this
529
+ # value. If unspecified, at most 100 spaces are returned. The maximum value is
530
+ # 1000. If you use a value more than 1000, it's automatically changed to 1000.
531
+ # @param [String] page_token
532
+ # A token, received from the previous search spaces call. Provide this parameter
533
+ # to retrieve the subsequent page. When paginating, all other parameters
534
+ # provided should match the call that provided the page token. Passing different
535
+ # values to the other parameters might lead to unexpected results.
536
+ # @param [String] query
537
+ # Required. A search query. You can search by using the following parameters: - `
538
+ # create_time` - `customer` - `display_name` - `external_user_allowed` - `
539
+ # last_active_time` - `space_history_state` - `space_type` `create_time` and `
540
+ # last_active_time` accept a timestamp in [RFC-3339](https://www.rfc-editor.org/
541
+ # rfc/rfc3339) format and the supported comparison operators are: `=`, `<`, `>`,
542
+ # `<=`, `>=`. `customer` is required and is used to indicate which customer to
543
+ # fetch spaces from. `customers/my_customer` is the only supported value. `
544
+ # display_name` only accepts the `HAS` (`:`) operator. The text to match is
545
+ # first tokenized into tokens and each token is prefix-matched case-
546
+ # insensitively and independently as a substring anywhere in the space's `
547
+ # display_name`. For example, `Fun Eve` matches `Fun event` or `The evening was
548
+ # fun`, but not `notFun event` or `even`. `external_user_allowed` accepts either
549
+ # `true` or `false`. `space_history_state` only accepts values from the [`
550
+ # historyState`] (https://developers.google.com/workspace/chat/api/reference/
551
+ # rest/v1/spaces#Space.HistoryState) field of a `space` resource. `space_type`
552
+ # is required and the only valid value is `SPACE`. Across different fields, only
553
+ # `AND` operators are supported. A valid example is `space_type = "SPACE" AND
554
+ # display_name:"Hello"` and an invalid example is `space_type = "SPACE" OR
555
+ # display_name:"Hello"`. Among the same field, `space_type` doesn't support `AND`
556
+ # or `OR` operators. `display_name`, 'space_history_state', and '
557
+ # external_user_allowed' only support `OR` operators. `last_active_time` and `
558
+ # create_time` support both `AND` and `OR` operators. `AND` can only be used to
559
+ # represent an interval, such as `last_active_time < "2022-01-01T00:00:00+00:00"
560
+ # AND last_active_time > "2023-01-01T00:00:00+00:00"`. The following example
561
+ # queries are valid: ``` customer = "customers/my_customer" AND space_type = "
562
+ # SPACE" customer = "customers/my_customer" AND space_type = "SPACE" AND
563
+ # display_name:"Hello World" customer = "customers/my_customer" AND space_type =
564
+ # "SPACE" AND (last_active_time < "2020-01-01T00:00:00+00:00" OR
565
+ # last_active_time > "2022-01-01T00:00:00+00:00") customer = "customers/
566
+ # my_customer" AND space_type = "SPACE" AND (display_name:"Hello World" OR
567
+ # display_name:"Fun event") AND (last_active_time > "2020-01-01T00:00:00+00:00"
568
+ # AND last_active_time < "2022-01-01T00:00:00+00:00") customer = "customers/
569
+ # my_customer" AND space_type = "SPACE" AND (create_time > "2019-01-01T00:00:00+
570
+ # 00:00" AND create_time < "2020-01-01T00:00:00+00:00") AND (
571
+ # external_user_allowed = "true") AND (space_history_state = "HISTORY_ON" OR
572
+ # space_history_state = "HISTORY_OFF") ```
573
+ # @param [Boolean] use_admin_access
574
+ # When `true`, the method runs using the user's Google Workspace administrator
575
+ # privileges. The calling user must be a Google Workspace administrator with the
576
+ # [manage chat and spaces conversations privilege](https://support.google.com/a/
577
+ # answer/13369245). Requires either the `chat.admin.spaces.readonly` or `chat.
578
+ # admin.spaces` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/
579
+ # authenticate-authorize#chat-api-scopes). This method currently only supports
580
+ # admin access, thus only `true` is accepted for this field.
581
+ # @param [String] fields
582
+ # Selector specifying which fields to include in a partial response.
583
+ # @param [String] quota_user
584
+ # Available to use for quota purposes for server-side applications. Can be any
585
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
586
+ # @param [Google::Apis::RequestOptions] options
587
+ # Request-specific options
588
+ #
589
+ # @yield [result, err] Result & error if block supplied
590
+ # @yieldparam result [Google::Apis::ChatV1::SearchSpacesResponse] parsed result object
591
+ # @yieldparam err [StandardError] error object if request failed
592
+ #
593
+ # @return [Google::Apis::ChatV1::SearchSpacesResponse]
594
+ #
595
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
596
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
597
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
598
+ def search_spaces(order_by: nil, page_size: nil, page_token: nil, query: nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
599
+ command = make_simple_command(:get, 'v1/spaces:search', options)
600
+ command.response_representation = Google::Apis::ChatV1::SearchSpacesResponse::Representation
601
+ command.response_class = Google::Apis::ChatV1::SearchSpacesResponse
602
+ command.query['orderBy'] = order_by unless order_by.nil?
603
+ command.query['pageSize'] = page_size unless page_size.nil?
604
+ command.query['pageToken'] = page_token unless page_token.nil?
605
+ command.query['query'] = query unless query.nil?
606
+ command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil?
474
607
  command.query['fields'] = fields unless fields.nil?
475
608
  command.query['quotaUser'] = quota_user unless quota_user.nil?
476
609
  execute_or_queue_command(command, &block)
@@ -542,36 +675,32 @@ module Google
542
675
  execute_or_queue_command(command, &block)
543
676
  end
544
677
 
545
- # Creates a human membership or app membership for the calling app. Creating
546
- # memberships for other apps isn't supported. For an example, see [Invite or add
547
- # a user or a Google Chat app to a space](https://developers.google.com/
548
- # workspace/chat/create-members). When creating a membership, if the specified
549
- # member has their auto-accept policy turned off, then they're invited, and must
550
- # accept the space invitation before joining. Otherwise, creating a membership
551
- # adds the member directly to the specified space. Requires [user authentication]
552
- # (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
553
- # . To specify the member to add, set the `membership.member.name` for the human
554
- # or app member, or set the `membership.group_member.name` for the group member.
555
- # - To add the calling app to a space or a direct message between two human
556
- # users, use `users/app`. Unable to add other apps to the space. - To add a
557
- # human user, use `users/`user``, where ``user`` can be the email address for
558
- # the user. For users in the same Workspace organization ``user`` can also be
559
- # the `id` for the person from the People API, or the `id` for the user in the
560
- # Directory API. For example, if the People API Person profile ID for `user@
561
- # example.com` is `123456789`, you can add the user to the space by setting the `
562
- # membership.member.name` to `users/user@example.com` or `users/123456789`. - To
563
- # add or invite a Google group in a named space, use `groups/`group``, where ``
564
- # group`` is the `id` for the group from the Cloud Identity Groups API. For
565
- # example, you can use [Cloud Identity Groups lookup API](https://cloud.google.
566
- # com/identity/docs/reference/rest/v1/groups/lookup) to retrieve the ID `
567
- # 123456789` for group email `group@example.com`, then you can add or invite the
568
- # group to a named space by setting the `membership.group_member.name` to `
569
- # groups/123456789`. Group email is not supported, and Google groups can only be
570
- # added as members in named spaces.
678
+ # Creates a membership for the calling Chat app, a user, or a Google Group.
679
+ # Creating memberships for other Chat apps isn't supported. When creating a
680
+ # membership, if the specified member has their auto-accept policy turned off,
681
+ # then they're invited, and must accept the space invitation before joining.
682
+ # Otherwise, creating a membership adds the member directly to the specified
683
+ # space. Requires [user authentication](https://developers.google.com/workspace/
684
+ # chat/authenticate-authorize-chat-user). For example usage, see: - [Invite or
685
+ # add a user to a space](https://developers.google.com/workspace/chat/create-
686
+ # members#create-user-membership). - [Invite or add a Google Group to a space](
687
+ # https://developers.google.com/workspace/chat/create-members#create-group-
688
+ # membership). - [Add the Chat app to a space](https://developers.google.com/
689
+ # workspace/chat/create-members#create-membership-calling-api).
571
690
  # @param [String] parent
572
691
  # Required. The resource name of the space for which to create the membership.
573
692
  # Format: spaces/`space`
574
693
  # @param [Google::Apis::ChatV1::Membership] membership_object
694
+ # @param [Boolean] use_admin_access
695
+ # [Developer Preview](https://developers.google.com/workspace/preview). When `
696
+ # true`, the method runs using the user's Google Workspace administrator
697
+ # privileges. The calling user must be a Google Workspace administrator with the
698
+ # [manage chat and spaces conversations privilege](https://support.google.com/a/
699
+ # answer/13369245). Requires the `chat.admin.memberships` [OAuth 2.0 scope](
700
+ # https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-
701
+ # scopes). Creating app memberships or creating memberships for users outside
702
+ # the administrator's Google Workspace organization isn't supported using admin
703
+ # access.
575
704
  # @param [String] fields
576
705
  # Selector specifying which fields to include in a partial response.
577
706
  # @param [String] quota_user
@@ -589,13 +718,14 @@ module Google
589
718
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
590
719
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
591
720
  # @raise [Google::Apis::AuthorizationError] Authorization is required
592
- def create_space_member(parent, membership_object = nil, fields: nil, quota_user: nil, options: nil, &block)
721
+ def create_space_member(parent, membership_object = nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
593
722
  command = make_simple_command(:post, 'v1/{+parent}/members', options)
594
723
  command.request_representation = Google::Apis::ChatV1::Membership::Representation
595
724
  command.request_object = membership_object
596
725
  command.response_representation = Google::Apis::ChatV1::Membership::Representation
597
726
  command.response_class = Google::Apis::ChatV1::Membership
598
727
  command.params['parent'] = parent unless parent.nil?
728
+ command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil?
599
729
  command.query['fields'] = fields unless fields.nil?
600
730
  command.query['quotaUser'] = quota_user unless quota_user.nil?
601
731
  execute_or_queue_command(command, &block)
@@ -615,6 +745,15 @@ module Google
615
745
  # deleting an app membership, requires the `chat.memberships.app` scope and `
616
746
  # spaces/`space`/members/app` format. Format: `spaces/`space`/members/`member``
617
747
  # or `spaces/`space`/members/app`.
748
+ # @param [Boolean] use_admin_access
749
+ # [Developer Preview](https://developers.google.com/workspace/preview). When `
750
+ # true`, the method runs using the user's Google Workspace administrator
751
+ # privileges. The calling user must be a Google Workspace administrator with the
752
+ # [manage chat and spaces conversations privilege](https://support.google.com/a/
753
+ # answer/13369245). Requires the `chat.admin.memberships` [OAuth 2.0 scope](
754
+ # https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-
755
+ # scopes). Deleting app memberships in a space isn't supported using admin
756
+ # access.
618
757
  # @param [String] fields
619
758
  # Selector specifying which fields to include in a partial response.
620
759
  # @param [String] quota_user
@@ -632,11 +771,12 @@ module Google
632
771
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
633
772
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
634
773
  # @raise [Google::Apis::AuthorizationError] Authorization is required
635
- def delete_space_member(name, fields: nil, quota_user: nil, options: nil, &block)
774
+ def delete_space_member(name, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
636
775
  command = make_simple_command(:delete, 'v1/{+name}', options)
637
776
  command.response_representation = Google::Apis::ChatV1::Membership::Representation
638
777
  command.response_class = Google::Apis::ChatV1::Membership
639
778
  command.params['name'] = name unless name.nil?
779
+ command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil?
640
780
  command.query['fields'] = fields unless fields.nil?
641
781
  command.query['quotaUser'] = quota_user unless quota_user.nil?
642
782
  execute_or_queue_command(command, &block)
@@ -659,6 +799,15 @@ module Google
659
799
  # user's email as an alias for ``member``. For example, `spaces/`space`/members/
660
800
  # example@gmail.com` where `example@gmail.com` is the email of the Google Chat
661
801
  # user.
802
+ # @param [Boolean] use_admin_access
803
+ # [Developer Preview](https://developers.google.com/workspace/preview). When `
804
+ # true`, the method runs using the user's Google Workspace administrator
805
+ # privileges. The calling user must be a Google Workspace administrator with the
806
+ # [manage chat and spaces conversations privilege](https://support.google.com/a/
807
+ # answer/13369245). Requires the `chat.admin.memberships` or `chat.admin.
808
+ # memberships.readonly` [OAuth 2.0 scopes](https://developers.google.com/
809
+ # workspace/chat/authenticate-authorize#chat-api-scopes). Getting app
810
+ # memberships in a space isn't supported when using admin access.
662
811
  # @param [String] fields
663
812
  # Selector specifying which fields to include in a partial response.
664
813
  # @param [String] quota_user
@@ -676,11 +825,12 @@ module Google
676
825
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
677
826
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
678
827
  # @raise [Google::Apis::AuthorizationError] Authorization is required
679
- def get_space_member(name, fields: nil, quota_user: nil, options: nil, &block)
828
+ def get_space_member(name, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
680
829
  command = make_simple_command(:get, 'v1/{+name}', options)
681
830
  command.response_representation = Google::Apis::ChatV1::Membership::Representation
682
831
  command.response_class = Google::Apis::ChatV1::Membership
683
832
  command.params['name'] = name unless name.nil?
833
+ command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil?
684
834
  command.query['fields'] = fields unless fields.nil?
685
835
  command.query['quotaUser'] = quota_user unless quota_user.nil?
686
836
  execute_or_queue_command(command, &block)
@@ -739,6 +889,15 @@ module Google
739
889
  # invited memberships that don't match the filter criteria aren't returned.
740
890
  # Currently requires [user authentication](https://developers.google.com/
741
891
  # workspace/chat/authenticate-authorize-chat-user).
892
+ # @param [Boolean] use_admin_access
893
+ # [Developer Preview](https://developers.google.com/workspace/preview). When `
894
+ # true`, the method runs using the user's Google Workspace administrator
895
+ # privileges. The calling user must be a Google Workspace administrator with the
896
+ # [manage chat and spaces conversations privilege](https://support.google.com/a/
897
+ # answer/13369245). Requires either the `chat.admin.memberships.readonly` or `
898
+ # chat.admin.memberships` [OAuth 2.0 scope](https://developers.google.com/
899
+ # workspace/chat/authenticate-authorize#chat-api-scopes). Listing app
900
+ # memberships in a space isn't supported when using admin access.
742
901
  # @param [String] fields
743
902
  # Selector specifying which fields to include in a partial response.
744
903
  # @param [String] quota_user
@@ -756,7 +915,7 @@ module Google
756
915
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
757
916
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
758
917
  # @raise [Google::Apis::AuthorizationError] Authorization is required
759
- def list_space_members(parent, filter: nil, page_size: nil, page_token: nil, show_groups: nil, show_invited: nil, fields: nil, quota_user: nil, options: nil, &block)
918
+ def list_space_members(parent, filter: nil, page_size: nil, page_token: nil, show_groups: nil, show_invited: nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
760
919
  command = make_simple_command(:get, 'v1/{+parent}/members', options)
761
920
  command.response_representation = Google::Apis::ChatV1::ListMembershipsResponse::Representation
762
921
  command.response_class = Google::Apis::ChatV1::ListMembershipsResponse
@@ -766,6 +925,7 @@ module Google
766
925
  command.query['pageToken'] = page_token unless page_token.nil?
767
926
  command.query['showGroups'] = show_groups unless show_groups.nil?
768
927
  command.query['showInvited'] = show_invited unless show_invited.nil?
928
+ command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil?
769
929
  command.query['fields'] = fields unless fields.nil?
770
930
  command.query['quotaUser'] = quota_user unless quota_user.nil?
771
931
  execute_or_queue_command(command, &block)
@@ -782,6 +942,14 @@ module Google
782
942
  # @param [String] update_mask
783
943
  # Required. The field paths to update. Separate multiple values with commas or
784
944
  # use `*` to update all field paths. Currently supported field paths: - `role`
945
+ # @param [Boolean] use_admin_access
946
+ # [Developer Preview](https://developers.google.com/workspace/preview). When `
947
+ # true`, the method runs using the user's Google Workspace administrator
948
+ # privileges. The calling user must be a Google Workspace administrator with the
949
+ # [manage chat and spaces conversations privilege](https://support.google.com/a/
950
+ # answer/13369245). Requires the `chat.admin.memberships` [OAuth 2.0 scope](
951
+ # https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-
952
+ # scopes).
785
953
  # @param [String] fields
786
954
  # Selector specifying which fields to include in a partial response.
787
955
  # @param [String] quota_user
@@ -799,7 +967,7 @@ module Google
799
967
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
800
968
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
801
969
  # @raise [Google::Apis::AuthorizationError] Authorization is required
802
- def patch_space_member(name, membership_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
970
+ def patch_space_member(name, membership_object = nil, update_mask: nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block)
803
971
  command = make_simple_command(:patch, 'v1/{+name}', options)
804
972
  command.request_representation = Google::Apis::ChatV1::Membership::Representation
805
973
  command.request_object = membership_object
@@ -807,19 +975,27 @@ module Google
807
975
  command.response_class = Google::Apis::ChatV1::Membership
808
976
  command.params['name'] = name unless name.nil?
809
977
  command.query['updateMask'] = update_mask unless update_mask.nil?
978
+ command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil?
810
979
  command.query['fields'] = fields unless fields.nil?
811
980
  command.query['quotaUser'] = quota_user unless quota_user.nil?
812
981
  execute_or_queue_command(command, &block)
813
982
  end
814
983
 
815
- # Creates a message in a Google Chat space. The maximum message size, including
816
- # text and cards, is 32,000 bytes. For an example, see [Send a message](https://
817
- # developers.google.com/workspace/chat/create-messages). Calling this method
818
- # requires [authentication](https://developers.google.com/workspace/chat/
819
- # authenticate-authorize) and supports the following authentication types: - For
820
- # text messages, user authentication or app authentication are supported. - For
821
- # card messages, only app authentication is supported. (Only Chat apps can
822
- # create card messages.)
984
+ # Creates a message in a Google Chat space. For an example, see [Send a message](
985
+ # https://developers.google.com/workspace/chat/create-messages). The `create()`
986
+ # method requires either user or app authentication. Chat attributes the message
987
+ # sender differently depending on the type of authentication that you use in
988
+ # your request. The following image shows how Chat attributes a message when you
989
+ # use app authentication. Chat displays the Chat app as the message sender. The
990
+ # content of the message can contain text (`text`), cards (`cardsV2`), and
991
+ # accessory widgets (`accessoryWidgets`). ![Message sent with app authentication]
992
+ # (https://developers.google.com/workspace/chat/images/message-app-auth.svg) The
993
+ # following image shows how Chat attributes a message when you use user
994
+ # authentication. Chat displays the user as the message sender and attributes
995
+ # the Chat app to the message by displaying its name. The content of message can
996
+ # only contain text (`text`). ![Message sent with user authentication](https://
997
+ # developers.google.com/workspace/chat/images/message-user-auth.svg) The maximum
998
+ # message size, including the message contents, is 32,000 bytes.
823
999
  # @param [String] parent
824
1000
  # Required. The resource name of the space in which to create a message. Format:
825
1001
  # `spaces/`space``
@@ -969,9 +1145,12 @@ module Google
969
1145
  end
970
1146
 
971
1147
  # Lists messages in a space that the caller is a member of, including messages
972
- # from blocked members and spaces. For an example, see [List messages](/chat/api/
973
- # guides/v1/messages/list). Requires [user authentication](https://developers.
974
- # google.com/workspace/chat/authenticate-authorize-chat-user).
1148
+ # from blocked members and spaces. If you list messages from a space with no
1149
+ # messages, the response is an empty object. When using a REST/HTTP interface,
1150
+ # the response contains an empty JSON object, ````. For an example, see [List
1151
+ # messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/
1152
+ # list). Requires [user authentication](https://developers.google.com/workspace/
1153
+ # chat/authenticate-authorize-chat-user).
975
1154
  # @param [String] parent
976
1155
  # Required. The resource name of the space to list messages from. Format: `
977
1156
  # spaces/`space``
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.101.0
4
+ version: 0.103.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-08-18 00:00:00.000000000 Z
11
+ date: 2024-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
@@ -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.101.0
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-chat_v1/v0.103.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: []