google-apps-chat-v1 0.a → 0.1.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/.yardopts +12 -0
- data/AUTHENTICATION.md +122 -0
- data/README.md +144 -8
- data/lib/google/apps/chat/v1/chat_service/client.rb +3663 -0
- data/lib/google/apps/chat/v1/chat_service/credentials.rb +63 -0
- data/lib/google/apps/chat/v1/chat_service/paths.rb +191 -0
- data/lib/google/apps/chat/v1/chat_service/rest/client.rb +3487 -0
- data/lib/google/apps/chat/v1/chat_service/rest/service_stub.rb +1614 -0
- data/lib/google/apps/chat/v1/chat_service/rest.rb +53 -0
- data/lib/google/apps/chat/v1/chat_service.rb +56 -0
- data/lib/google/apps/chat/v1/rest.rb +37 -0
- data/lib/google/apps/chat/v1/version.rb +7 -2
- data/lib/google/apps/chat/v1.rb +45 -0
- data/lib/google/chat/v1/action_status_pb.rb +44 -0
- data/lib/google/chat/v1/annotation_pb.rb +55 -0
- data/lib/google/chat/v1/attachment_pb.rb +51 -0
- data/lib/google/chat/v1/chat_service_pb.rb +53 -0
- data/lib/google/chat/v1/chat_service_services_pb.rb +359 -0
- data/lib/google/chat/v1/contextual_addon_pb.rb +50 -0
- data/lib/google/chat/v1/deletion_metadata_pb.rb +43 -0
- data/lib/google/chat/v1/group_pb.rb +42 -0
- data/lib/google/chat/v1/history_state_pb.rb +42 -0
- data/lib/google/chat/v1/matched_url_pb.rb +44 -0
- data/lib/google/chat/v1/membership_pb.rb +61 -0
- data/lib/google/chat/v1/message_pb.rb +89 -0
- data/lib/google/chat/v1/reaction_pb.rb +54 -0
- data/lib/google/chat/v1/slash_command_pb.rb +42 -0
- data/lib/google/chat/v1/space_pb.rb +63 -0
- data/lib/google/chat/v1/space_read_state_pb.rb +51 -0
- data/lib/google/chat/v1/space_setup_pb.rb +48 -0
- data/lib/google/chat/v1/thread_read_state_pb.rb +48 -0
- data/lib/google/chat/v1/user_pb.rb +46 -0
- data/lib/google/chat/v1/widgets_pb.rb +53 -0
- data/lib/google-apps-chat-v1.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/client.rb +399 -0
- data/proto_docs/google/api/field_behavior.rb +85 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/api/resource.rb +222 -0
- data/proto_docs/google/apps/card/v1/card.rb +2076 -0
- data/proto_docs/google/chat/v1/action_status.rb +40 -0
- data/proto_docs/google/chat/v1/annotation.rb +186 -0
- data/proto_docs/google/chat/v1/attachment.rb +131 -0
- data/proto_docs/google/chat/v1/contextual_addon.rb +120 -0
- data/proto_docs/google/chat/v1/deletion_metadata.rb +60 -0
- data/proto_docs/google/chat/v1/group.rb +41 -0
- data/proto_docs/google/chat/v1/history_state.rb +42 -0
- data/proto_docs/google/chat/v1/matched_url.rb +37 -0
- data/proto_docs/google/chat/v1/membership.rb +294 -0
- data/proto_docs/google/chat/v1/message.rb +657 -0
- data/proto_docs/google/chat/v1/reaction.rb +185 -0
- data/proto_docs/google/chat/v1/slash_command.rb +37 -0
- data/proto_docs/google/chat/v1/space.rb +382 -0
- data/proto_docs/google/chat/v1/space_read_state.rb +104 -0
- data/proto_docs/google/chat/v1/space_setup.rb +92 -0
- data/proto_docs/google/chat/v1/thread_read_state.rb +66 -0
- data/proto_docs/google/chat/v1/user.rb +84 -0
- data/proto_docs/google/chat/v1/widgets.rb +293 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +34 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +127 -0
- data/proto_docs/google/protobuf/wrappers.rb +121 -0
- data/proto_docs/google/rpc/code.rb +185 -0
- data/proto_docs/google/type/color.rb +173 -0
- metadata +128 -10
@@ -0,0 +1,657 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2024 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apps
|
22
|
+
module Chat
|
23
|
+
module V1
|
24
|
+
# A message in a Google Chat space.
|
25
|
+
# @!attribute [rw] name
|
26
|
+
# @return [::String]
|
27
|
+
# Resource name of the message.
|
28
|
+
#
|
29
|
+
# Format: `spaces/{space}/messages/{message}`
|
30
|
+
#
|
31
|
+
#
|
32
|
+
# Where `{space}` is the ID of the space where the message is posted and
|
33
|
+
# `{message}` is a system-assigned ID for the message. For example,
|
34
|
+
# `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`.
|
35
|
+
#
|
36
|
+
# If you set a custom ID when you create a message, you can use this ID to
|
37
|
+
# specify the message in a request by replacing `{message}` with the value
|
38
|
+
# from the `clientAssignedMessageId` field. For example,
|
39
|
+
# `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details, see [Name
|
40
|
+
# a
|
41
|
+
# message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message).
|
42
|
+
# @!attribute [r] sender
|
43
|
+
# @return [::Google::Apps::Chat::V1::User]
|
44
|
+
# Output only. The user who created the message.
|
45
|
+
# If your Chat app [authenticates as a
|
46
|
+
# user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
|
47
|
+
# the output populates the
|
48
|
+
# [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User)
|
49
|
+
# `name` and `type`.
|
50
|
+
# @!attribute [rw] create_time
|
51
|
+
# @return [::Google::Protobuf::Timestamp]
|
52
|
+
# Optional. Immutable. For spaces created in Chat, the time at which the
|
53
|
+
# message was created. This field is output only, except when used in import
|
54
|
+
# mode spaces.
|
55
|
+
#
|
56
|
+
# For import mode spaces, set this field to the historical timestamp at which
|
57
|
+
# the message was created in the source in order to preserve the original
|
58
|
+
# creation time.
|
59
|
+
# @!attribute [r] last_update_time
|
60
|
+
# @return [::Google::Protobuf::Timestamp]
|
61
|
+
# Output only. The time at which the message was last edited by a user. If
|
62
|
+
# the message has never been edited, this field is empty.
|
63
|
+
# @!attribute [r] delete_time
|
64
|
+
# @return [::Google::Protobuf::Timestamp]
|
65
|
+
# Output only. The time at which the message was deleted in
|
66
|
+
# Google Chat. If the message is never deleted, this field is empty.
|
67
|
+
# @!attribute [rw] text
|
68
|
+
# @return [::String]
|
69
|
+
# Plain-text body of the message. The first link to an image, video, or web
|
70
|
+
# page generates a
|
71
|
+
# [preview chip](https://developers.google.com/workspace/chat/preview-links).
|
72
|
+
# You can also [@mention a Google Chat
|
73
|
+
# user](https://developers.google.com/workspace/chat/format-messages#messages-@mention),
|
74
|
+
# or everyone in the space.
|
75
|
+
#
|
76
|
+
# To learn about creating text messages, see [Send a text
|
77
|
+
# message](https://developers.google.com/workspace/chat/create-messages#create-text-messages).
|
78
|
+
# @!attribute [r] formatted_text
|
79
|
+
# @return [::String]
|
80
|
+
# Output only. Contains the message `text` with markups added to communicate
|
81
|
+
# formatting. This field might not capture all formatting visible in the UI,
|
82
|
+
# but includes the following:
|
83
|
+
#
|
84
|
+
# * [Markup
|
85
|
+
# syntax](https://developers.google.com/workspace/chat/format-messages)
|
86
|
+
# for bold, italic, strikethrough, monospace, monospace block, and bulleted
|
87
|
+
# list.
|
88
|
+
#
|
89
|
+
# * [User
|
90
|
+
# mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention)
|
91
|
+
# using the format `<users/{user}>`.
|
92
|
+
#
|
93
|
+
# * Custom hyperlinks using the format `<{url}|{rendered_text}>` where the
|
94
|
+
# first string is the URL and the second is the rendered text—for example,
|
95
|
+
# `<http://example.com|custom text>`.
|
96
|
+
#
|
97
|
+
# * Custom emoji using the format `:{emoji_name}:`—for example, `:smile:`.
|
98
|
+
# This doesn't apply to Unicode emoji, such as `U+1F600` for a grinning
|
99
|
+
# face emoji.
|
100
|
+
#
|
101
|
+
# For more information, see [View text formatting sent in a
|
102
|
+
# message](https://developers.google.com/workspace/chat/format-messages#view_text_formatting_sent_in_a_message)
|
103
|
+
# @!attribute [rw] cards
|
104
|
+
# @deprecated This field is deprecated and may be removed in the next major version update.
|
105
|
+
# @return [::Array<::Google::Apps::Chat::V1::ContextualAddOnMarkup::Card>]
|
106
|
+
# Deprecated: Use `cards_v2` instead.
|
107
|
+
#
|
108
|
+
# Rich, formatted, and interactive cards that you can use to display UI
|
109
|
+
# elements such as: formatted texts, buttons, and clickable images. Cards are
|
110
|
+
# normally displayed below the plain-text body of the message. `cards` and
|
111
|
+
# `cards_v2` can have a maximum size of 32 KB.
|
112
|
+
# @!attribute [rw] cards_v2
|
113
|
+
# @return [::Array<::Google::Apps::Chat::V1::CardWithId>]
|
114
|
+
# An array of
|
115
|
+
# [cards](https://developers.google.com/workspace/chat/api/reference/rest/v1/cards).
|
116
|
+
#
|
117
|
+
# Only Chat apps can create cards. If your Chat app [authenticates as a
|
118
|
+
# user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
|
119
|
+
# the messages can't contain cards.
|
120
|
+
#
|
121
|
+
# To learn about cards and how to create them, see [Send card
|
122
|
+
# messages](https://developers.google.com/workspace/chat/create-messages#create).
|
123
|
+
#
|
124
|
+
# [Card builder](https://addons.gsuite.google.com/uikit/builder)
|
125
|
+
# @!attribute [r] annotations
|
126
|
+
# @return [::Array<::Google::Apps::Chat::V1::Annotation>]
|
127
|
+
# Output only. Annotations associated with the `text` in this message.
|
128
|
+
# @!attribute [rw] thread
|
129
|
+
# @return [::Google::Apps::Chat::V1::Thread]
|
130
|
+
# The thread the message belongs to. For example usage, see
|
131
|
+
# [Start or reply to a message
|
132
|
+
# thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread).
|
133
|
+
# @!attribute [rw] space
|
134
|
+
# @return [::Google::Apps::Chat::V1::Space]
|
135
|
+
# If your Chat app [authenticates as a
|
136
|
+
# user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
|
137
|
+
# the output populates the
|
138
|
+
# [space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces)
|
139
|
+
# `name`.
|
140
|
+
# @!attribute [rw] fallback_text
|
141
|
+
# @return [::String]
|
142
|
+
# A plain-text description of the message's cards, used when the actual cards
|
143
|
+
# can't be displayed—for example, mobile notifications.
|
144
|
+
# @!attribute [rw] action_response
|
145
|
+
# @return [::Google::Apps::Chat::V1::ActionResponse]
|
146
|
+
# Input only. Parameters that a Chat app can use to configure how its
|
147
|
+
# response is posted.
|
148
|
+
# @!attribute [r] argument_text
|
149
|
+
# @return [::String]
|
150
|
+
# Output only. Plain-text body of the message with all Chat app mentions
|
151
|
+
# stripped out.
|
152
|
+
# @!attribute [r] slash_command
|
153
|
+
# @return [::Google::Apps::Chat::V1::SlashCommand]
|
154
|
+
# Output only. Slash command information, if applicable.
|
155
|
+
# @!attribute [rw] attachment
|
156
|
+
# @return [::Array<::Google::Apps::Chat::V1::Attachment>]
|
157
|
+
# User-uploaded attachment.
|
158
|
+
# @!attribute [r] matched_url
|
159
|
+
# @return [::Google::Apps::Chat::V1::MatchedUrl]
|
160
|
+
# Output only. A URL in `spaces.messages.text` that matches a link preview
|
161
|
+
# pattern. For more information, see [Preview
|
162
|
+
# links](https://developers.google.com/workspace/chat/preview-links).
|
163
|
+
# @!attribute [r] thread_reply
|
164
|
+
# @return [::Boolean]
|
165
|
+
# Output only. When `true`, the message is a response in a reply thread. When
|
166
|
+
# `false`, the message is visible in the space's top-level conversation as
|
167
|
+
# either the first message of a thread or a message with no threaded replies.
|
168
|
+
#
|
169
|
+
# If the space doesn't support reply in threads, this field is always
|
170
|
+
# `false`.
|
171
|
+
# @!attribute [rw] client_assigned_message_id
|
172
|
+
# @return [::String]
|
173
|
+
# Optional. A custom ID for the message. You can use field to identify a
|
174
|
+
# message, or to get, delete, or update a message. To set a custom ID,
|
175
|
+
# specify the
|
176
|
+
# [`messageId`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#body.QUERY_PARAMETERS.message_id)
|
177
|
+
# field when you create the message. For details, see [Name a
|
178
|
+
# message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message).
|
179
|
+
# @!attribute [r] emoji_reaction_summaries
|
180
|
+
# @return [::Array<::Google::Apps::Chat::V1::EmojiReactionSummary>]
|
181
|
+
# Output only. The list of emoji reaction summaries on the message.
|
182
|
+
# @!attribute [rw] private_message_viewer
|
183
|
+
# @return [::Google::Apps::Chat::V1::User]
|
184
|
+
# Immutable. Input for creating a message, otherwise output only. The user
|
185
|
+
# that can view the message. When set, the message is private and only
|
186
|
+
# visible to the specified user and the Chat app. Link previews and
|
187
|
+
# attachments aren't supported for private messages.
|
188
|
+
#
|
189
|
+
# Only Chat apps can send private messages. If your Chat app [authenticates
|
190
|
+
# as a
|
191
|
+
# user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
192
|
+
# to send a message, the message can't be private and must omit this field.
|
193
|
+
#
|
194
|
+
# For details, see [Send private messages to Google Chat
|
195
|
+
# users](https://developers.google.com/workspace/chat/private-messages).
|
196
|
+
# @!attribute [r] deletion_metadata
|
197
|
+
# @return [::Google::Apps::Chat::V1::DeletionMetadata]
|
198
|
+
# Output only. Information about a deleted message. A message is deleted when
|
199
|
+
# `delete_time` is set.
|
200
|
+
# @!attribute [r] quoted_message_metadata
|
201
|
+
# @return [::Google::Apps::Chat::V1::QuotedMessageMetadata]
|
202
|
+
# Output only. Information about a message that's quoted by a Google Chat
|
203
|
+
# user in a space. Google Chat users can quote a message to reply to it.
|
204
|
+
# @!attribute [r] attached_gifs
|
205
|
+
# @return [::Array<::Google::Apps::Chat::V1::AttachedGif>]
|
206
|
+
# Output only. GIF images that are attached to the message.
|
207
|
+
# @!attribute [rw] accessory_widgets
|
208
|
+
# @return [::Array<::Google::Apps::Chat::V1::AccessoryWidget>]
|
209
|
+
# One or more interactive widgets that appear at the bottom of a message.
|
210
|
+
# You can add accessory widgets to messages that contain text, cards, or both
|
211
|
+
# text and cards. Not supported for messages that contain dialogs. For
|
212
|
+
# details, see [Add interactive widgets at the bottom of a
|
213
|
+
# message](https://developers.google.com/workspace/chat/create-messages#add-accessory-widgets).
|
214
|
+
#
|
215
|
+
# Creating a message with accessory widgets requires [app
|
216
|
+
# authentication]
|
217
|
+
# (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
|
218
|
+
class Message
|
219
|
+
include ::Google::Protobuf::MessageExts
|
220
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
221
|
+
end
|
222
|
+
|
223
|
+
# A GIF image that's specified by a URL.
|
224
|
+
# @!attribute [r] uri
|
225
|
+
# @return [::String]
|
226
|
+
# Output only. The URL that hosts the GIF image.
|
227
|
+
class AttachedGif
|
228
|
+
include ::Google::Protobuf::MessageExts
|
229
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
230
|
+
end
|
231
|
+
|
232
|
+
# Information about a quoted message.
|
233
|
+
# @!attribute [r] name
|
234
|
+
# @return [::String]
|
235
|
+
# Output only. Resource name of the quoted message.
|
236
|
+
#
|
237
|
+
# Format: `spaces/{space}/messages/{message}`
|
238
|
+
# @!attribute [r] last_update_time
|
239
|
+
# @return [::Google::Protobuf::Timestamp]
|
240
|
+
# Output only. The timestamp when the quoted message was created or when the
|
241
|
+
# quoted message was last updated.
|
242
|
+
class QuotedMessageMetadata
|
243
|
+
include ::Google::Protobuf::MessageExts
|
244
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
245
|
+
end
|
246
|
+
|
247
|
+
# A thread in a Google Chat space. For example usage, see
|
248
|
+
# [Start or reply to a message
|
249
|
+
# thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread).
|
250
|
+
#
|
251
|
+
# If you specify a thread when creating a message, you can set the
|
252
|
+
# [`messageReplyOption`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#messagereplyoption)
|
253
|
+
# field to determine what happens if no matching thread is found.
|
254
|
+
# @!attribute [rw] name
|
255
|
+
# @return [::String]
|
256
|
+
# Output only. Resource name of the thread.
|
257
|
+
#
|
258
|
+
# Example: `spaces/{space}/threads/{thread}`
|
259
|
+
# @!attribute [rw] thread_key
|
260
|
+
# @return [::String]
|
261
|
+
# Optional. Input for creating or updating a thread. Otherwise, output only.
|
262
|
+
# ID for the thread. Supports up to 4000 characters.
|
263
|
+
#
|
264
|
+
# This ID is unique to the Chat app that sets it. For example, if
|
265
|
+
# multiple Chat apps create a message using the same thread key,
|
266
|
+
# the messages are posted in different threads. To reply in a
|
267
|
+
# thread created by a person or another Chat app, specify the thread `name`
|
268
|
+
# field instead.
|
269
|
+
class Thread
|
270
|
+
include ::Google::Protobuf::MessageExts
|
271
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
272
|
+
end
|
273
|
+
|
274
|
+
# Parameters that a Chat app can use to configure how its response is posted.
|
275
|
+
# @!attribute [rw] type
|
276
|
+
# @return [::Google::Apps::Chat::V1::ActionResponse::ResponseType]
|
277
|
+
# Input only. The type of Chat app response.
|
278
|
+
# @!attribute [rw] url
|
279
|
+
# @return [::String]
|
280
|
+
# Input only. URL for users to authenticate or configure. (Only for
|
281
|
+
# `REQUEST_CONFIG` response types.)
|
282
|
+
# @!attribute [rw] dialog_action
|
283
|
+
# @return [::Google::Apps::Chat::V1::DialogAction]
|
284
|
+
# Input only. A response to an interaction event related to a
|
285
|
+
# [dialog](https://developers.google.com/workspace/chat/dialogs). Must be
|
286
|
+
# accompanied by `ResponseType.Dialog`.
|
287
|
+
# @!attribute [rw] updated_widget
|
288
|
+
# @return [::Google::Apps::Chat::V1::ActionResponse::UpdatedWidget]
|
289
|
+
# Input only. The response of the updated widget.
|
290
|
+
class ActionResponse
|
291
|
+
include ::Google::Protobuf::MessageExts
|
292
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
293
|
+
|
294
|
+
# List of widget autocomplete results.
|
295
|
+
# @!attribute [rw] items
|
296
|
+
# @return [::Array<::Google::Apps::Card::V1::SelectionInput::SelectionItem>]
|
297
|
+
# An array of the SelectionItem objects.
|
298
|
+
class SelectionItems
|
299
|
+
include ::Google::Protobuf::MessageExts
|
300
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
301
|
+
end
|
302
|
+
|
303
|
+
# The response of the updated widget.
|
304
|
+
# Used to provide autocomplete options for a widget.
|
305
|
+
# @!attribute [rw] suggestions
|
306
|
+
# @return [::Google::Apps::Chat::V1::ActionResponse::SelectionItems]
|
307
|
+
# List of widget autocomplete results
|
308
|
+
# @!attribute [rw] widget
|
309
|
+
# @return [::String]
|
310
|
+
# The ID of the updated widget. The ID must match the one for the
|
311
|
+
# widget that triggered the update request.
|
312
|
+
class UpdatedWidget
|
313
|
+
include ::Google::Protobuf::MessageExts
|
314
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
315
|
+
end
|
316
|
+
|
317
|
+
# The type of Chat app response.
|
318
|
+
module ResponseType
|
319
|
+
# Default type that's handled as `NEW_MESSAGE`.
|
320
|
+
TYPE_UNSPECIFIED = 0
|
321
|
+
|
322
|
+
# Post as a new message in the topic.
|
323
|
+
NEW_MESSAGE = 1
|
324
|
+
|
325
|
+
# Update the Chat app's message. This is only permitted on a `CARD_CLICKED`
|
326
|
+
# event where the message sender type is `BOT`.
|
327
|
+
UPDATE_MESSAGE = 2
|
328
|
+
|
329
|
+
# Update the cards on a user's message. This is only permitted as a
|
330
|
+
# response to a `MESSAGE` event with a matched url, or a `CARD_CLICKED`
|
331
|
+
# event where the message sender type is `HUMAN`. Text is ignored.
|
332
|
+
UPDATE_USER_MESSAGE_CARDS = 6
|
333
|
+
|
334
|
+
# Privately ask the user for additional authentication or configuration.
|
335
|
+
REQUEST_CONFIG = 3
|
336
|
+
|
337
|
+
# Presents a
|
338
|
+
# [dialog](https://developers.google.com/workspace/chat/dialogs).
|
339
|
+
DIALOG = 4
|
340
|
+
|
341
|
+
# Widget text autocomplete options query.
|
342
|
+
UPDATE_WIDGET = 7
|
343
|
+
end
|
344
|
+
end
|
345
|
+
|
346
|
+
# One or more interactive widgets that appear at the bottom of a message. For
|
347
|
+
# details, see [Add interactive widgets at the bottom of a
|
348
|
+
# message](https://developers.google.com/workspace/chat/create-messages#add-accessory-widgets).
|
349
|
+
# @!attribute [rw] button_list
|
350
|
+
# @return [::Google::Apps::Card::V1::ButtonList]
|
351
|
+
# A list of buttons.
|
352
|
+
class AccessoryWidget
|
353
|
+
include ::Google::Protobuf::MessageExts
|
354
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
355
|
+
end
|
356
|
+
|
357
|
+
# Request to get a message.
|
358
|
+
# @!attribute [rw] name
|
359
|
+
# @return [::String]
|
360
|
+
# Required. Resource name of the message.
|
361
|
+
#
|
362
|
+
# Format: `spaces/{space}/messages/{message}`
|
363
|
+
#
|
364
|
+
# If you've set a custom ID for your message, you can use the value from the
|
365
|
+
# `clientAssignedMessageId` field for `{message}`. For details, see [Name a
|
366
|
+
# message]
|
367
|
+
# (https://developers.google.com/workspace/chat/create-messages#name_a_created_message).
|
368
|
+
class GetMessageRequest
|
369
|
+
include ::Google::Protobuf::MessageExts
|
370
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
371
|
+
end
|
372
|
+
|
373
|
+
# Request to delete a message.
|
374
|
+
# @!attribute [rw] name
|
375
|
+
# @return [::String]
|
376
|
+
# Required. Resource name of the message.
|
377
|
+
#
|
378
|
+
# Format: `spaces/{space}/messages/{message}`
|
379
|
+
#
|
380
|
+
# If you've set a custom ID for your message, you can use the value from the
|
381
|
+
# `clientAssignedMessageId` field for `{message}`. For details, see [Name a
|
382
|
+
# message]
|
383
|
+
# (https://developers.google.com/workspace/chat/create-messages#name_a_created_message).
|
384
|
+
# @!attribute [rw] force
|
385
|
+
# @return [::Boolean]
|
386
|
+
# When `true`, deleting a message also deletes its threaded replies. When
|
387
|
+
# `false`, if a message has threaded replies, deletion fails.
|
388
|
+
#
|
389
|
+
# Only applies when [authenticating as a
|
390
|
+
# user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
391
|
+
# Has no effect when [authenticating as a Chat app]
|
392
|
+
# (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
|
393
|
+
class DeleteMessageRequest
|
394
|
+
include ::Google::Protobuf::MessageExts
|
395
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
396
|
+
end
|
397
|
+
|
398
|
+
# Request to update a message.
|
399
|
+
# @!attribute [rw] message
|
400
|
+
# @return [::Google::Apps::Chat::V1::Message]
|
401
|
+
# Required. Message with fields updated.
|
402
|
+
# @!attribute [rw] update_mask
|
403
|
+
# @return [::Google::Protobuf::FieldMask]
|
404
|
+
# Required. The field paths to update. Separate multiple values with commas
|
405
|
+
# or use `*` to update all field paths.
|
406
|
+
#
|
407
|
+
# Currently supported field paths:
|
408
|
+
#
|
409
|
+
# - `text`
|
410
|
+
#
|
411
|
+
# - `attachment`
|
412
|
+
#
|
413
|
+
# - `cards` (Requires [app
|
414
|
+
# authentication](/chat/api/guides/auth/service-accounts).)
|
415
|
+
#
|
416
|
+
# - `cards_v2` (Requires [app
|
417
|
+
# authentication](/chat/api/guides/auth/service-accounts).)
|
418
|
+
#
|
419
|
+
# - `accessory_widgets` (Requires [app
|
420
|
+
# authentication](/chat/api/guides/auth/service-accounts).)
|
421
|
+
# @!attribute [rw] allow_missing
|
422
|
+
# @return [::Boolean]
|
423
|
+
# Optional. If `true` and the message isn't found, a new message is created
|
424
|
+
# and `updateMask` is ignored. The specified message ID must be
|
425
|
+
# [client-assigned](https://developers.google.com/workspace/chat/create-messages#name_a_created_message)
|
426
|
+
# or the request fails.
|
427
|
+
class UpdateMessageRequest
|
428
|
+
include ::Google::Protobuf::MessageExts
|
429
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
430
|
+
end
|
431
|
+
|
432
|
+
# Creates a message.
|
433
|
+
# @!attribute [rw] parent
|
434
|
+
# @return [::String]
|
435
|
+
# Required. The resource name of the space in which to create a message.
|
436
|
+
#
|
437
|
+
# Format: `spaces/{space}`
|
438
|
+
# @!attribute [rw] message
|
439
|
+
# @return [::Google::Apps::Chat::V1::Message]
|
440
|
+
# Required. Message body.
|
441
|
+
# @!attribute [rw] thread_key
|
442
|
+
# @deprecated This field is deprecated and may be removed in the next major version update.
|
443
|
+
# @return [::String]
|
444
|
+
# Optional. Deprecated: Use
|
445
|
+
# {::Google::Apps::Chat::V1::Thread#thread_key thread.thread_key} instead. ID for the
|
446
|
+
# thread. Supports up to 4000 characters. To start or add to a thread, create
|
447
|
+
# a message and specify a `threadKey` or the
|
448
|
+
# {::Google::Apps::Chat::V1::Thread#name thread.name}. For example usage, see [Start or
|
449
|
+
# reply to a message
|
450
|
+
# thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread).
|
451
|
+
# @!attribute [rw] request_id
|
452
|
+
# @return [::String]
|
453
|
+
# Optional. A unique request ID for this message. Specifying an existing
|
454
|
+
# request ID returns the message created with that ID instead of creating a
|
455
|
+
# new message.
|
456
|
+
# @!attribute [rw] message_reply_option
|
457
|
+
# @return [::Google::Apps::Chat::V1::CreateMessageRequest::MessageReplyOption]
|
458
|
+
# Optional. Specifies whether a message starts a thread or replies to one.
|
459
|
+
# Only supported in named spaces.
|
460
|
+
# @!attribute [rw] message_id
|
461
|
+
# @return [::String]
|
462
|
+
# Optional. A custom ID for a message. Lets Chat apps get, update, or delete
|
463
|
+
# a message without needing to store the system-assigned ID in the message's
|
464
|
+
# resource name (represented in the message `name` field).
|
465
|
+
#
|
466
|
+
# The value for this field must meet the following requirements:
|
467
|
+
#
|
468
|
+
# * Begins with `client-`. For example, `client-custom-name` is a valid
|
469
|
+
# custom ID, but `custom-name` is not.
|
470
|
+
# * Contains up to 63 characters and only lowercase letters, numbers, and
|
471
|
+
# hyphens.
|
472
|
+
# * Is unique within a space. A Chat app can't use the same custom ID for
|
473
|
+
# different messages.
|
474
|
+
#
|
475
|
+
# For details, see [Name a
|
476
|
+
# message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message).
|
477
|
+
class CreateMessageRequest
|
478
|
+
include ::Google::Protobuf::MessageExts
|
479
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
480
|
+
|
481
|
+
# Specifies how to reply to a message.
|
482
|
+
# More states might be added in the future.
|
483
|
+
module MessageReplyOption
|
484
|
+
# Default. Starts a new thread. Using this option ignores any [thread
|
485
|
+
# ID][google.chat.v1.Thread.name] or
|
486
|
+
# {::Google::Apps::Chat::V1::Thread#thread_key `thread_key`} that's included.
|
487
|
+
MESSAGE_REPLY_OPTION_UNSPECIFIED = 0
|
488
|
+
|
489
|
+
# Creates the message as a reply to the thread specified by [thread
|
490
|
+
# ID][google.chat.v1.Thread.name] or
|
491
|
+
# {::Google::Apps::Chat::V1::Thread#thread_key `thread_key`}. If it fails, the
|
492
|
+
# message starts a new thread instead.
|
493
|
+
REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD = 1
|
494
|
+
|
495
|
+
# Creates the message as a reply to the thread specified by [thread
|
496
|
+
# ID][google.chat.v1.Thread.name] or
|
497
|
+
# {::Google::Apps::Chat::V1::Thread#thread_key `thread_key`}. If a new `thread_key`
|
498
|
+
# is used, a new thread is created. If the message creation fails, a
|
499
|
+
# `NOT_FOUND` error is returned instead.
|
500
|
+
REPLY_MESSAGE_OR_FAIL = 2
|
501
|
+
end
|
502
|
+
end
|
503
|
+
|
504
|
+
# Lists messages in the specified space, that the user is a member of.
|
505
|
+
# @!attribute [rw] parent
|
506
|
+
# @return [::String]
|
507
|
+
# Required. The resource name of the space to list messages from.
|
508
|
+
#
|
509
|
+
# Format: `spaces/{space}`
|
510
|
+
# @!attribute [rw] page_size
|
511
|
+
# @return [::Integer]
|
512
|
+
# The maximum number of messages returned. The service might return fewer
|
513
|
+
# messages than this value.
|
514
|
+
#
|
515
|
+
# If unspecified, at most 25 are returned.
|
516
|
+
#
|
517
|
+
# The maximum value is 1000. If you use a value more than 1000, it's
|
518
|
+
# automatically changed to 1000.
|
519
|
+
#
|
520
|
+
# Negative values return an `INVALID_ARGUMENT` error.
|
521
|
+
# @!attribute [rw] page_token
|
522
|
+
# @return [::String]
|
523
|
+
# Optional, if resuming from a previous query.
|
524
|
+
#
|
525
|
+
# A page token received from a previous list messages call. Provide this
|
526
|
+
# parameter to retrieve the subsequent page.
|
527
|
+
#
|
528
|
+
# When paginating, all other parameters provided should match the call that
|
529
|
+
# provided the page token. Passing different values to the other parameters
|
530
|
+
# might lead to unexpected results.
|
531
|
+
# @!attribute [rw] filter
|
532
|
+
# @return [::String]
|
533
|
+
# A query filter.
|
534
|
+
#
|
535
|
+
# You can filter messages by date (`create_time`) and thread (`thread.name`).
|
536
|
+
#
|
537
|
+
# To filter messages by the date they were created, specify the `create_time`
|
538
|
+
# with a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339)
|
539
|
+
# format and double quotation marks. For example,
|
540
|
+
# `"2023-04-21T11:30:00-04:00"`. You can use the greater than operator `>` to
|
541
|
+
# list messages that were created after a timestamp, or the less than
|
542
|
+
# operator `<` to list messages that were created before a timestamp. To
|
543
|
+
# filter messages within a time interval, use the `AND` operator between two
|
544
|
+
# timestamps.
|
545
|
+
#
|
546
|
+
# To filter by thread, specify the `thread.name`, formatted as
|
547
|
+
# `spaces/{space}/threads/{thread}`. You can only specify one
|
548
|
+
# `thread.name` per query.
|
549
|
+
#
|
550
|
+
# To filter by both thread and date, use the `AND` operator in your query.
|
551
|
+
#
|
552
|
+
# For example, the following queries are valid:
|
553
|
+
#
|
554
|
+
# ```
|
555
|
+
# create_time > "2012-04-21T11:30:00-04:00"
|
556
|
+
#
|
557
|
+
# create_time > "2012-04-21T11:30:00-04:00" AND
|
558
|
+
# thread.name = spaces/AAAAAAAAAAA/threads/123
|
559
|
+
#
|
560
|
+
# create_time > "2012-04-21T11:30:00+00:00" AND
|
561
|
+
#
|
562
|
+
# create_time < "2013-01-01T00:00:00+00:00" AND
|
563
|
+
# thread.name = spaces/AAAAAAAAAAA/threads/123
|
564
|
+
#
|
565
|
+
# thread.name = spaces/AAAAAAAAAAA/threads/123
|
566
|
+
# ```
|
567
|
+
#
|
568
|
+
# Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
569
|
+
# error.
|
570
|
+
# @!attribute [rw] order_by
|
571
|
+
# @return [::String]
|
572
|
+
# Optional, if resuming from a previous query.
|
573
|
+
#
|
574
|
+
# How the list of messages is ordered. Specify a value to order by an
|
575
|
+
# ordering operation. Valid ordering operation values are as follows:
|
576
|
+
#
|
577
|
+
# - `ASC` for ascending.
|
578
|
+
#
|
579
|
+
# - `DESC` for descending.
|
580
|
+
#
|
581
|
+
# The default ordering is `create_time ASC`.
|
582
|
+
# @!attribute [rw] show_deleted
|
583
|
+
# @return [::Boolean]
|
584
|
+
# Whether to include deleted messages. Deleted messages include deleted time
|
585
|
+
# and metadata about their deletion, but message content is unavailable.
|
586
|
+
class ListMessagesRequest
|
587
|
+
include ::Google::Protobuf::MessageExts
|
588
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
589
|
+
end
|
590
|
+
|
591
|
+
# Response message for listing messages.
|
592
|
+
# @!attribute [rw] messages
|
593
|
+
# @return [::Array<::Google::Apps::Chat::V1::Message>]
|
594
|
+
# List of messages.
|
595
|
+
# @!attribute [rw] next_page_token
|
596
|
+
# @return [::String]
|
597
|
+
# You can send a token as `pageToken` to retrieve the next page of
|
598
|
+
# results. If empty, there are no subsequent pages.
|
599
|
+
class ListMessagesResponse
|
600
|
+
include ::Google::Protobuf::MessageExts
|
601
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
602
|
+
end
|
603
|
+
|
604
|
+
# Contains a
|
605
|
+
# [dialog](https://developers.google.com/workspace/chat/dialogs) and request
|
606
|
+
# status code.
|
607
|
+
# @!attribute [rw] dialog
|
608
|
+
# @return [::Google::Apps::Chat::V1::Dialog]
|
609
|
+
# Input only.
|
610
|
+
# [Dialog](https://developers.google.com/workspace/chat/dialogs) for the
|
611
|
+
# request.
|
612
|
+
# @!attribute [rw] action_status
|
613
|
+
# @return [::Google::Apps::Chat::V1::ActionStatus]
|
614
|
+
# Input only. Status for a request to either invoke or submit a
|
615
|
+
# [dialog](https://developers.google.com/workspace/chat/dialogs). Displays
|
616
|
+
# a status and message to users, if necessary.
|
617
|
+
# For example, in case of an error or success.
|
618
|
+
class DialogAction
|
619
|
+
include ::Google::Protobuf::MessageExts
|
620
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
621
|
+
end
|
622
|
+
|
623
|
+
# Wrapper around the card body of the dialog.
|
624
|
+
# @!attribute [rw] body
|
625
|
+
# @return [::Google::Apps::Card::V1::Card]
|
626
|
+
# Input only. Body of the dialog, which is rendered in a modal.
|
627
|
+
# Google Chat apps don't support the following card entities:
|
628
|
+
# `DateTimePicker`, `OnChangeAction`.
|
629
|
+
class Dialog
|
630
|
+
include ::Google::Protobuf::MessageExts
|
631
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
632
|
+
end
|
633
|
+
|
634
|
+
# A
|
635
|
+
# [card](https://developers.google.com/workspace/chat/api/reference/rest/v1/cards)
|
636
|
+
# in a Google Chat message.
|
637
|
+
#
|
638
|
+
# Only Chat apps can create cards. If your Chat app [authenticates as a
|
639
|
+
# user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
|
640
|
+
# the message can't contain cards.
|
641
|
+
#
|
642
|
+
# [Card builder](https://addons.gsuite.google.com/uikit/builder)
|
643
|
+
# @!attribute [rw] card_id
|
644
|
+
# @return [::String]
|
645
|
+
# Required if the message contains multiple cards. A unique identifier for
|
646
|
+
# a card in a message.
|
647
|
+
# @!attribute [rw] card
|
648
|
+
# @return [::Google::Apps::Card::V1::Card]
|
649
|
+
# A card. Maximum size is 32 KB.
|
650
|
+
class CardWithId
|
651
|
+
include ::Google::Protobuf::MessageExts
|
652
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
653
|
+
end
|
654
|
+
end
|
655
|
+
end
|
656
|
+
end
|
657
|
+
end
|