google-apps-chat-v1 0.a → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +144 -8
  5. data/lib/google/apps/chat/v1/chat_service/client.rb +3663 -0
  6. data/lib/google/apps/chat/v1/chat_service/credentials.rb +63 -0
  7. data/lib/google/apps/chat/v1/chat_service/paths.rb +191 -0
  8. data/lib/google/apps/chat/v1/chat_service/rest/client.rb +3487 -0
  9. data/lib/google/apps/chat/v1/chat_service/rest/service_stub.rb +1614 -0
  10. data/lib/google/apps/chat/v1/chat_service/rest.rb +53 -0
  11. data/lib/google/apps/chat/v1/chat_service.rb +56 -0
  12. data/lib/google/apps/chat/v1/rest.rb +37 -0
  13. data/lib/google/apps/chat/v1/version.rb +7 -2
  14. data/lib/google/apps/chat/v1.rb +45 -0
  15. data/lib/google/chat/v1/action_status_pb.rb +44 -0
  16. data/lib/google/chat/v1/annotation_pb.rb +55 -0
  17. data/lib/google/chat/v1/attachment_pb.rb +51 -0
  18. data/lib/google/chat/v1/chat_service_pb.rb +53 -0
  19. data/lib/google/chat/v1/chat_service_services_pb.rb +359 -0
  20. data/lib/google/chat/v1/contextual_addon_pb.rb +50 -0
  21. data/lib/google/chat/v1/deletion_metadata_pb.rb +43 -0
  22. data/lib/google/chat/v1/group_pb.rb +42 -0
  23. data/lib/google/chat/v1/history_state_pb.rb +42 -0
  24. data/lib/google/chat/v1/matched_url_pb.rb +44 -0
  25. data/lib/google/chat/v1/membership_pb.rb +61 -0
  26. data/lib/google/chat/v1/message_pb.rb +89 -0
  27. data/lib/google/chat/v1/reaction_pb.rb +54 -0
  28. data/lib/google/chat/v1/slash_command_pb.rb +42 -0
  29. data/lib/google/chat/v1/space_pb.rb +63 -0
  30. data/lib/google/chat/v1/space_read_state_pb.rb +51 -0
  31. data/lib/google/chat/v1/space_setup_pb.rb +48 -0
  32. data/lib/google/chat/v1/thread_read_state_pb.rb +48 -0
  33. data/lib/google/chat/v1/user_pb.rb +46 -0
  34. data/lib/google/chat/v1/widgets_pb.rb +53 -0
  35. data/lib/google-apps-chat-v1.rb +21 -0
  36. data/proto_docs/README.md +4 -0
  37. data/proto_docs/google/api/client.rb +399 -0
  38. data/proto_docs/google/api/field_behavior.rb +85 -0
  39. data/proto_docs/google/api/launch_stage.rb +71 -0
  40. data/proto_docs/google/api/resource.rb +222 -0
  41. data/proto_docs/google/apps/card/v1/card.rb +2076 -0
  42. data/proto_docs/google/chat/v1/action_status.rb +40 -0
  43. data/proto_docs/google/chat/v1/annotation.rb +186 -0
  44. data/proto_docs/google/chat/v1/attachment.rb +131 -0
  45. data/proto_docs/google/chat/v1/contextual_addon.rb +120 -0
  46. data/proto_docs/google/chat/v1/deletion_metadata.rb +60 -0
  47. data/proto_docs/google/chat/v1/group.rb +41 -0
  48. data/proto_docs/google/chat/v1/history_state.rb +42 -0
  49. data/proto_docs/google/chat/v1/matched_url.rb +37 -0
  50. data/proto_docs/google/chat/v1/membership.rb +294 -0
  51. data/proto_docs/google/chat/v1/message.rb +657 -0
  52. data/proto_docs/google/chat/v1/reaction.rb +185 -0
  53. data/proto_docs/google/chat/v1/slash_command.rb +37 -0
  54. data/proto_docs/google/chat/v1/space.rb +382 -0
  55. data/proto_docs/google/chat/v1/space_read_state.rb +104 -0
  56. data/proto_docs/google/chat/v1/space_setup.rb +92 -0
  57. data/proto_docs/google/chat/v1/thread_read_state.rb +66 -0
  58. data/proto_docs/google/chat/v1/user.rb +84 -0
  59. data/proto_docs/google/chat/v1/widgets.rb +293 -0
  60. data/proto_docs/google/protobuf/duration.rb +98 -0
  61. data/proto_docs/google/protobuf/empty.rb +34 -0
  62. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  63. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  64. data/proto_docs/google/protobuf/wrappers.rb +121 -0
  65. data/proto_docs/google/rpc/code.rb +185 -0
  66. data/proto_docs/google/type/color.rb +173 -0
  67. metadata +128 -10
@@ -0,0 +1,2076 @@
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 Card
23
+ module V1
24
+ # A card interface displayed in a Google Chat message or Google Workspace
25
+ # Add-on.
26
+ #
27
+ # Cards support a defined layout, interactive UI elements like buttons, and
28
+ # rich media like images. Use cards to present detailed information,
29
+ # gather information from users, and guide users to take a next step.
30
+ #
31
+ # [Card builder](https://addons.gsuite.google.com/uikit/builder)
32
+ #
33
+ # To learn how
34
+ # to build cards, see the following documentation:
35
+ #
36
+ # * For Google Chat apps, see [Design the components of a card or
37
+ # dialog](https://developers.google.com/workspace/chat/design-components-card-dialog).
38
+ # * For Google Workspace Add-ons, see [Card-based
39
+ # interfaces](https://developers.google.com/apps-script/add-ons/concepts/cards).
40
+ #
41
+ # **Example: Card message for a Google Chat app**
42
+ #
43
+ # ![Example contact
44
+ # card](https://developers.google.com/workspace/chat/images/card_api_reference.png)
45
+ #
46
+ # To create the sample card message in Google Chat, use the following JSON:
47
+ #
48
+ # ```
49
+ # {
50
+ # "cardsV2": [
51
+ # {
52
+ # "cardId": "unique-card-id",
53
+ # "card": {
54
+ # "header": {
55
+ # "title": "Sasha",
56
+ # "subtitle": "Software Engineer",
57
+ # "imageUrl":
58
+ # "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png",
59
+ # "imageType": "CIRCLE",
60
+ # "imageAltText": "Avatar for Sasha"
61
+ # },
62
+ # "sections": [
63
+ # {
64
+ # "header": "Contact Info",
65
+ # "collapsible": true,
66
+ # "uncollapsibleWidgetsCount": 1,
67
+ # "widgets": [
68
+ # {
69
+ # "decoratedText": {
70
+ # "startIcon": {
71
+ # "knownIcon": "EMAIL"
72
+ # },
73
+ # "text": "sasha@example.com"
74
+ # }
75
+ # },
76
+ # {
77
+ # "decoratedText": {
78
+ # "startIcon": {
79
+ # "knownIcon": "PERSON"
80
+ # },
81
+ # "text": "<font color=\"#80e27e\">Online</font>"
82
+ # }
83
+ # },
84
+ # {
85
+ # "decoratedText": {
86
+ # "startIcon": {
87
+ # "knownIcon": "PHONE"
88
+ # },
89
+ # "text": "+1 (555) 555-1234"
90
+ # }
91
+ # },
92
+ # {
93
+ # "buttonList": {
94
+ # "buttons": [
95
+ # {
96
+ # "text": "Share",
97
+ # "onClick": {
98
+ # "openLink": {
99
+ # "url": "https://example.com/share"
100
+ # }
101
+ # }
102
+ # },
103
+ # {
104
+ # "text": "Edit",
105
+ # "onClick": {
106
+ # "action": {
107
+ # "function": "goToView",
108
+ # "parameters": [
109
+ # {
110
+ # "key": "viewType",
111
+ # "value": "EDIT"
112
+ # }
113
+ # ]
114
+ # }
115
+ # }
116
+ # }
117
+ # ]
118
+ # }
119
+ # }
120
+ # ]
121
+ # }
122
+ # ]
123
+ # }
124
+ # }
125
+ # ]
126
+ # }
127
+ # ```
128
+ # @!attribute [rw] header
129
+ # @return [::Google::Apps::Card::V1::Card::CardHeader]
130
+ # The header of the card. A header usually contains a leading image and a
131
+ # title. Headers always appear at the top of a card.
132
+ # @!attribute [rw] sections
133
+ # @return [::Array<::Google::Apps::Card::V1::Card::Section>]
134
+ # Contains a collection of widgets. Each section has its own, optional
135
+ # header. Sections are visually separated by a line divider. For an example
136
+ # in Google Chat apps, see [Define a section of a
137
+ # card](https://developers.google.com/workspace/chat/design-components-card-dialog#define_a_section_of_a_card).
138
+ # @!attribute [rw] section_divider_style
139
+ # @return [::Google::Apps::Card::V1::Card::DividerStyle]
140
+ # The divider style between sections.
141
+ # @!attribute [rw] card_actions
142
+ # @return [::Array<::Google::Apps::Card::V1::Card::CardAction>]
143
+ # The card's actions. Actions are added to the card's toolbar menu.
144
+ #
145
+ # [Google Workspace
146
+ # Add-ons](https://developers.google.com/workspace/add-ons):
147
+ #
148
+ # For example, the following JSON constructs a card action menu with
149
+ # `Settings` and `Send Feedback` options:
150
+ #
151
+ # ```
152
+ # "card_actions": [
153
+ # {
154
+ # "actionLabel": "Settings",
155
+ # "onClick": {
156
+ # "action": {
157
+ # "functionName": "goToView",
158
+ # "parameters": [
159
+ # {
160
+ # "key": "viewType",
161
+ # "value": "SETTING"
162
+ # }
163
+ # ],
164
+ # "loadIndicator": "LoadIndicator.SPINNER"
165
+ # }
166
+ # }
167
+ # },
168
+ # {
169
+ # "actionLabel": "Send Feedback",
170
+ # "onClick": {
171
+ # "openLink": {
172
+ # "url": "https://example.com/feedback"
173
+ # }
174
+ # }
175
+ # }
176
+ # ]
177
+ # ```
178
+ # @!attribute [rw] name
179
+ # @return [::String]
180
+ # Name of the card. Used as a card identifier in card navigation.
181
+ #
182
+ # [Google Workspace
183
+ # Add-ons](https://developers.google.com/workspace/add-ons):
184
+ # @!attribute [rw] fixed_footer
185
+ # @return [::Google::Apps::Card::V1::Card::CardFixedFooter]
186
+ # The fixed footer shown at the bottom of this card.
187
+ #
188
+ # Setting `fixedFooter` without specifying a `primaryButton` or a
189
+ # `secondaryButton` causes an error. For Chat apps, you can use fixed footers
190
+ # in
191
+ # [dialogs](https://developers.google.com/workspace/chat/dialogs), but not
192
+ # [card
193
+ # messages](https://developers.google.com/workspace/chat/create-messages#create).
194
+ #
195
+ # [Google Workspace Add-ons and Chat
196
+ # apps](https://developers.google.com/workspace/extend):
197
+ # @!attribute [rw] display_style
198
+ # @return [::Google::Apps::Card::V1::Card::DisplayStyle]
199
+ # In Google Workspace Add-ons, sets the display properties of the
200
+ # `peekCardHeader`.
201
+ #
202
+ # [Google Workspace
203
+ # Add-ons](https://developers.google.com/workspace/add-ons):
204
+ # @!attribute [rw] peek_card_header
205
+ # @return [::Google::Apps::Card::V1::Card::CardHeader]
206
+ # When displaying contextual content, the peek card header acts as a
207
+ # placeholder so that the user can navigate forward between the homepage
208
+ # cards and the contextual cards.
209
+ #
210
+ # [Google Workspace
211
+ # Add-ons](https://developers.google.com/workspace/add-ons):
212
+ class Card
213
+ include ::Google::Protobuf::MessageExts
214
+ extend ::Google::Protobuf::MessageExts::ClassMethods
215
+
216
+ # Represents a card header. For an example in Google Chat apps, see [Add a
217
+ # header](https://developers.google.com/workspace/chat/design-components-card-dialog#add_a_header).
218
+ #
219
+ # [Google Workspace Add-ons and Chat
220
+ # apps](https://developers.google.com/workspace/extend):
221
+ # @!attribute [rw] title
222
+ # @return [::String]
223
+ # Required. The title of the card header.
224
+ # The header has a fixed height: if both a
225
+ # title and subtitle are specified, each takes up one line. If only the
226
+ # title is specified, it takes up both lines.
227
+ # @!attribute [rw] subtitle
228
+ # @return [::String]
229
+ # The subtitle of the card header. If specified, appears on its own line
230
+ # below the `title`.
231
+ # @!attribute [rw] image_type
232
+ # @return [::Google::Apps::Card::V1::Widget::ImageType]
233
+ # The shape used to crop the image.
234
+ #
235
+ # [Google Workspace Add-ons and Chat
236
+ # apps](https://developers.google.com/workspace/extend):
237
+ # @!attribute [rw] image_url
238
+ # @return [::String]
239
+ # The HTTPS URL of the image in the card header.
240
+ # @!attribute [rw] image_alt_text
241
+ # @return [::String]
242
+ # The alternative text of this image that's used for accessibility.
243
+ class CardHeader
244
+ include ::Google::Protobuf::MessageExts
245
+ extend ::Google::Protobuf::MessageExts::ClassMethods
246
+ end
247
+
248
+ # A section contains a collection of widgets that are rendered
249
+ # vertically in the order that they're specified.
250
+ #
251
+ # [Google Workspace Add-ons and Chat
252
+ # apps](https://developers.google.com/workspace/extend):
253
+ # @!attribute [rw] header
254
+ # @return [::String]
255
+ # Text that appears at the top of a section.
256
+ # Supports simple HTML formatted text. For more information
257
+ # about formatting text, see
258
+ # [Formatting text in Google Chat
259
+ # apps](https://developers.google.com/workspace/chat/format-messages#card-formatting)
260
+ # and
261
+ # [Formatting
262
+ # text in Google Workspace
263
+ # Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
264
+ # @!attribute [rw] widgets
265
+ # @return [::Array<::Google::Apps::Card::V1::Widget>]
266
+ # All the widgets in the section.
267
+ # Must contain at least one widget.
268
+ # @!attribute [rw] collapsible
269
+ # @return [::Boolean]
270
+ # Indicates whether this section is collapsible.
271
+ #
272
+ # Collapsible sections hide some or all widgets, but users can expand the
273
+ # section to reveal the hidden widgets by clicking **Show more**. Users
274
+ # can hide the widgets again by clicking **Show less**.
275
+ #
276
+ # To determine which widgets are hidden, specify
277
+ # `uncollapsibleWidgetsCount`.
278
+ # @!attribute [rw] uncollapsible_widgets_count
279
+ # @return [::Integer]
280
+ # The number of uncollapsible widgets which remain visible even when a
281
+ # section is collapsed.
282
+ #
283
+ # For example, when a section
284
+ # contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`,
285
+ # the first two widgets are always shown and the last three are collapsed
286
+ # by default. The `uncollapsibleWidgetsCount` is taken into account only
287
+ # when `collapsible` is `true`.
288
+ class Section
289
+ include ::Google::Protobuf::MessageExts
290
+ extend ::Google::Protobuf::MessageExts::ClassMethods
291
+ end
292
+
293
+ # A card action is the action associated with the card. For example,
294
+ # an invoice card might include actions such as delete invoice, email
295
+ # invoice, or open the invoice in a browser.
296
+ #
297
+ # [Google Workspace
298
+ # Add-ons](https://developers.google.com/workspace/add-ons):
299
+ # @!attribute [rw] action_label
300
+ # @return [::String]
301
+ # The label that displays as the action menu item.
302
+ # @!attribute [rw] on_click
303
+ # @return [::Google::Apps::Card::V1::OnClick]
304
+ # The `onClick` action for this action item.
305
+ class CardAction
306
+ include ::Google::Protobuf::MessageExts
307
+ extend ::Google::Protobuf::MessageExts::ClassMethods
308
+ end
309
+
310
+ # A persistent (sticky) footer that that appears at the bottom of the card.
311
+ #
312
+ # Setting `fixedFooter` without specifying a `primaryButton` or a
313
+ # `secondaryButton` causes an error.
314
+ #
315
+ # For Chat apps, you can use fixed footers in
316
+ # [dialogs](https://developers.google.com/workspace/chat/dialogs), but not
317
+ # [card
318
+ # messages](https://developers.google.com/workspace/chat/create-messages#create).
319
+ # For an example in Google Chat apps, see [Add a persistent
320
+ # footer](https://developers.google.com/workspace/chat/design-components-card-dialog#add_a_persistent_footer).
321
+ #
322
+ # [Google Workspace Add-ons and Chat
323
+ # apps](https://developers.google.com/workspace/extend):
324
+ # @!attribute [rw] primary_button
325
+ # @return [::Google::Apps::Card::V1::Button]
326
+ # The primary button of the fixed footer. The button must be a text button
327
+ # with text and color set.
328
+ # @!attribute [rw] secondary_button
329
+ # @return [::Google::Apps::Card::V1::Button]
330
+ # The secondary button of the fixed footer. The button must be a text
331
+ # button with text and color set.
332
+ # If `secondaryButton` is set, you must also set `primaryButton`.
333
+ class CardFixedFooter
334
+ include ::Google::Protobuf::MessageExts
335
+ extend ::Google::Protobuf::MessageExts::ClassMethods
336
+ end
337
+
338
+ # The divider style of a card. Currently only used for dividers betweens card
339
+ # sections.
340
+ #
341
+ # [Google Workspace Add-ons and Chat
342
+ # apps](https://developers.google.com/workspace/extend):
343
+ module DividerStyle
344
+ # Don't use. Unspecified.
345
+ DIVIDER_STYLE_UNSPECIFIED = 0
346
+
347
+ # Default option. Render a solid divider between sections.
348
+ SOLID_DIVIDER = 1
349
+
350
+ # If set, no divider is rendered between sections.
351
+ NO_DIVIDER = 2
352
+ end
353
+
354
+ # In Google Workspace Add-ons,
355
+ # determines how a card is displayed.
356
+ #
357
+ # [Google Workspace
358
+ # Add-ons](https://developers.google.com/workspace/add-ons):
359
+ module DisplayStyle
360
+ # Don't use. Unspecified.
361
+ DISPLAY_STYLE_UNSPECIFIED = 0
362
+
363
+ # The header of the card appears at the bottom of the
364
+ # sidebar, partially covering the current top card of the stack. Clicking
365
+ # the header pops the card into the card stack. If the card has no header,
366
+ # a generated header is used instead.
367
+ PEEK = 1
368
+
369
+ # Default value. The card is shown by replacing the view of the top card in
370
+ # the card stack.
371
+ REPLACE = 2
372
+ end
373
+ end
374
+
375
+ # Each card is made up of widgets.
376
+ #
377
+ # A widget is a composite object that can represent one of text, images,
378
+ # buttons, and other object types.
379
+ # @!attribute [rw] text_paragraph
380
+ # @return [::Google::Apps::Card::V1::TextParagraph]
381
+ # Displays a text paragraph. Supports simple HTML formatted text. For more
382
+ # information about formatting text, see
383
+ # [Formatting text in Google Chat
384
+ # apps](https://developers.google.com/workspace/chat/format-messages#card-formatting)
385
+ # and
386
+ # [Formatting
387
+ # text in Google Workspace
388
+ # Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
389
+ #
390
+ # For example, the following JSON creates a bolded text:
391
+ # ```
392
+ # "textParagraph": {
393
+ # "text": " <b>bold text</b>"
394
+ # }
395
+ # ```
396
+ # @!attribute [rw] image
397
+ # @return [::Google::Apps::Card::V1::Image]
398
+ # Displays an image.
399
+ #
400
+ # For example, the following JSON creates an image with alternative text:
401
+ # ```
402
+ # "image": {
403
+ # "imageUrl":
404
+ # "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png",
405
+ # "altText": "Chat app avatar"
406
+ # }
407
+ # ```
408
+ # @!attribute [rw] decorated_text
409
+ # @return [::Google::Apps::Card::V1::DecoratedText]
410
+ # Displays a decorated text item.
411
+ #
412
+ # For example, the following JSON creates a decorated text widget showing
413
+ # email address:
414
+ #
415
+ # ```
416
+ # "decoratedText": {
417
+ # "icon": {
418
+ # "knownIcon": "EMAIL"
419
+ # },
420
+ # "topLabel": "Email Address",
421
+ # "text": "sasha@example.com",
422
+ # "bottomLabel": "This is a new Email address!",
423
+ # "switchControl": {
424
+ # "name": "has_send_welcome_email_to_sasha",
425
+ # "selected": false,
426
+ # "controlType": "CHECKBOX"
427
+ # }
428
+ # }
429
+ # ```
430
+ # @!attribute [rw] button_list
431
+ # @return [::Google::Apps::Card::V1::ButtonList]
432
+ # A list of buttons.
433
+ #
434
+ # For example, the following JSON creates two buttons. The first
435
+ # is a blue text button and the second is an image button that opens a
436
+ # link:
437
+ # ```
438
+ # "buttonList": {
439
+ # "buttons": [
440
+ # {
441
+ # "text": "Edit",
442
+ # "color": {
443
+ # "red": 0,
444
+ # "green": 0,
445
+ # "blue": 1,
446
+ # "alpha": 1
447
+ # },
448
+ # "disabled": true,
449
+ # },
450
+ # {
451
+ # "icon": {
452
+ # "knownIcon": "INVITE",
453
+ # "altText": "check calendar"
454
+ # },
455
+ # "onClick": {
456
+ # "openLink": {
457
+ # "url": "https://example.com/calendar"
458
+ # }
459
+ # }
460
+ # }
461
+ # ]
462
+ # }
463
+ # ```
464
+ # @!attribute [rw] text_input
465
+ # @return [::Google::Apps::Card::V1::TextInput]
466
+ # Displays a text box that users can type into.
467
+ #
468
+ # For example, the following JSON creates a text input for an email
469
+ # address:
470
+ #
471
+ # ```
472
+ # "textInput": {
473
+ # "name": "mailing_address",
474
+ # "label": "Mailing Address"
475
+ # }
476
+ # ```
477
+ #
478
+ # As another example, the following JSON creates a text input for a
479
+ # programming language with static suggestions:
480
+ # ```
481
+ # "textInput": {
482
+ # "name": "preferred_programing_language",
483
+ # "label": "Preferred Language",
484
+ # "initialSuggestions": {
485
+ # "items": [
486
+ # {
487
+ # "text": "C++"
488
+ # },
489
+ # {
490
+ # "text": "Java"
491
+ # },
492
+ # {
493
+ # "text": "JavaScript"
494
+ # },
495
+ # {
496
+ # "text": "Python"
497
+ # }
498
+ # ]
499
+ # }
500
+ # }
501
+ # ```
502
+ # @!attribute [rw] selection_input
503
+ # @return [::Google::Apps::Card::V1::SelectionInput]
504
+ # Displays a selection control that lets users select items. Selection
505
+ # controls can be checkboxes, radio buttons, switches, or dropdown menus.
506
+ #
507
+ # For example, the following JSON creates a dropdown menu that lets users
508
+ # choose a size:
509
+ #
510
+ # ```
511
+ # "selectionInput": {
512
+ # "name": "size",
513
+ # "label": "Size"
514
+ # "type": "DROPDOWN",
515
+ # "items": [
516
+ # {
517
+ # "text": "S",
518
+ # "value": "small",
519
+ # "selected": false
520
+ # },
521
+ # {
522
+ # "text": "M",
523
+ # "value": "medium",
524
+ # "selected": true
525
+ # },
526
+ # {
527
+ # "text": "L",
528
+ # "value": "large",
529
+ # "selected": false
530
+ # },
531
+ # {
532
+ # "text": "XL",
533
+ # "value": "extra_large",
534
+ # "selected": false
535
+ # }
536
+ # ]
537
+ # }
538
+ # ```
539
+ # @!attribute [rw] date_time_picker
540
+ # @return [::Google::Apps::Card::V1::DateTimePicker]
541
+ # Displays a widget that lets users input a date, time, or date and time.
542
+ #
543
+ # For example, the following JSON creates a date time picker to schedule an
544
+ # appointment:
545
+ #
546
+ #
547
+ # ```
548
+ # "dateTimePicker": {
549
+ # "name": "appointment_time",
550
+ # "label": "Book your appointment at:",
551
+ # "type": "DATE_AND_TIME",
552
+ # "valueMsEpoch": "796435200000"
553
+ # }
554
+ # ```
555
+ # @!attribute [rw] divider
556
+ # @return [::Google::Apps::Card::V1::Divider]
557
+ # Displays a horizontal line divider between widgets.
558
+ #
559
+ # For example, the following JSON creates a divider:
560
+ # ```
561
+ # "divider": {
562
+ # }
563
+ # ```
564
+ # @!attribute [rw] grid
565
+ # @return [::Google::Apps::Card::V1::Grid]
566
+ # Displays a grid with a collection of items.
567
+ #
568
+ # A grid supports any number of columns and items. The number of rows is
569
+ # determined by the upper bounds of the number items divided by the number
570
+ # of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11
571
+ # items and 2 columns has 6 rows.
572
+ #
573
+ # [Google Workspace Add-ons and
574
+ # Chat apps](https://developers.google.com/workspace/extend):
575
+ #
576
+ # For example, the following JSON creates a 2 column grid with a single
577
+ # item:
578
+ #
579
+ # ```
580
+ # "grid": {
581
+ # "title": "A fine collection of items",
582
+ # "columnCount": 2,
583
+ # "borderStyle": {
584
+ # "type": "STROKE",
585
+ # "cornerRadius": 4
586
+ # },
587
+ # "items": [
588
+ # {
589
+ # "image": {
590
+ # "imageUri": "https://www.example.com/image.png",
591
+ # "cropStyle": {
592
+ # "type": "SQUARE"
593
+ # },
594
+ # "borderStyle": {
595
+ # "type": "STROKE"
596
+ # }
597
+ # },
598
+ # "title": "An item",
599
+ # "textAlignment": "CENTER"
600
+ # }
601
+ # ],
602
+ # "onClick": {
603
+ # "openLink": {
604
+ # "url": "https://www.example.com"
605
+ # }
606
+ # }
607
+ # }
608
+ # ```
609
+ # @!attribute [rw] columns
610
+ # @return [::Google::Apps::Card::V1::Columns]
611
+ # Displays up to 2 columns.
612
+ #
613
+ # To include more than 2 columns, or to use rows, use the `Grid` widget.
614
+ #
615
+ # For example, the following JSON creates 2 columns that each contain
616
+ # text paragraphs:
617
+ #
618
+ # ```
619
+ # "columns": {
620
+ # "columnItems": [
621
+ # {
622
+ # "horizontalSizeStyle": "FILL_AVAILABLE_SPACE",
623
+ # "horizontalAlignment": "CENTER",
624
+ # "verticalAlignment": "CENTER",
625
+ # "widgets": [
626
+ # {
627
+ # "textParagraph": {
628
+ # "text": "First column text paragraph"
629
+ # }
630
+ # }
631
+ # ]
632
+ # },
633
+ # {
634
+ # "horizontalSizeStyle": "FILL_AVAILABLE_SPACE",
635
+ # "horizontalAlignment": "CENTER",
636
+ # "verticalAlignment": "CENTER",
637
+ # "widgets": [
638
+ # {
639
+ # "textParagraph": {
640
+ # "text": "Second column text paragraph"
641
+ # }
642
+ # }
643
+ # ]
644
+ # }
645
+ # ]
646
+ # }
647
+ # ```
648
+ # @!attribute [rw] horizontal_alignment
649
+ # @return [::Google::Apps::Card::V1::Widget::HorizontalAlignment]
650
+ # Specifies whether widgets align to the left, right, or center of a column.
651
+ class Widget
652
+ include ::Google::Protobuf::MessageExts
653
+ extend ::Google::Protobuf::MessageExts::ClassMethods
654
+
655
+ # The shape used to crop the image.
656
+ #
657
+ # [Google Workspace Add-ons and Chat
658
+ # apps](https://developers.google.com/workspace/extend):
659
+ module ImageType
660
+ # Default value. Applies a square mask to the image. For example, a 4x3
661
+ # image becomes 3x3.
662
+ SQUARE = 0
663
+
664
+ # Applies a circular mask to the image. For example, a 4x3 image becomes a
665
+ # circle with a diameter of 3.
666
+ CIRCLE = 1
667
+ end
668
+
669
+ # Specifies whether widgets align to the left, right, or center of a column.
670
+ #
671
+ # [Google Chat apps](https://developers.google.com/workspace/chat):
672
+ module HorizontalAlignment
673
+ # Don't use. Unspecified.
674
+ HORIZONTAL_ALIGNMENT_UNSPECIFIED = 0
675
+
676
+ # Default value. Aligns widgets to the start position of the column. For
677
+ # left-to-right layouts, aligns to the left. For right-to-left layouts,
678
+ # aligns to the right.
679
+ START = 1
680
+
681
+ # Aligns widgets to the center of the column.
682
+ CENTER = 2
683
+
684
+ # Aligns widgets to the end position of the column. For left-to-right
685
+ # layouts, aligns widgets to the right. For right-to-left layouts, aligns
686
+ # widgets to the left.
687
+ HorizontalAlignment::END = 3
688
+ end
689
+ end
690
+
691
+ # A paragraph of text that supports formatting. For an example in
692
+ # Google Chat apps, see [Add a paragraph of formatted
693
+ # text](https://developers.google.com/workspace/chat/add-text-image-card-dialog#add_a_paragraph_of_formatted_text).
694
+ # For more information
695
+ # about formatting text, see
696
+ # [Formatting text in Google Chat
697
+ # apps](https://developers.google.com/workspace/chat/format-messages#card-formatting)
698
+ # and
699
+ # [Formatting
700
+ # text in Google Workspace
701
+ # Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
702
+ #
703
+ # [Google Workspace Add-ons and
704
+ # Chat apps](https://developers.google.com/workspace/extend):
705
+ # @!attribute [rw] text
706
+ # @return [::String]
707
+ # The text that's shown in the widget.
708
+ class TextParagraph
709
+ include ::Google::Protobuf::MessageExts
710
+ extend ::Google::Protobuf::MessageExts::ClassMethods
711
+ end
712
+
713
+ # An image that is specified by a URL and can have an `onClick` action. For an
714
+ # example, see [Add an
715
+ # image](https://developers.google.com/workspace/chat/add-text-image-card-dialog#add_an_image).
716
+ #
717
+ # [Google Workspace Add-ons and Chat
718
+ # apps](https://developers.google.com/workspace/extend):
719
+ # @!attribute [rw] image_url
720
+ # @return [::String]
721
+ # The HTTPS URL that hosts the image.
722
+ #
723
+ # For example:
724
+ #
725
+ # ```
726
+ # https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png
727
+ # ```
728
+ # @!attribute [rw] on_click
729
+ # @return [::Google::Apps::Card::V1::OnClick]
730
+ # When a user clicks the image, the click triggers this action.
731
+ # @!attribute [rw] alt_text
732
+ # @return [::String]
733
+ # The alternative text of this image that's used for accessibility.
734
+ class Image
735
+ include ::Google::Protobuf::MessageExts
736
+ extend ::Google::Protobuf::MessageExts::ClassMethods
737
+ end
738
+
739
+ # Displays a divider between widgets as a horizontal line. For an example in
740
+ # Google Chat apps, see
741
+ # [Add a horizontal divider between
742
+ # widgets](https://developers.google.com/workspace/chat/format-structure-card-dialog#add_a_horizontal_divider_between_widgets).
743
+ #
744
+ # [Google Workspace Add-ons and Chat
745
+ # apps](https://developers.google.com/workspace/extend):
746
+ #
747
+ # For example, the following JSON creates a divider:
748
+ #
749
+ # ```
750
+ # "divider": {}
751
+ # ```
752
+ class Divider
753
+ include ::Google::Protobuf::MessageExts
754
+ extend ::Google::Protobuf::MessageExts::ClassMethods
755
+ end
756
+
757
+ # A widget that displays text with optional decorations such as a label above
758
+ # or below the text, an icon in front of the text, a selection widget, or a
759
+ # button after the text. For an example in
760
+ # Google Chat apps, see [Display text with decorative
761
+ # text](https://developers.google.com/workspace/chat/add-text-image-card-dialog#display_text_with_decorative_elements).
762
+ #
763
+ # [Google Workspace Add-ons and Chat
764
+ # apps](https://developers.google.com/workspace/extend):
765
+ # @!attribute [rw] icon
766
+ # @deprecated This field is deprecated and may be removed in the next major version update.
767
+ # @return [::Google::Apps::Card::V1::Icon]
768
+ # Deprecated in favor of `startIcon`.
769
+ # @!attribute [rw] start_icon
770
+ # @return [::Google::Apps::Card::V1::Icon]
771
+ # The icon displayed in front of the text.
772
+ # @!attribute [rw] top_label
773
+ # @return [::String]
774
+ # The text that appears above `text`. Always truncates.
775
+ # @!attribute [rw] text
776
+ # @return [::String]
777
+ # Required. The primary text.
778
+ #
779
+ # Supports simple formatting. For more information
780
+ # about formatting text, see
781
+ # [Formatting text in Google Chat
782
+ # apps](https://developers.google.com/workspace/chat/format-messages#card-formatting)
783
+ # and
784
+ # [Formatting
785
+ # text in Google Workspace
786
+ # Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
787
+ # @!attribute [rw] wrap_text
788
+ # @return [::Boolean]
789
+ # The wrap text setting. If `true`, the text wraps and displays on
790
+ # multiple lines. Otherwise, the text is truncated.
791
+ #
792
+ # Only applies to `text`, not `topLabel` and `bottomLabel`.
793
+ # @!attribute [rw] bottom_label
794
+ # @return [::String]
795
+ # The text that appears below `text`. Always wraps.
796
+ # @!attribute [rw] on_click
797
+ # @return [::Google::Apps::Card::V1::OnClick]
798
+ # This action is triggered when users click `topLabel` or `bottomLabel`.
799
+ # @!attribute [rw] button
800
+ # @return [::Google::Apps::Card::V1::Button]
801
+ # A button that a user can click to trigger an action.
802
+ # @!attribute [rw] switch_control
803
+ # @return [::Google::Apps::Card::V1::DecoratedText::SwitchControl]
804
+ # A switch widget that a user can click to change its state and trigger an
805
+ # action.
806
+ # @!attribute [rw] end_icon
807
+ # @return [::Google::Apps::Card::V1::Icon]
808
+ # An icon displayed after the text.
809
+ #
810
+ # Supports
811
+ # [built-in](https://developers.google.com/workspace/chat/format-messages#builtinicons)
812
+ # and
813
+ # [custom](https://developers.google.com/workspace/chat/format-messages#customicons)
814
+ # icons.
815
+ class DecoratedText
816
+ include ::Google::Protobuf::MessageExts
817
+ extend ::Google::Protobuf::MessageExts::ClassMethods
818
+
819
+ # Either a toggle-style switch or a checkbox inside a `decoratedText` widget.
820
+ #
821
+ # [Google Workspace Add-ons and Chat
822
+ # apps](https://developers.google.com/workspace/extend):
823
+ #
824
+ # Only supported in the `decoratedText` widget.
825
+ # @!attribute [rw] name
826
+ # @return [::String]
827
+ # The name by which the switch widget is identified in a form input event.
828
+ #
829
+ # For details about working with form inputs, see [Receive form
830
+ # data](https://developers.google.com/workspace/chat/read-form-data).
831
+ # @!attribute [rw] value
832
+ # @return [::String]
833
+ # The value entered by a user, returned as part of a form input event.
834
+ #
835
+ # For details about working with form inputs, see [Receive form
836
+ # data](https://developers.google.com/workspace/chat/read-form-data).
837
+ # @!attribute [rw] selected
838
+ # @return [::Boolean]
839
+ # When `true`, the switch is selected.
840
+ # @!attribute [rw] on_change_action
841
+ # @return [::Google::Apps::Card::V1::Action]
842
+ # The action to perform when the switch state is changed, such as what
843
+ # function to run.
844
+ # @!attribute [rw] control_type
845
+ # @return [::Google::Apps::Card::V1::DecoratedText::SwitchControl::ControlType]
846
+ # How the switch appears in the user interface.
847
+ #
848
+ # [Google Workspace Add-ons
849
+ # and Chat apps](https://developers.google.com/workspace/extend):
850
+ class SwitchControl
851
+ include ::Google::Protobuf::MessageExts
852
+ extend ::Google::Protobuf::MessageExts::ClassMethods
853
+
854
+ # How the switch appears in the user interface.
855
+ #
856
+ # [Google Workspace Add-ons
857
+ # and Chat apps](https://developers.google.com/workspace/extend):
858
+ module ControlType
859
+ # A toggle-style switch.
860
+ SWITCH = 0
861
+
862
+ # Deprecated in favor of `CHECK_BOX`.
863
+ CHECKBOX = 1
864
+
865
+ # A checkbox.
866
+ CHECK_BOX = 2
867
+ end
868
+ end
869
+ end
870
+
871
+ # A field in which users can enter text. Supports suggestions and on-change
872
+ # actions. For an example in Google Chat apps, see [Add a field in which a user
873
+ # can enter
874
+ # text](https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_field_in_which_a_user_can_enter_text).
875
+ #
876
+ # Chat apps receive and can process the value of entered text during form input
877
+ # events. For details about working with form inputs, see [Receive form
878
+ # data](https://developers.google.com/workspace/chat/read-form-data).
879
+ #
880
+ # When you need to collect undefined or abstract data from users,
881
+ # use a text input. To collect defined or enumerated data from users, use the
882
+ # {::Google::Apps::Card::V1::SelectionInput SelectionInput} widget.
883
+ #
884
+ # [Google Workspace Add-ons and Chat
885
+ # apps](https://developers.google.com/workspace/extend):
886
+ # @!attribute [rw] name
887
+ # @return [::String]
888
+ # The name by which the text input is identified in a form input event.
889
+ #
890
+ # For details about working with form inputs, see [Receive form
891
+ # data](https://developers.google.com/workspace/chat/read-form-data).
892
+ # @!attribute [rw] label
893
+ # @return [::String]
894
+ # The text that appears above the text input field in the user interface.
895
+ #
896
+ # Specify text that helps the user enter the information your app needs.
897
+ # For example, if you are asking someone's name, but specifically need their
898
+ # surname, write `surname` instead of `name`.
899
+ #
900
+ # Required if `hintText` is unspecified. Otherwise, optional.
901
+ # @!attribute [rw] hint_text
902
+ # @return [::String]
903
+ # Text that appears below the text input field meant to assist users by
904
+ # prompting them to enter a certain value. This text is always visible.
905
+ #
906
+ # Required if `label` is unspecified. Otherwise, optional.
907
+ # @!attribute [rw] value
908
+ # @return [::String]
909
+ # The value entered by a user, returned as part of a form input event.
910
+ #
911
+ # For details about working with form inputs, see [Receive form
912
+ # data](https://developers.google.com/workspace/chat/read-form-data).
913
+ # @!attribute [rw] type
914
+ # @return [::Google::Apps::Card::V1::TextInput::Type]
915
+ # How a text input field appears in the user interface.
916
+ # For example, whether the field is single or multi-line.
917
+ # @!attribute [rw] on_change_action
918
+ # @return [::Google::Apps::Card::V1::Action]
919
+ # What to do when a change occurs in the text input field. For example, a
920
+ # user adding to the field or deleting text.
921
+ #
922
+ # Examples of actions to take include running a custom function or opening
923
+ # a [dialog](https://developers.google.com/workspace/chat/dialogs)
924
+ # in Google Chat.
925
+ # @!attribute [rw] initial_suggestions
926
+ # @return [::Google::Apps::Card::V1::Suggestions]
927
+ # Suggested values that users can enter. These values appear when users click
928
+ # inside the text input field. As users type, the suggested values
929
+ # dynamically filter to match what the users have typed.
930
+ #
931
+ # For example, a text input field for programming language might suggest
932
+ # Java, JavaScript, Python, and C++. When users start typing `Jav`, the list
933
+ # of suggestions filters to show just `Java` and `JavaScript`.
934
+ #
935
+ # Suggested values help guide users to enter values that your app can make
936
+ # sense of. When referring to JavaScript, some users might enter `javascript`
937
+ # and others `java script`. Suggesting `JavaScript` can standardize how users
938
+ # interact with your app.
939
+ #
940
+ # When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set
941
+ # to `MULTIPLE_LINE`.
942
+ #
943
+ # [Google Workspace
944
+ # Add-ons and Chat apps](https://developers.google.com/workspace/extend):
945
+ # @!attribute [rw] auto_complete_action
946
+ # @return [::Google::Apps::Card::V1::Action]
947
+ # Optional. Specify what action to take when the text input field provides
948
+ # suggestions to users who interact with it.
949
+ #
950
+ # If unspecified, the suggestions are set by `initialSuggestions` and
951
+ # are processed by the client.
952
+ #
953
+ # If specified, the app takes the action specified here, such as running
954
+ # a custom function.
955
+ #
956
+ # [Google Workspace
957
+ # Add-ons](https://developers.google.com/workspace/add-ons):
958
+ # @!attribute [rw] placeholder_text
959
+ # @return [::String]
960
+ # Text that appears in the text input field when the field is empty.
961
+ # Use this text to prompt users to enter a value. For example, `Enter a
962
+ # number from 0 to 100`.
963
+ #
964
+ # [Google Chat apps](https://developers.google.com/workspace/chat):
965
+ class TextInput
966
+ include ::Google::Protobuf::MessageExts
967
+ extend ::Google::Protobuf::MessageExts::ClassMethods
968
+
969
+ # How a text input field appears in the user interface. For example,
970
+ # whether it's a single line input field, or a multi-line input. If
971
+ # `initialSuggestions` is specified, `type` is always `SINGLE_LINE`,
972
+ # even if it's set to `MULTIPLE_LINE`.
973
+ #
974
+ # [Google Workspace Add-ons and Chat
975
+ # apps](https://developers.google.com/workspace/extend):
976
+ module Type
977
+ # The text input field has a fixed height of one line.
978
+ SINGLE_LINE = 0
979
+
980
+ # The text input field has a fixed height of multiple lines.
981
+ MULTIPLE_LINE = 1
982
+ end
983
+ end
984
+
985
+ # Suggested values that users can enter. These values appear when users click
986
+ # inside the text input field. As users type, the suggested values
987
+ # dynamically filter to match what the users have typed.
988
+ #
989
+ # For example, a text input field for programming language might suggest
990
+ # Java, JavaScript, Python, and C++. When users start typing `Jav`, the list
991
+ # of suggestions filters to show `Java` and `JavaScript`.
992
+ #
993
+ # Suggested values help guide users to enter values that your app can make
994
+ # sense of. When referring to JavaScript, some users might enter `javascript`
995
+ # and others `java script`. Suggesting `JavaScript` can standardize how users
996
+ # interact with your app.
997
+ #
998
+ # When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set
999
+ # to `MULTIPLE_LINE`.
1000
+ #
1001
+ # [Google Workspace
1002
+ # Add-ons and Chat apps](https://developers.google.com/workspace/extend):
1003
+ # @!attribute [rw] items
1004
+ # @return [::Array<::Google::Apps::Card::V1::Suggestions::SuggestionItem>]
1005
+ # A list of suggestions used for autocomplete recommendations in text input
1006
+ # fields.
1007
+ class Suggestions
1008
+ include ::Google::Protobuf::MessageExts
1009
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1010
+
1011
+ # One suggested value that users can enter in a text input field.
1012
+ #
1013
+ # [Google Workspace Add-ons and Chat
1014
+ # apps](https://developers.google.com/workspace/extend):
1015
+ # @!attribute [rw] text
1016
+ # @return [::String]
1017
+ # The value of a suggested input to a text input field. This is
1018
+ # equivalent to what users enter themselves.
1019
+ class SuggestionItem
1020
+ include ::Google::Protobuf::MessageExts
1021
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1022
+ end
1023
+ end
1024
+
1025
+ # A list of buttons layed out horizontally. For an example in
1026
+ # Google Chat apps, see
1027
+ # [Add a
1028
+ # button](https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_button).
1029
+ #
1030
+ # [Google Workspace Add-ons and Chat
1031
+ # apps](https://developers.google.com/workspace/extend):
1032
+ # @!attribute [rw] buttons
1033
+ # @return [::Array<::Google::Apps::Card::V1::Button>]
1034
+ # An array of buttons.
1035
+ class ButtonList
1036
+ include ::Google::Protobuf::MessageExts
1037
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1038
+ end
1039
+
1040
+ # A widget that creates one or more UI items that users can select.
1041
+ # For example, a dropdown menu or checkboxes. You can use this widget to
1042
+ # collect data that can be predicted or enumerated. For an example in Google
1043
+ # Chat apps, see [Add selectable UI
1044
+ # elements](/workspace/chat/design-interactive-card-dialog#add_selectable_ui_elements).
1045
+ #
1046
+ # Chat apps can process the value of items that users select or input. For
1047
+ # details about working with form inputs, see [Receive form
1048
+ # data](https://developers.google.com/workspace/chat/read-form-data).
1049
+ #
1050
+ # To collect undefined or abstract data from users, use
1051
+ # the {::Google::Apps::Card::V1::TextInput TextInput} widget.
1052
+ #
1053
+ # [Google Workspace Add-ons
1054
+ # and Chat apps](https://developers.google.com/workspace/extend):
1055
+ # @!attribute [rw] name
1056
+ # @return [::String]
1057
+ # The name that identifies the selection input in a form input event.
1058
+ #
1059
+ # For details about working with form inputs, see [Receive form
1060
+ # data](https://developers.google.com/workspace/chat/read-form-data).
1061
+ # @!attribute [rw] label
1062
+ # @return [::String]
1063
+ # The text that appears above the selection input field in the user
1064
+ # interface.
1065
+ #
1066
+ # Specify text that helps the user enter the information your app needs.
1067
+ # For example, if users are selecting the urgency of a work ticket from a
1068
+ # drop-down menu, the label might be "Urgency" or "Select urgency".
1069
+ # @!attribute [rw] type
1070
+ # @return [::Google::Apps::Card::V1::SelectionInput::SelectionType]
1071
+ # The type of items that are displayed to users in a `SelectionInput` widget.
1072
+ # Selection types support different types of interactions. For example, users
1073
+ # can select one or more checkboxes, but they can only select one value from
1074
+ # a dropdown menu.
1075
+ # @!attribute [rw] items
1076
+ # @return [::Array<::Google::Apps::Card::V1::SelectionInput::SelectionItem>]
1077
+ # An array of selectable items. For example, an array of radio buttons or
1078
+ # checkboxes. Supports up to 100 items.
1079
+ # @!attribute [rw] on_change_action
1080
+ # @return [::Google::Apps::Card::V1::Action]
1081
+ # If specified, the form is submitted when the selection changes. If not
1082
+ # specified, you must specify a separate button that submits the form.
1083
+ #
1084
+ # For details about working with form inputs, see [Receive form
1085
+ # data](https://developers.google.com/workspace/chat/read-form-data).
1086
+ # @!attribute [rw] multi_select_max_selected_items
1087
+ # @return [::Integer]
1088
+ # For multiselect menus, the maximum number of items that a user can select.
1089
+ # Minimum value is 1 item. If unspecified, defaults to 3 items.
1090
+ # @!attribute [rw] multi_select_min_query_length
1091
+ # @return [::Integer]
1092
+ # For multiselect menus, the number of text characters that a user inputs
1093
+ # before the app queries autocomplete and displays suggested items
1094
+ # in the menu.
1095
+ #
1096
+ # If unspecified, defaults to 0 characters for static data sources and 3
1097
+ # characters for external data sources.
1098
+ # @!attribute [rw] external_data_source
1099
+ # @return [::Google::Apps::Card::V1::Action]
1100
+ # An external data source, such as a relational data base.
1101
+ # @!attribute [rw] platform_data_source
1102
+ # @return [::Google::Apps::Card::V1::SelectionInput::PlatformDataSource]
1103
+ # A data source from Google Workspace.
1104
+ class SelectionInput
1105
+ include ::Google::Protobuf::MessageExts
1106
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1107
+
1108
+ # An item that users can select in a selection input, such as a checkbox
1109
+ # or switch.
1110
+ #
1111
+ # [Google Workspace Add-ons and Chat
1112
+ # apps](https://developers.google.com/workspace/extend):
1113
+ # @!attribute [rw] text
1114
+ # @return [::String]
1115
+ # The text that identifies or describes the item to users.
1116
+ # @!attribute [rw] value
1117
+ # @return [::String]
1118
+ # The value associated with this item. The client should use this as a form
1119
+ # input value.
1120
+ #
1121
+ # For details about working with form inputs, see [Receive form
1122
+ # data](https://developers.google.com/workspace/chat/read-form-data).
1123
+ # @!attribute [rw] selected
1124
+ # @return [::Boolean]
1125
+ # Whether the item is selected by default. If the selection input only
1126
+ # accepts one value (such as for radio buttons or a dropdown menu), only
1127
+ # set this field for one item.
1128
+ # @!attribute [rw] start_icon_uri
1129
+ # @return [::String]
1130
+ # For multiselect menus, the URL for the icon displayed next to
1131
+ # the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS`
1132
+ # URL. For example,
1133
+ # `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`.
1134
+ # @!attribute [rw] bottom_text
1135
+ # @return [::String]
1136
+ # For multiselect menus, a text description or label that's
1137
+ # displayed below the item's `text` field.
1138
+ class SelectionItem
1139
+ include ::Google::Protobuf::MessageExts
1140
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1141
+ end
1142
+
1143
+ # For a
1144
+ # {::Google::Apps::Card::V1::SelectionInput `SelectionInput`} widget that uses a
1145
+ # multiselect menu, a data source from Google Workspace. Used to populate
1146
+ # items in a multiselect menu.
1147
+ #
1148
+ # [Google Chat apps](https://developers.google.com/workspace/chat):
1149
+ # @!attribute [rw] common_data_source
1150
+ # @return [::Google::Apps::Card::V1::SelectionInput::PlatformDataSource::CommonDataSource]
1151
+ # A data source shared by all Google Workspace applications, such as
1152
+ # users in a Google Workspace organization.
1153
+ class PlatformDataSource
1154
+ include ::Google::Protobuf::MessageExts
1155
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1156
+
1157
+ # A data source shared by all [Google Workspace
1158
+ # applications]
1159
+ # (https://developers.google.com/workspace/chat/api/reference/rest/v1/HostApp).
1160
+ #
1161
+ # [Google Chat apps](https://developers.google.com/workspace/chat):
1162
+ module CommonDataSource
1163
+ # Default value. Don't use.
1164
+ UNKNOWN = 0
1165
+
1166
+ # Google Workspace users. The user can only view and select users from
1167
+ # their Google Workspace organization.
1168
+ USER = 1
1169
+ end
1170
+ end
1171
+
1172
+ # The format for the items that users can select. Different options support
1173
+ # different types of interactions. For example, users can select multiple
1174
+ # checkboxes, but can only select one item from a dropdown menu.
1175
+ #
1176
+ # Each selection input supports one type of selection. Mixing checkboxes
1177
+ # and switches, for example, isn't supported.
1178
+ #
1179
+ # [Google Workspace Add-ons and Chat
1180
+ # apps](https://developers.google.com/workspace/extend):
1181
+ module SelectionType
1182
+ # A set of checkboxes. Users can select one or more checkboxes.
1183
+ CHECK_BOX = 0
1184
+
1185
+ # A set of radio buttons. Users can select one radio button.
1186
+ RADIO_BUTTON = 1
1187
+
1188
+ # A set of switches. Users can turn on one or more switches.
1189
+ SWITCH = 2
1190
+
1191
+ # A dropdown menu. Users can select one item from the menu.
1192
+ DROPDOWN = 3
1193
+
1194
+ # A multiselect menu for static or dynamic data. From the menu bar,
1195
+ # users select one or more items. Users can also input values to populate
1196
+ # dynamic data. For example, users can start typing the name of a Google
1197
+ # Chat space and the widget autosuggests the space.
1198
+ #
1199
+ # To populate items for a multiselect menu, you can use one of the
1200
+ # following types of data sources:
1201
+ #
1202
+ # * Static data: Items are specified as `SelectionItem` objects in the
1203
+ # widget. Up to 100 items.
1204
+ # * Google Workspace data: Items are populated using data from Google
1205
+ # Workspace, such as Google Workspace users or Google Chat spaces.
1206
+ # * External data: Items are populated from an external data
1207
+ # source outside of Google Workspace.
1208
+ #
1209
+ # For examples of how to implement multiselect menus, see
1210
+ # [Add a multiselect
1211
+ # menu](https://developers.google.com/workspace/chat/design-interactive-card-dialog#multiselect-menu).
1212
+ #
1213
+ # [Google Workspace Add-ons and Chat
1214
+ # apps](https://developers.google.com/workspace/extend):
1215
+ # Multiselect for Google Workspace Add-ons are in
1216
+ # Developer Preview.
1217
+ MULTI_SELECT = 4
1218
+ end
1219
+ end
1220
+
1221
+ # Lets users input a date, a time, or both a date and a time. For an example in
1222
+ # Google Chat apps, see [Let a user pick a date and
1223
+ # time](https://developers.google.com/workspace/chat/design-interactive-card-dialog#let_a_user_pick_a_date_and_time).
1224
+ #
1225
+ # Users can input text or use the picker to select dates and times. If users
1226
+ # input an invalid date or time, the picker shows an error that prompts users
1227
+ # to input the information correctly.
1228
+ #
1229
+ # [Google Workspace
1230
+ # Add-ons and Chat apps](https://developers.google.com/workspace/extend):
1231
+ # @!attribute [rw] name
1232
+ # @return [::String]
1233
+ # The name by which the `DateTimePicker` is identified in a form input event.
1234
+ #
1235
+ # For details about working with form inputs, see [Receive form
1236
+ # data](https://developers.google.com/workspace/chat/read-form-data).
1237
+ # @!attribute [rw] label
1238
+ # @return [::String]
1239
+ # The text that prompts users to input a date, a time, or a date and time.
1240
+ # For example, if users are scheduling an appointment, use a label such as
1241
+ # `Appointment date` or `Appointment date and time`.
1242
+ # @!attribute [rw] type
1243
+ # @return [::Google::Apps::Card::V1::DateTimePicker::DateTimePickerType]
1244
+ # Whether the widget supports inputting a date, a time, or the date and time.
1245
+ # @!attribute [rw] value_ms_epoch
1246
+ # @return [::Integer]
1247
+ # The default value displayed in the widget, in milliseconds since [Unix
1248
+ # epoch time](https://en.wikipedia.org/wiki/Unix_time).
1249
+ #
1250
+ # Specify the value based on the type of picker (`DateTimePickerType`):
1251
+ #
1252
+ # * `DATE_AND_TIME`: a calendar date and time in UTC. For example, to
1253
+ # represent January 1, 2023 at 12:00 PM UTC, use `1672574400000`.
1254
+ # * `DATE_ONLY`: a calendar date at 00:00:00 UTC. For example, to represent
1255
+ # January 1, 2023, use `1672531200000`.
1256
+ # * `TIME_ONLY`: a time in UTC. For example, to represent 12:00 PM, use
1257
+ # `43200000` (or `12 * 60 * 60 * 1000`).
1258
+ # @!attribute [rw] timezone_offset_date
1259
+ # @return [::Integer]
1260
+ # The number representing the time zone offset from UTC, in minutes.
1261
+ # If set, the `value_ms_epoch` is displayed in the specified time zone.
1262
+ # If unset, the value defaults to the user's time zone setting.
1263
+ # @!attribute [rw] on_change_action
1264
+ # @return [::Google::Apps::Card::V1::Action]
1265
+ # Triggered when the user clicks **Save** or **Clear** from the
1266
+ # `DateTimePicker` interface.
1267
+ class DateTimePicker
1268
+ include ::Google::Protobuf::MessageExts
1269
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1270
+
1271
+ # The format for the date and time in the `DateTimePicker` widget.
1272
+ # Determines whether users can input a date, a time, or both a date and time.
1273
+ #
1274
+ # [Google Workspace Add-ons and Chat
1275
+ # apps](https://developers.google.com/workspace/extend):
1276
+ module DateTimePickerType
1277
+ # Users input a date and time.
1278
+ DATE_AND_TIME = 0
1279
+
1280
+ # Users input a date.
1281
+ DATE_ONLY = 1
1282
+
1283
+ # Users input a time.
1284
+ TIME_ONLY = 2
1285
+ end
1286
+ end
1287
+
1288
+ # A text, icon, or text and icon button that users can click. For an example in
1289
+ # Google Chat apps, see
1290
+ # [Add a
1291
+ # button](https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_button).
1292
+ #
1293
+ # To make an image a clickable button, specify an
1294
+ # {::Google::Apps::Card::V1::Image `Image`} (not an
1295
+ # {::Google::Apps::Card::V1::ImageComponent `ImageComponent`}) and set an
1296
+ # `onClick` action.
1297
+ #
1298
+ # [Google Workspace
1299
+ # Add-ons and Chat apps](https://developers.google.com/workspace/extend):
1300
+ # @!attribute [rw] text
1301
+ # @return [::String]
1302
+ # The text displayed inside the button.
1303
+ # @!attribute [rw] icon
1304
+ # @return [::Google::Apps::Card::V1::Icon]
1305
+ # The icon image. If both `icon` and `text` are set, then the icon appears
1306
+ # before the text.
1307
+ # @!attribute [rw] color
1308
+ # @return [::Google::Type::Color]
1309
+ # If set, the button is filled with a solid background color and the font
1310
+ # color changes to maintain contrast with the background color. For example,
1311
+ # setting a blue background likely results in white text.
1312
+ #
1313
+ # If unset, the image background is white and the font color is blue.
1314
+ #
1315
+ # For red, green, and blue, the value of each field is a `float` number that
1316
+ # you can express in either of two ways: as a number between 0 and 255
1317
+ # divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents
1318
+ # the absence of a color and 1 or 255/255 represent the full presence of that
1319
+ # color on the RGB scale.
1320
+ #
1321
+ # Optionally set `alpha`, which sets a level of transparency using this
1322
+ # equation:
1323
+ #
1324
+ # ```
1325
+ # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1326
+ # ```
1327
+ #
1328
+ # For `alpha`, a value of `1` corresponds with a solid color, and a value of
1329
+ # `0` corresponds with a completely transparent color.
1330
+ #
1331
+ # For example, the following color represents a half transparent red:
1332
+ #
1333
+ # ```
1334
+ # "color": {
1335
+ # "red": 1,
1336
+ # "green": 0,
1337
+ # "blue": 0,
1338
+ # "alpha": 0.5
1339
+ # }
1340
+ # ```
1341
+ # @!attribute [rw] on_click
1342
+ # @return [::Google::Apps::Card::V1::OnClick]
1343
+ # Required. The action to perform when a user clicks the button, such as
1344
+ # opening a hyperlink or running a custom function.
1345
+ # @!attribute [rw] disabled
1346
+ # @return [::Boolean]
1347
+ # If `true`, the button is displayed in an inactive state and doesn't respond
1348
+ # to user actions.
1349
+ # @!attribute [rw] alt_text
1350
+ # @return [::String]
1351
+ # The alternative text that's used for accessibility.
1352
+ #
1353
+ # Set descriptive text that lets users know what the button does. For
1354
+ # example, if a button opens a hyperlink, you might write: "Opens a new
1355
+ # browser tab and navigates to the Google Chat developer documentation at
1356
+ # https://developers.google.com/workspace/chat".
1357
+ class Button
1358
+ include ::Google::Protobuf::MessageExts
1359
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1360
+ end
1361
+
1362
+ # An icon displayed in a widget on a card. For an example in Google Chat apps,
1363
+ # see [Add an
1364
+ # icon](https://developers.google.com/workspace/chat/add-text-image-card-dialog#add_an_icon).
1365
+ #
1366
+ # Supports
1367
+ # [built-in](https://developers.google.com/workspace/chat/format-messages#builtinicons)
1368
+ # and
1369
+ # [custom](https://developers.google.com/workspace/chat/format-messages#customicons)
1370
+ # icons.
1371
+ #
1372
+ # [Google Workspace Add-ons and Chat
1373
+ # apps](https://developers.google.com/workspace/extend):
1374
+ # @!attribute [rw] known_icon
1375
+ # @return [::String]
1376
+ # Display one of the built-in icons provided by Google Workspace.
1377
+ #
1378
+ # For example, to display an airplane icon, specify `AIRPLANE`.
1379
+ # For a bus, specify `BUS`.
1380
+ #
1381
+ # For a full list of supported icons, see [built-in
1382
+ # icons](https://developers.google.com/workspace/chat/format-messages#builtinicons).
1383
+ # @!attribute [rw] icon_url
1384
+ # @return [::String]
1385
+ # Display a custom icon hosted at an HTTPS URL.
1386
+ #
1387
+ # For example:
1388
+ #
1389
+ # ```
1390
+ # "iconUrl":
1391
+ # "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png"
1392
+ # ```
1393
+ #
1394
+ # Supported file types include `.png` and `.jpg`.
1395
+ # @!attribute [rw] material_icon
1396
+ # @return [::Google::Apps::Card::V1::MaterialIcon]
1397
+ # Display one of the [Google Material
1398
+ # Icons](https://fonts.google.com/icons).
1399
+ #
1400
+ # For example, to display a [checkbox
1401
+ # icon](https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Acheck_box%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4048),
1402
+ # use
1403
+ # ```
1404
+ # "material_icon": {
1405
+ # "name": "check_box"
1406
+ # }
1407
+ # ```
1408
+ #
1409
+ # [Google Chat apps](https://developers.google.com/workspace/chat):
1410
+ # @!attribute [rw] alt_text
1411
+ # @return [::String]
1412
+ # Optional. A description of the icon used for accessibility.
1413
+ # If unspecified, the default value `Button` is provided. As a best practice,
1414
+ # you should set a helpful description for what the icon displays, and if
1415
+ # applicable, what it does. For example, `A user's account portrait`, or
1416
+ # `Opens a new browser tab and navigates to the Google Chat developer
1417
+ # documentation at https://developers.google.com/workspace/chat`.
1418
+ #
1419
+ # If the icon is set in a {::Google::Apps::Card::V1::Button `Button`}, the
1420
+ # `altText` appears as helper text when the user hovers over the button.
1421
+ # However, if the button also sets `text`, the icon's `altText` is ignored.
1422
+ # @!attribute [rw] image_type
1423
+ # @return [::Google::Apps::Card::V1::Widget::ImageType]
1424
+ # The crop style applied to the image. In some cases, applying a
1425
+ # `CIRCLE` crop causes the image to be drawn larger than a built-in
1426
+ # icon.
1427
+ class Icon
1428
+ include ::Google::Protobuf::MessageExts
1429
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1430
+ end
1431
+
1432
+ # A [Google Material Icon](https://fonts.google.com/icons), which includes over
1433
+ # 2500+ options.
1434
+ #
1435
+ # For example, to display a [checkbox
1436
+ # icon](https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Acheck_box%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4048)
1437
+ # with customized weight and grade, write the following:
1438
+ #
1439
+ # ```
1440
+ # {
1441
+ # "name": "check_box",
1442
+ # "fill": true,
1443
+ # "weight": 300,
1444
+ # "grade": -25
1445
+ # }
1446
+ # ```
1447
+ #
1448
+ # [Google Chat apps](https://developers.google.com/workspace/chat):
1449
+ # @!attribute [rw] name
1450
+ # @return [::String]
1451
+ # The icon name defined in the [Google Material
1452
+ # Icon](https://fonts.google.com/icons), for example, `check_box`. Any
1453
+ # invalid names are abandoned and replaced with empty string and
1454
+ # results in the icon failing to render.
1455
+ # @!attribute [rw] fill
1456
+ # @return [::Boolean]
1457
+ # Whether the icon renders as filled. Default value is false.
1458
+ #
1459
+ # To preview different icon settings, go to
1460
+ # [Google Font Icons](https://fonts.google.com/icons) and adjust the
1461
+ # settings under **Customize**.
1462
+ # @!attribute [rw] weight
1463
+ # @return [::Integer]
1464
+ # The stroke weight of the icon. Choose from {100, 200, 300, 400,
1465
+ # 500, 600, 700}. If absent, default value is 400. If any other value is
1466
+ # specified, the default value is used.
1467
+ #
1468
+ # To preview different icon settings, go to
1469
+ # [Google Font Icons](https://fonts.google.com/icons) and adjust the
1470
+ # settings under **Customize**.
1471
+ # @!attribute [rw] grade
1472
+ # @return [::Integer]
1473
+ # Weight and grade affect a symbol’s thickness. Adjustments to grade are more
1474
+ # granular than adjustments to weight and have a small impact on the size of
1475
+ # the symbol. Choose from \\{-25, 0, 200}. If absent, default value is 0. If
1476
+ # any other value is specified, the default value is used.
1477
+ #
1478
+ # To preview different icon settings, go to
1479
+ # [Google Font Icons](https://fonts.google.com/icons) and adjust the
1480
+ # settings under **Customize**.
1481
+ class MaterialIcon
1482
+ include ::Google::Protobuf::MessageExts
1483
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1484
+ end
1485
+
1486
+ # Represents the crop style applied to an image.
1487
+ #
1488
+ # [Google Workspace Add-ons and
1489
+ # Chat apps](https://developers.google.com/workspace/extend):
1490
+ #
1491
+ # For example, here's how to apply a 16:9 aspect ratio:
1492
+ #
1493
+ # ```
1494
+ # cropStyle {
1495
+ # "type": "RECTANGLE_CUSTOM",
1496
+ # "aspectRatio": 16/9
1497
+ # }
1498
+ # ```
1499
+ # @!attribute [rw] type
1500
+ # @return [::Google::Apps::Card::V1::ImageCropStyle::ImageCropType]
1501
+ # The crop type.
1502
+ # @!attribute [rw] aspect_ratio
1503
+ # @return [::Float]
1504
+ # The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`.
1505
+ #
1506
+ # For example, here's how to apply a 16:9 aspect ratio:
1507
+ #
1508
+ # ```
1509
+ # cropStyle {
1510
+ # "type": "RECTANGLE_CUSTOM",
1511
+ # "aspectRatio": 16/9
1512
+ # }
1513
+ # ```
1514
+ class ImageCropStyle
1515
+ include ::Google::Protobuf::MessageExts
1516
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1517
+
1518
+ # Represents the crop style applied to an image.
1519
+ #
1520
+ # [Google Workspace Add-ons
1521
+ # and Chat apps](https://developers.google.com/workspace/extend):
1522
+ module ImageCropType
1523
+ # Don't use. Unspecified.
1524
+ IMAGE_CROP_TYPE_UNSPECIFIED = 0
1525
+
1526
+ # Default value. Applies a square crop.
1527
+ SQUARE = 1
1528
+
1529
+ # Applies a circular crop.
1530
+ CIRCLE = 2
1531
+
1532
+ # Applies a rectangular crop with a custom aspect ratio. Set the custom
1533
+ # aspect ratio with `aspectRatio`.
1534
+ RECTANGLE_CUSTOM = 3
1535
+
1536
+ # Applies a rectangular crop with a 4:3 aspect ratio.
1537
+ RECTANGLE_4_3 = 4
1538
+ end
1539
+ end
1540
+
1541
+ # The style options for the border of a card or widget, including the border
1542
+ # type and color.
1543
+ #
1544
+ # [Google Workspace Add-ons and Chat
1545
+ # apps](https://developers.google.com/workspace/extend):
1546
+ # @!attribute [rw] type
1547
+ # @return [::Google::Apps::Card::V1::BorderStyle::BorderType]
1548
+ # The border type.
1549
+ # @!attribute [rw] stroke_color
1550
+ # @return [::Google::Type::Color]
1551
+ # The colors to use when the type is `BORDER_TYPE_STROKE`.
1552
+ # @!attribute [rw] corner_radius
1553
+ # @return [::Integer]
1554
+ # The corner radius for the border.
1555
+ class BorderStyle
1556
+ include ::Google::Protobuf::MessageExts
1557
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1558
+
1559
+ # Represents the border types applied to widgets.
1560
+ #
1561
+ # [Google Workspace Add-ons
1562
+ # and Chat apps](https://developers.google.com/workspace/extend):
1563
+ module BorderType
1564
+ # Don't use. Unspecified.
1565
+ BORDER_TYPE_UNSPECIFIED = 0
1566
+
1567
+ # Default value. No border.
1568
+ NO_BORDER = 1
1569
+
1570
+ # Outline.
1571
+ STROKE = 2
1572
+ end
1573
+ end
1574
+
1575
+ # Represents an image.
1576
+ #
1577
+ # [Google Workspace Add-ons and Chat
1578
+ # apps](https://developers.google.com/workspace/extend):
1579
+ # @!attribute [rw] image_uri
1580
+ # @return [::String]
1581
+ # The image URL.
1582
+ # @!attribute [rw] alt_text
1583
+ # @return [::String]
1584
+ # The accessibility label for the image.
1585
+ # @!attribute [rw] crop_style
1586
+ # @return [::Google::Apps::Card::V1::ImageCropStyle]
1587
+ # The crop style to apply to the image.
1588
+ # @!attribute [rw] border_style
1589
+ # @return [::Google::Apps::Card::V1::BorderStyle]
1590
+ # The border style to apply to the image.
1591
+ class ImageComponent
1592
+ include ::Google::Protobuf::MessageExts
1593
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1594
+ end
1595
+
1596
+ # Displays a grid with a collection of items. Items can only include text or
1597
+ # images. For responsive columns, or to include more than text or images, use
1598
+ # {::Google::Apps::Card::V1::Columns `Columns`}. For an example in Google Chat apps,
1599
+ # see [Display a Grid with a collection of
1600
+ # items](https://developers.google.com/workspace/chat/format-structure-card-dialog#display_a_grid_with_a_collection_of_items).
1601
+ #
1602
+ # A grid supports any number of columns and items. The number of rows is
1603
+ # determined by items divided by columns. A grid with
1604
+ # 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns
1605
+ # has 6 rows.
1606
+ #
1607
+ # [Google Workspace Add-ons and Chat
1608
+ # apps](https://developers.google.com/workspace/extend):
1609
+ #
1610
+ # For example, the following JSON creates a 2 column grid with a single
1611
+ # item:
1612
+ #
1613
+ # ```
1614
+ # "grid": {
1615
+ # "title": "A fine collection of items",
1616
+ # "columnCount": 2,
1617
+ # "borderStyle": {
1618
+ # "type": "STROKE",
1619
+ # "cornerRadius": 4
1620
+ # },
1621
+ # "items": [
1622
+ # {
1623
+ # "image": {
1624
+ # "imageUri": "https://www.example.com/image.png",
1625
+ # "cropStyle": {
1626
+ # "type": "SQUARE"
1627
+ # },
1628
+ # "borderStyle": {
1629
+ # "type": "STROKE"
1630
+ # }
1631
+ # },
1632
+ # "title": "An item",
1633
+ # "textAlignment": "CENTER"
1634
+ # }
1635
+ # ],
1636
+ # "onClick": {
1637
+ # "openLink": {
1638
+ # "url": "https://www.example.com"
1639
+ # }
1640
+ # }
1641
+ # }
1642
+ # ```
1643
+ # @!attribute [rw] title
1644
+ # @return [::String]
1645
+ # The text that displays in the grid header.
1646
+ # @!attribute [rw] items
1647
+ # @return [::Array<::Google::Apps::Card::V1::Grid::GridItem>]
1648
+ # The items to display in the grid.
1649
+ # @!attribute [rw] border_style
1650
+ # @return [::Google::Apps::Card::V1::BorderStyle]
1651
+ # The border style to apply to each grid item.
1652
+ # @!attribute [rw] column_count
1653
+ # @return [::Integer]
1654
+ # The number of columns to display in the grid. A default value
1655
+ # is used if this field isn't specified, and that default value is
1656
+ # different depending on where the grid is shown (dialog versus companion).
1657
+ # @!attribute [rw] on_click
1658
+ # @return [::Google::Apps::Card::V1::OnClick]
1659
+ # This callback is reused by each individual grid item, but with the
1660
+ # item's identifier and index in the items list added to the callback's
1661
+ # parameters.
1662
+ class Grid
1663
+ include ::Google::Protobuf::MessageExts
1664
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1665
+
1666
+ # Represents an item in a grid layout. Items can contain text, an image, or
1667
+ # both text and an image.
1668
+ #
1669
+ # [Google Workspace Add-ons and Chat
1670
+ # apps](https://developers.google.com/workspace/extend):
1671
+ # @!attribute [rw] id
1672
+ # @return [::String]
1673
+ # A user-specified identifier for this grid item. This identifier is
1674
+ # returned in the parent grid's `onClick` callback parameters.
1675
+ # @!attribute [rw] image
1676
+ # @return [::Google::Apps::Card::V1::ImageComponent]
1677
+ # The image that displays in the grid item.
1678
+ # @!attribute [rw] title
1679
+ # @return [::String]
1680
+ # The grid item's title.
1681
+ # @!attribute [rw] subtitle
1682
+ # @return [::String]
1683
+ # The grid item's subtitle.
1684
+ # @!attribute [rw] layout
1685
+ # @return [::Google::Apps::Card::V1::Grid::GridItem::GridItemLayout]
1686
+ # The layout to use for the grid item.
1687
+ class GridItem
1688
+ include ::Google::Protobuf::MessageExts
1689
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1690
+
1691
+ # Represents the various layout options available for a grid item.
1692
+ #
1693
+ # [Google Workspace Add-ons and Chat
1694
+ # apps](https://developers.google.com/workspace/extend):
1695
+ module GridItemLayout
1696
+ # Don't use. Unspecified.
1697
+ GRID_ITEM_LAYOUT_UNSPECIFIED = 0
1698
+
1699
+ # The title and subtitle are shown below the grid item's image.
1700
+ TEXT_BELOW = 1
1701
+
1702
+ # The title and subtitle are shown above the grid item's image.
1703
+ TEXT_ABOVE = 2
1704
+ end
1705
+ end
1706
+ end
1707
+
1708
+ # The `Columns` widget displays up to 2 columns in a card or dialog. You can
1709
+ # add widgets to each column; the widgets appear in the order that they are
1710
+ # specified. For an example in Google Chat apps, see
1711
+ # [Display cards and dialogs in
1712
+ # columns](https://developers.google.com/workspace/chat/format-structure-card-dialog#display_cards_and_dialogs_in_columns).
1713
+ #
1714
+ # The height of each column is determined by the taller column. For example, if
1715
+ # the first column is taller than the second column, both columns have the
1716
+ # height of the first column. Because each column can contain a different
1717
+ # number of widgets, you can't define rows or align widgets between the
1718
+ # columns.
1719
+ #
1720
+ # Columns are displayed side-by-side. You can customize the width of each
1721
+ # column using the `HorizontalSizeStyle` field. If the user's
1722
+ # screen width is too narrow, the second column wraps below the first:
1723
+ #
1724
+ # * On web, the second column wraps if the screen width is less than or equal
1725
+ # to 480 pixels.
1726
+ # * On iOS devices, the second column wraps if the screen width is
1727
+ # less than or equal to 300 pt.
1728
+ # * On Android devices, the second column wraps if the screen width is
1729
+ # less than or equal to 320 dp.
1730
+ #
1731
+ # To include more than 2 columns, or to use rows, use the
1732
+ # {::Google::Apps::Card::V1::Grid `Grid`} widget.
1733
+ #
1734
+ # [Google Workspace Add-ons and Chat
1735
+ # apps](https://developers.google.com/workspace/extend):
1736
+ # Columns for Google Workspace Add-ons are in
1737
+ # Developer Preview.
1738
+ # @!attribute [rw] column_items
1739
+ # @return [::Array<::Google::Apps::Card::V1::Columns::Column>]
1740
+ # An array of columns. You can include up to 2 columns in a card or dialog.
1741
+ class Columns
1742
+ include ::Google::Protobuf::MessageExts
1743
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1744
+
1745
+ # A column.
1746
+ #
1747
+ # [Google Workspace Add-ons and Chat
1748
+ # apps](https://developers.google.com/workspace/extend):
1749
+ # Columns for Google Workspace Add-ons are in
1750
+ # Developer Preview.
1751
+ # @!attribute [rw] horizontal_size_style
1752
+ # @return [::Google::Apps::Card::V1::Columns::Column::HorizontalSizeStyle]
1753
+ # Specifies how a column fills the width of the card.
1754
+ # @!attribute [rw] horizontal_alignment
1755
+ # @return [::Google::Apps::Card::V1::Widget::HorizontalAlignment]
1756
+ # Specifies whether widgets align to the left, right, or center of a
1757
+ # column.
1758
+ # @!attribute [rw] vertical_alignment
1759
+ # @return [::Google::Apps::Card::V1::Columns::Column::VerticalAlignment]
1760
+ # Specifies whether widgets align to the top, bottom, or center of a
1761
+ # column.
1762
+ # @!attribute [rw] widgets
1763
+ # @return [::Array<::Google::Apps::Card::V1::Columns::Column::Widgets>]
1764
+ # An array of widgets included in a column. Widgets appear in the order
1765
+ # that they are specified.
1766
+ class Column
1767
+ include ::Google::Protobuf::MessageExts
1768
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1769
+
1770
+ # The supported widgets that you can include in a column.
1771
+ #
1772
+ # [Google Workspace Add-ons and Chat
1773
+ # apps](https://developers.google.com/workspace/extend):
1774
+ # Columns for Google Workspace Add-ons are in
1775
+ # Developer Preview.
1776
+ # @!attribute [rw] text_paragraph
1777
+ # @return [::Google::Apps::Card::V1::TextParagraph]
1778
+ # {::Google::Apps::Card::V1::TextParagraph TextParagraph} widget.
1779
+ # @!attribute [rw] image
1780
+ # @return [::Google::Apps::Card::V1::Image]
1781
+ # {::Google::Apps::Card::V1::Image Image} widget.
1782
+ # @!attribute [rw] decorated_text
1783
+ # @return [::Google::Apps::Card::V1::DecoratedText]
1784
+ # {::Google::Apps::Card::V1::DecoratedText DecoratedText} widget.
1785
+ # @!attribute [rw] button_list
1786
+ # @return [::Google::Apps::Card::V1::ButtonList]
1787
+ # {::Google::Apps::Card::V1::ButtonList ButtonList} widget.
1788
+ # @!attribute [rw] text_input
1789
+ # @return [::Google::Apps::Card::V1::TextInput]
1790
+ # {::Google::Apps::Card::V1::TextInput TextInput} widget.
1791
+ # @!attribute [rw] selection_input
1792
+ # @return [::Google::Apps::Card::V1::SelectionInput]
1793
+ # {::Google::Apps::Card::V1::SelectionInput SelectionInput} widget.
1794
+ # @!attribute [rw] date_time_picker
1795
+ # @return [::Google::Apps::Card::V1::DateTimePicker]
1796
+ # {::Google::Apps::Card::V1::DateTimePicker DateTimePicker} widget.
1797
+ class Widgets
1798
+ include ::Google::Protobuf::MessageExts
1799
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1800
+ end
1801
+
1802
+ # Specifies how a column fills the width of the card. The width of each
1803
+ # column depends on both the `HorizontalSizeStyle` and the width of the
1804
+ # widgets within the column.
1805
+ #
1806
+ # [Google Workspace Add-ons and Chat
1807
+ # apps](https://developers.google.com/workspace/extend):
1808
+ # Columns for Google Workspace Add-ons are in
1809
+ # Developer Preview.
1810
+ module HorizontalSizeStyle
1811
+ # Don't use. Unspecified.
1812
+ HORIZONTAL_SIZE_STYLE_UNSPECIFIED = 0
1813
+
1814
+ # Default value. Column fills the available space, up to 70% of the
1815
+ # card's width. If both columns are set to `FILL_AVAILABLE_SPACE`, each
1816
+ # column fills 50% of the space.
1817
+ FILL_AVAILABLE_SPACE = 1
1818
+
1819
+ # Column fills the least amount of space possible and no more than 30% of
1820
+ # the card's width.
1821
+ FILL_MINIMUM_SPACE = 2
1822
+ end
1823
+
1824
+ # Specifies whether widgets align to the top, bottom, or center of a
1825
+ # column.
1826
+ #
1827
+ # [Google Workspace Add-ons and Chat
1828
+ # apps](https://developers.google.com/workspace/extend):
1829
+ # Columns for Google Workspace Add-ons are in
1830
+ # Developer Preview.
1831
+ module VerticalAlignment
1832
+ # Don't use. Unspecified.
1833
+ VERTICAL_ALIGNMENT_UNSPECIFIED = 0
1834
+
1835
+ # Default value. Aligns widgets to the center of a column.
1836
+ CENTER = 1
1837
+
1838
+ # Aligns widgets to the top of a column.
1839
+ TOP = 2
1840
+
1841
+ # Aligns widgets to the bottom of a column.
1842
+ BOTTOM = 3
1843
+ end
1844
+ end
1845
+ end
1846
+
1847
+ # Represents how to respond when users click an interactive element on
1848
+ # a card, such as a button.
1849
+ #
1850
+ # [Google Workspace Add-ons and Chat
1851
+ # apps](https://developers.google.com/workspace/extend):
1852
+ # @!attribute [rw] action
1853
+ # @return [::Google::Apps::Card::V1::Action]
1854
+ # If specified, an action is triggered by this `onClick`.
1855
+ # @!attribute [rw] open_link
1856
+ # @return [::Google::Apps::Card::V1::OpenLink]
1857
+ # If specified, this `onClick` triggers an open link action.
1858
+ # @!attribute [rw] open_dynamic_link_action
1859
+ # @return [::Google::Apps::Card::V1::Action]
1860
+ # An add-on triggers this action when the action needs to open a
1861
+ # link. This differs from the `open_link` above in that this needs to talk
1862
+ # to server to get the link. Thus some preparation work is required for
1863
+ # web client to do before the open link action response comes back.
1864
+ #
1865
+ # [Google Workspace
1866
+ # Add-ons](https://developers.google.com/workspace/add-ons):
1867
+ # @!attribute [rw] card
1868
+ # @return [::Google::Apps::Card::V1::Card]
1869
+ # A new card is pushed to the card stack after clicking if specified.
1870
+ #
1871
+ # [Google Workspace
1872
+ # Add-ons](https://developers.google.com/workspace/add-ons):
1873
+ class OnClick
1874
+ include ::Google::Protobuf::MessageExts
1875
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1876
+ end
1877
+
1878
+ # Represents an `onClick` event that opens a hyperlink.
1879
+ #
1880
+ # [Google Workspace Add-ons and Chat
1881
+ # apps](https://developers.google.com/workspace/extend):
1882
+ # @!attribute [rw] url
1883
+ # @return [::String]
1884
+ # The URL to open.
1885
+ # @!attribute [rw] open_as
1886
+ # @return [::Google::Apps::Card::V1::OpenLink::OpenAs]
1887
+ # How to open a link.
1888
+ #
1889
+ # [Google Workspace
1890
+ # Add-ons](https://developers.google.com/workspace/add-ons):
1891
+ # @!attribute [rw] on_close
1892
+ # @return [::Google::Apps::Card::V1::OpenLink::OnClose]
1893
+ # Whether the client forgets about a link after opening it, or observes it
1894
+ # until the window closes.
1895
+ #
1896
+ # [Google Workspace
1897
+ # Add-ons](https://developers.google.com/workspace/add-ons):
1898
+ class OpenLink
1899
+ include ::Google::Protobuf::MessageExts
1900
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1901
+
1902
+ # When an `OnClick` action opens a link, then the client can either open it
1903
+ # as a full-size window (if that's the frame used by the client), or an
1904
+ # overlay (such as a pop-up). The implementation depends on the client
1905
+ # platform capabilities, and the value selected might be ignored if the
1906
+ # client doesn't support it. `FULL_SIZE` is supported by all clients.
1907
+ #
1908
+ # [Google Workspace
1909
+ # Add-ons](https://developers.google.com/workspace/add-ons):
1910
+ module OpenAs
1911
+ # The link opens as a full-size window (if that's the frame used by the
1912
+ # client).
1913
+ FULL_SIZE = 0
1914
+
1915
+ # The link opens as an overlay, such as a pop-up.
1916
+ OVERLAY = 1
1917
+ end
1918
+
1919
+ # What the client does when a link opened by an `OnClick` action is closed.
1920
+ #
1921
+ # Implementation depends on client platform capabilities. For example, a web
1922
+ # browser might open a link in a pop-up window with an `OnClose` handler.
1923
+ #
1924
+ # If both `OnOpen` and `OnClose` handlers are set, and the client platform
1925
+ # can't support both values, `OnClose` takes precedence.
1926
+ #
1927
+ # [Google Workspace
1928
+ # Add-ons](https://developers.google.com/workspace/add-ons):
1929
+ module OnClose
1930
+ # Default value. The card doesn't reload; nothing happens.
1931
+ NOTHING = 0
1932
+
1933
+ # Reloads the card after the child window closes.
1934
+ #
1935
+ # If used in conjunction with
1936
+ # [`OpenAs.OVERLAY`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#openas),
1937
+ # the child window acts as a modal dialog and the parent card is blocked
1938
+ # until the child window closes.
1939
+ RELOAD = 1
1940
+ end
1941
+ end
1942
+
1943
+ # An action that describes the behavior when the form is submitted.
1944
+ # For example, you can invoke an Apps Script script to handle the form.
1945
+ # If the action is triggered, the form values are sent to the server.
1946
+ #
1947
+ # [Google Workspace Add-ons and Chat
1948
+ # apps](https://developers.google.com/workspace/extend):
1949
+ # @!attribute [rw] function
1950
+ # @return [::String]
1951
+ # A custom function to invoke when the containing element is
1952
+ # clicked or othrwise activated.
1953
+ #
1954
+ # For example usage, see [Read form
1955
+ # data](https://developers.google.com/workspace/chat/read-form-data).
1956
+ # @!attribute [rw] parameters
1957
+ # @return [::Array<::Google::Apps::Card::V1::Action::ActionParameter>]
1958
+ # List of action parameters.
1959
+ # @!attribute [rw] load_indicator
1960
+ # @return [::Google::Apps::Card::V1::Action::LoadIndicator]
1961
+ # Specifies the loading indicator that the action displays while
1962
+ # making the call to the action.
1963
+ # @!attribute [rw] persist_values
1964
+ # @return [::Boolean]
1965
+ # Indicates whether form values persist after the action. The default value
1966
+ # is `false`.
1967
+ #
1968
+ # If `true`, form values remain after the action is triggered. To let the
1969
+ # user make changes while the action is being processed, set
1970
+ # [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator)
1971
+ # to `NONE`. For [card
1972
+ # messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/create#create)
1973
+ # in Chat apps, you must also set the action's
1974
+ # [`ResponseType`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#responsetype)
1975
+ # to `UPDATE_MESSAGE` and use the same
1976
+ # [`card_id`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#CardWithId)
1977
+ # from the card that contained the action.
1978
+ #
1979
+ # If `false`, the form values are cleared when the action is triggered.
1980
+ # To prevent the user from making changes while the action is being
1981
+ # processed, set
1982
+ # [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator)
1983
+ # to `SPINNER`.
1984
+ # @!attribute [rw] interaction
1985
+ # @return [::Google::Apps::Card::V1::Action::Interaction]
1986
+ # Optional. Required when opening a
1987
+ # [dialog](https://developers.google.com/workspace/chat/dialogs).
1988
+ #
1989
+ # What to do in response to an interaction with a user, such as a user
1990
+ # clicking a button in a card message.
1991
+ #
1992
+ # If unspecified, the app responds by executing an `action`—like opening a
1993
+ # link or running a function—as normal.
1994
+ #
1995
+ # By specifying an `interaction`, the app can respond in special interactive
1996
+ # ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can
1997
+ # open a [dialog](https://developers.google.com/workspace/chat/dialogs). When
1998
+ # specified, a loading indicator isn't shown. If specified for
1999
+ # an add-on, the entire card is stripped and nothing is shown in the client.
2000
+ #
2001
+ # [Google Chat apps](https://developers.google.com/workspace/chat):
2002
+ class Action
2003
+ include ::Google::Protobuf::MessageExts
2004
+ extend ::Google::Protobuf::MessageExts::ClassMethods
2005
+
2006
+ # List of string parameters to supply when the action method is invoked.
2007
+ # For example, consider three snooze buttons: snooze now, snooze one day,
2008
+ # or snooze next week. You might use `action method = snooze()`, passing the
2009
+ # snooze type and snooze time in the list of string parameters.
2010
+ #
2011
+ # To learn more, see
2012
+ # [`CommonEventObject`](https://developers.google.com/workspace/chat/api/reference/rest/v1/Event#commoneventobject).
2013
+ #
2014
+ # [Google Workspace Add-ons and Chat
2015
+ # apps](https://developers.google.com/workspace/extend):
2016
+ # @!attribute [rw] key
2017
+ # @return [::String]
2018
+ # The name of the parameter for the action script.
2019
+ # @!attribute [rw] value
2020
+ # @return [::String]
2021
+ # The value of the parameter.
2022
+ class ActionParameter
2023
+ include ::Google::Protobuf::MessageExts
2024
+ extend ::Google::Protobuf::MessageExts::ClassMethods
2025
+ end
2026
+
2027
+ # Specifies the loading indicator that the action displays while
2028
+ # making the call to the action.
2029
+ #
2030
+ # [Google Workspace Add-ons and Chat
2031
+ # apps](https://developers.google.com/workspace/extend):
2032
+ module LoadIndicator
2033
+ # Displays a spinner to indicate that content is loading.
2034
+ SPINNER = 0
2035
+
2036
+ # Nothing is displayed.
2037
+ NONE = 1
2038
+ end
2039
+
2040
+ # Optional. Required when opening a
2041
+ # [dialog](https://developers.google.com/workspace/chat/dialogs).
2042
+ #
2043
+ # What to do in response to an interaction with a user, such as a user
2044
+ # clicking a button in a card message.
2045
+ #
2046
+ # If unspecified, the app responds by executing an `action`—like opening a
2047
+ # link or running a function—as normal.
2048
+ #
2049
+ # By specifying an `interaction`, the app can respond in special interactive
2050
+ # ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can
2051
+ # open a [dialog](https://developers.google.com/workspace/chat/dialogs).
2052
+ #
2053
+ # When specified, a loading indicator isn't shown. If specified for
2054
+ # an add-on, the entire card is stripped and nothing is shown in the client.
2055
+ #
2056
+ # [Google Chat apps](https://developers.google.com/workspace/chat):
2057
+ module Interaction
2058
+ # Default value. The `action` executes as normal.
2059
+ INTERACTION_UNSPECIFIED = 0
2060
+
2061
+ # Opens a [dialog](https://developers.google.com/workspace/chat/dialogs), a
2062
+ # windowed, card-based interface that Chat apps use to interact with users.
2063
+ #
2064
+ # Only supported by Chat apps in response to button-clicks on card
2065
+ # messages. If specified for
2066
+ # an add-on, the entire card is stripped and nothing is shown in the
2067
+ # client.
2068
+ #
2069
+ # [Google Chat apps](https://developers.google.com/workspace/chat):
2070
+ OPEN_DIALOG = 1
2071
+ end
2072
+ end
2073
+ end
2074
+ end
2075
+ end
2076
+ end