google-apps-chat-v1 0.28.0 → 0.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +0 -1
  3. data/lib/google/apps/chat/v1/chat_service/client.rb +485 -51
  4. data/lib/google/apps/chat/v1/chat_service/credentials.rb +6 -1
  5. data/lib/google/apps/chat/v1/chat_service/paths.rb +18 -1
  6. data/lib/google/apps/chat/v1/chat_service/rest/client.rb +464 -51
  7. data/lib/google/apps/chat/v1/chat_service/rest/service_stub.rb +185 -1
  8. data/lib/google/apps/chat/v1/chat_service/rest.rb +1 -1
  9. data/lib/google/apps/chat/v1/chat_service.rb +1 -1
  10. data/lib/google/apps/chat/v1/rest.rb +1 -1
  11. data/lib/google/apps/chat/v1/version.rb +1 -1
  12. data/lib/google/apps/chat/v1.rb +1 -1
  13. data/lib/google/chat/v1/app_command_metadata_pb.rb +22 -0
  14. data/lib/google/chat/v1/chat_service_pb.rb +2 -1
  15. data/lib/google/chat/v1/chat_service_services_pb.rb +53 -8
  16. data/lib/google/chat/v1/markup_syntax_pb.rb +21 -0
  17. data/lib/google/chat/v1/message_pb.rb +2 -1
  18. data/lib/google/chat/v1/message_pin_pb.rb +28 -0
  19. data/lib/google/chat/v1/space_pb.rb +2 -1
  20. data/lib/google-apps-chat-v1.rb +1 -1
  21. data/proto_docs/google/api/client.rb +1 -1
  22. data/proto_docs/google/api/field_behavior.rb +1 -1
  23. data/proto_docs/google/api/field_info.rb +1 -1
  24. data/proto_docs/google/api/launch_stage.rb +1 -1
  25. data/proto_docs/google/api/resource.rb +1 -1
  26. data/proto_docs/google/apps/card/v1/card.rb +2 -2
  27. data/proto_docs/google/chat/v1/action_status.rb +1 -1
  28. data/proto_docs/google/chat/v1/annotation.rb +6 -6
  29. data/proto_docs/google/chat/v1/app_command_metadata.rb +57 -0
  30. data/proto_docs/google/chat/v1/attachment.rb +1 -1
  31. data/proto_docs/google/chat/v1/contextual_addon.rb +1 -1
  32. data/proto_docs/google/chat/v1/deletion_metadata.rb +1 -1
  33. data/proto_docs/google/chat/v1/event_payload.rb +1 -1
  34. data/proto_docs/google/chat/v1/group.rb +1 -1
  35. data/proto_docs/google/chat/v1/history_state.rb +1 -1
  36. data/proto_docs/google/chat/v1/markup_syntax.rb +47 -0
  37. data/proto_docs/google/chat/v1/matched_url.rb +1 -1
  38. data/proto_docs/google/chat/v1/membership.rb +1 -1
  39. data/proto_docs/google/chat/v1/message.rb +60 -10
  40. data/proto_docs/google/chat/v1/message_pin.rb +106 -0
  41. data/proto_docs/google/chat/v1/reaction.rb +13 -13
  42. data/proto_docs/google/chat/v1/slash_command.rb +1 -1
  43. data/proto_docs/google/chat/v1/space.rb +117 -20
  44. data/proto_docs/google/chat/v1/space_event.rb +1 -1
  45. data/proto_docs/google/chat/v1/space_notification_setting.rb +4 -4
  46. data/proto_docs/google/chat/v1/space_read_state.rb +1 -1
  47. data/proto_docs/google/chat/v1/space_setup.rb +19 -7
  48. data/proto_docs/google/chat/v1/thread_read_state.rb +1 -1
  49. data/proto_docs/google/chat/v1/user.rb +1 -1
  50. data/proto_docs/google/chat/v1/widgets.rb +1 -1
  51. data/proto_docs/google/protobuf/duration.rb +1 -1
  52. data/proto_docs/google/protobuf/empty.rb +1 -1
  53. data/proto_docs/google/protobuf/field_mask.rb +1 -1
  54. data/proto_docs/google/protobuf/timestamp.rb +8 -7
  55. data/proto_docs/google/protobuf/wrappers.rb +1 -1
  56. data/proto_docs/google/rpc/code.rb +1 -1
  57. data/proto_docs/google/type/color.rb +1 -1
  58. metadata +7 -1
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2024 Google LLC
3
+ # Copyright 2026 Google LLC
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -498,9 +498,24 @@ module Google
498
498
  # reply to a message
499
499
  # thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread).
500
500
  # @param request_id [::String]
501
- # Optional. A unique request ID for this message. Specifying an existing
502
- # request ID returns the message created with that ID instead of creating a
503
- # new message.
501
+ # Optional. A unique ID for this request. A random UUID is recommended.
502
+ # Specifying a request ID makes the request idempotent, which ensures that
503
+ # multiple identical requests with the same request ID result in only a
504
+ # single message being created. Subsequent requests with the same request
505
+ # ID return the existing message and do not update the message, even if the
506
+ # requested details differ from the current state.
507
+ #
508
+ # To use this field effectively:
509
+ #
510
+ # - Ensure that subsequent requests are identical and use the same
511
+ # authentication credentials as the original request.
512
+ # - If a message was already created with the provided request ID, the
513
+ # request returns that message. Note that the returned message might not be
514
+ # fully populated; the API echoes the message in your request with the
515
+ # system-assigned resource names populated. To retrieve the latest metadata
516
+ # for the message, call `GetMessage`.
517
+ # - Reusing an existing request ID with a different authenticated user
518
+ # results in an error.
504
519
  # @param message_reply_option [::Google::Apps::Chat::V1::CreateMessageRequest::MessageReplyOption]
505
520
  # Optional. Specifies whether a message starts a thread or replies to one.
506
521
  # Only supported in named spaces.
@@ -628,7 +643,7 @@ module Google
628
643
  # @param options [::Gapic::CallOptions, ::Hash]
629
644
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
630
645
  #
631
- # @overload list_messages(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, show_deleted: nil)
646
+ # @overload list_messages(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, show_deleted: nil, markup_syntax: nil)
632
647
  # Pass arguments to `list_messages` via keyword arguments. Note that at
633
648
  # least one keyword argument is required. To specify no parameters, or to keep all
634
649
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -705,6 +720,9 @@ module Google
705
720
  # Optional. Whether to include deleted messages. Deleted messages include
706
721
  # deleted time and metadata about their deletion, but message content is
707
722
  # unavailable.
723
+ # @param markup_syntax [::Google::Apps::Chat::V1::MarkupSyntax]
724
+ # Optional. Specifies the desired output syntax for the Chat message
725
+ # `formatted_text` field.
708
726
  # @yield [result, operation] Access the result along with the TransportOperation object
709
727
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Apps::Chat::V1::Message>]
710
728
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1138,7 +1156,7 @@ module Google
1138
1156
  # @param options [::Gapic::CallOptions, ::Hash]
1139
1157
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1140
1158
  #
1141
- # @overload get_message(name: nil)
1159
+ # @overload get_message(name: nil, markup_syntax: nil)
1142
1160
  # Pass arguments to `get_message` via keyword arguments. Note that at
1143
1161
  # least one keyword argument is required. To specify no parameters, or to keep all
1144
1162
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1152,6 +1170,9 @@ module Google
1152
1170
  # `clientAssignedMessageId` field for `{message}`. For details, see [Name a
1153
1171
  # message]
1154
1172
  # (https://developers.google.com/workspace/chat/create-messages#name_a_created_message).
1173
+ # @param markup_syntax [::Google::Apps::Chat::V1::MarkupSyntax]
1174
+ # Optional. Specifies the desired output syntax for the Chat message
1175
+ # `formatted_text` field.
1155
1176
  # @yield [result, operation] Access the result along with the TransportOperation object
1156
1177
  # @yieldparam result [::Google::Apps::Chat::V1::Message]
1157
1178
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1488,7 +1509,7 @@ module Google
1488
1509
  # @param options [::Gapic::CallOptions, ::Hash]
1489
1510
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1490
1511
  #
1491
- # @overload search_messages(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil, view: nil)
1512
+ # @overload search_messages(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil, markup_syntax: nil, view: nil)
1492
1513
  # Pass arguments to `search_messages` via keyword arguments. Note that at
1493
1514
  # least one keyword argument is required. To specify no parameters, or to keep all
1494
1515
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1526,6 +1547,10 @@ module Google
1526
1547
  # the top five space matches. For example, `space.display_name:Project`
1527
1548
  # searches for messages in the top five spaces that contain the word
1528
1549
  # "Project" in their display names.
1550
+ # - `space.space_type`: The type of the space. Only supports `=`. For
1551
+ # example, `space.space_type="DIRECT_MESSAGE"` returns only messages from
1552
+ # direct messages. The possible values are `DIRECT_MESSAGE`, `GROUP_CHAT`,
1553
+ # and `SPACE`.
1529
1554
  # - `attachment`: Supports the operator `:*` (has any) to check for the
1530
1555
  # presence of attachments. If `attachment:*` is specified, only messages
1531
1556
  # that have at least one attachment are returned.
@@ -1545,8 +1570,8 @@ module Google
1545
1570
  # - `is_unread()`: Filters out messages that have been read by the calling
1546
1571
  # user.
1547
1572
  #
1548
- # Using the `space.display_name` filter requires that the calling credentials
1549
- # include one of the following [authorization
1573
+ # Using the `space.display_name` or the `space.space_type` filters requires
1574
+ # that the calling credentials include one of the following [authorization
1550
1575
  # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
1551
1576
  #
1552
1577
  # - `https://www.googleapis.com/auth/chat.spaces.readonly`
@@ -1584,6 +1609,8 @@ module Google
1584
1609
  # `space.display_name:Project OR space.display_name:Tasks` returns messages
1585
1610
  # that are in spaces with display names containing either `Project` or
1586
1611
  # `Tasks` or both.
1612
+ # - `space.space_type` supports only the `OR` operator, for example:
1613
+ # `space.space_type = "DIRECT_MESSAGE" OR space.space_type = "GROUP_CHAT"`.
1587
1614
  # - `annotations.user_mentions.user.name` supports the operators `AND` and
1588
1615
  # `OR`, but not a mix of both. For example:
1589
1616
  # `annotations.user_mentions.user.name:"users/1234567890" AND
@@ -1655,6 +1682,9 @@ module Google
1655
1682
  # The default ordering is `create_time desc`. Only a single order per query
1656
1683
  # (`create_time` or `relevance`) is supported. Only descending order (`desc`)
1657
1684
  # is supported, and it must be specified after the order attribute.
1685
+ # @param markup_syntax [::Google::Apps::Chat::V1::MarkupSyntax]
1686
+ # Optional. Specifies the desired output syntax for the Chat message
1687
+ # `formatted_text` field.
1658
1688
  # @param view [::Google::Apps::Chat::V1::SearchMessagesRequest::SearchMessagesView]
1659
1689
  # Optional. Specifies what kind of search results view to return. The default
1660
1690
  # is `SEARCH_MESSAGES_VIEW_BASIC`.
@@ -2049,19 +2079,30 @@ module Google
2049
2079
  end
2050
2080
 
2051
2081
  ##
2052
- # Returns a list of spaces in a Google Workspace organization based on an
2053
- # administrator's search. In the request, set `use_admin_access` to `true`.
2054
- # For an example, see [Search for and manage
2082
+ # Returns a list of spaces in a Google Workspace organization. For an
2083
+ # example, see [Search for and manage
2055
2084
  # spaces](https://developers.google.com/workspace/chat/search-manage-admin).
2056
2085
  #
2057
- # Requires [user
2086
+ # When `use_admin_access` is set to `false`, the results are limited to
2087
+ # spaces where the calling user is a joined member. To search with
2088
+ # administrator privileges, set `use_admin_access` to `true`.
2089
+ #
2090
+ # Supports the following types of
2091
+ # [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
2092
+ #
2093
+ # - [User
2094
+ # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
2095
+ # with one of the following authorization scopes:
2096
+ # - `https://www.googleapis.com/auth/chat.spaces.readonly`
2097
+ # - `https://www.googleapis.com/auth/chat.spaces`
2098
+ #
2099
+ # - [User
2058
2100
  # authentication with administrator
2059
2101
  # privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges)
2060
2102
  # and one of the following [authorization
2061
2103
  # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
2062
- #
2063
- # - `https://www.googleapis.com/auth/chat.admin.spaces.readonly`
2064
- # - `https://www.googleapis.com/auth/chat.admin.spaces`
2104
+ # - `https://www.googleapis.com/auth/chat.admin.spaces.readonly`
2105
+ # - `https://www.googleapis.com/auth/chat.admin.spaces`
2065
2106
  #
2066
2107
  # @overload search_spaces(request, options = nil)
2067
2108
  # Pass arguments to `search_spaces` via a request object, either of type
@@ -2089,17 +2130,15 @@ module Google
2089
2130
  # Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces`
2090
2131
  # [OAuth 2.0
2091
2132
  # scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
2092
- #
2093
- # This method currently only supports admin access, thus only `true` is
2094
- # accepted for this field.
2095
2133
  # @param page_size [::Integer]
2096
2134
  # The maximum number of spaces to return. The service may return fewer than
2097
2135
  # this value.
2098
2136
  #
2099
2137
  # If unspecified, at most 100 spaces are returned.
2100
2138
  #
2101
- # The maximum value is 1000. If you use a value more than 1000, it's
2102
- # automatically changed to 1000.
2139
+ # The maximum value is 1000 when `useAdminAccess` is set to `true`.
2140
+ # Otherwise, the maximum value is 100. If you use a value more than the
2141
+ # maximum value, it's automatically changed to the maximum value.
2103
2142
  # @param page_token [::String]
2104
2143
  # A token, received from the previous search spaces call. Provide this
2105
2144
  # parameter to retrieve the subsequent page.
@@ -2110,7 +2149,8 @@ module Google
2110
2149
  # @param query [::String]
2111
2150
  # Required. A search query.
2112
2151
  #
2113
- # You can search by using the following parameters:
2152
+ # You can search by using the following parameters when `useAdminAccess`
2153
+ # is set to `true`:
2114
2154
  #
2115
2155
  # - `create_time`
2116
2156
  # - `customer`
@@ -2120,18 +2160,27 @@ module Google
2120
2160
  # - `space_history_state`
2121
2161
  # - `space_type`
2122
2162
  #
2163
+ # When `useAdminAccess` is set to `false`:
2164
+ #
2165
+ # - `display_name`
2166
+ # - `external_user_allowed`
2167
+ # - `space_type`
2168
+ #
2123
2169
  # `create_time` and `last_active_time` accept a timestamp in
2124
2170
  # [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported
2125
2171
  # comparison operators are: `=`, `<`, `>`, `<=`, `>=`.
2126
2172
  #
2127
- # `customer` is required and is used to indicate which customer
2128
- # to fetch spaces from. `customers/my_customer` is the only supported value.
2173
+ # `customer` is required when `useAdminAccess` is set to `true`, and is
2174
+ # used to indicate which customer to fetch spaces from.
2175
+ # `customers/my_customer` is the only supported value.
2129
2176
  #
2130
2177
  # `display_name` only accepts the `HAS` (`:`) operator. The text to
2131
2178
  # match is first tokenized into tokens and each token is prefix-matched
2132
2179
  # case-insensitively and independently as a substring anywhere in the space's
2133
2180
  # `display_name`. For example, `Fun Eve` matches `Fun event` or `The
2134
- # evening was fun`, but not `notFun event` or `even`.
2181
+ # evening was fun`, but not `notFun event` or `even`. When `useAdminAccess`
2182
+ # is set to `false`, `display_name` is required to retrieve meaningful
2183
+ # results. Otherwise, the default behavior is to return an empty response.
2135
2184
  #
2136
2185
  # `external_user_allowed` accepts either `true` or `false`.
2137
2186
  #
@@ -2154,7 +2203,8 @@ module Google
2154
2203
  # < "2022-01-01T00:00:00+00:00" AND last_active_time >
2155
2204
  # "2023-01-01T00:00:00+00:00"`.
2156
2205
  #
2157
- # The following example queries are valid:
2206
+ # The following example queries are valid when `useAdminAccess` is set to
2207
+ # `true`:
2158
2208
  #
2159
2209
  # ```
2160
2210
  # customer = "customers/my_customer" AND space_type = "SPACE"
@@ -2176,6 +2226,26 @@ module Google
2176
2226
  # "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND
2177
2227
  # (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF")
2178
2228
  # ```
2229
+ #
2230
+ # The following example queries are valid when `useAdminAccess` is set to
2231
+ # `false`:
2232
+ #
2233
+ # ```
2234
+ # display_name:"Hello World" AND space_type = "SPACE"
2235
+ #
2236
+ # (display_name:"Hello" OR display_name:"Fun") AND space_type = "SPACE"
2237
+ #
2238
+ # (external_user_allowed = "true" AND space_type = "SPACE") // Returns an
2239
+ # empty response.
2240
+ #
2241
+ # (external_user_allowed = "true" AND display_name:"Hello" AND space_type =
2242
+ # "SPACE")
2243
+ # ```
2244
+ #
2245
+ # The maximum query length is 1,000 characters.
2246
+ #
2247
+ # Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
2248
+ # error.
2179
2249
  # @param order_by [::String]
2180
2250
  # Optional. How the list of spaces is ordered.
2181
2251
  #
@@ -2187,13 +2257,17 @@ module Google
2187
2257
  # any topic of this space.
2188
2258
  # - `create_time` — Denotes the time of the space creation.
2189
2259
  #
2260
+ # When `useAdminAccess` is `false`, only `create_time` and `relevance` are
2261
+ # supported for ordering. Only `DESC` is supported for these fields in
2262
+ # non-admin searches.
2263
+ #
2190
2264
  # Valid ordering operation values are:
2191
2265
  #
2192
2266
  # - `ASC` for ascending. Default value.
2193
2267
  #
2194
2268
  # - `DESC` for descending.
2195
2269
  #
2196
- # The supported syntax are:
2270
+ # The supported syntax are when `useAdminAccess` is set to `true`:
2197
2271
  #
2198
2272
  # - `membership_count.joined_direct_human_user_count DESC`
2199
2273
  # - `membership_count.joined_direct_human_user_count ASC`
@@ -2201,6 +2275,12 @@ module Google
2201
2275
  # - `last_active_time ASC`
2202
2276
  # - `create_time DESC`
2203
2277
  # - `create_time ASC`
2278
+ #
2279
+ # When `useAdminAccess` is set to `false`:
2280
+ #
2281
+ # - `create_time DESC`
2282
+ # - `relevance DESC`
2283
+ # [Developer Preview](https://developers.google.com/workspace/preview).
2204
2284
  # @yield [result, operation] Access the result along with the TransportOperation object
2205
2285
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Apps::Chat::V1::Space>]
2206
2286
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -2458,12 +2538,24 @@ module Google
2458
2538
  # The space `name` is assigned on the server so anything specified in this
2459
2539
  # field will be ignored.
2460
2540
  # @param request_id [::String]
2461
- # Optional. A unique identifier for this request.
2462
- # A random UUID is recommended.
2463
- # Specifying an existing request ID returns the space created with that ID
2464
- # instead of creating a new space.
2465
- # Specifying an existing request ID from the same Chat app with a different
2466
- # authenticated user returns an error.
2541
+ # Optional. A unique ID for this request. A random UUID is recommended.
2542
+ # Specifying a request ID makes the request idempotent, which ensures that
2543
+ # multiple identical requests with the same request ID result in only a
2544
+ # single space being created. Subsequent requests with the same request ID
2545
+ # return the existing space and do not update the space, even if the
2546
+ # requested details differ from the current state.
2547
+ #
2548
+ # To use this field effectively:
2549
+ #
2550
+ # - Ensure that subsequent requests are identical and use the same
2551
+ # authentication credentials as the original request.
2552
+ # - If a space was already created with the provided request ID, the request
2553
+ # returns that space. Note that the returned space might not be fully
2554
+ # populated; the API echoes the space in your request with the
2555
+ # system-assigned resource name populated. To retrieve the latest metadata
2556
+ # for the space, call `GetSpace`.
2557
+ # - Reusing an existing request ID with a different authenticated user
2558
+ # results in an error.
2467
2559
  # @yield [result, operation] Access the result along with the TransportOperation object
2468
2560
  # @yieldparam result [::Google::Apps::Chat::V1::Space]
2469
2561
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -2621,12 +2713,24 @@ module Google
2621
2713
  # If a `DIRECT_MESSAGE` space already exists, that space is returned instead
2622
2714
  # of creating a new space.
2623
2715
  # @param request_id [::String]
2624
- # Optional. A unique identifier for this request.
2625
- # A random UUID is recommended.
2626
- # Specifying an existing request ID returns the space created with that ID
2627
- # instead of creating a new space.
2628
- # Specifying an existing request ID from the same Chat app with a different
2629
- # authenticated user returns an error.
2716
+ # Optional. A unique ID for this request. A random UUID is recommended.
2717
+ # Specifying a request ID makes the request idempotent, which ensures that
2718
+ # multiple identical requests with the same request ID result in only a
2719
+ # single space being created. Subsequent requests with the same request ID
2720
+ # return the existing space and do not update the space, even if the
2721
+ # requested details differ from the current state.
2722
+ #
2723
+ # To use this field effectively:
2724
+ #
2725
+ # - Ensure that subsequent requests are identical and use the same
2726
+ # authentication credentials as the original request.
2727
+ # - If a space was already created with the provided request ID, the request
2728
+ # returns that space. Note that the returned space might not be fully
2729
+ # populated; the API echoes the space in your request with the
2730
+ # system-assigned resource name populated. To retrieve the latest metadata
2731
+ # for the space, call `GetSpace`.
2732
+ # - Reusing an existing request ID with a different authenticated user
2733
+ # results in an error.
2630
2734
  # @param memberships [::Array<::Google::Apps::Chat::V1::Membership, ::Hash>]
2631
2735
  # Optional. The Google Chat users or groups to invite to join the space. Omit
2632
2736
  # the calling user, as they are added automatically.
@@ -2835,6 +2939,7 @@ module Google
2835
2939
  #
2836
2940
  # - `access_settings.access_permission_settings.discoverSpaceSetting`
2837
2941
  # - `access_settings.access_permission_settings.joinSpaceSetting`
2942
+ # - `access_settings.access_permission_settings.viewSpaceMembershipSetting`
2838
2943
  #
2839
2944
  # `permission_settings`: Supports changing the
2840
2945
  # [permission settings](https://support.google.com/chat/answer/13340792)
@@ -2851,6 +2956,7 @@ module Google
2851
2956
  # - `permission_settings.manageApps`
2852
2957
  # - `permission_settings.manageWebhooks`
2853
2958
  # - `permission_settings.replyMessages`
2959
+ # - `permission_settings.viewSpaceMembership`
2854
2960
  # @param use_admin_access [::Boolean]
2855
2961
  # Optional. When `true`, the method runs using the user's Google Workspace
2856
2962
  # administrator privileges.
@@ -3985,26 +4091,26 @@ module Google
3985
4091
  # For example, the following queries are valid:
3986
4092
  #
3987
4093
  # ```
3988
- # user.name = "users/\\{user}"
4094
+ # user.name = "users/{user}"
3989
4095
  # emoji.unicode = "🙂"
3990
- # emoji.custom_emoji.uid = "\\{uid}"
4096
+ # emoji.custom_emoji.uid = "{uid}"
3991
4097
  # emoji.unicode = "🙂" OR emoji.unicode = "👍"
3992
- # emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "\\{uid}"
3993
- # emoji.unicode = "🙂" AND user.name = "users/\\{user}"
3994
- # (emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "\\{uid}")
3995
- # AND user.name = "users/\\{user}"
4098
+ # emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}"
4099
+ # emoji.unicode = "🙂" AND user.name = "users/{user}"
4100
+ # (emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}")
4101
+ # AND user.name = "users/{user}"
3996
4102
  # ```
3997
4103
  #
3998
4104
  # The following queries are invalid:
3999
4105
  #
4000
4106
  # ```
4001
4107
  # emoji.unicode = "🙂" AND emoji.unicode = "👍"
4002
- # emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "\\{uid}"
4003
- # emoji.unicode = "🙂" OR user.name = "users/\\{user}"
4004
- # emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "\\{uid}" OR
4005
- # user.name = "users/\\{user}"
4006
- # emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "\\{uid}"
4007
- # AND user.name = "users/\\{user}"
4108
+ # emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "{uid}"
4109
+ # emoji.unicode = "🙂" OR user.name = "users/{user}"
4110
+ # emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" OR
4111
+ # user.name = "users/{user}"
4112
+ # emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}"
4113
+ # AND user.name = "users/{user}"
4008
4114
  # ```
4009
4115
  #
4010
4116
  # Invalid queries are rejected with an `INVALID_ARGUMENT` error.
@@ -4163,6 +4269,292 @@ module Google
4163
4269
  raise ::Google::Cloud::Error.from_error(e)
4164
4270
  end
4165
4271
 
4272
+ ##
4273
+ # Lists message pins in a space. Users can pin important messages in spaces
4274
+ # for easy access. For more information, see [Pin or unpin a conversation in
4275
+ # Google Chat](https://support.google.com/chat/answer/15622437).
4276
+ #
4277
+ # Requires [user
4278
+ # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
4279
+ # with one of the following [authorization
4280
+ # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
4281
+ #
4282
+ # - `https://www.googleapis.com/auth/chat.spaces.pins.readonly`
4283
+ # - `https://www.googleapis.com/auth/chat.spaces.pins`
4284
+ # - `https://www.googleapis.com/auth/chat.spaces.readonly`
4285
+ # - `https://www.googleapis.com/auth/chat.spaces`
4286
+ #
4287
+ # @overload list_message_pins(request, options = nil)
4288
+ # Pass arguments to `list_message_pins` via a request object, either of type
4289
+ # {::Google::Apps::Chat::V1::ListMessagePinsRequest} or an equivalent Hash.
4290
+ #
4291
+ # @param request [::Google::Apps::Chat::V1::ListMessagePinsRequest, ::Hash]
4292
+ # A request object representing the call parameters. Required. To specify no
4293
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4294
+ # @param options [::Gapic::CallOptions, ::Hash]
4295
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4296
+ #
4297
+ # @overload list_message_pins(parent: nil, page_size: nil, page_token: nil)
4298
+ # Pass arguments to `list_message_pins` via keyword arguments. Note that at
4299
+ # least one keyword argument is required. To specify no parameters, or to keep all
4300
+ # the default parameter values, pass an empty Hash as a request object (see above).
4301
+ #
4302
+ # @param parent [::String]
4303
+ # Required. The parent space which owns the collection of pinned items
4304
+ # Format: `spaces/{space}`
4305
+ # @param page_size [::Integer]
4306
+ # Optional. The maximum number of message pins returned. The service might
4307
+ # return fewer messages than this value. The maximum value is 100. If you use
4308
+ # a value more than 100, it's automatically changed to 100. If unspecified,
4309
+ # at most 100 message pins will be returned. Negative values return an
4310
+ # `INVALID_ARGUMENT` error.
4311
+ # @param page_token [::String]
4312
+ # Optional. A page token received from a previous list message pins call.
4313
+ # Provide this parameter to retrieve the subsequent page.
4314
+ #
4315
+ # When paginating, all other parameters provided should match the call that
4316
+ # provided the page token. Passing different values to the other parameters
4317
+ # might lead to unexpected results.
4318
+ # @yield [result, operation] Access the result along with the TransportOperation object
4319
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Apps::Chat::V1::MessagePin>]
4320
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4321
+ #
4322
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Apps::Chat::V1::MessagePin>]
4323
+ #
4324
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4325
+ #
4326
+ # @example Basic example
4327
+ # require "google/apps/chat/v1"
4328
+ #
4329
+ # # Create a client object. The client can be reused for multiple calls.
4330
+ # client = Google::Apps::Chat::V1::ChatService::Rest::Client.new
4331
+ #
4332
+ # # Create a request. To set request fields, pass in keyword arguments.
4333
+ # request = Google::Apps::Chat::V1::ListMessagePinsRequest.new
4334
+ #
4335
+ # # Call the list_message_pins method.
4336
+ # result = client.list_message_pins request
4337
+ #
4338
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
4339
+ # # over elements, and API calls will be issued to fetch pages as needed.
4340
+ # result.each do |item|
4341
+ # # Each element is of type ::Google::Apps::Chat::V1::MessagePin.
4342
+ # p item
4343
+ # end
4344
+ #
4345
+ def list_message_pins request, options = nil
4346
+ raise ::ArgumentError, "request must be provided" if request.nil?
4347
+
4348
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Chat::V1::ListMessagePinsRequest
4349
+
4350
+ # Converts hash and nil to an options object
4351
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4352
+
4353
+ # Customize the options with defaults
4354
+ call_metadata = @config.rpcs.list_message_pins.metadata.to_h
4355
+
4356
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
4357
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4358
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4359
+ gapic_version: ::Google::Apps::Chat::V1::VERSION,
4360
+ transports_version_send: [:rest]
4361
+
4362
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
4363
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4364
+
4365
+ options.apply_defaults timeout: @config.rpcs.list_message_pins.timeout,
4366
+ metadata: call_metadata,
4367
+ retry_policy: @config.rpcs.list_message_pins.retry_policy
4368
+
4369
+ options.apply_defaults timeout: @config.timeout,
4370
+ metadata: @config.metadata,
4371
+ retry_policy: @config.retry_policy
4372
+
4373
+ @chat_service_stub.list_message_pins request, options do |result, operation|
4374
+ result = ::Gapic::Rest::PagedEnumerable.new @chat_service_stub, :list_message_pins, "message_pins", request, result, options
4375
+ yield result, operation if block_given?
4376
+ throw :response, result
4377
+ end
4378
+ rescue ::Gapic::Rest::Error => e
4379
+ raise ::Google::Cloud::Error.from_error(e)
4380
+ end
4381
+
4382
+ ##
4383
+ # Creates a message pin.
4384
+ #
4385
+ # Requires [user
4386
+ # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
4387
+ # with one of the following [authorization
4388
+ # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
4389
+ #
4390
+ # - `https://www.googleapis.com/auth/chat.spaces.pins`
4391
+ # - `https://www.googleapis.com/auth/chat.spaces`
4392
+ #
4393
+ # @overload create_message_pin(request, options = nil)
4394
+ # Pass arguments to `create_message_pin` via a request object, either of type
4395
+ # {::Google::Apps::Chat::V1::CreateMessagePinRequest} or an equivalent Hash.
4396
+ #
4397
+ # @param request [::Google::Apps::Chat::V1::CreateMessagePinRequest, ::Hash]
4398
+ # A request object representing the call parameters. Required. To specify no
4399
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4400
+ # @param options [::Gapic::CallOptions, ::Hash]
4401
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4402
+ #
4403
+ # @overload create_message_pin(parent: nil, message_pin: nil)
4404
+ # Pass arguments to `create_message_pin` via keyword arguments. Note that at
4405
+ # least one keyword argument is required. To specify no parameters, or to keep all
4406
+ # the default parameter values, pass an empty Hash as a request object (see above).
4407
+ #
4408
+ # @param parent [::String]
4409
+ # Required. The parent space in which to create the message pin.
4410
+ # Format: spaces/\\{space}
4411
+ # @param message_pin [::Google::Apps::Chat::V1::MessagePin, ::Hash]
4412
+ # Required. The MessagePin to create.
4413
+ # @yield [result, operation] Access the result along with the TransportOperation object
4414
+ # @yieldparam result [::Google::Apps::Chat::V1::MessagePin]
4415
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4416
+ #
4417
+ # @return [::Google::Apps::Chat::V1::MessagePin]
4418
+ #
4419
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4420
+ #
4421
+ # @example Basic example
4422
+ # require "google/apps/chat/v1"
4423
+ #
4424
+ # # Create a client object. The client can be reused for multiple calls.
4425
+ # client = Google::Apps::Chat::V1::ChatService::Rest::Client.new
4426
+ #
4427
+ # # Create a request. To set request fields, pass in keyword arguments.
4428
+ # request = Google::Apps::Chat::V1::CreateMessagePinRequest.new
4429
+ #
4430
+ # # Call the create_message_pin method.
4431
+ # result = client.create_message_pin request
4432
+ #
4433
+ # # The returned object is of type Google::Apps::Chat::V1::MessagePin.
4434
+ # p result
4435
+ #
4436
+ def create_message_pin request, options = nil
4437
+ raise ::ArgumentError, "request must be provided" if request.nil?
4438
+
4439
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Chat::V1::CreateMessagePinRequest
4440
+
4441
+ # Converts hash and nil to an options object
4442
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4443
+
4444
+ # Customize the options with defaults
4445
+ call_metadata = @config.rpcs.create_message_pin.metadata.to_h
4446
+
4447
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
4448
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4449
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4450
+ gapic_version: ::Google::Apps::Chat::V1::VERSION,
4451
+ transports_version_send: [:rest]
4452
+
4453
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
4454
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4455
+
4456
+ options.apply_defaults timeout: @config.rpcs.create_message_pin.timeout,
4457
+ metadata: call_metadata,
4458
+ retry_policy: @config.rpcs.create_message_pin.retry_policy
4459
+
4460
+ options.apply_defaults timeout: @config.timeout,
4461
+ metadata: @config.metadata,
4462
+ retry_policy: @config.retry_policy
4463
+
4464
+ @chat_service_stub.create_message_pin request, options do |result, operation|
4465
+ yield result, operation if block_given?
4466
+ end
4467
+ rescue ::Gapic::Rest::Error => e
4468
+ raise ::Google::Cloud::Error.from_error(e)
4469
+ end
4470
+
4471
+ ##
4472
+ # Deletes a message pin.
4473
+ #
4474
+ # Requires [user
4475
+ # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
4476
+ # with one of the following [authorization
4477
+ # scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
4478
+ #
4479
+ # - `https://www.googleapis.com/auth/chat.spaces.pins`
4480
+ # - `https://www.googleapis.com/auth/chat.spaces`
4481
+ #
4482
+ # @overload delete_message_pin(request, options = nil)
4483
+ # Pass arguments to `delete_message_pin` via a request object, either of type
4484
+ # {::Google::Apps::Chat::V1::DeleteMessagePinRequest} or an equivalent Hash.
4485
+ #
4486
+ # @param request [::Google::Apps::Chat::V1::DeleteMessagePinRequest, ::Hash]
4487
+ # A request object representing the call parameters. Required. To specify no
4488
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4489
+ # @param options [::Gapic::CallOptions, ::Hash]
4490
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4491
+ #
4492
+ # @overload delete_message_pin(name: nil)
4493
+ # Pass arguments to `delete_message_pin` via keyword arguments. Note that at
4494
+ # least one keyword argument is required. To specify no parameters, or to keep all
4495
+ # the default parameter values, pass an empty Hash as a request object (see above).
4496
+ #
4497
+ # @param name [::String]
4498
+ # Required. The resource name of the message pin to remove.
4499
+ # Format: spaces/\\{space}/messagePins/\\{message_pin}
4500
+ # @yield [result, operation] Access the result along with the TransportOperation object
4501
+ # @yieldparam result [::Google::Protobuf::Empty]
4502
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4503
+ #
4504
+ # @return [::Google::Protobuf::Empty]
4505
+ #
4506
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4507
+ #
4508
+ # @example Basic example
4509
+ # require "google/apps/chat/v1"
4510
+ #
4511
+ # # Create a client object. The client can be reused for multiple calls.
4512
+ # client = Google::Apps::Chat::V1::ChatService::Rest::Client.new
4513
+ #
4514
+ # # Create a request. To set request fields, pass in keyword arguments.
4515
+ # request = Google::Apps::Chat::V1::DeleteMessagePinRequest.new
4516
+ #
4517
+ # # Call the delete_message_pin method.
4518
+ # result = client.delete_message_pin request
4519
+ #
4520
+ # # The returned object is of type Google::Protobuf::Empty.
4521
+ # p result
4522
+ #
4523
+ def delete_message_pin request, options = nil
4524
+ raise ::ArgumentError, "request must be provided" if request.nil?
4525
+
4526
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Chat::V1::DeleteMessagePinRequest
4527
+
4528
+ # Converts hash and nil to an options object
4529
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4530
+
4531
+ # Customize the options with defaults
4532
+ call_metadata = @config.rpcs.delete_message_pin.metadata.to_h
4533
+
4534
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
4535
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4536
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4537
+ gapic_version: ::Google::Apps::Chat::V1::VERSION,
4538
+ transports_version_send: [:rest]
4539
+
4540
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
4541
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4542
+
4543
+ options.apply_defaults timeout: @config.rpcs.delete_message_pin.timeout,
4544
+ metadata: call_metadata,
4545
+ retry_policy: @config.rpcs.delete_message_pin.retry_policy
4546
+
4547
+ options.apply_defaults timeout: @config.timeout,
4548
+ metadata: @config.metadata,
4549
+ retry_policy: @config.retry_policy
4550
+
4551
+ @chat_service_stub.delete_message_pin request, options do |result, operation|
4552
+ yield result, operation if block_given?
4553
+ end
4554
+ rescue ::Gapic::Rest::Error => e
4555
+ raise ::Google::Cloud::Error.from_error(e)
4556
+ end
4557
+
4166
4558
  ##
4167
4559
  # Creates a custom emoji.
4168
4560
  #
@@ -6912,6 +7304,21 @@ module Google
6912
7304
  #
6913
7305
  attr_reader :delete_reaction
6914
7306
  ##
7307
+ # RPC-specific configuration for `list_message_pins`
7308
+ # @return [::Gapic::Config::Method]
7309
+ #
7310
+ attr_reader :list_message_pins
7311
+ ##
7312
+ # RPC-specific configuration for `create_message_pin`
7313
+ # @return [::Gapic::Config::Method]
7314
+ #
7315
+ attr_reader :create_message_pin
7316
+ ##
7317
+ # RPC-specific configuration for `delete_message_pin`
7318
+ # @return [::Gapic::Config::Method]
7319
+ #
7320
+ attr_reader :delete_message_pin
7321
+ ##
6915
7322
  # RPC-specific configuration for `create_custom_emoji`
6916
7323
  # @return [::Gapic::Config::Method]
6917
7324
  #
@@ -7081,6 +7488,12 @@ module Google
7081
7488
  @list_reactions = ::Gapic::Config::Method.new list_reactions_config
7082
7489
  delete_reaction_config = parent_rpcs.delete_reaction if parent_rpcs.respond_to? :delete_reaction
7083
7490
  @delete_reaction = ::Gapic::Config::Method.new delete_reaction_config
7491
+ list_message_pins_config = parent_rpcs.list_message_pins if parent_rpcs.respond_to? :list_message_pins
7492
+ @list_message_pins = ::Gapic::Config::Method.new list_message_pins_config
7493
+ create_message_pin_config = parent_rpcs.create_message_pin if parent_rpcs.respond_to? :create_message_pin
7494
+ @create_message_pin = ::Gapic::Config::Method.new create_message_pin_config
7495
+ delete_message_pin_config = parent_rpcs.delete_message_pin if parent_rpcs.respond_to? :delete_message_pin
7496
+ @delete_message_pin = ::Gapic::Config::Method.new delete_message_pin_config
7084
7497
  create_custom_emoji_config = parent_rpcs.create_custom_emoji if parent_rpcs.respond_to? :create_custom_emoji
7085
7498
  @create_custom_emoji = ::Gapic::Config::Method.new create_custom_emoji_config
7086
7499
  get_custom_emoji_config = parent_rpcs.get_custom_emoji if parent_rpcs.respond_to? :get_custom_emoji