google-apps-chat-v1 0.28.0 → 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +0 -1
- data/lib/google/apps/chat/v1/chat_service/client.rb +485 -51
- data/lib/google/apps/chat/v1/chat_service/credentials.rb +6 -1
- data/lib/google/apps/chat/v1/chat_service/paths.rb +18 -1
- data/lib/google/apps/chat/v1/chat_service/rest/client.rb +464 -51
- data/lib/google/apps/chat/v1/chat_service/rest/service_stub.rb +185 -1
- data/lib/google/apps/chat/v1/chat_service/rest.rb +1 -1
- data/lib/google/apps/chat/v1/chat_service.rb +1 -1
- data/lib/google/apps/chat/v1/rest.rb +1 -1
- data/lib/google/apps/chat/v1/version.rb +1 -1
- data/lib/google/apps/chat/v1.rb +1 -1
- data/lib/google/chat/v1/app_command_metadata_pb.rb +22 -0
- data/lib/google/chat/v1/chat_service_pb.rb +2 -1
- data/lib/google/chat/v1/chat_service_services_pb.rb +53 -8
- data/lib/google/chat/v1/markup_syntax_pb.rb +21 -0
- data/lib/google/chat/v1/message_pb.rb +2 -1
- data/lib/google/chat/v1/message_pin_pb.rb +28 -0
- data/lib/google/chat/v1/space_pb.rb +2 -1
- data/lib/google/chat/v1/user_pb.rb +1 -1
- data/lib/google-apps-chat-v1.rb +1 -1
- data/proto_docs/google/api/client.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +1 -1
- data/proto_docs/google/api/field_info.rb +1 -1
- data/proto_docs/google/api/launch_stage.rb +1 -1
- data/proto_docs/google/api/resource.rb +1 -1
- data/proto_docs/google/apps/card/v1/card.rb +2 -2
- data/proto_docs/google/chat/v1/action_status.rb +1 -1
- data/proto_docs/google/chat/v1/annotation.rb +6 -6
- data/proto_docs/google/chat/v1/app_command_metadata.rb +57 -0
- data/proto_docs/google/chat/v1/attachment.rb +1 -1
- data/proto_docs/google/chat/v1/contextual_addon.rb +1 -1
- data/proto_docs/google/chat/v1/deletion_metadata.rb +1 -1
- data/proto_docs/google/chat/v1/event_payload.rb +1 -1
- data/proto_docs/google/chat/v1/group.rb +1 -1
- data/proto_docs/google/chat/v1/history_state.rb +1 -1
- data/proto_docs/google/chat/v1/markup_syntax.rb +47 -0
- data/proto_docs/google/chat/v1/matched_url.rb +1 -1
- data/proto_docs/google/chat/v1/membership.rb +5 -3
- data/proto_docs/google/chat/v1/message.rb +64 -12
- data/proto_docs/google/chat/v1/message_pin.rb +106 -0
- data/proto_docs/google/chat/v1/reaction.rb +13 -13
- data/proto_docs/google/chat/v1/slash_command.rb +1 -1
- data/proto_docs/google/chat/v1/space.rb +117 -20
- data/proto_docs/google/chat/v1/space_event.rb +1 -1
- data/proto_docs/google/chat/v1/space_notification_setting.rb +4 -4
- data/proto_docs/google/chat/v1/space_read_state.rb +1 -1
- data/proto_docs/google/chat/v1/space_setup.rb +19 -7
- data/proto_docs/google/chat/v1/thread_read_state.rb +1 -1
- data/proto_docs/google/chat/v1/user.rb +38 -6
- data/proto_docs/google/chat/v1/widgets.rb +1 -1
- data/proto_docs/google/protobuf/duration.rb +1 -1
- data/proto_docs/google/protobuf/empty.rb +1 -1
- data/proto_docs/google/protobuf/field_mask.rb +1 -1
- data/proto_docs/google/protobuf/timestamp.rb +8 -7
- data/proto_docs/google/protobuf/wrappers.rb +1 -1
- data/proto_docs/google/rpc/code.rb +1 -1
- data/proto_docs/google/type/color.rb +1 -1
- metadata +7 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright
|
|
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.
|
|
@@ -505,9 +505,24 @@ module Google
|
|
|
505
505
|
# reply to a message
|
|
506
506
|
# thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread).
|
|
507
507
|
# @param request_id [::String]
|
|
508
|
-
# Optional. A unique
|
|
509
|
-
# request ID
|
|
510
|
-
#
|
|
508
|
+
# Optional. A unique ID for this request. A random UUID is recommended.
|
|
509
|
+
# Specifying a request ID makes the request idempotent, which ensures that
|
|
510
|
+
# multiple identical requests with the same request ID result in only a
|
|
511
|
+
# single message being created. Subsequent requests with the same request
|
|
512
|
+
# ID return the existing message and do not update the message, even if the
|
|
513
|
+
# requested details differ from the current state.
|
|
514
|
+
#
|
|
515
|
+
# To use this field effectively:
|
|
516
|
+
#
|
|
517
|
+
# - Ensure that subsequent requests are identical and use the same
|
|
518
|
+
# authentication credentials as the original request.
|
|
519
|
+
# - If a message was already created with the provided request ID, the
|
|
520
|
+
# request returns that message. Note that the returned message might not be
|
|
521
|
+
# fully populated; the API echoes the message in your request with the
|
|
522
|
+
# system-assigned resource names populated. To retrieve the latest metadata
|
|
523
|
+
# for the message, call `GetMessage`.
|
|
524
|
+
# - Reusing an existing request ID with a different authenticated user
|
|
525
|
+
# results in an error.
|
|
511
526
|
# @param message_reply_option [::Google::Apps::Chat::V1::CreateMessageRequest::MessageReplyOption]
|
|
512
527
|
# Optional. Specifies whether a message starts a thread or replies to one.
|
|
513
528
|
# Only supported in named spaces.
|
|
@@ -642,7 +657,7 @@ module Google
|
|
|
642
657
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
643
658
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
644
659
|
#
|
|
645
|
-
# @overload list_messages(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, show_deleted: nil)
|
|
660
|
+
# @overload list_messages(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, show_deleted: nil, markup_syntax: nil)
|
|
646
661
|
# Pass arguments to `list_messages` via keyword arguments. Note that at
|
|
647
662
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
648
663
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -719,6 +734,9 @@ module Google
|
|
|
719
734
|
# Optional. Whether to include deleted messages. Deleted messages include
|
|
720
735
|
# deleted time and metadata about their deletion, but message content is
|
|
721
736
|
# unavailable.
|
|
737
|
+
# @param markup_syntax [::Google::Apps::Chat::V1::MarkupSyntax]
|
|
738
|
+
# Optional. Specifies the desired output syntax for the Chat message
|
|
739
|
+
# `formatted_text` field.
|
|
722
740
|
#
|
|
723
741
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
724
742
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Apps::Chat::V1::Message>]
|
|
@@ -1173,7 +1191,7 @@ module Google
|
|
|
1173
1191
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1174
1192
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1175
1193
|
#
|
|
1176
|
-
# @overload get_message(name: nil)
|
|
1194
|
+
# @overload get_message(name: nil, markup_syntax: nil)
|
|
1177
1195
|
# Pass arguments to `get_message` via keyword arguments. Note that at
|
|
1178
1196
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1179
1197
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -1187,6 +1205,9 @@ module Google
|
|
|
1187
1205
|
# `clientAssignedMessageId` field for `{message}`. For details, see [Name a
|
|
1188
1206
|
# message]
|
|
1189
1207
|
# (https://developers.google.com/workspace/chat/create-messages#name_a_created_message).
|
|
1208
|
+
# @param markup_syntax [::Google::Apps::Chat::V1::MarkupSyntax]
|
|
1209
|
+
# Optional. Specifies the desired output syntax for the Chat message
|
|
1210
|
+
# `formatted_text` field.
|
|
1190
1211
|
#
|
|
1191
1212
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
1192
1213
|
# @yieldparam response [::Google::Apps::Chat::V1::Message]
|
|
@@ -1544,7 +1565,7 @@ module Google
|
|
|
1544
1565
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1545
1566
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1546
1567
|
#
|
|
1547
|
-
# @overload search_messages(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil, view: nil)
|
|
1568
|
+
# @overload search_messages(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil, markup_syntax: nil, view: nil)
|
|
1548
1569
|
# Pass arguments to `search_messages` via keyword arguments. Note that at
|
|
1549
1570
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1550
1571
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -1582,6 +1603,10 @@ module Google
|
|
|
1582
1603
|
# the top five space matches. For example, `space.display_name:Project`
|
|
1583
1604
|
# searches for messages in the top five spaces that contain the word
|
|
1584
1605
|
# "Project" in their display names.
|
|
1606
|
+
# - `space.space_type`: The type of the space. Only supports `=`. For
|
|
1607
|
+
# example, `space.space_type="DIRECT_MESSAGE"` returns only messages from
|
|
1608
|
+
# direct messages. The possible values are `DIRECT_MESSAGE`, `GROUP_CHAT`,
|
|
1609
|
+
# and `SPACE`.
|
|
1585
1610
|
# - `attachment`: Supports the operator `:*` (has any) to check for the
|
|
1586
1611
|
# presence of attachments. If `attachment:*` is specified, only messages
|
|
1587
1612
|
# that have at least one attachment are returned.
|
|
@@ -1601,8 +1626,8 @@ module Google
|
|
|
1601
1626
|
# - `is_unread()`: Filters out messages that have been read by the calling
|
|
1602
1627
|
# user.
|
|
1603
1628
|
#
|
|
1604
|
-
# Using the `space.display_name`
|
|
1605
|
-
# include one of the following [authorization
|
|
1629
|
+
# Using the `space.display_name` or the `space.space_type` filters requires
|
|
1630
|
+
# that the calling credentials include one of the following [authorization
|
|
1606
1631
|
# scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
1607
1632
|
#
|
|
1608
1633
|
# - `https://www.googleapis.com/auth/chat.spaces.readonly`
|
|
@@ -1640,6 +1665,8 @@ module Google
|
|
|
1640
1665
|
# `space.display_name:Project OR space.display_name:Tasks` returns messages
|
|
1641
1666
|
# that are in spaces with display names containing either `Project` or
|
|
1642
1667
|
# `Tasks` or both.
|
|
1668
|
+
# - `space.space_type` supports only the `OR` operator, for example:
|
|
1669
|
+
# `space.space_type = "DIRECT_MESSAGE" OR space.space_type = "GROUP_CHAT"`.
|
|
1643
1670
|
# - `annotations.user_mentions.user.name` supports the operators `AND` and
|
|
1644
1671
|
# `OR`, but not a mix of both. For example:
|
|
1645
1672
|
# `annotations.user_mentions.user.name:"users/1234567890" AND
|
|
@@ -1711,6 +1738,9 @@ module Google
|
|
|
1711
1738
|
# The default ordering is `create_time desc`. Only a single order per query
|
|
1712
1739
|
# (`create_time` or `relevance`) is supported. Only descending order (`desc`)
|
|
1713
1740
|
# is supported, and it must be specified after the order attribute.
|
|
1741
|
+
# @param markup_syntax [::Google::Apps::Chat::V1::MarkupSyntax]
|
|
1742
|
+
# Optional. Specifies the desired output syntax for the Chat message
|
|
1743
|
+
# `formatted_text` field.
|
|
1714
1744
|
# @param view [::Google::Apps::Chat::V1::SearchMessagesRequest::SearchMessagesView]
|
|
1715
1745
|
# Optional. Specifies what kind of search results view to return. The default
|
|
1716
1746
|
# is `SEARCH_MESSAGES_VIEW_BASIC`.
|
|
@@ -2125,19 +2155,30 @@ module Google
|
|
|
2125
2155
|
end
|
|
2126
2156
|
|
|
2127
2157
|
##
|
|
2128
|
-
# Returns a list of spaces in a Google Workspace organization
|
|
2129
|
-
#
|
|
2130
|
-
# For an example, see [Search for and manage
|
|
2158
|
+
# Returns a list of spaces in a Google Workspace organization. For an
|
|
2159
|
+
# example, see [Search for and manage
|
|
2131
2160
|
# spaces](https://developers.google.com/workspace/chat/search-manage-admin).
|
|
2132
2161
|
#
|
|
2133
|
-
#
|
|
2162
|
+
# When `use_admin_access` is set to `false`, the results are limited to
|
|
2163
|
+
# spaces where the calling user is a joined member. To search with
|
|
2164
|
+
# administrator privileges, set `use_admin_access` to `true`.
|
|
2165
|
+
#
|
|
2166
|
+
# Supports the following types of
|
|
2167
|
+
# [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
|
|
2168
|
+
#
|
|
2169
|
+
# - [User
|
|
2170
|
+
# authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
2171
|
+
# with one of the following authorization scopes:
|
|
2172
|
+
# - `https://www.googleapis.com/auth/chat.spaces.readonly`
|
|
2173
|
+
# - `https://www.googleapis.com/auth/chat.spaces`
|
|
2174
|
+
#
|
|
2175
|
+
# - [User
|
|
2134
2176
|
# authentication with administrator
|
|
2135
2177
|
# privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges)
|
|
2136
2178
|
# and one of the following [authorization
|
|
2137
2179
|
# scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
2138
|
-
#
|
|
2139
|
-
#
|
|
2140
|
-
# - `https://www.googleapis.com/auth/chat.admin.spaces`
|
|
2180
|
+
# - `https://www.googleapis.com/auth/chat.admin.spaces.readonly`
|
|
2181
|
+
# - `https://www.googleapis.com/auth/chat.admin.spaces`
|
|
2141
2182
|
#
|
|
2142
2183
|
# @overload search_spaces(request, options = nil)
|
|
2143
2184
|
# Pass arguments to `search_spaces` via a request object, either of type
|
|
@@ -2165,17 +2206,15 @@ module Google
|
|
|
2165
2206
|
# Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces`
|
|
2166
2207
|
# [OAuth 2.0
|
|
2167
2208
|
# scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
|
|
2168
|
-
#
|
|
2169
|
-
# This method currently only supports admin access, thus only `true` is
|
|
2170
|
-
# accepted for this field.
|
|
2171
2209
|
# @param page_size [::Integer]
|
|
2172
2210
|
# The maximum number of spaces to return. The service may return fewer than
|
|
2173
2211
|
# this value.
|
|
2174
2212
|
#
|
|
2175
2213
|
# If unspecified, at most 100 spaces are returned.
|
|
2176
2214
|
#
|
|
2177
|
-
# The maximum value is 1000
|
|
2178
|
-
#
|
|
2215
|
+
# The maximum value is 1000 when `useAdminAccess` is set to `true`.
|
|
2216
|
+
# Otherwise, the maximum value is 100. If you use a value more than the
|
|
2217
|
+
# maximum value, it's automatically changed to the maximum value.
|
|
2179
2218
|
# @param page_token [::String]
|
|
2180
2219
|
# A token, received from the previous search spaces call. Provide this
|
|
2181
2220
|
# parameter to retrieve the subsequent page.
|
|
@@ -2186,7 +2225,8 @@ module Google
|
|
|
2186
2225
|
# @param query [::String]
|
|
2187
2226
|
# Required. A search query.
|
|
2188
2227
|
#
|
|
2189
|
-
# You can search by using the following parameters
|
|
2228
|
+
# You can search by using the following parameters when `useAdminAccess`
|
|
2229
|
+
# is set to `true`:
|
|
2190
2230
|
#
|
|
2191
2231
|
# - `create_time`
|
|
2192
2232
|
# - `customer`
|
|
@@ -2196,18 +2236,27 @@ module Google
|
|
|
2196
2236
|
# - `space_history_state`
|
|
2197
2237
|
# - `space_type`
|
|
2198
2238
|
#
|
|
2239
|
+
# When `useAdminAccess` is set to `false`:
|
|
2240
|
+
#
|
|
2241
|
+
# - `display_name`
|
|
2242
|
+
# - `external_user_allowed`
|
|
2243
|
+
# - `space_type`
|
|
2244
|
+
#
|
|
2199
2245
|
# `create_time` and `last_active_time` accept a timestamp in
|
|
2200
2246
|
# [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported
|
|
2201
2247
|
# comparison operators are: `=`, `<`, `>`, `<=`, `>=`.
|
|
2202
2248
|
#
|
|
2203
|
-
# `customer` is required
|
|
2204
|
-
# to
|
|
2249
|
+
# `customer` is required when `useAdminAccess` is set to `true`, and is
|
|
2250
|
+
# used to indicate which customer to fetch spaces from.
|
|
2251
|
+
# `customers/my_customer` is the only supported value.
|
|
2205
2252
|
#
|
|
2206
2253
|
# `display_name` only accepts the `HAS` (`:`) operator. The text to
|
|
2207
2254
|
# match is first tokenized into tokens and each token is prefix-matched
|
|
2208
2255
|
# case-insensitively and independently as a substring anywhere in the space's
|
|
2209
2256
|
# `display_name`. For example, `Fun Eve` matches `Fun event` or `The
|
|
2210
|
-
# evening was fun`, but not `notFun event` or `even`.
|
|
2257
|
+
# evening was fun`, but not `notFun event` or `even`. When `useAdminAccess`
|
|
2258
|
+
# is set to `false`, `display_name` is required to retrieve meaningful
|
|
2259
|
+
# results. Otherwise, the default behavior is to return an empty response.
|
|
2211
2260
|
#
|
|
2212
2261
|
# `external_user_allowed` accepts either `true` or `false`.
|
|
2213
2262
|
#
|
|
@@ -2230,7 +2279,8 @@ module Google
|
|
|
2230
2279
|
# < "2022-01-01T00:00:00+00:00" AND last_active_time >
|
|
2231
2280
|
# "2023-01-01T00:00:00+00:00"`.
|
|
2232
2281
|
#
|
|
2233
|
-
# The following example queries are valid
|
|
2282
|
+
# The following example queries are valid when `useAdminAccess` is set to
|
|
2283
|
+
# `true`:
|
|
2234
2284
|
#
|
|
2235
2285
|
# ```
|
|
2236
2286
|
# customer = "customers/my_customer" AND space_type = "SPACE"
|
|
@@ -2252,6 +2302,26 @@ module Google
|
|
|
2252
2302
|
# "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND
|
|
2253
2303
|
# (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF")
|
|
2254
2304
|
# ```
|
|
2305
|
+
#
|
|
2306
|
+
# The following example queries are valid when `useAdminAccess` is set to
|
|
2307
|
+
# `false`:
|
|
2308
|
+
#
|
|
2309
|
+
# ```
|
|
2310
|
+
# display_name:"Hello World" AND space_type = "SPACE"
|
|
2311
|
+
#
|
|
2312
|
+
# (display_name:"Hello" OR display_name:"Fun") AND space_type = "SPACE"
|
|
2313
|
+
#
|
|
2314
|
+
# (external_user_allowed = "true" AND space_type = "SPACE") // Returns an
|
|
2315
|
+
# empty response.
|
|
2316
|
+
#
|
|
2317
|
+
# (external_user_allowed = "true" AND display_name:"Hello" AND space_type =
|
|
2318
|
+
# "SPACE")
|
|
2319
|
+
# ```
|
|
2320
|
+
#
|
|
2321
|
+
# The maximum query length is 1,000 characters.
|
|
2322
|
+
#
|
|
2323
|
+
# Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
|
2324
|
+
# error.
|
|
2255
2325
|
# @param order_by [::String]
|
|
2256
2326
|
# Optional. How the list of spaces is ordered.
|
|
2257
2327
|
#
|
|
@@ -2263,13 +2333,17 @@ module Google
|
|
|
2263
2333
|
# any topic of this space.
|
|
2264
2334
|
# - `create_time` — Denotes the time of the space creation.
|
|
2265
2335
|
#
|
|
2336
|
+
# When `useAdminAccess` is `false`, only `create_time` and `relevance` are
|
|
2337
|
+
# supported for ordering. Only `DESC` is supported for these fields in
|
|
2338
|
+
# non-admin searches.
|
|
2339
|
+
#
|
|
2266
2340
|
# Valid ordering operation values are:
|
|
2267
2341
|
#
|
|
2268
2342
|
# - `ASC` for ascending. Default value.
|
|
2269
2343
|
#
|
|
2270
2344
|
# - `DESC` for descending.
|
|
2271
2345
|
#
|
|
2272
|
-
# The supported syntax are
|
|
2346
|
+
# The supported syntax are when `useAdminAccess` is set to `true`:
|
|
2273
2347
|
#
|
|
2274
2348
|
# - `membership_count.joined_direct_human_user_count DESC`
|
|
2275
2349
|
# - `membership_count.joined_direct_human_user_count ASC`
|
|
@@ -2278,6 +2352,12 @@ module Google
|
|
|
2278
2352
|
# - `create_time DESC`
|
|
2279
2353
|
# - `create_time ASC`
|
|
2280
2354
|
#
|
|
2355
|
+
# When `useAdminAccess` is set to `false`:
|
|
2356
|
+
#
|
|
2357
|
+
# - `create_time DESC`
|
|
2358
|
+
# - `relevance DESC`
|
|
2359
|
+
# [Developer Preview](https://developers.google.com/workspace/preview).
|
|
2360
|
+
#
|
|
2281
2361
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
2282
2362
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Apps::Chat::V1::Space>]
|
|
2283
2363
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
@@ -2540,12 +2620,24 @@ module Google
|
|
|
2540
2620
|
# The space `name` is assigned on the server so anything specified in this
|
|
2541
2621
|
# field will be ignored.
|
|
2542
2622
|
# @param request_id [::String]
|
|
2543
|
-
# Optional. A unique
|
|
2544
|
-
#
|
|
2545
|
-
#
|
|
2546
|
-
#
|
|
2547
|
-
#
|
|
2548
|
-
#
|
|
2623
|
+
# Optional. A unique ID for this request. A random UUID is recommended.
|
|
2624
|
+
# Specifying a request ID makes the request idempotent, which ensures that
|
|
2625
|
+
# multiple identical requests with the same request ID result in only a
|
|
2626
|
+
# single space being created. Subsequent requests with the same request ID
|
|
2627
|
+
# return the existing space and do not update the space, even if the
|
|
2628
|
+
# requested details differ from the current state.
|
|
2629
|
+
#
|
|
2630
|
+
# To use this field effectively:
|
|
2631
|
+
#
|
|
2632
|
+
# - Ensure that subsequent requests are identical and use the same
|
|
2633
|
+
# authentication credentials as the original request.
|
|
2634
|
+
# - If a space was already created with the provided request ID, the request
|
|
2635
|
+
# returns that space. Note that the returned space might not be fully
|
|
2636
|
+
# populated; the API echoes the space in your request with the
|
|
2637
|
+
# system-assigned resource name populated. To retrieve the latest metadata
|
|
2638
|
+
# for the space, call `GetSpace`.
|
|
2639
|
+
# - Reusing an existing request ID with a different authenticated user
|
|
2640
|
+
# results in an error.
|
|
2549
2641
|
#
|
|
2550
2642
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
2551
2643
|
# @yieldparam response [::Google::Apps::Chat::V1::Space]
|
|
@@ -2702,12 +2794,24 @@ module Google
|
|
|
2702
2794
|
# If a `DIRECT_MESSAGE` space already exists, that space is returned instead
|
|
2703
2795
|
# of creating a new space.
|
|
2704
2796
|
# @param request_id [::String]
|
|
2705
|
-
# Optional. A unique
|
|
2706
|
-
#
|
|
2707
|
-
#
|
|
2708
|
-
#
|
|
2709
|
-
#
|
|
2710
|
-
#
|
|
2797
|
+
# Optional. A unique ID for this request. A random UUID is recommended.
|
|
2798
|
+
# Specifying a request ID makes the request idempotent, which ensures that
|
|
2799
|
+
# multiple identical requests with the same request ID result in only a
|
|
2800
|
+
# single space being created. Subsequent requests with the same request ID
|
|
2801
|
+
# return the existing space and do not update the space, even if the
|
|
2802
|
+
# requested details differ from the current state.
|
|
2803
|
+
#
|
|
2804
|
+
# To use this field effectively:
|
|
2805
|
+
#
|
|
2806
|
+
# - Ensure that subsequent requests are identical and use the same
|
|
2807
|
+
# authentication credentials as the original request.
|
|
2808
|
+
# - If a space was already created with the provided request ID, the request
|
|
2809
|
+
# returns that space. Note that the returned space might not be fully
|
|
2810
|
+
# populated; the API echoes the space in your request with the
|
|
2811
|
+
# system-assigned resource name populated. To retrieve the latest metadata
|
|
2812
|
+
# for the space, call `GetSpace`.
|
|
2813
|
+
# - Reusing an existing request ID with a different authenticated user
|
|
2814
|
+
# results in an error.
|
|
2711
2815
|
# @param memberships [::Array<::Google::Apps::Chat::V1::Membership, ::Hash>]
|
|
2712
2816
|
# Optional. The Google Chat users or groups to invite to join the space. Omit
|
|
2713
2817
|
# the calling user, as they are added automatically.
|
|
@@ -2915,6 +3019,7 @@ module Google
|
|
|
2915
3019
|
#
|
|
2916
3020
|
# - `access_settings.access_permission_settings.discoverSpaceSetting`
|
|
2917
3021
|
# - `access_settings.access_permission_settings.joinSpaceSetting`
|
|
3022
|
+
# - `access_settings.access_permission_settings.viewSpaceMembershipSetting`
|
|
2918
3023
|
#
|
|
2919
3024
|
# `permission_settings`: Supports changing the
|
|
2920
3025
|
# [permission settings](https://support.google.com/chat/answer/13340792)
|
|
@@ -2931,6 +3036,7 @@ module Google
|
|
|
2931
3036
|
# - `permission_settings.manageApps`
|
|
2932
3037
|
# - `permission_settings.manageWebhooks`
|
|
2933
3038
|
# - `permission_settings.replyMessages`
|
|
3039
|
+
# - `permission_settings.viewSpaceMembership`
|
|
2934
3040
|
# @param use_admin_access [::Boolean]
|
|
2935
3041
|
# Optional. When `true`, the method runs using the user's Google Workspace
|
|
2936
3042
|
# administrator privileges.
|
|
@@ -4112,26 +4218,26 @@ module Google
|
|
|
4112
4218
|
# For example, the following queries are valid:
|
|
4113
4219
|
#
|
|
4114
4220
|
# ```
|
|
4115
|
-
# user.name = "users
|
|
4221
|
+
# user.name = "users/{user}"
|
|
4116
4222
|
# emoji.unicode = "🙂"
|
|
4117
|
-
# emoji.custom_emoji.uid = "
|
|
4223
|
+
# emoji.custom_emoji.uid = "{uid}"
|
|
4118
4224
|
# emoji.unicode = "🙂" OR emoji.unicode = "👍"
|
|
4119
|
-
# emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "
|
|
4120
|
-
# emoji.unicode = "🙂" AND user.name = "users
|
|
4121
|
-
# (emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "
|
|
4122
|
-
# AND user.name = "users
|
|
4225
|
+
# emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}"
|
|
4226
|
+
# emoji.unicode = "🙂" AND user.name = "users/{user}"
|
|
4227
|
+
# (emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}")
|
|
4228
|
+
# AND user.name = "users/{user}"
|
|
4123
4229
|
# ```
|
|
4124
4230
|
#
|
|
4125
4231
|
# The following queries are invalid:
|
|
4126
4232
|
#
|
|
4127
4233
|
# ```
|
|
4128
4234
|
# emoji.unicode = "🙂" AND emoji.unicode = "👍"
|
|
4129
|
-
# emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "
|
|
4130
|
-
# emoji.unicode = "🙂" OR user.name = "users
|
|
4131
|
-
# emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "
|
|
4132
|
-
# user.name = "users
|
|
4133
|
-
# emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "
|
|
4134
|
-
# AND user.name = "users
|
|
4235
|
+
# emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "{uid}"
|
|
4236
|
+
# emoji.unicode = "🙂" OR user.name = "users/{user}"
|
|
4237
|
+
# emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" OR
|
|
4238
|
+
# user.name = "users/{user}"
|
|
4239
|
+
# emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}"
|
|
4240
|
+
# AND user.name = "users/{user}"
|
|
4135
4241
|
# ```
|
|
4136
4242
|
#
|
|
4137
4243
|
# Invalid queries are rejected with an `INVALID_ARGUMENT` error.
|
|
@@ -4304,6 +4410,313 @@ module Google
|
|
|
4304
4410
|
raise ::Google::Cloud::Error.from_error(e)
|
|
4305
4411
|
end
|
|
4306
4412
|
|
|
4413
|
+
##
|
|
4414
|
+
# Lists message pins in a space. Users can pin important messages in spaces
|
|
4415
|
+
# for easy access. For more information, see [Pin or unpin a conversation in
|
|
4416
|
+
# Google Chat](https://support.google.com/chat/answer/15622437).
|
|
4417
|
+
#
|
|
4418
|
+
# Requires [user
|
|
4419
|
+
# authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
4420
|
+
# with one of the following [authorization
|
|
4421
|
+
# scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
4422
|
+
#
|
|
4423
|
+
# - `https://www.googleapis.com/auth/chat.spaces.pins.readonly`
|
|
4424
|
+
# - `https://www.googleapis.com/auth/chat.spaces.pins`
|
|
4425
|
+
# - `https://www.googleapis.com/auth/chat.spaces.readonly`
|
|
4426
|
+
# - `https://www.googleapis.com/auth/chat.spaces`
|
|
4427
|
+
#
|
|
4428
|
+
# @overload list_message_pins(request, options = nil)
|
|
4429
|
+
# Pass arguments to `list_message_pins` via a request object, either of type
|
|
4430
|
+
# {::Google::Apps::Chat::V1::ListMessagePinsRequest} or an equivalent Hash.
|
|
4431
|
+
#
|
|
4432
|
+
# @param request [::Google::Apps::Chat::V1::ListMessagePinsRequest, ::Hash]
|
|
4433
|
+
# A request object representing the call parameters. Required. To specify no
|
|
4434
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
4435
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
4436
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
4437
|
+
#
|
|
4438
|
+
# @overload list_message_pins(parent: nil, page_size: nil, page_token: nil)
|
|
4439
|
+
# Pass arguments to `list_message_pins` via keyword arguments. Note that at
|
|
4440
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
4441
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
4442
|
+
#
|
|
4443
|
+
# @param parent [::String]
|
|
4444
|
+
# Required. The parent space which owns the collection of pinned items
|
|
4445
|
+
# Format: `spaces/{space}`
|
|
4446
|
+
# @param page_size [::Integer]
|
|
4447
|
+
# Optional. The maximum number of message pins returned. The service might
|
|
4448
|
+
# return fewer messages than this value. The maximum value is 100. If you use
|
|
4449
|
+
# a value more than 100, it's automatically changed to 100. If unspecified,
|
|
4450
|
+
# at most 100 message pins will be returned. Negative values return an
|
|
4451
|
+
# `INVALID_ARGUMENT` error.
|
|
4452
|
+
# @param page_token [::String]
|
|
4453
|
+
# Optional. A page token received from a previous list message pins call.
|
|
4454
|
+
# Provide this parameter to retrieve the subsequent page.
|
|
4455
|
+
#
|
|
4456
|
+
# When paginating, all other parameters provided should match the call that
|
|
4457
|
+
# provided the page token. Passing different values to the other parameters
|
|
4458
|
+
# might lead to unexpected results.
|
|
4459
|
+
#
|
|
4460
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
4461
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Apps::Chat::V1::MessagePin>]
|
|
4462
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
4463
|
+
#
|
|
4464
|
+
# @return [::Gapic::PagedEnumerable<::Google::Apps::Chat::V1::MessagePin>]
|
|
4465
|
+
#
|
|
4466
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
4467
|
+
#
|
|
4468
|
+
# @example Basic example
|
|
4469
|
+
# require "google/apps/chat/v1"
|
|
4470
|
+
#
|
|
4471
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
4472
|
+
# client = Google::Apps::Chat::V1::ChatService::Client.new
|
|
4473
|
+
#
|
|
4474
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
4475
|
+
# request = Google::Apps::Chat::V1::ListMessagePinsRequest.new
|
|
4476
|
+
#
|
|
4477
|
+
# # Call the list_message_pins method.
|
|
4478
|
+
# result = client.list_message_pins request
|
|
4479
|
+
#
|
|
4480
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
4481
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
4482
|
+
# result.each do |item|
|
|
4483
|
+
# # Each element is of type ::Google::Apps::Chat::V1::MessagePin.
|
|
4484
|
+
# p item
|
|
4485
|
+
# end
|
|
4486
|
+
#
|
|
4487
|
+
def list_message_pins request, options = nil
|
|
4488
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
4489
|
+
|
|
4490
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Chat::V1::ListMessagePinsRequest
|
|
4491
|
+
|
|
4492
|
+
# Converts hash and nil to an options object
|
|
4493
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
4494
|
+
|
|
4495
|
+
# Customize the options with defaults
|
|
4496
|
+
metadata = @config.rpcs.list_message_pins.metadata.to_h
|
|
4497
|
+
|
|
4498
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
4499
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
4500
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
4501
|
+
gapic_version: ::Google::Apps::Chat::V1::VERSION
|
|
4502
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
4503
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
4504
|
+
|
|
4505
|
+
header_params = {}
|
|
4506
|
+
if request.parent
|
|
4507
|
+
header_params["parent"] = request.parent
|
|
4508
|
+
end
|
|
4509
|
+
|
|
4510
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
4511
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
4512
|
+
|
|
4513
|
+
options.apply_defaults timeout: @config.rpcs.list_message_pins.timeout,
|
|
4514
|
+
metadata: metadata,
|
|
4515
|
+
retry_policy: @config.rpcs.list_message_pins.retry_policy
|
|
4516
|
+
|
|
4517
|
+
options.apply_defaults timeout: @config.timeout,
|
|
4518
|
+
metadata: @config.metadata,
|
|
4519
|
+
retry_policy: @config.retry_policy
|
|
4520
|
+
|
|
4521
|
+
@chat_service_stub.call_rpc :list_message_pins, request, options: options do |response, operation|
|
|
4522
|
+
response = ::Gapic::PagedEnumerable.new @chat_service_stub, :list_message_pins, request, response, operation, options
|
|
4523
|
+
yield response, operation if block_given?
|
|
4524
|
+
throw :response, response
|
|
4525
|
+
end
|
|
4526
|
+
rescue ::GRPC::BadStatus => e
|
|
4527
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
4528
|
+
end
|
|
4529
|
+
|
|
4530
|
+
##
|
|
4531
|
+
# Creates a message pin.
|
|
4532
|
+
#
|
|
4533
|
+
# Requires [user
|
|
4534
|
+
# authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
4535
|
+
# with one of the following [authorization
|
|
4536
|
+
# scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
4537
|
+
#
|
|
4538
|
+
# - `https://www.googleapis.com/auth/chat.spaces.pins`
|
|
4539
|
+
# - `https://www.googleapis.com/auth/chat.spaces`
|
|
4540
|
+
#
|
|
4541
|
+
# @overload create_message_pin(request, options = nil)
|
|
4542
|
+
# Pass arguments to `create_message_pin` via a request object, either of type
|
|
4543
|
+
# {::Google::Apps::Chat::V1::CreateMessagePinRequest} or an equivalent Hash.
|
|
4544
|
+
#
|
|
4545
|
+
# @param request [::Google::Apps::Chat::V1::CreateMessagePinRequest, ::Hash]
|
|
4546
|
+
# A request object representing the call parameters. Required. To specify no
|
|
4547
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
4548
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
4549
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
4550
|
+
#
|
|
4551
|
+
# @overload create_message_pin(parent: nil, message_pin: nil)
|
|
4552
|
+
# Pass arguments to `create_message_pin` via keyword arguments. Note that at
|
|
4553
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
4554
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
4555
|
+
#
|
|
4556
|
+
# @param parent [::String]
|
|
4557
|
+
# Required. The parent space in which to create the message pin.
|
|
4558
|
+
# Format: spaces/\\{space}
|
|
4559
|
+
# @param message_pin [::Google::Apps::Chat::V1::MessagePin, ::Hash]
|
|
4560
|
+
# Required. The MessagePin to create.
|
|
4561
|
+
#
|
|
4562
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
4563
|
+
# @yieldparam response [::Google::Apps::Chat::V1::MessagePin]
|
|
4564
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
4565
|
+
#
|
|
4566
|
+
# @return [::Google::Apps::Chat::V1::MessagePin]
|
|
4567
|
+
#
|
|
4568
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
4569
|
+
#
|
|
4570
|
+
# @example Basic example
|
|
4571
|
+
# require "google/apps/chat/v1"
|
|
4572
|
+
#
|
|
4573
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
4574
|
+
# client = Google::Apps::Chat::V1::ChatService::Client.new
|
|
4575
|
+
#
|
|
4576
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
4577
|
+
# request = Google::Apps::Chat::V1::CreateMessagePinRequest.new
|
|
4578
|
+
#
|
|
4579
|
+
# # Call the create_message_pin method.
|
|
4580
|
+
# result = client.create_message_pin request
|
|
4581
|
+
#
|
|
4582
|
+
# # The returned object is of type Google::Apps::Chat::V1::MessagePin.
|
|
4583
|
+
# p result
|
|
4584
|
+
#
|
|
4585
|
+
def create_message_pin request, options = nil
|
|
4586
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
4587
|
+
|
|
4588
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Chat::V1::CreateMessagePinRequest
|
|
4589
|
+
|
|
4590
|
+
# Converts hash and nil to an options object
|
|
4591
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
4592
|
+
|
|
4593
|
+
# Customize the options with defaults
|
|
4594
|
+
metadata = @config.rpcs.create_message_pin.metadata.to_h
|
|
4595
|
+
|
|
4596
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
4597
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
4598
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
4599
|
+
gapic_version: ::Google::Apps::Chat::V1::VERSION
|
|
4600
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
4601
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
4602
|
+
|
|
4603
|
+
header_params = {}
|
|
4604
|
+
if request.parent
|
|
4605
|
+
header_params["parent"] = request.parent
|
|
4606
|
+
end
|
|
4607
|
+
|
|
4608
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
4609
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
4610
|
+
|
|
4611
|
+
options.apply_defaults timeout: @config.rpcs.create_message_pin.timeout,
|
|
4612
|
+
metadata: metadata,
|
|
4613
|
+
retry_policy: @config.rpcs.create_message_pin.retry_policy
|
|
4614
|
+
|
|
4615
|
+
options.apply_defaults timeout: @config.timeout,
|
|
4616
|
+
metadata: @config.metadata,
|
|
4617
|
+
retry_policy: @config.retry_policy
|
|
4618
|
+
|
|
4619
|
+
@chat_service_stub.call_rpc :create_message_pin, request, options: options do |response, operation|
|
|
4620
|
+
yield response, operation if block_given?
|
|
4621
|
+
end
|
|
4622
|
+
rescue ::GRPC::BadStatus => e
|
|
4623
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
4624
|
+
end
|
|
4625
|
+
|
|
4626
|
+
##
|
|
4627
|
+
# Deletes a message pin.
|
|
4628
|
+
#
|
|
4629
|
+
# Requires [user
|
|
4630
|
+
# authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
4631
|
+
# with one of the following [authorization
|
|
4632
|
+
# scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
4633
|
+
#
|
|
4634
|
+
# - `https://www.googleapis.com/auth/chat.spaces.pins`
|
|
4635
|
+
# - `https://www.googleapis.com/auth/chat.spaces`
|
|
4636
|
+
#
|
|
4637
|
+
# @overload delete_message_pin(request, options = nil)
|
|
4638
|
+
# Pass arguments to `delete_message_pin` via a request object, either of type
|
|
4639
|
+
# {::Google::Apps::Chat::V1::DeleteMessagePinRequest} or an equivalent Hash.
|
|
4640
|
+
#
|
|
4641
|
+
# @param request [::Google::Apps::Chat::V1::DeleteMessagePinRequest, ::Hash]
|
|
4642
|
+
# A request object representing the call parameters. Required. To specify no
|
|
4643
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
4644
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
4645
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
4646
|
+
#
|
|
4647
|
+
# @overload delete_message_pin(name: nil)
|
|
4648
|
+
# Pass arguments to `delete_message_pin` via keyword arguments. Note that at
|
|
4649
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
4650
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
4651
|
+
#
|
|
4652
|
+
# @param name [::String]
|
|
4653
|
+
# Required. The resource name of the message pin to remove.
|
|
4654
|
+
# Format: spaces/\\{space}/messagePins/\\{message_pin}
|
|
4655
|
+
#
|
|
4656
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
4657
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
|
4658
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
4659
|
+
#
|
|
4660
|
+
# @return [::Google::Protobuf::Empty]
|
|
4661
|
+
#
|
|
4662
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
4663
|
+
#
|
|
4664
|
+
# @example Basic example
|
|
4665
|
+
# require "google/apps/chat/v1"
|
|
4666
|
+
#
|
|
4667
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
4668
|
+
# client = Google::Apps::Chat::V1::ChatService::Client.new
|
|
4669
|
+
#
|
|
4670
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
4671
|
+
# request = Google::Apps::Chat::V1::DeleteMessagePinRequest.new
|
|
4672
|
+
#
|
|
4673
|
+
# # Call the delete_message_pin method.
|
|
4674
|
+
# result = client.delete_message_pin request
|
|
4675
|
+
#
|
|
4676
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
|
4677
|
+
# p result
|
|
4678
|
+
#
|
|
4679
|
+
def delete_message_pin request, options = nil
|
|
4680
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
4681
|
+
|
|
4682
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Chat::V1::DeleteMessagePinRequest
|
|
4683
|
+
|
|
4684
|
+
# Converts hash and nil to an options object
|
|
4685
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
4686
|
+
|
|
4687
|
+
# Customize the options with defaults
|
|
4688
|
+
metadata = @config.rpcs.delete_message_pin.metadata.to_h
|
|
4689
|
+
|
|
4690
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
4691
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
4692
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
4693
|
+
gapic_version: ::Google::Apps::Chat::V1::VERSION
|
|
4694
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
4695
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
4696
|
+
|
|
4697
|
+
header_params = {}
|
|
4698
|
+
if request.name
|
|
4699
|
+
header_params["name"] = request.name
|
|
4700
|
+
end
|
|
4701
|
+
|
|
4702
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
4703
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
4704
|
+
|
|
4705
|
+
options.apply_defaults timeout: @config.rpcs.delete_message_pin.timeout,
|
|
4706
|
+
metadata: metadata,
|
|
4707
|
+
retry_policy: @config.rpcs.delete_message_pin.retry_policy
|
|
4708
|
+
|
|
4709
|
+
options.apply_defaults timeout: @config.timeout,
|
|
4710
|
+
metadata: @config.metadata,
|
|
4711
|
+
retry_policy: @config.retry_policy
|
|
4712
|
+
|
|
4713
|
+
@chat_service_stub.call_rpc :delete_message_pin, request, options: options do |response, operation|
|
|
4714
|
+
yield response, operation if block_given?
|
|
4715
|
+
end
|
|
4716
|
+
rescue ::GRPC::BadStatus => e
|
|
4717
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
4718
|
+
end
|
|
4719
|
+
|
|
4307
4720
|
##
|
|
4308
4721
|
# Creates a custom emoji.
|
|
4309
4722
|
#
|
|
@@ -7235,6 +7648,21 @@ module Google
|
|
|
7235
7648
|
#
|
|
7236
7649
|
attr_reader :delete_reaction
|
|
7237
7650
|
##
|
|
7651
|
+
# RPC-specific configuration for `list_message_pins`
|
|
7652
|
+
# @return [::Gapic::Config::Method]
|
|
7653
|
+
#
|
|
7654
|
+
attr_reader :list_message_pins
|
|
7655
|
+
##
|
|
7656
|
+
# RPC-specific configuration for `create_message_pin`
|
|
7657
|
+
# @return [::Gapic::Config::Method]
|
|
7658
|
+
#
|
|
7659
|
+
attr_reader :create_message_pin
|
|
7660
|
+
##
|
|
7661
|
+
# RPC-specific configuration for `delete_message_pin`
|
|
7662
|
+
# @return [::Gapic::Config::Method]
|
|
7663
|
+
#
|
|
7664
|
+
attr_reader :delete_message_pin
|
|
7665
|
+
##
|
|
7238
7666
|
# RPC-specific configuration for `create_custom_emoji`
|
|
7239
7667
|
# @return [::Gapic::Config::Method]
|
|
7240
7668
|
#
|
|
@@ -7404,6 +7832,12 @@ module Google
|
|
|
7404
7832
|
@list_reactions = ::Gapic::Config::Method.new list_reactions_config
|
|
7405
7833
|
delete_reaction_config = parent_rpcs.delete_reaction if parent_rpcs.respond_to? :delete_reaction
|
|
7406
7834
|
@delete_reaction = ::Gapic::Config::Method.new delete_reaction_config
|
|
7835
|
+
list_message_pins_config = parent_rpcs.list_message_pins if parent_rpcs.respond_to? :list_message_pins
|
|
7836
|
+
@list_message_pins = ::Gapic::Config::Method.new list_message_pins_config
|
|
7837
|
+
create_message_pin_config = parent_rpcs.create_message_pin if parent_rpcs.respond_to? :create_message_pin
|
|
7838
|
+
@create_message_pin = ::Gapic::Config::Method.new create_message_pin_config
|
|
7839
|
+
delete_message_pin_config = parent_rpcs.delete_message_pin if parent_rpcs.respond_to? :delete_message_pin
|
|
7840
|
+
@delete_message_pin = ::Gapic::Config::Method.new delete_message_pin_config
|
|
7407
7841
|
create_custom_emoji_config = parent_rpcs.create_custom_emoji if parent_rpcs.respond_to? :create_custom_emoji
|
|
7408
7842
|
@create_custom_emoji = ::Gapic::Config::Method.new create_custom_emoji_config
|
|
7409
7843
|
get_custom_emoji_config = parent_rpcs.get_custom_emoji if parent_rpcs.respond_to? :get_custom_emoji
|