google-apps-chat-v1 0.3.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -123,6 +123,11 @@ module Google
123
123
  initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
124
124
  }
125
125
 
126
+ default_config.rpcs.search_spaces.timeout = 30.0
127
+ default_config.rpcs.search_spaces.retry_policy = {
128
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
129
+ }
130
+
126
131
  default_config.rpcs.get_space.timeout = 30.0
127
132
  default_config.rpcs.get_space.retry_policy = {
128
133
  initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
@@ -614,7 +619,7 @@ module Google
614
619
  # @param options [::Gapic::CallOptions, ::Hash]
615
620
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
616
621
  #
617
- # @overload list_memberships(parent: nil, page_size: nil, page_token: nil, filter: nil, show_groups: nil, show_invited: nil)
622
+ # @overload list_memberships(parent: nil, page_size: nil, page_token: nil, filter: nil, show_groups: nil, show_invited: nil, use_admin_access: nil)
618
623
  # Pass arguments to `list_memberships` via keyword arguments. Note that at
619
624
  # least one keyword argument is required. To specify no parameters, or to keep all
620
625
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -651,8 +656,8 @@ module Google
651
656
  #
652
657
  # To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`.
653
658
  #
654
- # To filter by type, set `member.type` to `HUMAN` or `BOT`. Developer
655
- # Preview: You can also filter for `member.type` using the `!=` operator.
659
+ # To filter by type, set `member.type` to `HUMAN` or `BOT`. You can also
660
+ # filter for `member.type` using the `!=` operator.
656
661
  #
657
662
  # To filter by both role and type, use the `AND` operator. To filter by
658
663
  # either role or type, use the `OR` operator.
@@ -696,6 +701,19 @@ module Google
696
701
  #
697
702
  # Currently requires [user
698
703
  # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
704
+ # @param use_admin_access [::Boolean]
705
+ # When `true`, the method runs using the user's Google Workspace
706
+ # administrator privileges.
707
+ #
708
+ # The calling user must be a Google Workspace administrator with the
709
+ # [manage chat and spaces conversations
710
+ # privilege](https://support.google.com/a/answer/13369245).
711
+ #
712
+ # Requires either the `chat.admin.memberships.readonly` or
713
+ # `chat.admin.memberships` [OAuth 2.0
714
+ # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
715
+ #
716
+ # Listing app memberships in a space isn't supported when using admin access.
699
717
  # @yield [result, operation] Access the result along with the TransportOperation object
700
718
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Apps::Chat::V1::Membership>]
701
719
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -783,7 +801,7 @@ module Google
783
801
  # @param options [::Gapic::CallOptions, ::Hash]
784
802
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
785
803
  #
786
- # @overload get_membership(name: nil)
804
+ # @overload get_membership(name: nil, use_admin_access: nil)
787
805
  # Pass arguments to `get_membership` via keyword arguments. Note that at
788
806
  # least one keyword argument is required. To specify no parameters, or to keep all
789
807
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -802,6 +820,19 @@ module Google
802
820
  # you can use the user's email as an alias for `{member}`. For example,
803
821
  # `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the
804
822
  # email of the Google Chat user.
823
+ # @param use_admin_access [::Boolean]
824
+ # When `true`, the method runs using the user's Google Workspace
825
+ # administrator privileges.
826
+ #
827
+ # The calling user must be a Google Workspace administrator with the
828
+ # [manage chat and spaces conversations
829
+ # privilege](https://support.google.com/a/answer/13369245).
830
+ #
831
+ # Requires the `chat.admin.memberships` or `chat.admin.memberships.readonly`
832
+ # [OAuth 2.0
833
+ # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
834
+ #
835
+ # Getting app memberships in a space isn't supported when using admin access.
805
836
  # @yield [result, operation] Access the result along with the TransportOperation object
806
837
  # @yieldparam result [::Google::Apps::Chat::V1::Membership]
807
838
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1495,6 +1526,215 @@ module Google
1495
1526
  raise ::Google::Cloud::Error.from_error(e)
1496
1527
  end
1497
1528
 
1529
+ ##
1530
+ # Returns a list of spaces in a Google Workspace organization based on an
1531
+ # administrator's search. Requires [user
1532
+ # authentication with administrator
1533
+ # privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges).
1534
+ # In the request, set `use_admin_access` to `true`.
1535
+ #
1536
+ # @overload search_spaces(request, options = nil)
1537
+ # Pass arguments to `search_spaces` via a request object, either of type
1538
+ # {::Google::Apps::Chat::V1::SearchSpacesRequest} or an equivalent Hash.
1539
+ #
1540
+ # @param request [::Google::Apps::Chat::V1::SearchSpacesRequest, ::Hash]
1541
+ # A request object representing the call parameters. Required. To specify no
1542
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1543
+ # @param options [::Gapic::CallOptions, ::Hash]
1544
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1545
+ #
1546
+ # @overload search_spaces(use_admin_access: nil, page_size: nil, page_token: nil, query: nil, order_by: nil)
1547
+ # Pass arguments to `search_spaces` via keyword arguments. Note that at
1548
+ # least one keyword argument is required. To specify no parameters, or to keep all
1549
+ # the default parameter values, pass an empty Hash as a request object (see above).
1550
+ #
1551
+ # @param use_admin_access [::Boolean]
1552
+ # When `true`, the method runs using the user's Google Workspace
1553
+ # administrator privileges.
1554
+ #
1555
+ # The calling user must be a Google Workspace administrator with the
1556
+ # [manage chat and spaces conversations
1557
+ # privilege](https://support.google.com/a/answer/13369245).
1558
+ #
1559
+ # Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces`
1560
+ # [OAuth 2.0
1561
+ # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
1562
+ #
1563
+ # This method currently only supports admin access, thus only `true` is
1564
+ # accepted for this field.
1565
+ # @param page_size [::Integer]
1566
+ # The maximum number of spaces to return. The service may return fewer than
1567
+ # this value.
1568
+ #
1569
+ # If unspecified, at most 100 spaces are returned.
1570
+ #
1571
+ # The maximum value is 1000. If you use a value more than 1000, it's
1572
+ # automatically changed to 1000.
1573
+ # @param page_token [::String]
1574
+ # A token, received from the previous search spaces call. Provide this
1575
+ # parameter to retrieve the subsequent page.
1576
+ #
1577
+ # When paginating, all other parameters provided should match the call that
1578
+ # provided the page token. Passing different values to the other parameters
1579
+ # might lead to unexpected results.
1580
+ # @param query [::String]
1581
+ # Required. A search query.
1582
+ #
1583
+ # You can search by using the following parameters:
1584
+ #
1585
+ # - `create_time`
1586
+ # - `customer`
1587
+ # - `display_name`
1588
+ # - `external_user_allowed`
1589
+ # - `last_active_time`
1590
+ # - `space_history_state`
1591
+ # - `space_type`
1592
+ #
1593
+ # `create_time` and `last_active_time` accept a timestamp in
1594
+ # [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported
1595
+ # comparison operators are: `=`, `<`, `>`, `<=`, `>=`.
1596
+ #
1597
+ # `customer` is required and is used to indicate which customer
1598
+ # to fetch spaces from. `customers/my_customer` is the only supported value.
1599
+ #
1600
+ # `display_name` only accepts the `HAS` (`:`) operator. The text to
1601
+ # match is first tokenized into tokens and each token is prefix-matched
1602
+ # case-insensitively and independently as a substring anywhere in the space's
1603
+ # `display_name`. For example, `Fun Eve` matches `Fun event` or `The
1604
+ # evening was fun`, but not `notFun event` or `even`.
1605
+ #
1606
+ # `external_user_allowed` accepts either `true` or `false`.
1607
+ #
1608
+ # `space_history_state` only accepts values from the [`historyState`]
1609
+ # (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.HistoryState)
1610
+ # field of a `space` resource.
1611
+ #
1612
+ # `space_type` is required and the only valid value is `SPACE`.
1613
+ #
1614
+ # Across different fields, only `AND` operators are supported. A valid
1615
+ # example is `space_type = "SPACE" AND display_name:"Hello"` and an invalid
1616
+ # example is `space_type = "SPACE" OR display_name:"Hello"`.
1617
+ #
1618
+ # Among the same field,
1619
+ # `space_type` doesn't support `AND` or `OR` operators.
1620
+ # `display_name`, 'space_history_state', and 'external_user_allowed' only
1621
+ # support `OR` operators.
1622
+ # `last_active_time` and `create_time` support both `AND` and `OR` operators.
1623
+ # `AND` can only be used to represent an interval, such as `last_active_time
1624
+ # < "2022-01-01T00:00:00+00:00" AND last_active_time >
1625
+ # "2023-01-01T00:00:00+00:00"`.
1626
+ #
1627
+ # The following example queries are valid:
1628
+ #
1629
+ # ```
1630
+ # customer = "customers/my_customer" AND space_type = "SPACE"
1631
+ #
1632
+ # customer = "customers/my_customer" AND space_type = "SPACE" AND
1633
+ # display_name:"Hello World"
1634
+ #
1635
+ # customer = "customers/my_customer" AND space_type = "SPACE" AND
1636
+ # (last_active_time < "2020-01-01T00:00:00+00:00" OR last_active_time >
1637
+ # "2022-01-01T00:00:00+00:00")
1638
+ #
1639
+ # customer = "customers/my_customer" AND space_type = "SPACE" AND
1640
+ # (display_name:"Hello World" OR display_name:"Fun event") AND
1641
+ # (last_active_time > "2020-01-01T00:00:00+00:00" AND last_active_time <
1642
+ # "2022-01-01T00:00:00+00:00")
1643
+ #
1644
+ # customer = "customers/my_customer" AND space_type = "SPACE" AND
1645
+ # (create_time > "2019-01-01T00:00:00+00:00" AND create_time <
1646
+ # "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND
1647
+ # (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF")
1648
+ # ```
1649
+ # @param order_by [::String]
1650
+ # Optional. How the list of spaces is ordered.
1651
+ #
1652
+ # Supported attributes to order by are:
1653
+ #
1654
+ # - `membership_count.joined_direct_human_user_count` — Denotes the count of
1655
+ # human users that have directly joined a space.
1656
+ # - `last_active_time` — Denotes the time when last eligible item is added to
1657
+ # any topic of this space.
1658
+ # - `create_time` — Denotes the time of the space creation.
1659
+ #
1660
+ # Valid ordering operation values are:
1661
+ #
1662
+ # - `ASC` for ascending. Default value.
1663
+ #
1664
+ # - `DESC` for descending.
1665
+ #
1666
+ # The supported syntax are:
1667
+ #
1668
+ # - `membership_count.joined_direct_human_user_count DESC`
1669
+ # - `membership_count.joined_direct_human_user_count ASC`
1670
+ # - `last_active_time DESC`
1671
+ # - `last_active_time ASC`
1672
+ # - `create_time DESC`
1673
+ # - `create_time ASC`
1674
+ # @yield [result, operation] Access the result along with the TransportOperation object
1675
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Apps::Chat::V1::Space>]
1676
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1677
+ #
1678
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Apps::Chat::V1::Space>]
1679
+ #
1680
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1681
+ #
1682
+ # @example Basic example
1683
+ # require "google/apps/chat/v1"
1684
+ #
1685
+ # # Create a client object. The client can be reused for multiple calls.
1686
+ # client = Google::Apps::Chat::V1::ChatService::Rest::Client.new
1687
+ #
1688
+ # # Create a request. To set request fields, pass in keyword arguments.
1689
+ # request = Google::Apps::Chat::V1::SearchSpacesRequest.new
1690
+ #
1691
+ # # Call the search_spaces method.
1692
+ # result = client.search_spaces request
1693
+ #
1694
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1695
+ # # over elements, and API calls will be issued to fetch pages as needed.
1696
+ # result.each do |item|
1697
+ # # Each element is of type ::Google::Apps::Chat::V1::Space.
1698
+ # p item
1699
+ # end
1700
+ #
1701
+ def search_spaces request, options = nil
1702
+ raise ::ArgumentError, "request must be provided" if request.nil?
1703
+
1704
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Chat::V1::SearchSpacesRequest
1705
+
1706
+ # Converts hash and nil to an options object
1707
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1708
+
1709
+ # Customize the options with defaults
1710
+ call_metadata = @config.rpcs.search_spaces.metadata.to_h
1711
+
1712
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1713
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1714
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1715
+ gapic_version: ::Google::Apps::Chat::V1::VERSION,
1716
+ transports_version_send: [:rest]
1717
+
1718
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1719
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1720
+
1721
+ options.apply_defaults timeout: @config.rpcs.search_spaces.timeout,
1722
+ metadata: call_metadata,
1723
+ retry_policy: @config.rpcs.search_spaces.retry_policy
1724
+
1725
+ options.apply_defaults timeout: @config.timeout,
1726
+ metadata: @config.metadata,
1727
+ retry_policy: @config.retry_policy
1728
+
1729
+ @chat_service_stub.search_spaces request, options do |result, operation|
1730
+ result = ::Gapic::Rest::PagedEnumerable.new @chat_service_stub, :search_spaces, "spaces", request, result, options
1731
+ yield result, operation if block_given?
1732
+ return result
1733
+ end
1734
+ rescue ::Gapic::Rest::Error => e
1735
+ raise ::Google::Cloud::Error.from_error(e)
1736
+ end
1737
+
1498
1738
  ##
1499
1739
  # Returns details about a space. For an example, see
1500
1740
  # [Get details about a
@@ -1518,7 +1758,7 @@ module Google
1518
1758
  # @param options [::Gapic::CallOptions, ::Hash]
1519
1759
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1520
1760
  #
1521
- # @overload get_space(name: nil)
1761
+ # @overload get_space(name: nil, use_admin_access: nil)
1522
1762
  # Pass arguments to `get_space` via keyword arguments. Note that at
1523
1763
  # least one keyword argument is required. To specify no parameters, or to keep all
1524
1764
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1527,6 +1767,16 @@ module Google
1527
1767
  # Required. Resource name of the space, in the form `spaces/{space}`.
1528
1768
  #
1529
1769
  # Format: `spaces/{space}`
1770
+ # @param use_admin_access [::Boolean]
1771
+ # When `true`, the method runs using the user's Google Workspace
1772
+ # administrator privileges.
1773
+ #
1774
+ # The calling user must be a Google Workspace administrator with the
1775
+ # [manage chat and spaces conversations
1776
+ # privilege](https://support.google.com/a/answer/13369245).
1777
+ #
1778
+ # Requires the `chat.admin.spaces` or `chat.admin.spaces.readonly` [OAuth 2.0
1779
+ # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
1530
1780
  # @yield [result, operation] Access the result along with the TransportOperation object
1531
1781
  # @yieldparam result [::Google::Apps::Chat::V1::Space]
1532
1782
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1900,7 +2150,7 @@ module Google
1900
2150
  # @param options [::Gapic::CallOptions, ::Hash]
1901
2151
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1902
2152
  #
1903
- # @overload update_space(space: nil, update_mask: nil)
2153
+ # @overload update_space(space: nil, update_mask: nil, use_admin_access: nil)
1904
2154
  # Pass arguments to `update_space` via keyword arguments. Note that at
1905
2155
  # least one keyword argument is required. To specify no parameters, or to keep all
1906
2156
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1961,6 +2211,19 @@ module Google
1961
2211
  # `permission_settings.reply_messages`
1962
2212
  # (Warning: mutually exclusive with all other non-permission settings field
1963
2213
  # paths). `permission_settings` is not supported with admin access.
2214
+ # @param use_admin_access [::Boolean]
2215
+ # When `true`, the method runs using the user's Google Workspace
2216
+ # administrator privileges.
2217
+ #
2218
+ # The calling user must be a Google Workspace administrator with the
2219
+ # [manage chat and spaces conversations
2220
+ # privilege](https://support.google.com/a/answer/13369245).
2221
+ #
2222
+ # Requires the `chat.admin.spaces` [OAuth 2.0
2223
+ # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
2224
+ #
2225
+ # Some `FieldMask` values are not supported using admin access. For details,
2226
+ # see the description of `update_mask`.
1964
2227
  # @yield [result, operation] Access the result along with the TransportOperation object
1965
2228
  # @yieldparam result [::Google::Apps::Chat::V1::Space]
1966
2229
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -2040,7 +2303,7 @@ module Google
2040
2303
  # @param options [::Gapic::CallOptions, ::Hash]
2041
2304
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2042
2305
  #
2043
- # @overload delete_space(name: nil)
2306
+ # @overload delete_space(name: nil, use_admin_access: nil)
2044
2307
  # Pass arguments to `delete_space` via keyword arguments. Note that at
2045
2308
  # least one keyword argument is required. To specify no parameters, or to keep all
2046
2309
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -2049,6 +2312,16 @@ module Google
2049
2312
  # Required. Resource name of the space to delete.
2050
2313
  #
2051
2314
  # Format: `spaces/{space}`
2315
+ # @param use_admin_access [::Boolean]
2316
+ # When `true`, the method runs using the user's Google Workspace
2317
+ # administrator privileges.
2318
+ #
2319
+ # The calling user must be a Google Workspace administrator with the
2320
+ # [manage chat and spaces conversations
2321
+ # privilege](https://support.google.com/a/answer/13369245).
2322
+ #
2323
+ # Requires the `chat.admin.delete` [OAuth 2.0
2324
+ # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
2052
2325
  # @yield [result, operation] Access the result along with the TransportOperation object
2053
2326
  # @yieldparam result [::Google::Protobuf::Empty]
2054
2327
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -2349,7 +2622,7 @@ module Google
2349
2622
  # @param options [::Gapic::CallOptions, ::Hash]
2350
2623
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2351
2624
  #
2352
- # @overload create_membership(parent: nil, membership: nil)
2625
+ # @overload create_membership(parent: nil, membership: nil, use_admin_access: nil)
2353
2626
  # Pass arguments to `create_membership` via keyword arguments. Note that at
2354
2627
  # least one keyword argument is required. To specify no parameters, or to keep all
2355
2628
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -2376,6 +2649,20 @@ module Google
2376
2649
  # `users/user@example.com` or `users/123456789`. When a Chat app creates a
2377
2650
  # membership relation for itself, it must use the `chat.memberships.app`
2378
2651
  # scope, set `user.type` to `BOT`, and set `user.name` to `users/app`.
2652
+ # @param use_admin_access [::Boolean]
2653
+ # When `true`, the method runs using the user's Google Workspace
2654
+ # administrator privileges.
2655
+ #
2656
+ # The calling user must be a Google Workspace administrator with the
2657
+ # [manage chat and spaces conversations
2658
+ # privilege](https://support.google.com/a/answer/13369245).
2659
+ #
2660
+ # Requires the `chat.admin.memberships` [OAuth 2.0
2661
+ # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
2662
+ #
2663
+ # Creating app memberships or creating memberships for users outside the
2664
+ # administrator's Google Workspace organization isn't supported using admin
2665
+ # access.
2379
2666
  # @yield [result, operation] Access the result along with the TransportOperation object
2380
2667
  # @yieldparam result [::Google::Apps::Chat::V1::Membership]
2381
2668
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -2452,7 +2739,7 @@ module Google
2452
2739
  # @param options [::Gapic::CallOptions, ::Hash]
2453
2740
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2454
2741
  #
2455
- # @overload update_membership(membership: nil, update_mask: nil)
2742
+ # @overload update_membership(membership: nil, update_mask: nil, use_admin_access: nil)
2456
2743
  # Pass arguments to `update_membership` via keyword arguments. Note that at
2457
2744
  # least one keyword argument is required. To specify no parameters, or to keep all
2458
2745
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -2467,6 +2754,16 @@ module Google
2467
2754
  # Currently supported field paths:
2468
2755
  #
2469
2756
  # - `role`
2757
+ # @param use_admin_access [::Boolean]
2758
+ # When `true`, the method runs using the user's Google Workspace
2759
+ # administrator privileges.
2760
+ #
2761
+ # The calling user must be a Google Workspace administrator with the
2762
+ # [manage chat and spaces conversations
2763
+ # privilege](https://support.google.com/a/answer/13369245).
2764
+ #
2765
+ # Requires the `chat.admin.memberships` [OAuth 2.0
2766
+ # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
2470
2767
  # @yield [result, operation] Access the result along with the TransportOperation object
2471
2768
  # @yieldparam result [::Google::Apps::Chat::V1::Membership]
2472
2769
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -2544,7 +2841,7 @@ module Google
2544
2841
  # @param options [::Gapic::CallOptions, ::Hash]
2545
2842
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2546
2843
  #
2547
- # @overload delete_membership(name: nil)
2844
+ # @overload delete_membership(name: nil, use_admin_access: nil)
2548
2845
  # Pass arguments to `delete_membership` via keyword arguments. Note that at
2549
2846
  # least one keyword argument is required. To specify no parameters, or to keep all
2550
2847
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -2564,6 +2861,18 @@ module Google
2564
2861
  # and `spaces/{space}/members/app` format.
2565
2862
  #
2566
2863
  # Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`.
2864
+ # @param use_admin_access [::Boolean]
2865
+ # When `true`, the method runs using the user's Google Workspace
2866
+ # administrator privileges.
2867
+ #
2868
+ # The calling user must be a Google Workspace administrator with the
2869
+ # [manage chat and spaces conversations
2870
+ # privilege](https://support.google.com/a/answer/13369245).
2871
+ #
2872
+ # Requires the `chat.admin.memberships` [OAuth 2.0
2873
+ # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
2874
+ #
2875
+ # Deleting app memberships in a space isn't supported using admin access.
2567
2876
  # @yield [result, operation] Access the result along with the TransportOperation object
2568
2877
  # @yieldparam result [::Google::Apps::Chat::V1::Membership]
2569
2878
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -3699,6 +4008,11 @@ module Google
3699
4008
  #
3700
4009
  attr_reader :list_spaces
3701
4010
  ##
4011
+ # RPC-specific configuration for `search_spaces`
4012
+ # @return [::Gapic::Config::Method]
4013
+ #
4014
+ attr_reader :search_spaces
4015
+ ##
3702
4016
  # RPC-specific configuration for `get_space`
3703
4017
  # @return [::Gapic::Config::Method]
3704
4018
  #
@@ -3811,6 +4125,8 @@ module Google
3811
4125
  @upload_attachment = ::Gapic::Config::Method.new upload_attachment_config
3812
4126
  list_spaces_config = parent_rpcs.list_spaces if parent_rpcs.respond_to? :list_spaces
3813
4127
  @list_spaces = ::Gapic::Config::Method.new list_spaces_config
4128
+ search_spaces_config = parent_rpcs.search_spaces if parent_rpcs.respond_to? :search_spaces
4129
+ @search_spaces = ::Gapic::Config::Method.new search_spaces_config
3814
4130
  get_space_config = parent_rpcs.get_space if parent_rpcs.respond_to? :get_space
3815
4131
  @get_space = ::Gapic::Config::Method.new get_space_config
3816
4132
  create_space_config = parent_rpcs.create_space if parent_rpcs.respond_to? :create_space
@@ -441,6 +441,44 @@ module Google
441
441
  result
442
442
  end
443
443
 
444
+ ##
445
+ # Baseline implementation for the search_spaces REST call
446
+ #
447
+ # @param request_pb [::Google::Apps::Chat::V1::SearchSpacesRequest]
448
+ # A request object representing the call parameters. Required.
449
+ # @param options [::Gapic::CallOptions]
450
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
451
+ #
452
+ # @yield [result, operation] Access the result along with the TransportOperation object
453
+ # @yieldparam result [::Google::Apps::Chat::V1::SearchSpacesResponse]
454
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
455
+ #
456
+ # @return [::Google::Apps::Chat::V1::SearchSpacesResponse]
457
+ # A result object deserialized from the server's reply
458
+ def search_spaces request_pb, options = nil
459
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
460
+
461
+ verb, uri, query_string_params, body = ServiceStub.transcode_search_spaces_request request_pb
462
+ query_string_params = if query_string_params.any?
463
+ query_string_params.to_h { |p| p.split "=", 2 }
464
+ else
465
+ {}
466
+ end
467
+
468
+ response = @client_stub.make_http_request(
469
+ verb,
470
+ uri: uri,
471
+ body: body || "",
472
+ params: query_string_params,
473
+ options: options
474
+ )
475
+ operation = ::Gapic::Rest::TransportOperation.new response
476
+ result = ::Google::Apps::Chat::V1::SearchSpacesResponse.decode_json response.body, ignore_unknown_fields: true
477
+
478
+ yield result, operation if block_given?
479
+ result
480
+ end
481
+
444
482
  ##
445
483
  # Baseline implementation for the get_space REST call
446
484
  #
@@ -1344,6 +1382,25 @@ module Google
1344
1382
  transcoder.transcode request_pb
1345
1383
  end
1346
1384
 
1385
+ ##
1386
+ # @private
1387
+ #
1388
+ # GRPC transcoding helper method for the search_spaces REST call
1389
+ #
1390
+ # @param request_pb [::Google::Apps::Chat::V1::SearchSpacesRequest]
1391
+ # A request object representing the call parameters. Required.
1392
+ # @return [Array(String, [String, nil], Hash{String => String})]
1393
+ # Uri, Body, Query string parameters
1394
+ def self.transcode_search_spaces_request request_pb
1395
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1396
+ .with_bindings(
1397
+ uri_method: :get,
1398
+ uri_template: "/v1/spaces:search",
1399
+ matches: []
1400
+ )
1401
+ transcoder.transcode request_pb
1402
+ end
1403
+
1347
1404
  ##
1348
1405
  # @private
1349
1406
  #
@@ -21,7 +21,7 @@ module Google
21
21
  module Apps
22
22
  module Chat
23
23
  module V1
24
- VERSION = "0.3.1"
24
+ VERSION = "0.5.0"
25
25
  end
26
26
  end
27
27
  end
@@ -9,7 +9,7 @@ require 'google/chat/v1/attachment_pb'
9
9
  require 'google/chat/v1/user_pb'
10
10
 
11
11
 
12
- descriptor_data = "\n\x1fgoogle/chat/v1/annotation.proto\x12\x0egoogle.chat.v1\x1a\x19google/api/resource.proto\x1a\x1fgoogle/chat/v1/attachment.proto\x1a\x19google/chat/v1/user.proto\"\xbc\x02\n\nAnnotation\x12,\n\x04type\x18\x01 \x01(\x0e\x32\x1e.google.chat.v1.AnnotationType\x12\x18\n\x0bstart_index\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12\x0e\n\x06length\x18\x03 \x01(\x05\x12;\n\x0cuser_mention\x18\x04 \x01(\x0b\x32#.google.chat.v1.UserMentionMetadataH\x00\x12=\n\rslash_command\x18\x05 \x01(\x0b\x32$.google.chat.v1.SlashCommandMetadataH\x00\x12>\n\x12rich_link_metadata\x18\x06 \x01(\x0b\x32 .google.chat.v1.RichLinkMetadataH\x00\x42\n\n\x08metadataB\x0e\n\x0c_start_index\"\xa5\x01\n\x13UserMentionMetadata\x12\"\n\x04user\x18\x01 \x01(\x0b\x32\x14.google.chat.v1.User\x12\x36\n\x04type\x18\x02 \x01(\x0e\x32(.google.chat.v1.UserMentionMetadata.Type\"2\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\x0b\n\x07MENTION\x10\x02\"\xe8\x01\n\x14SlashCommandMetadata\x12!\n\x03\x62ot\x18\x01 \x01(\x0b\x32\x14.google.chat.v1.User\x12\x37\n\x04type\x18\x02 \x01(\x0e\x32).google.chat.v1.SlashCommandMetadata.Type\x12\x14\n\x0c\x63ommand_name\x18\x03 \x01(\t\x12\x12\n\ncommand_id\x18\x04 \x01(\x03\x12\x17\n\x0ftriggers_dialog\x18\x05 \x01(\x08\"1\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06INVOKE\x10\x02\"\xe8\x01\n\x10RichLinkMetadata\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x45\n\x0erich_link_type\x18\x02 \x01(\x0e\x32-.google.chat.v1.RichLinkMetadata.RichLinkType\x12\x38\n\x0f\x64rive_link_data\x18\x03 \x01(\x0b\x32\x1d.google.chat.v1.DriveLinkDataH\x00\">\n\x0cRichLinkType\x12\x1e\n\x1aRICH_LINK_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nDRIVE_FILE\x10\x01\x42\x06\n\x04\x64\x61ta\"X\n\rDriveLinkData\x12\x34\n\x0e\x64rive_data_ref\x18\x01 \x01(\x0b\x32\x1c.google.chat.v1.DriveDataRef\x12\x11\n\tmime_type\x18\x02 \x01(\t*e\n\x0e\x41nnotationType\x12\x1f\n\x1b\x41NNOTATION_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cUSER_MENTION\x10\x01\x12\x11\n\rSLASH_COMMAND\x10\x02\x12\r\n\tRICH_LINK\x10\x03\x42\xa8\x01\n\x12\x63om.google.chat.v1B\x0f\x41nnotationProtoP\x01Z,cloud.google.com/go/chat/apiv1/chatpb;chatpb\xa2\x02\x0b\x44YNAPIProto\xaa\x02\x13Google.Apps.Chat.V1\xca\x02\x13Google\\Apps\\Chat\\V1\xea\x02\x16Google::Apps::Chat::V1b\x06proto3"
12
+ descriptor_data = "\n\x1fgoogle/chat/v1/annotation.proto\x12\x0egoogle.chat.v1\x1a\x19google/api/resource.proto\x1a\x1fgoogle/chat/v1/attachment.proto\x1a\x19google/chat/v1/user.proto\"\xbc\x02\n\nAnnotation\x12,\n\x04type\x18\x01 \x01(\x0e\x32\x1e.google.chat.v1.AnnotationType\x12\x18\n\x0bstart_index\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12\x0e\n\x06length\x18\x03 \x01(\x05\x12;\n\x0cuser_mention\x18\x04 \x01(\x0b\x32#.google.chat.v1.UserMentionMetadataH\x00\x12=\n\rslash_command\x18\x05 \x01(\x0b\x32$.google.chat.v1.SlashCommandMetadataH\x00\x12>\n\x12rich_link_metadata\x18\x06 \x01(\x0b\x32 .google.chat.v1.RichLinkMetadataH\x00\x42\n\n\x08metadataB\x0e\n\x0c_start_index\"\xa5\x01\n\x13UserMentionMetadata\x12\"\n\x04user\x18\x01 \x01(\x0b\x32\x14.google.chat.v1.User\x12\x36\n\x04type\x18\x02 \x01(\x0e\x32(.google.chat.v1.UserMentionMetadata.Type\"2\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\x0b\n\x07MENTION\x10\x02\"\xe8\x01\n\x14SlashCommandMetadata\x12!\n\x03\x62ot\x18\x01 \x01(\x0b\x32\x14.google.chat.v1.User\x12\x37\n\x04type\x18\x02 \x01(\x0e\x32).google.chat.v1.SlashCommandMetadata.Type\x12\x14\n\x0c\x63ommand_name\x18\x03 \x01(\t\x12\x12\n\ncommand_id\x18\x04 \x01(\x03\x12\x17\n\x0ftriggers_dialog\x18\x05 \x01(\x08\"1\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06INVOKE\x10\x02\"\xbb\x02\n\x10RichLinkMetadata\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x45\n\x0erich_link_type\x18\x02 \x01(\x0e\x32-.google.chat.v1.RichLinkMetadata.RichLinkType\x12\x38\n\x0f\x64rive_link_data\x18\x03 \x01(\x0b\x32\x1d.google.chat.v1.DriveLinkDataH\x00\x12\x41\n\x14\x63hat_space_link_data\x18\x04 \x01(\x0b\x32!.google.chat.v1.ChatSpaceLinkDataH\x00\"N\n\x0cRichLinkType\x12\x1e\n\x1aRICH_LINK_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nDRIVE_FILE\x10\x01\x12\x0e\n\nCHAT_SPACE\x10\x02\x42\x06\n\x04\x64\x61ta\"X\n\rDriveLinkData\x12\x34\n\x0e\x64rive_data_ref\x18\x01 \x01(\x0b\x32\x1c.google.chat.v1.DriveDataRef\x12\x11\n\tmime_type\x18\x02 \x01(\t\"\xa6\x01\n\x11\x43hatSpaceLinkData\x12-\n\x05space\x18\x01 \x01(\tB\x1e\xfa\x41\x1b\n\x19\x63hat.googleapis.com/Space\x12/\n\x06thread\x18\x02 \x01(\tB\x1f\xfa\x41\x1c\n\x1a\x63hat.googleapis.com/Thread\x12\x31\n\x07message\x18\x03 \x01(\tB \xfa\x41\x1d\n\x1b\x63hat.googleapis.com/Message*e\n\x0e\x41nnotationType\x12\x1f\n\x1b\x41NNOTATION_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cUSER_MENTION\x10\x01\x12\x11\n\rSLASH_COMMAND\x10\x02\x12\r\n\tRICH_LINK\x10\x03\x42\xa8\x01\n\x12\x63om.google.chat.v1B\x0f\x41nnotationProtoP\x01Z,cloud.google.com/go/chat/apiv1/chatpb;chatpb\xa2\x02\x0b\x44YNAPIProto\xaa\x02\x13Google.Apps.Chat.V1\xca\x02\x13Google\\Apps\\Chat\\V1\xea\x02\x16Google::Apps::Chat::V1b\x06proto3"
13
13
 
14
14
  pool = Google::Protobuf::DescriptorPool.generated_pool
15
15
 
@@ -49,6 +49,7 @@ module Google
49
49
  RichLinkMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.RichLinkMetadata").msgclass
50
50
  RichLinkMetadata::RichLinkType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.RichLinkMetadata.RichLinkType").enummodule
51
51
  DriveLinkData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.DriveLinkData").msgclass
52
+ ChatSpaceLinkData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.ChatSpaceLinkData").msgclass
52
53
  AnnotationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.AnnotationType").enummodule
53
54
  end
54
55
  end
@@ -18,7 +18,7 @@ require 'google/chat/v1/thread_read_state_pb'
18
18
  require 'google/protobuf/empty_pb'
19
19
 
20
20
 
21
- descriptor_data = "\n!google/chat/v1/chat_service.proto\x12\x0egoogle.chat.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/chat/v1/attachment.proto\x1a\x1fgoogle/chat/v1/membership.proto\x1a\x1cgoogle/chat/v1/message.proto\x1a\x1dgoogle/chat/v1/reaction.proto\x1a\x1agoogle/chat/v1/space.proto\x1a google/chat/v1/space_event.proto\x1a%google/chat/v1/space_read_state.proto\x1a google/chat/v1/space_setup.proto\x1a&google/chat/v1/thread_read_state.proto\x1a\x1bgoogle/protobuf/empty.proto2\x9a)\n\x0b\x43hatService\x12\x9b\x01\n\rCreateMessage\x12$.google.chat.v1.CreateMessageRequest\x1a\x17.google.chat.v1.Message\"K\xda\x41\x19parent,message,message_id\x82\xd3\xe4\x93\x02)\"\x1e/v1/{parent=spaces/*}/messages:\x07message\x12\x8a\x01\n\x0cListMessages\x12#.google.chat.v1.ListMessagesRequest\x1a$.google.chat.v1.ListMessagesResponse\"/\xda\x41\x06parent\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{parent=spaces/*}/messages\x12\x92\x01\n\x0fListMemberships\x12&.google.chat.v1.ListMembershipsRequest\x1a\'.google.chat.v1.ListMembershipsResponse\".\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{parent=spaces/*}/members\x12\x7f\n\rGetMembership\x12$.google.chat.v1.GetMembershipRequest\x1a\x1a.google.chat.v1.Membership\",\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{name=spaces/*/members/*}\x12w\n\nGetMessage\x12!.google.chat.v1.GetMessageRequest\x1a\x17.google.chat.v1.Message\"-\xda\x41\x04name\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{name=spaces/*/messages/*}\x12\xd1\x01\n\rUpdateMessage\x12$.google.chat.v1.UpdateMessageRequest\x1a\x17.google.chat.v1.Message\"\x80\x01\xda\x41\x13message,update_mask\x82\xd3\xe4\x93\x02\x64\x1a&/v1/{message.name=spaces/*/messages/*}:\x07messageZ12&/v1/{message.name=spaces/*/messages/*}:\x07message\x12|\n\rDeleteMessage\x12$.google.chat.v1.DeleteMessageRequest\x1a\x16.google.protobuf.Empty\"-\xda\x41\x04name\x82\xd3\xe4\x93\x02 *\x1e/v1/{name=spaces/*/messages/*}\x12\x8e\x01\n\rGetAttachment\x12$.google.chat.v1.GetAttachmentRequest\x1a\x1a.google.chat.v1.Attachment\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=spaces/*/messages/*/attachments/*}\x12\x9a\x01\n\x10UploadAttachment\x12\'.google.chat.v1.UploadAttachmentRequest\x1a(.google.chat.v1.UploadAttachmentResponse\"3\x82\xd3\xe4\x93\x02-\"(/v1/{parent=spaces/*}/attachments:upload:\x01*\x12j\n\nListSpaces\x12!.google.chat.v1.ListSpacesRequest\x1a\".google.chat.v1.ListSpacesResponse\"\x15\xda\x41\x00\x82\xd3\xe4\x93\x02\x0c\x12\n/v1/spaces\x12\x66\n\x08GetSpace\x12\x1f.google.chat.v1.GetSpaceRequest\x1a\x15.google.chat.v1.Space\"\"\xda\x41\x04name\x82\xd3\xe4\x93\x02\x15\x12\x13/v1/{name=spaces/*}\x12k\n\x0b\x43reateSpace\x12\".google.chat.v1.CreateSpaceRequest\x1a\x15.google.chat.v1.Space\"!\xda\x41\x05space\x82\xd3\xe4\x93\x02\x13\"\n/v1/spaces:\x05space\x12\x63\n\nSetUpSpace\x12!.google.chat.v1.SetUpSpaceRequest\x1a\x15.google.chat.v1.Space\"\x1b\x82\xd3\xe4\x93\x02\x15\"\x10/v1/spaces:setup:\x01*\x12\x86\x01\n\x0bUpdateSpace\x12\".google.chat.v1.UpdateSpaceRequest\x1a\x15.google.chat.v1.Space\"<\xda\x41\x11space,update_mask\x82\xd3\xe4\x93\x02\"2\x19/v1/{space.name=spaces/*}:\x05space\x12m\n\x0b\x44\x65leteSpace\x12\".google.chat.v1.DeleteSpaceRequest\x1a\x16.google.protobuf.Empty\"\"\xda\x41\x04name\x82\xd3\xe4\x93\x02\x15*\x13/v1/{name=spaces/*}\x12\x9d\x01\n\x13\x43ompleteImportSpace\x12*.google.chat.v1.CompleteImportSpaceRequest\x1a+.google.chat.v1.CompleteImportSpaceResponse\"-\x82\xd3\xe4\x93\x02\'\"\"/v1/{name=spaces/*}:completeImport:\x01*\x12z\n\x11\x46indDirectMessage\x12(.google.chat.v1.FindDirectMessageRequest\x1a\x15.google.chat.v1.Space\"$\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/spaces:findDirectMessage\x12\x9e\x01\n\x10\x43reateMembership\x12\'.google.chat.v1.CreateMembershipRequest\x1a\x1a.google.chat.v1.Membership\"E\xda\x41\x11parent,membership\x82\xd3\xe4\x93\x02+\"\x1d/v1/{parent=spaces/*}/members:\nmembership\x12\xae\x01\n\x10UpdateMembership\x12\'.google.chat.v1.UpdateMembershipRequest\x1a\x1a.google.chat.v1.Membership\"U\xda\x41\x16membership,update_mask\x82\xd3\xe4\x93\x02\x36\x32(/v1/{membership.name=spaces/*/members/*}:\nmembership\x12\x85\x01\n\x10\x44\x65leteMembership\x12\'.google.chat.v1.DeleteMembershipRequest\x1a\x1a.google.chat.v1.Membership\",\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1f*\x1d/v1/{name=spaces/*/members/*}\x12\xa1\x01\n\x0e\x43reateReaction\x12%.google.chat.v1.CreateReactionRequest\x1a\x18.google.chat.v1.Reaction\"N\xda\x41\x0fparent,reaction\x82\xd3\xe4\x93\x02\x36\"*/v1/{parent=spaces/*/messages/*}/reactions:\x08reaction\x12\x99\x01\n\rListReactions\x12$.google.chat.v1.ListReactionsRequest\x1a%.google.chat.v1.ListReactionsResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=spaces/*/messages/*}/reactions\x12\x8a\x01\n\x0e\x44\x65leteReaction\x12%.google.chat.v1.DeleteReactionRequest\x1a\x16.google.protobuf.Empty\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=spaces/*/messages/*/reactions/*}\x12\x98\x01\n\x11GetSpaceReadState\x12(.google.chat.v1.GetSpaceReadStateRequest\x1a\x1e.google.chat.v1.SpaceReadState\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=users/*/spaces/*/spaceReadState}\x12\xd9\x01\n\x14UpdateSpaceReadState\x12+.google.chat.v1.UpdateSpaceReadStateRequest\x1a\x1e.google.chat.v1.SpaceReadState\"t\xda\x41\x1cspace_read_state,update_mask\x82\xd3\xe4\x93\x02O2;/v1/{space_read_state.name=users/*/spaces/*/spaceReadState}:\x10space_read_state\x12\xa6\x01\n\x12GetThreadReadState\x12).google.chat.v1.GetThreadReadStateRequest\x1a\x1f.google.chat.v1.ThreadReadState\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=users/*/spaces/*/threads/*/threadReadState}\x12\x83\x01\n\rGetSpaceEvent\x12$.google.chat.v1.GetSpaceEventRequest\x1a\x1a.google.chat.v1.SpaceEvent\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x12!/v1/{name=spaces/*/spaceEvents/*}\x12\x9d\x01\n\x0fListSpaceEvents\x12&.google.chat.v1.ListSpaceEventsRequest\x1a\'.google.chat.v1.ListSpaceEventsResponse\"9\xda\x41\rparent,filter\x82\xd3\xe4\x93\x02#\x12!/v1/{parent=spaces/*}/spaceEvents\x1a\xa9\t\xca\x41\x13\x63hat.googleapis.com\xd2\x41\x8f\thttps://www.googleapis.com/auth/chat.admin.delete,https://www.googleapis.com/auth/chat.admin.memberships,https://www.googleapis.com/auth/chat.admin.memberships.readonly,https://www.googleapis.com/auth/chat.admin.spaces,https://www.googleapis.com/auth/chat.admin.spaces.readonly,https://www.googleapis.com/auth/chat.bot,https://www.googleapis.com/auth/chat.delete,https://www.googleapis.com/auth/chat.import,https://www.googleapis.com/auth/chat.memberships,https://www.googleapis.com/auth/chat.memberships.app,https://www.googleapis.com/auth/chat.memberships.readonly,https://www.googleapis.com/auth/chat.messages,https://www.googleapis.com/auth/chat.messages.create,https://www.googleapis.com/auth/chat.messages.reactions,https://www.googleapis.com/auth/chat.messages.reactions.create,https://www.googleapis.com/auth/chat.messages.reactions.readonly,https://www.googleapis.com/auth/chat.messages.readonly,https://www.googleapis.com/auth/chat.spaces,https://www.googleapis.com/auth/chat.spaces.create,https://www.googleapis.com/auth/chat.spaces.readonly,https://www.googleapis.com/auth/chat.users.readstate,https://www.googleapis.com/auth/chat.users.readstate.readonlyB\xa9\x01\n\x12\x63om.google.chat.v1B\x10\x43hatServiceProtoP\x01Z,cloud.google.com/go/chat/apiv1/chatpb;chatpb\xa2\x02\x0b\x44YNAPIProto\xaa\x02\x13Google.Apps.Chat.V1\xca\x02\x13Google\\Apps\\Chat\\V1\xea\x02\x16Google::Apps::Chat::V1b\x06proto3"
21
+ descriptor_data = "\n!google/chat/v1/chat_service.proto\x12\x0egoogle.chat.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/chat/v1/attachment.proto\x1a\x1fgoogle/chat/v1/membership.proto\x1a\x1cgoogle/chat/v1/message.proto\x1a\x1dgoogle/chat/v1/reaction.proto\x1a\x1agoogle/chat/v1/space.proto\x1a google/chat/v1/space_event.proto\x1a%google/chat/v1/space_read_state.proto\x1a google/chat/v1/space_setup.proto\x1a&google/chat/v1/thread_read_state.proto\x1a\x1bgoogle/protobuf/empty.proto2\x93*\n\x0b\x43hatService\x12\x9b\x01\n\rCreateMessage\x12$.google.chat.v1.CreateMessageRequest\x1a\x17.google.chat.v1.Message\"K\xda\x41\x19parent,message,message_id\x82\xd3\xe4\x93\x02)\"\x1e/v1/{parent=spaces/*}/messages:\x07message\x12\x8a\x01\n\x0cListMessages\x12#.google.chat.v1.ListMessagesRequest\x1a$.google.chat.v1.ListMessagesResponse\"/\xda\x41\x06parent\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{parent=spaces/*}/messages\x12\x92\x01\n\x0fListMemberships\x12&.google.chat.v1.ListMembershipsRequest\x1a\'.google.chat.v1.ListMembershipsResponse\".\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{parent=spaces/*}/members\x12\x7f\n\rGetMembership\x12$.google.chat.v1.GetMembershipRequest\x1a\x1a.google.chat.v1.Membership\",\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{name=spaces/*/members/*}\x12w\n\nGetMessage\x12!.google.chat.v1.GetMessageRequest\x1a\x17.google.chat.v1.Message\"-\xda\x41\x04name\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{name=spaces/*/messages/*}\x12\xd1\x01\n\rUpdateMessage\x12$.google.chat.v1.UpdateMessageRequest\x1a\x17.google.chat.v1.Message\"\x80\x01\xda\x41\x13message,update_mask\x82\xd3\xe4\x93\x02\x64\x1a&/v1/{message.name=spaces/*/messages/*}:\x07messageZ12&/v1/{message.name=spaces/*/messages/*}:\x07message\x12|\n\rDeleteMessage\x12$.google.chat.v1.DeleteMessageRequest\x1a\x16.google.protobuf.Empty\"-\xda\x41\x04name\x82\xd3\xe4\x93\x02 *\x1e/v1/{name=spaces/*/messages/*}\x12\x8e\x01\n\rGetAttachment\x12$.google.chat.v1.GetAttachmentRequest\x1a\x1a.google.chat.v1.Attachment\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=spaces/*/messages/*/attachments/*}\x12\x9a\x01\n\x10UploadAttachment\x12\'.google.chat.v1.UploadAttachmentRequest\x1a(.google.chat.v1.UploadAttachmentResponse\"3\x82\xd3\xe4\x93\x02-\"(/v1/{parent=spaces/*}/attachments:upload:\x01*\x12j\n\nListSpaces\x12!.google.chat.v1.ListSpacesRequest\x1a\".google.chat.v1.ListSpacesResponse\"\x15\xda\x41\x00\x82\xd3\xe4\x93\x02\x0c\x12\n/v1/spaces\x12w\n\x0cSearchSpaces\x12#.google.chat.v1.SearchSpacesRequest\x1a$.google.chat.v1.SearchSpacesResponse\"\x1c\xda\x41\x00\x82\xd3\xe4\x93\x02\x13\x12\x11/v1/spaces:search\x12\x66\n\x08GetSpace\x12\x1f.google.chat.v1.GetSpaceRequest\x1a\x15.google.chat.v1.Space\"\"\xda\x41\x04name\x82\xd3\xe4\x93\x02\x15\x12\x13/v1/{name=spaces/*}\x12k\n\x0b\x43reateSpace\x12\".google.chat.v1.CreateSpaceRequest\x1a\x15.google.chat.v1.Space\"!\xda\x41\x05space\x82\xd3\xe4\x93\x02\x13\"\n/v1/spaces:\x05space\x12\x63\n\nSetUpSpace\x12!.google.chat.v1.SetUpSpaceRequest\x1a\x15.google.chat.v1.Space\"\x1b\x82\xd3\xe4\x93\x02\x15\"\x10/v1/spaces:setup:\x01*\x12\x86\x01\n\x0bUpdateSpace\x12\".google.chat.v1.UpdateSpaceRequest\x1a\x15.google.chat.v1.Space\"<\xda\x41\x11space,update_mask\x82\xd3\xe4\x93\x02\"2\x19/v1/{space.name=spaces/*}:\x05space\x12m\n\x0b\x44\x65leteSpace\x12\".google.chat.v1.DeleteSpaceRequest\x1a\x16.google.protobuf.Empty\"\"\xda\x41\x04name\x82\xd3\xe4\x93\x02\x15*\x13/v1/{name=spaces/*}\x12\x9d\x01\n\x13\x43ompleteImportSpace\x12*.google.chat.v1.CompleteImportSpaceRequest\x1a+.google.chat.v1.CompleteImportSpaceResponse\"-\x82\xd3\xe4\x93\x02\'\"\"/v1/{name=spaces/*}:completeImport:\x01*\x12z\n\x11\x46indDirectMessage\x12(.google.chat.v1.FindDirectMessageRequest\x1a\x15.google.chat.v1.Space\"$\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/spaces:findDirectMessage\x12\x9e\x01\n\x10\x43reateMembership\x12\'.google.chat.v1.CreateMembershipRequest\x1a\x1a.google.chat.v1.Membership\"E\xda\x41\x11parent,membership\x82\xd3\xe4\x93\x02+\"\x1d/v1/{parent=spaces/*}/members:\nmembership\x12\xae\x01\n\x10UpdateMembership\x12\'.google.chat.v1.UpdateMembershipRequest\x1a\x1a.google.chat.v1.Membership\"U\xda\x41\x16membership,update_mask\x82\xd3\xe4\x93\x02\x36\x32(/v1/{membership.name=spaces/*/members/*}:\nmembership\x12\x85\x01\n\x10\x44\x65leteMembership\x12\'.google.chat.v1.DeleteMembershipRequest\x1a\x1a.google.chat.v1.Membership\",\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1f*\x1d/v1/{name=spaces/*/members/*}\x12\xa1\x01\n\x0e\x43reateReaction\x12%.google.chat.v1.CreateReactionRequest\x1a\x18.google.chat.v1.Reaction\"N\xda\x41\x0fparent,reaction\x82\xd3\xe4\x93\x02\x36\"*/v1/{parent=spaces/*/messages/*}/reactions:\x08reaction\x12\x99\x01\n\rListReactions\x12$.google.chat.v1.ListReactionsRequest\x1a%.google.chat.v1.ListReactionsResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=spaces/*/messages/*}/reactions\x12\x8a\x01\n\x0e\x44\x65leteReaction\x12%.google.chat.v1.DeleteReactionRequest\x1a\x16.google.protobuf.Empty\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=spaces/*/messages/*/reactions/*}\x12\x98\x01\n\x11GetSpaceReadState\x12(.google.chat.v1.GetSpaceReadStateRequest\x1a\x1e.google.chat.v1.SpaceReadState\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=users/*/spaces/*/spaceReadState}\x12\xd9\x01\n\x14UpdateSpaceReadState\x12+.google.chat.v1.UpdateSpaceReadStateRequest\x1a\x1e.google.chat.v1.SpaceReadState\"t\xda\x41\x1cspace_read_state,update_mask\x82\xd3\xe4\x93\x02O2;/v1/{space_read_state.name=users/*/spaces/*/spaceReadState}:\x10space_read_state\x12\xa6\x01\n\x12GetThreadReadState\x12).google.chat.v1.GetThreadReadStateRequest\x1a\x1f.google.chat.v1.ThreadReadState\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=users/*/spaces/*/threads/*/threadReadState}\x12\x83\x01\n\rGetSpaceEvent\x12$.google.chat.v1.GetSpaceEventRequest\x1a\x1a.google.chat.v1.SpaceEvent\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x12!/v1/{name=spaces/*/spaceEvents/*}\x12\x9d\x01\n\x0fListSpaceEvents\x12&.google.chat.v1.ListSpaceEventsRequest\x1a\'.google.chat.v1.ListSpaceEventsResponse\"9\xda\x41\rparent,filter\x82\xd3\xe4\x93\x02#\x12!/v1/{parent=spaces/*}/spaceEvents\x1a\xa9\t\xca\x41\x13\x63hat.googleapis.com\xd2\x41\x8f\thttps://www.googleapis.com/auth/chat.admin.delete,https://www.googleapis.com/auth/chat.admin.memberships,https://www.googleapis.com/auth/chat.admin.memberships.readonly,https://www.googleapis.com/auth/chat.admin.spaces,https://www.googleapis.com/auth/chat.admin.spaces.readonly,https://www.googleapis.com/auth/chat.bot,https://www.googleapis.com/auth/chat.delete,https://www.googleapis.com/auth/chat.import,https://www.googleapis.com/auth/chat.memberships,https://www.googleapis.com/auth/chat.memberships.app,https://www.googleapis.com/auth/chat.memberships.readonly,https://www.googleapis.com/auth/chat.messages,https://www.googleapis.com/auth/chat.messages.create,https://www.googleapis.com/auth/chat.messages.reactions,https://www.googleapis.com/auth/chat.messages.reactions.create,https://www.googleapis.com/auth/chat.messages.reactions.readonly,https://www.googleapis.com/auth/chat.messages.readonly,https://www.googleapis.com/auth/chat.spaces,https://www.googleapis.com/auth/chat.spaces.create,https://www.googleapis.com/auth/chat.spaces.readonly,https://www.googleapis.com/auth/chat.users.readstate,https://www.googleapis.com/auth/chat.users.readstate.readonlyB\xa9\x01\n\x12\x63om.google.chat.v1B\x10\x43hatServiceProtoP\x01Z,cloud.google.com/go/chat/apiv1/chatpb;chatpb\xa2\x02\x0b\x44YNAPIProto\xaa\x02\x13Google.Apps.Chat.V1\xca\x02\x13Google\\Apps\\Chat\\V1\xea\x02\x16Google::Apps::Chat::V1b\x06proto3"
22
22
 
23
23
  pool = Google::Protobuf::DescriptorPool.generated_pool
24
24
 
@@ -169,6 +169,12 @@ module Google
169
169
  # [`spaces.search()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/search)
170
170
  # method using Workspace administrator privileges instead.
171
171
  rpc :ListSpaces, ::Google::Apps::Chat::V1::ListSpacesRequest, ::Google::Apps::Chat::V1::ListSpacesResponse
172
+ # Returns a list of spaces in a Google Workspace organization based on an
173
+ # administrator's search. Requires [user
174
+ # authentication with administrator
175
+ # privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges).
176
+ # In the request, set `use_admin_access` to `true`.
177
+ rpc :SearchSpaces, ::Google::Apps::Chat::V1::SearchSpacesRequest, ::Google::Apps::Chat::V1::SearchSpacesResponse
172
178
  # Returns details about a space. For an example, see
173
179
  # [Get details about a
174
180
  # space](https://developers.google.com/workspace/chat/get-spaces).