@google-apps/chat 0.19.1 → 0.20.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.
@@ -27,7 +27,7 @@ option php_namespace = "Google\\Apps\\Card\\V1";
27
27
  option ruby_package = "Google::Apps::Card::V1";
28
28
 
29
29
  // A card interface displayed in a Google Chat message or Google Workspace
30
- // Add-on.
30
+ // add-on.
31
31
  //
32
32
  // Cards support a defined layout, interactive UI elements like buttons, and
33
33
  // rich media like images. Use cards to present detailed information,
@@ -40,9 +40,13 @@ option ruby_package = "Google::Apps::Card::V1";
40
40
  //
41
41
  // * For Google Chat apps, see [Design the components of a card or
42
42
  // dialog](https://developers.google.com/workspace/chat/design-components-card-dialog).
43
- // * For Google Workspace Add-ons, see [Card-based
43
+ // * For Google Workspace add-ons, see [Card-based
44
44
  // interfaces](https://developers.google.com/apps-script/add-ons/concepts/cards).
45
45
  //
46
+ // Note: You can add up to 100 widgets per card. Any widgets beyond this
47
+ // limit are ignored. This limit applies to both card messages and dialogs
48
+ // in Google Chat apps, and to cards in Google Workspace add-ons.
49
+ //
46
50
  // **Example: Card message for a Google Chat app**
47
51
  //
48
52
  // ![Example contact
@@ -134,7 +138,7 @@ message Card {
134
138
  // Represents a card header. For an example in Google Chat apps, see [Add a
135
139
  // header](https://developers.google.com/workspace/chat/design-components-card-dialog#add_a_header).
136
140
  //
137
- // [Google Workspace Add-ons and Chat
141
+ // [Google Workspace add-ons and Chat
138
142
  // apps](https://developers.google.com/workspace/extend):
139
143
  message CardHeader {
140
144
  // Required. The title of the card header.
@@ -149,7 +153,7 @@ message Card {
149
153
 
150
154
  // The shape used to crop the image.
151
155
  //
152
- // [Google Workspace Add-ons and Chat
156
+ // [Google Workspace add-ons and Chat
153
157
  // apps](https://developers.google.com/workspace/extend):
154
158
  Widget.ImageType image_type = 3;
155
159
 
@@ -163,7 +167,7 @@ message Card {
163
167
  // A section contains a collection of widgets that are rendered
164
168
  // vertically in the order that they're specified.
165
169
  //
166
- // [Google Workspace Add-ons and Chat
170
+ // [Google Workspace add-ons and Chat
167
171
  // apps](https://developers.google.com/workspace/extend):
168
172
  message Section {
169
173
  // Text that appears at the top of a section.
@@ -174,7 +178,7 @@ message Card {
174
178
  // and
175
179
  // [Formatting
176
180
  // text in Google Workspace
177
- // Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
181
+ // add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
178
182
  string header = 1;
179
183
 
180
184
  // All the widgets in the section.
@@ -200,21 +204,27 @@ message Card {
200
204
  // by default. The `uncollapsibleWidgetsCount` is taken into account only
201
205
  // when `collapsible` is `true`.
202
206
  int32 uncollapsible_widgets_count = 6;
207
+
208
+ // Optional. Define the expand and collapse button of the section.
209
+ // This button will be shown only if the section is collapsible.
210
+ // If this field isn't set, the default button is used.
211
+ CollapseControl collapse_control = 8;
203
212
  }
204
213
 
205
214
  // The divider style of a card. Currently only used for dividers betweens card
206
215
  // sections.
207
216
  //
208
- // [Google Workspace Add-ons and Chat
217
+ // [Google Workspace add-ons and Chat
209
218
  // apps](https://developers.google.com/workspace/extend):
210
219
  enum DividerStyle {
211
220
  // Don't use. Unspecified.
212
221
  DIVIDER_STYLE_UNSPECIFIED = 0;
213
222
 
214
- // Default option. Render a solid divider between sections.
223
+ // Default option. Render a solid divider.
215
224
  SOLID_DIVIDER = 1;
216
225
 
217
- // If set, no divider is rendered between sections.
226
+ // If set, no divider is rendered. This style completely removes the divider
227
+ // from the layout. The result is equivalent to not adding a divider at all.
218
228
  NO_DIVIDER = 2;
219
229
  }
220
230
 
@@ -223,7 +233,7 @@ message Card {
223
233
  // invoice, or open the invoice in a browser.
224
234
  //
225
235
  // [Google Workspace
226
- // Add-ons](https://developers.google.com/workspace/add-ons):
236
+ // add-ons](https://developers.google.com/workspace/add-ons):
227
237
  message CardAction {
228
238
  // The label that displays as the action menu item.
229
239
  string action_label = 1;
@@ -232,6 +242,22 @@ message Card {
232
242
  OnClick on_click = 2;
233
243
  }
234
244
 
245
+ // A list of widgets that can be displayed in a containing layout, such
246
+ // as a `CarouselCard`.
247
+ // [Google Chat apps](https://developers.google.com/workspace/chat):
248
+ message NestedWidget {
249
+ oneof data {
250
+ // A text paragraph widget.
251
+ TextParagraph text_paragraph = 1;
252
+
253
+ // A button list widget.
254
+ ButtonList button_list = 3;
255
+
256
+ // An image widget.
257
+ Image image = 10;
258
+ }
259
+ }
260
+
235
261
  // A persistent (sticky) footer that that appears at the bottom of the card.
236
262
  //
237
263
  // Setting `fixedFooter` without specifying a `primaryButton` or a
@@ -244,7 +270,7 @@ message Card {
244
270
  // For an example in Google Chat apps, see [Add a persistent
245
271
  // footer](https://developers.google.com/workspace/chat/design-components-card-dialog#add_a_persistent_footer).
246
272
  //
247
- // [Google Workspace Add-ons and Chat
273
+ // [Google Workspace add-ons and Chat
248
274
  // apps](https://developers.google.com/workspace/extend):
249
275
  message CardFixedFooter {
250
276
  // The primary button of the fixed footer. The button must be a text button
@@ -257,11 +283,11 @@ message Card {
257
283
  Button secondary_button = 2;
258
284
  }
259
285
 
260
- // In Google Workspace Add-ons,
286
+ // In Google Workspace add-ons,
261
287
  // determines how a card is displayed.
262
288
  //
263
289
  // [Google Workspace
264
- // Add-ons](https://developers.google.com/workspace/add-ons):
290
+ // add-ons](https://developers.google.com/workspace/add-ons):
265
291
  enum DisplayStyle {
266
292
  // Don't use. Unspecified.
267
293
  DISPLAY_STYLE_UNSPECIFIED = 0;
@@ -287,13 +313,13 @@ message Card {
287
313
  // card](https://developers.google.com/workspace/chat/design-components-card-dialog#define_a_section_of_a_card).
288
314
  repeated Section sections = 2;
289
315
 
290
- // The divider style between sections.
316
+ // The divider style between the header, sections and footer.
291
317
  DividerStyle section_divider_style = 9;
292
318
 
293
319
  // The card's actions. Actions are added to the card's toolbar menu.
294
320
  //
295
321
  // [Google Workspace
296
- // Add-ons](https://developers.google.com/workspace/add-ons):
322
+ // add-ons](https://developers.google.com/workspace/add-ons):
297
323
  //
298
324
  // For example, the following JSON constructs a card action menu with
299
325
  // `Settings` and `Send Feedback` options:
@@ -330,7 +356,7 @@ message Card {
330
356
  // Name of the card. Used as a card identifier in card navigation.
331
357
  //
332
358
  // [Google Workspace
333
- // Add-ons](https://developers.google.com/workspace/add-ons):
359
+ // add-ons](https://developers.google.com/workspace/add-ons):
334
360
  string name = 4;
335
361
 
336
362
  // The fixed footer shown at the bottom of this card.
@@ -342,15 +368,15 @@ message Card {
342
368
  // [card
343
369
  // messages](https://developers.google.com/workspace/chat/create-messages#create).
344
370
  //
345
- // [Google Workspace Add-ons and Chat
371
+ // [Google Workspace add-ons and Chat
346
372
  // apps](https://developers.google.com/workspace/extend):
347
373
  CardFixedFooter fixed_footer = 5;
348
374
 
349
- // In Google Workspace Add-ons, sets the display properties of the
375
+ // In Google Workspace add-ons, sets the display properties of the
350
376
  // `peekCardHeader`.
351
377
  //
352
378
  // [Google Workspace
353
- // Add-ons](https://developers.google.com/workspace/add-ons):
379
+ // add-ons](https://developers.google.com/workspace/add-ons):
354
380
  DisplayStyle display_style = 6;
355
381
 
356
382
  // When displaying contextual content, the peek card header acts as a
@@ -358,7 +384,7 @@ message Card {
358
384
  // cards and the contextual cards.
359
385
  //
360
386
  // [Google Workspace
361
- // Add-ons](https://developers.google.com/workspace/add-ons):
387
+ // add-ons](https://developers.google.com/workspace/add-ons):
362
388
  CardHeader peek_card_header = 7;
363
389
  }
364
390
 
@@ -369,7 +395,7 @@ message Card {
369
395
  message Widget {
370
396
  // The shape used to crop the image.
371
397
  //
372
- // [Google Workspace Add-ons and Chat
398
+ // [Google Workspace add-ons and Chat
373
399
  // apps](https://developers.google.com/workspace/extend):
374
400
  enum ImageType {
375
401
  // Default value. Applies a square mask to the image. For example, a 4x3
@@ -402,6 +428,21 @@ message Widget {
402
428
  END = 3;
403
429
  }
404
430
 
431
+ // Represents vertical alignment attribute.
432
+ enum VerticalAlignment {
433
+ // Unspecified type. Do not use.
434
+ VERTICAL_ALIGNMENT_UNSPECIFIED = 0;
435
+
436
+ // Alignment to the top position.
437
+ TOP = 1;
438
+
439
+ // Alignment to the middle position.
440
+ MIDDLE = 2;
441
+
442
+ // Alignment to the bottom position.
443
+ BOTTOM = 3;
444
+ }
445
+
405
446
  // A widget can only have one of the following items. You can use multiple
406
447
  // widget fields to display more items.
407
448
  oneof data {
@@ -412,7 +453,7 @@ message Widget {
412
453
  // and
413
454
  // [Formatting
414
455
  // text in Google Workspace
415
- // Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
456
+ // add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
416
457
  //
417
458
  // For example, the following JSON creates a bolded text:
418
459
  // ```
@@ -470,7 +511,6 @@ message Widget {
470
511
  // "red": 0,
471
512
  // "green": 0,
472
513
  // "blue": 1,
473
- // "alpha": 1
474
514
  // },
475
515
  // "disabled": true,
476
516
  // },
@@ -576,7 +616,7 @@ message Widget {
576
616
  // "name": "appointment_time",
577
617
  // "label": "Book your appointment at:",
578
618
  // "type": "DATE_AND_TIME",
579
- // "valueMsEpoch": "796435200000"
619
+ // "valueMsEpoch": 796435200000
580
620
  // }
581
621
  // ```
582
622
  DateTimePicker date_time_picker = 7;
@@ -597,7 +637,7 @@ message Widget {
597
637
  // of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11
598
638
  // items and 2 columns has 6 rows.
599
639
  //
600
- // [Google Workspace Add-ons and
640
+ // [Google Workspace add-ons and
601
641
  // Chat apps](https://developers.google.com/workspace/extend):
602
642
  //
603
643
  // For example, the following JSON creates a 2 column grid with a single
@@ -673,6 +713,56 @@ message Widget {
673
713
  // }
674
714
  // ```
675
715
  Columns columns = 11;
716
+
717
+ // A carousel contains a collection of nested widgets.
718
+ // For example, this is a JSON representation of a carousel that contains
719
+ // two text paragraphs.
720
+ //
721
+ // ```
722
+ // {
723
+ // "widgets": [
724
+ // {
725
+ // "textParagraph": {
726
+ // "text": "First text paragraph in the carousel."
727
+ // }
728
+ // },
729
+ // {
730
+ // "textParagraph": {
731
+ // "text": "Second text paragraph in the carousel."
732
+ // }
733
+ // }
734
+ // ]
735
+ // }
736
+ // ```
737
+ Carousel carousel = 13;
738
+
739
+ // A list of chips.
740
+ //
741
+ // For example, the following JSON creates two chips. The first
742
+ // is a text chip and the second is an icon chip that opens a
743
+ // link:
744
+ // ```
745
+ // "chipList": {
746
+ // "chips": [
747
+ // {
748
+ // "text": "Edit",
749
+ // "disabled": true,
750
+ // },
751
+ // {
752
+ // "icon": {
753
+ // "knownIcon": "INVITE",
754
+ // "altText": "check calendar"
755
+ // },
756
+ // "onClick": {
757
+ // "openLink": {
758
+ // "url": "https://example.com/calendar"
759
+ // }
760
+ // }
761
+ // }
762
+ // ]
763
+ // }
764
+ // ```
765
+ ChipList chip_list = 14;
676
766
  }
677
767
 
678
768
  // Specifies whether widgets align to the left, right, or center of a column.
@@ -689,20 +779,49 @@ message Widget {
689
779
  // and
690
780
  // [Formatting
691
781
  // text in Google Workspace
692
- // Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
782
+ // add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
693
783
  //
694
- // [Google Workspace Add-ons and
784
+ // [Google Workspace add-ons and
695
785
  // Chat apps](https://developers.google.com/workspace/extend):
696
786
  message TextParagraph {
787
+ // Syntax to use for formatting text.
788
+ //
789
+ // [Google Chat apps](https://developers.google.com/workspace/chat):
790
+ enum TextSyntax {
791
+ // The text is rendered as HTML if unspecified.
792
+ TEXT_SYNTAX_UNSPECIFIED = 0;
793
+
794
+ // The text is rendered as HTML. This is the default value.
795
+ HTML = 1;
796
+
797
+ // The text is rendered as Markdown.
798
+ MARKDOWN = 2;
799
+ }
800
+
697
801
  // The text that's shown in the widget.
698
802
  string text = 1;
803
+
804
+ // The maximum number of lines of text that are displayed in the widget. If
805
+ // the text exceeds the specified maximum number of lines, the excess
806
+ // content is concealed behind a **show more** button. If the text is equal or
807
+ // shorter than the specified maximum number of lines, a **show more** button
808
+ // isn't displayed.
809
+ //
810
+ // The default value is 0, in which case
811
+ // all context is displayed. Negative values are ignored.
812
+ int32 max_lines = 2;
813
+
814
+ // The syntax of the text. If not set, the text is rendered as HTML.
815
+ //
816
+ // [Google Chat apps](https://developers.google.com/workspace/chat):
817
+ TextSyntax text_syntax = 4;
699
818
  }
700
819
 
701
820
  // An image that is specified by a URL and can have an `onClick` action. For an
702
821
  // example, see [Add an
703
822
  // image](https://developers.google.com/workspace/chat/add-text-image-card-dialog#add_an_image).
704
823
  //
705
- // [Google Workspace Add-ons and Chat
824
+ // [Google Workspace add-ons and Chat
706
825
  // apps](https://developers.google.com/workspace/extend):
707
826
  message Image {
708
827
  // The HTTPS URL that hosts the image.
@@ -726,7 +845,7 @@ message Image {
726
845
  // [Add a horizontal divider between
727
846
  // widgets](https://developers.google.com/workspace/chat/format-structure-card-dialog#add_a_horizontal_divider_between_widgets).
728
847
  //
729
- // [Google Workspace Add-ons and Chat
848
+ // [Google Workspace add-ons and Chat
730
849
  // apps](https://developers.google.com/workspace/extend):
731
850
  //
732
851
  // For example, the following JSON creates a divider:
@@ -742,19 +861,19 @@ message Divider {}
742
861
  // Google Chat apps, see [Display text with decorative
743
862
  // text](https://developers.google.com/workspace/chat/add-text-image-card-dialog#display_text_with_decorative_elements).
744
863
  //
745
- // [Google Workspace Add-ons and Chat
864
+ // [Google Workspace add-ons and Chat
746
865
  // apps](https://developers.google.com/workspace/extend):
747
866
  message DecoratedText {
748
867
  // Either a toggle-style switch or a checkbox inside a `decoratedText` widget.
749
868
  //
750
- // [Google Workspace Add-ons and Chat
869
+ // [Google Workspace add-ons and Chat
751
870
  // apps](https://developers.google.com/workspace/extend):
752
871
  //
753
872
  // Only supported in the `decoratedText` widget.
754
873
  message SwitchControl {
755
874
  // How the switch appears in the user interface.
756
875
  //
757
- // [Google Workspace Add-ons
876
+ // [Google Workspace add-ons
758
877
  // and Chat apps](https://developers.google.com/workspace/extend):
759
878
  enum ControlType {
760
879
  // A toggle-style switch.
@@ -788,7 +907,7 @@ message DecoratedText {
788
907
 
789
908
  // How the switch appears in the user interface.
790
909
  //
791
- // [Google Workspace Add-ons
910
+ // [Google Workspace add-ons
792
911
  // and Chat apps](https://developers.google.com/workspace/extend):
793
912
  ControlType control_type = 5;
794
913
  }
@@ -799,9 +918,21 @@ message DecoratedText {
799
918
  // The icon displayed in front of the text.
800
919
  Icon start_icon = 12;
801
920
 
921
+ // Optional. Vertical alignment of the start icon. If not set, the icon
922
+ // will be vertically centered.
923
+ //
924
+ // [Google Chat apps](https://developers.google.com/workspace/chat):
925
+ Widget.VerticalAlignment start_icon_vertical_alignment = 13;
926
+
802
927
  // The text that appears above `text`. Always truncates.
803
928
  string top_label = 3;
804
929
 
930
+ // `TextParagraph` equivalent of `top_label`. Always truncates. Allows for
931
+ // more complex formatting than `top_label`.
932
+ //
933
+ // [Google Chat apps](https://developers.google.com/workspace/chat):
934
+ TextParagraph top_label_text = 17;
935
+
805
936
  // Required. The primary text.
806
937
  //
807
938
  // Supports simple formatting. For more information
@@ -811,9 +942,15 @@ message DecoratedText {
811
942
  // and
812
943
  // [Formatting
813
944
  // text in Google Workspace
814
- // Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
945
+ // add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
815
946
  string text = 4;
816
947
 
948
+ // `TextParagraph` equivalent of `text`. Allows for more complex formatting
949
+ // than `text`.
950
+ //
951
+ // [Google Chat apps](https://developers.google.com/workspace/chat):
952
+ TextParagraph content_text = 18;
953
+
817
954
  // The wrap text setting. If `true`, the text wraps and displays on
818
955
  // multiple lines. Otherwise, the text is truncated.
819
956
  //
@@ -823,6 +960,12 @@ message DecoratedText {
823
960
  // The text that appears below `text`. Always wraps.
824
961
  string bottom_label = 6;
825
962
 
963
+ // `TextParagraph` equivalent of `bottom_label`. Always wraps. Allows for
964
+ // more complex formatting than `bottom_label`.
965
+ //
966
+ // [Google Chat apps](https://developers.google.com/workspace/chat):
967
+ TextParagraph bottom_label_text = 19;
968
+
826
969
  // This action is triggered when users click `topLabel` or `bottomLabel`.
827
970
  OnClick on_click = 7;
828
971
 
@@ -848,8 +991,11 @@ message DecoratedText {
848
991
  }
849
992
 
850
993
  // A field in which users can enter text. Supports suggestions and on-change
851
- // actions. For an example in Google Chat apps, see [Add a field in which a user
852
- // can enter
994
+ // actions.
995
+ // Supports form submission validation. When `Action.all_widgets_are_required`
996
+ // is set to `true` or this widget is specified in `Action.required_widgets`,
997
+ // the submission action is blocked unless a value is entered. For an example in
998
+ // Google Chat apps, see [Add a field in which a user can enter
853
999
  // text](https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_field_in_which_a_user_can_enter_text).
854
1000
  //
855
1001
  // Chat apps receive and can process the value of entered text during form input
@@ -860,7 +1006,7 @@ message DecoratedText {
860
1006
  // use a text input. To collect defined or enumerated data from users, use the
861
1007
  // [SelectionInput][google.apps.card.v1.SelectionInput] widget.
862
1008
  //
863
- // [Google Workspace Add-ons and Chat
1009
+ // [Google Workspace add-ons and Chat
864
1010
  // apps](https://developers.google.com/workspace/extend):
865
1011
  message TextInput {
866
1012
  // How a text input field appears in the user interface. For example,
@@ -868,7 +1014,7 @@ message TextInput {
868
1014
  // `initialSuggestions` is specified, `type` is always `SINGLE_LINE`,
869
1015
  // even if it's set to `MULTIPLE_LINE`.
870
1016
  //
871
- // [Google Workspace Add-ons and Chat
1017
+ // [Google Workspace add-ons and Chat
872
1018
  // apps](https://developers.google.com/workspace/extend):
873
1019
  enum Type {
874
1020
  // The text input field has a fixed height of one line.
@@ -934,7 +1080,7 @@ message TextInput {
934
1080
  // to `MULTIPLE_LINE`.
935
1081
  //
936
1082
  // [Google Workspace
937
- // Add-ons and Chat apps](https://developers.google.com/workspace/extend):
1083
+ // add-ons and Chat apps](https://developers.google.com/workspace/extend):
938
1084
  Suggestions initial_suggestions = 7;
939
1085
 
940
1086
  // Optional. Specify what action to take when the text input field provides
@@ -947,9 +1093,15 @@ message TextInput {
947
1093
  // a custom function.
948
1094
  //
949
1095
  // [Google Workspace
950
- // Add-ons](https://developers.google.com/workspace/add-ons):
1096
+ // add-ons](https://developers.google.com/workspace/add-ons):
951
1097
  Action auto_complete_action = 8;
952
1098
 
1099
+ // Specify the input format validation necessary for this text field.
1100
+ //
1101
+ // [Google Workspace add-ons and Chat
1102
+ // apps](https://developers.google.com/workspace/extend):
1103
+ Validation validation = 11;
1104
+
953
1105
  // Text that appears in the text input field when the field is empty.
954
1106
  // Use this text to prompt users to enter a value. For example, `Enter a
955
1107
  // number from 0 to 100`.
@@ -975,11 +1127,11 @@ message TextInput {
975
1127
  // to `MULTIPLE_LINE`.
976
1128
  //
977
1129
  // [Google Workspace
978
- // Add-ons and Chat apps](https://developers.google.com/workspace/extend):
1130
+ // add-ons and Chat apps](https://developers.google.com/workspace/extend):
979
1131
  message Suggestions {
980
1132
  // One suggested value that users can enter in a text input field.
981
1133
  //
982
- // [Google Workspace Add-ons and Chat
1134
+ // [Google Workspace add-ons and Chat
983
1135
  // apps](https://developers.google.com/workspace/extend):
984
1136
  message SuggestionItem {
985
1137
  oneof content {
@@ -999,7 +1151,7 @@ message Suggestions {
999
1151
  // [Add a
1000
1152
  // button](https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_button).
1001
1153
  //
1002
- // [Google Workspace Add-ons and Chat
1154
+ // [Google Workspace add-ons and Chat
1003
1155
  // apps](https://developers.google.com/workspace/extend):
1004
1156
  message ButtonList {
1005
1157
  // An array of buttons.
@@ -1007,9 +1159,12 @@ message ButtonList {
1007
1159
  }
1008
1160
 
1009
1161
  // A widget that creates one or more UI items that users can select.
1010
- // For example, a dropdown menu or checkboxes. You can use this widget to
1011
- // collect data that can be predicted or enumerated. For an example in Google
1012
- // Chat apps, see [Add selectable UI
1162
+ // Supports form submission validation for `dropdown` and `multiselect` menus
1163
+ // only. When `Action.all_widgets_are_required` is set to `true` or this widget
1164
+ // is specified in `Action.required_widgets`, the submission action is blocked
1165
+ // unless a value is selected. For example, a dropdown menu or checkboxes. You
1166
+ // can use this widget to collect data that can be predicted or enumerated. For
1167
+ // an example in Google Chat apps, see [Add selectable UI
1013
1168
  // elements](/workspace/chat/design-interactive-card-dialog#add_selectable_ui_elements).
1014
1169
  //
1015
1170
  // Chat apps can process the value of items that users select or input. For
@@ -1019,7 +1174,7 @@ message ButtonList {
1019
1174
  // To collect undefined or abstract data from users, use
1020
1175
  // the [TextInput][google.apps.card.v1.TextInput] widget.
1021
1176
  //
1022
- // [Google Workspace Add-ons
1177
+ // [Google Workspace add-ons
1023
1178
  // and Chat apps](https://developers.google.com/workspace/extend):
1024
1179
  message SelectionInput {
1025
1180
  // The format for the items that users can select. Different options support
@@ -1029,7 +1184,7 @@ message SelectionInput {
1029
1184
  // Each selection input supports one type of selection. Mixing checkboxes
1030
1185
  // and switches, for example, isn't supported.
1031
1186
  //
1032
- // [Google Workspace Add-ons and Chat
1187
+ // [Google Workspace add-ons and Chat
1033
1188
  // apps](https://developers.google.com/workspace/extend):
1034
1189
  enum SelectionType {
1035
1190
  // A set of checkboxes. Users can select one or more checkboxes.
@@ -1044,36 +1199,34 @@ message SelectionInput {
1044
1199
  // A dropdown menu. Users can select one item from the menu.
1045
1200
  DROPDOWN = 3;
1046
1201
 
1047
- // A multiselect menu for static or dynamic data. From the menu bar,
1048
- // users select one or more items. Users can also input values to populate
1049
- // dynamic data. For example, users can start typing the name of a Google
1050
- // Chat space and the widget autosuggests the space.
1202
+ // A menu with a text box. Users can type and select one or more items.
1203
+ // For Google Workspace add-ons, you must populate items using a static
1204
+ // array of `SelectionItem` objects.
1051
1205
  //
1052
- // To populate items for a multiselect menu, you can use one of the
1053
- // following types of data sources:
1206
+ // For Google Chat apps, you can also populate items using a dynamic data
1207
+ // source and autosuggest items as users type in the menu. For example,
1208
+ // users can start typing the name of a Google Chat space and the widget
1209
+ // autosuggests the space. To dynamically populate items for a multiselect
1210
+ // menu, use one of the following types of data sources:
1054
1211
  //
1055
- // * Static data: Items are specified as `SelectionItem` objects in the
1056
- // widget. Up to 100 items.
1057
1212
  // * Google Workspace data: Items are populated using data from Google
1058
1213
  // Workspace, such as Google Workspace users or Google Chat spaces.
1059
1214
  // * External data: Items are populated from an external data
1060
1215
  // source outside of Google Workspace.
1061
1216
  //
1062
- // For examples of how to implement multiselect menus, see
1217
+ // For examples of how to implement multiselect menus for Chat apps, see
1063
1218
  // [Add a multiselect
1064
1219
  // menu](https://developers.google.com/workspace/chat/design-interactive-card-dialog#multiselect-menu).
1065
1220
  //
1066
- // [Google Workspace Add-ons and Chat
1221
+ // [Google Workspace add-ons and Chat
1067
1222
  // apps](https://developers.google.com/workspace/extend):
1068
- // Multiselect for Google Workspace Add-ons are in
1069
- // Developer Preview.
1070
1223
  MULTI_SELECT = 4;
1071
1224
  }
1072
1225
 
1073
1226
  // An item that users can select in a selection input, such as a checkbox
1074
- // or switch.
1227
+ // or switch. Supports up to 100 items.
1075
1228
  //
1076
- // [Google Workspace Add-ons and Chat
1229
+ // [Google Workspace add-ons and Chat
1077
1230
  // apps](https://developers.google.com/workspace/extend):
1078
1231
  message SelectionItem {
1079
1232
  // The text that identifies or describes the item to users.
@@ -1095,7 +1248,9 @@ message SelectionInput {
1095
1248
  // the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS`
1096
1249
  // URL. For example,
1097
1250
  // `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`.
1098
- string start_icon_uri = 4;
1251
+ oneof start_icon {
1252
+ string start_icon_uri = 4;
1253
+ }
1099
1254
 
1100
1255
  // For multiselect menus, a text description or label that's
1101
1256
  // displayed below the item's `text` field.
@@ -1131,7 +1286,8 @@ message SelectionInput {
1131
1286
  }
1132
1287
  }
1133
1288
 
1134
- // The name that identifies the selection input in a form input event.
1289
+ // Required. The name that identifies the selection input in a form input
1290
+ // event.
1135
1291
  //
1136
1292
  // For details about working with form inputs, see [Receive form
1137
1293
  // data](https://developers.google.com/workspace/chat/read-form-data).
@@ -1164,22 +1320,26 @@ message SelectionInput {
1164
1320
 
1165
1321
  // For multiselect menus, the maximum number of items that a user can select.
1166
1322
  // Minimum value is 1 item. If unspecified, defaults to 3 items.
1167
- int32 multi_select_max_selected_items = 6;
1323
+ optional int32 multi_select_max_selected_items = 6;
1168
1324
 
1169
1325
  // For multiselect menus, the number of text characters that a user inputs
1170
- // before the app queries autocomplete and displays suggested items
1171
- // in the menu.
1326
+ // before the menu returns suggested selection items.
1327
+ //
1328
+ // If unset, the multiselect menu uses the following default values:
1172
1329
  //
1173
- // If unspecified, defaults to 0 characters for static data sources and 3
1174
- // characters for external data sources.
1330
+ // * If the menu uses a static array of `SelectionInput` items, defaults to
1331
+ // 0 characters and immediately populates items from the array.
1332
+ // * If the menu uses a dynamic data source (`multi_select_data_source`),
1333
+ // defaults to 3 characters before querying the data source to return
1334
+ // suggested items.
1175
1335
  int32 multi_select_min_query_length = 7;
1176
1336
 
1177
- // For a multiselect menu, the data source that populates
1337
+ // For a multiselect menu, a data source that dynamically populates
1178
1338
  // selection items.
1179
1339
  //
1180
1340
  // [Google Chat apps](https://developers.google.com/workspace/chat):
1181
1341
  oneof multi_select_data_source {
1182
- // An external data source, such as a relational data base.
1342
+ // An external data source, such as a relational database.
1183
1343
  Action external_data_source = 8;
1184
1344
 
1185
1345
  // A data source from Google Workspace.
@@ -1187,8 +1347,11 @@ message SelectionInput {
1187
1347
  }
1188
1348
  }
1189
1349
 
1190
- // Lets users input a date, a time, or both a date and a time. For an example in
1191
- // Google Chat apps, see [Let a user pick a date and
1350
+ // Lets users input a date, a time, or both a date and a time.
1351
+ // Supports form submission validation. When `Action.all_widgets_are_required`
1352
+ // is set to `true` or this widget is specified in `Action.required_widgets`,
1353
+ // the submission action is blocked unless a value is selected. For an example
1354
+ // in Google Chat apps, see [Let a user pick a date and
1192
1355
  // time](https://developers.google.com/workspace/chat/design-interactive-card-dialog#let_a_user_pick_a_date_and_time).
1193
1356
  //
1194
1357
  // Users can input text or use the picker to select dates and times. If users
@@ -1196,12 +1359,12 @@ message SelectionInput {
1196
1359
  // to input the information correctly.
1197
1360
  //
1198
1361
  // [Google Workspace
1199
- // Add-ons and Chat apps](https://developers.google.com/workspace/extend):
1362
+ // add-ons and Chat apps](https://developers.google.com/workspace/extend):
1200
1363
  message DateTimePicker {
1201
1364
  // The format for the date and time in the `DateTimePicker` widget.
1202
1365
  // Determines whether users can input a date, a time, or both a date and time.
1203
1366
  //
1204
- // [Google Workspace Add-ons and Chat
1367
+ // [Google Workspace add-ons and Chat
1205
1368
  // apps](https://developers.google.com/workspace/extend):
1206
1369
  enum DateTimePickerType {
1207
1370
  // Users input a date and time.
@@ -1228,8 +1391,8 @@ message DateTimePicker {
1228
1391
  // Whether the widget supports inputting a date, a time, or the date and time.
1229
1392
  DateTimePickerType type = 3;
1230
1393
 
1231
- // The default value displayed in the widget, in milliseconds since [Unix
1232
- // epoch time](https://en.wikipedia.org/wiki/Unix_time).
1394
+ // Optional. The default value displayed in the widget, in milliseconds since
1395
+ // [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time).
1233
1396
  //
1234
1397
  // Specify the value based on the type of picker (`DateTimePickerType`):
1235
1398
  //
@@ -1239,7 +1402,7 @@ message DateTimePicker {
1239
1402
  // January 1, 2023, use `1672531200000`.
1240
1403
  // * `TIME_ONLY`: a time in UTC. For example, to represent 12:00 PM, use
1241
1404
  // `43200000` (or `12 * 60 * 60 * 1000`).
1242
- int64 value_ms_epoch = 4;
1405
+ optional int64 value_ms_epoch = 4;
1243
1406
 
1244
1407
  // The number representing the time zone offset from UTC, in minutes.
1245
1408
  // If set, the `value_ms_epoch` is displayed in the specified time zone.
@@ -1251,6 +1414,40 @@ message DateTimePicker {
1251
1414
  Action on_change_action = 6;
1252
1415
  }
1253
1416
 
1417
+ // A widget that presents a pop-up menu with one or more actions that users can
1418
+ // invoke. For example, showing non-primary actions in a card. You can use this
1419
+ // widget when actions don't fit in the available space. To use, specify this
1420
+ // widget in the `OnClick` action of widgets that support it. For example, in a
1421
+ // `Button`.
1422
+ //
1423
+ // [Google Workspace add-ons and Chat
1424
+ // apps](https://developers.google.com/workspace/extend):
1425
+ message OverflowMenu {
1426
+ // An option that users can invoke in an overflow menu.
1427
+ //
1428
+ // [Google Workspace add-ons and Chat
1429
+ // apps](https://developers.google.com/workspace/extend):
1430
+ message OverflowMenuItem {
1431
+ // The icon displayed in front of the text.
1432
+ Icon start_icon = 1;
1433
+
1434
+ // Required. The text that identifies or describes the item to users.
1435
+ string text = 2;
1436
+
1437
+ // Required. The action invoked when a menu option is selected.
1438
+ // This `OnClick` cannot contain an `OverflowMenu`, any specified
1439
+ // `OverflowMenu` is dropped and the menu item disabled.
1440
+ OnClick on_click = 3;
1441
+
1442
+ // Whether the menu option is disabled.
1443
+ // Defaults to false.
1444
+ bool disabled = 4;
1445
+ }
1446
+
1447
+ // Required. The list of menu options.
1448
+ repeated OverflowMenuItem items = 1;
1449
+ }
1450
+
1254
1451
  // A text, icon, or text and icon button that users can click. For an example in
1255
1452
  // Google Chat apps, see
1256
1453
  // [Add a
@@ -1262,47 +1459,68 @@ message DateTimePicker {
1262
1459
  // `onClick` action.
1263
1460
  //
1264
1461
  // [Google Workspace
1265
- // Add-ons and Chat apps](https://developers.google.com/workspace/extend):
1462
+ // add-ons and Chat apps](https://developers.google.com/workspace/extend):
1266
1463
  message Button {
1464
+ // Optional. The
1465
+ // [type](https://m3.material.io/components/all-buttons#9134ac95-678e-49ae-a50a-e71948011b05)
1466
+ // of a button. If `color` field is set, the `type` is forced to `FILLED`.
1467
+ //
1468
+ // [Google Chat apps](https://developers.google.com/workspace/chat):
1469
+ enum Type {
1470
+ // Don't use. Unspecified.
1471
+ TYPE_UNSPECIFIED = 0;
1472
+
1473
+ // Outlined buttons are medium-emphasis buttons. They usually contain
1474
+ // actions that are important, but aren’t the primary action in a Chat app
1475
+ // or an add-on.
1476
+ OUTLINED = 1;
1477
+
1478
+ // A filled button has a container with a solid color. It has the most
1479
+ // visual impact and is recommended for the important and primary action in
1480
+ // a Chat app or an add-on.
1481
+ FILLED = 2;
1482
+
1483
+ // A filled tonal button is an alternative middle ground between filled and
1484
+ // outlined buttons. They’re useful in contexts where a lower-priority
1485
+ // button requires slightly more emphasis than an outline button would give.
1486
+ FILLED_TONAL = 3;
1487
+
1488
+ // A button does not have an invisible container in its default state. It is
1489
+ // often used for the lowest priority actions, especially when presenting
1490
+ // multiple options.
1491
+ BORDERLESS = 4;
1492
+ }
1493
+
1267
1494
  // The text displayed inside the button.
1268
1495
  string text = 1;
1269
1496
 
1270
- // The icon image. If both `icon` and `text` are set, then the icon appears
1271
- // before the text.
1497
+ // An icon displayed inside the button. If both `icon` and `text` are set,
1498
+ // then the icon appears before the text.
1272
1499
  Icon icon = 2;
1273
1500
 
1274
- // If set, the button is filled with a solid background color and the font
1275
- // color changes to maintain contrast with the background color. For example,
1276
- // setting a blue background likely results in white text.
1277
- //
1278
- // If unset, the image background is white and the font color is blue.
1279
- //
1280
- // For red, green, and blue, the value of each field is a `float` number that
1281
- // you can express in either of two ways: as a number between 0 and 255
1282
- // divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents
1283
- // the absence of a color and 1 or 255/255 represent the full presence of that
1284
- // color on the RGB scale.
1501
+ // Optional. The color of the button. If set, the button `type` is set to
1502
+ // `FILLED` and the color of `text` and `icon` fields are set to a
1503
+ // contrasting color for readability. For example, if the button color is
1504
+ // set to blue, any text or icons in the button are set to white.
1285
1505
  //
1286
- // Optionally set `alpha`, which sets a level of transparency using this
1287
- // equation:
1288
- //
1289
- // ```
1290
- // pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1291
- // ```
1292
- //
1293
- // For `alpha`, a value of `1` corresponds with a solid color, and a value of
1294
- // `0` corresponds with a completely transparent color.
1506
+ // To set the button color, specify a value for the `red`, `green`, and `blue`
1507
+ // fields.
1508
+ // The value must be a float number between 0 and 1 based on the RGB color
1509
+ // value, where `0` (0/255) represents the absence of color and `1` (255/255)
1510
+ // represents the maximum intensity of the color.
1295
1511
  //
1296
- // For example, the following color represents a half transparent red:
1512
+ // For example, the following sets the color to red at its maximum intensity:
1297
1513
  //
1298
1514
  // ```
1299
1515
  // "color": {
1300
1516
  // "red": 1,
1301
1517
  // "green": 0,
1302
1518
  // "blue": 0,
1303
- // "alpha": 0.5
1304
1519
  // }
1305
1520
  // ```
1521
+ //
1522
+ // The `alpha` field is unavailable for button color. If specified, this field
1523
+ // is ignored.
1306
1524
  google.type.Color color = 3;
1307
1525
 
1308
1526
  // Required. The action to perform when a user clicks the button, such as
@@ -1320,6 +1538,11 @@ message Button {
1320
1538
  // browser tab and navigates to the Google Chat developer documentation at
1321
1539
  // https://developers.google.com/workspace/chat".
1322
1540
  string alt_text = 6;
1541
+
1542
+ // Optional. The type of a button. If unset, button type defaults to
1543
+ // `OUTLINED`. If the `color` field is set, the button type is forced to
1544
+ // `FILLED` and any value set for this field is ignored.
1545
+ Type type = 7;
1323
1546
  }
1324
1547
 
1325
1548
  // An icon displayed in a widget on a card. For an example in Google Chat apps,
@@ -1332,7 +1555,7 @@ message Button {
1332
1555
  // [custom](https://developers.google.com/workspace/chat/format-messages#customicons)
1333
1556
  // icons.
1334
1557
  //
1335
- // [Google Workspace Add-ons and Chat
1558
+ // [Google Workspace add-ons and Chat
1336
1559
  // apps](https://developers.google.com/workspace/extend):
1337
1560
  message Icon {
1338
1561
  // The icon displayed in the widget on the card.
@@ -1445,7 +1668,7 @@ message MaterialIcon {
1445
1668
 
1446
1669
  // Represents the crop style applied to an image.
1447
1670
  //
1448
- // [Google Workspace Add-ons and
1671
+ // [Google Workspace add-ons and
1449
1672
  // Chat apps](https://developers.google.com/workspace/extend):
1450
1673
  //
1451
1674
  // For example, here's how to apply a 16:9 aspect ratio:
@@ -1459,7 +1682,7 @@ message MaterialIcon {
1459
1682
  message ImageCropStyle {
1460
1683
  // Represents the crop style applied to an image.
1461
1684
  //
1462
- // [Google Workspace Add-ons
1685
+ // [Google Workspace add-ons
1463
1686
  // and Chat apps](https://developers.google.com/workspace/extend):
1464
1687
  enum ImageCropType {
1465
1688
  // Don't use. Unspecified.
@@ -1498,21 +1721,21 @@ message ImageCropStyle {
1498
1721
  // The style options for the border of a card or widget, including the border
1499
1722
  // type and color.
1500
1723
  //
1501
- // [Google Workspace Add-ons and Chat
1724
+ // [Google Workspace add-ons and Chat
1502
1725
  // apps](https://developers.google.com/workspace/extend):
1503
1726
  message BorderStyle {
1504
1727
  // Represents the border types applied to widgets.
1505
1728
  //
1506
- // [Google Workspace Add-ons
1729
+ // [Google Workspace add-ons
1507
1730
  // and Chat apps](https://developers.google.com/workspace/extend):
1508
1731
  enum BorderType {
1509
1732
  // Don't use. Unspecified.
1510
1733
  BORDER_TYPE_UNSPECIFIED = 0;
1511
1734
 
1512
- // Default value. No border.
1735
+ // No border.
1513
1736
  NO_BORDER = 1;
1514
1737
 
1515
- // Outline.
1738
+ // Default value. Outline.
1516
1739
  STROKE = 2;
1517
1740
  }
1518
1741
 
@@ -1520,6 +1743,25 @@ message BorderStyle {
1520
1743
  BorderType type = 1;
1521
1744
 
1522
1745
  // The colors to use when the type is `BORDER_TYPE_STROKE`.
1746
+ //
1747
+ // To set the stroke color, specify a value for the `red`, `green`, and `blue`
1748
+ // fields.
1749
+ // The value must be a float number between 0 and 1 based on the RGB color
1750
+ // value, where `0` (0/255) represents the absence of color and `1` (255/255)
1751
+ // represents the maximum intensity of the color.
1752
+ //
1753
+ // For example, the following sets the color to red at its maximum intensity:
1754
+ //
1755
+ // ```
1756
+ // "color": {
1757
+ // "red": 1,
1758
+ // "green": 0,
1759
+ // "blue": 0,
1760
+ // }
1761
+ // ```
1762
+ //
1763
+ // The `alpha` field is unavailable for stroke color. If specified, this field
1764
+ // is ignored.
1523
1765
  google.type.Color stroke_color = 2;
1524
1766
 
1525
1767
  // The corner radius for the border.
@@ -1528,7 +1770,7 @@ message BorderStyle {
1528
1770
 
1529
1771
  // Represents an image.
1530
1772
  //
1531
- // [Google Workspace Add-ons and Chat
1773
+ // [Google Workspace add-ons and Chat
1532
1774
  // apps](https://developers.google.com/workspace/extend):
1533
1775
  message ImageComponent {
1534
1776
  // The image URL.
@@ -1555,7 +1797,7 @@ message ImageComponent {
1555
1797
  // 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns
1556
1798
  // has 6 rows.
1557
1799
  //
1558
- // [Google Workspace Add-ons and Chat
1800
+ // [Google Workspace add-ons and Chat
1559
1801
  // apps](https://developers.google.com/workspace/extend):
1560
1802
  //
1561
1803
  // For example, the following JSON creates a 2 column grid with a single
@@ -1595,12 +1837,12 @@ message Grid {
1595
1837
  // Represents an item in a grid layout. Items can contain text, an image, or
1596
1838
  // both text and an image.
1597
1839
  //
1598
- // [Google Workspace Add-ons and Chat
1840
+ // [Google Workspace add-ons and Chat
1599
1841
  // apps](https://developers.google.com/workspace/extend):
1600
1842
  message GridItem {
1601
1843
  // Represents the various layout options available for a grid item.
1602
1844
  //
1603
- // [Google Workspace Add-ons and Chat
1845
+ // [Google Workspace add-ons and Chat
1604
1846
  // apps](https://developers.google.com/workspace/extend):
1605
1847
  enum GridItemLayout {
1606
1848
  // Don't use. Unspecified.
@@ -1673,29 +1915,28 @@ message Grid {
1673
1915
  // * On Android devices, the second column wraps if the screen width is
1674
1916
  // less than or equal to 320 dp.
1675
1917
  //
1676
- // To include more than 2 columns, or to use rows, use the
1918
+ // To include more than two columns, or to use rows, use the
1677
1919
  // [`Grid`][google.apps.card.v1.Grid] widget.
1678
1920
  //
1679
- // [Google Workspace Add-ons and Chat
1921
+ // [Google Workspace add-ons and Chat
1680
1922
  // apps](https://developers.google.com/workspace/extend):
1681
- // Columns for Google Workspace Add-ons are in
1682
- // Developer Preview.
1923
+ // The add-on UIs that support columns include:
1924
+ //
1925
+ // * The dialog displayed when users open the add-on from an email draft.
1926
+ // * The dialog displayed when users open the add-on from the
1927
+ // **Add attachment** menu in a Google Calendar event.
1683
1928
  message Columns {
1684
1929
  // A column.
1685
1930
  //
1686
- // [Google Workspace Add-ons and Chat
1687
- // apps](https://developers.google.com/workspace/extend):
1688
- // Columns for Google Workspace Add-ons are in
1689
- // Developer Preview.
1931
+ // [Google Workspace add-ons and Chat
1932
+ // apps](https://developers.google.com/workspace/extend)
1690
1933
  message Column {
1691
1934
  // Specifies how a column fills the width of the card. The width of each
1692
1935
  // column depends on both the `HorizontalSizeStyle` and the width of the
1693
1936
  // widgets within the column.
1694
1937
  //
1695
- // [Google Workspace Add-ons and Chat
1696
- // apps](https://developers.google.com/workspace/extend):
1697
- // Columns for Google Workspace Add-ons are in
1698
- // Developer Preview.
1938
+ // [Google Workspace add-ons and Chat
1939
+ // apps](https://developers.google.com/workspace/extend)
1699
1940
  enum HorizontalSizeStyle {
1700
1941
  // Don't use. Unspecified.
1701
1942
  HORIZONTAL_SIZE_STYLE_UNSPECIFIED = 0;
@@ -1713,10 +1954,8 @@ message Columns {
1713
1954
  // Specifies whether widgets align to the top, bottom, or center of a
1714
1955
  // column.
1715
1956
  //
1716
- // [Google Workspace Add-ons and Chat
1717
- // apps](https://developers.google.com/workspace/extend):
1718
- // Columns for Google Workspace Add-ons are in
1719
- // Developer Preview.
1957
+ // [Google Workspace add-ons and Chat
1958
+ // apps](https://developers.google.com/workspace/extend)
1720
1959
  enum VerticalAlignment {
1721
1960
  // Don't use. Unspecified.
1722
1961
  VERTICAL_ALIGNMENT_UNSPECIFIED = 0;
@@ -1733,10 +1972,8 @@ message Columns {
1733
1972
 
1734
1973
  // The supported widgets that you can include in a column.
1735
1974
  //
1736
- // [Google Workspace Add-ons and Chat
1737
- // apps](https://developers.google.com/workspace/extend):
1738
- // Columns for Google Workspace Add-ons are in
1739
- // Developer Preview.
1975
+ // [Google Workspace add-ons and Chat
1976
+ // apps](https://developers.google.com/workspace/extend)
1740
1977
  message Widgets {
1741
1978
  oneof data {
1742
1979
  // [TextParagraph][google.apps.card.v1.TextParagraph] widget.
@@ -1759,6 +1996,9 @@ message Columns {
1759
1996
 
1760
1997
  // [DateTimePicker][google.apps.card.v1.DateTimePicker] widget.
1761
1998
  DateTimePicker date_time_picker = 7;
1999
+
2000
+ // [ChipList][google.apps.card.v1.ChipList] widget.
2001
+ ChipList chip_list = 8;
1762
2002
  }
1763
2003
  }
1764
2004
 
@@ -1782,10 +2022,89 @@ message Columns {
1782
2022
  repeated Column column_items = 2;
1783
2023
  }
1784
2024
 
2025
+ // A carousel, also known as a slider, rotates and displays a list of widgets in
2026
+ // a slideshow format, with buttons navigating to the previous or next widget.
2027
+ //
2028
+ // For example, this is a JSON representation of a carousel that contains three
2029
+ // text paragraph widgets.
2030
+ //
2031
+ // ```
2032
+ // {
2033
+ // "carouselCards": [
2034
+ // {
2035
+ // "widgets": [
2036
+ // {
2037
+ // "textParagraph": {
2038
+ // "text": "First text paragraph in carousel",
2039
+ // }
2040
+ // }
2041
+ // ]
2042
+ // },
2043
+ // {
2044
+ // "widgets": [
2045
+ // {
2046
+ // "textParagraph": {
2047
+ // "text": "Second text paragraph in carousel",
2048
+ // }
2049
+ // }
2050
+ // ]
2051
+ // },
2052
+ // {
2053
+ // "widgets": [
2054
+ // {
2055
+ // "textParagraph": {
2056
+ // "text": "Third text paragraph in carousel",
2057
+ // }
2058
+ // }
2059
+ // ]
2060
+ // }
2061
+ // ]
2062
+ // }
2063
+ // ```
2064
+ //
2065
+ // [Google Chat apps](https://developers.google.com/workspace/chat):
2066
+ message Carousel {
2067
+ // A card that can be displayed as a carousel item.
2068
+ // [Google Chat apps](https://developers.google.com/workspace/chat):
2069
+ message CarouselCard {
2070
+ // A list of widgets displayed in the carousel card. The widgets are
2071
+ // displayed in the order that they are specified.
2072
+ repeated Card.NestedWidget widgets = 1;
2073
+
2074
+ // A list of widgets displayed at the bottom of the carousel card. The
2075
+ // widgets are displayed in the order that they are specified.
2076
+ repeated Card.NestedWidget footer_widgets = 2;
2077
+ }
2078
+
2079
+ // A list of cards included in the carousel.
2080
+ repeated CarouselCard carousel_cards = 4;
2081
+ }
2082
+
2083
+ // Represent an expand and collapse control.
2084
+ //
2085
+ // [Google Workspace add-ons and Chat
2086
+ // apps](https://developers.google.com/workspace/extend):
2087
+ message CollapseControl {
2088
+ // The horizontal alignment of the expand and collapse button.
2089
+ Widget.HorizontalAlignment horizontal_alignment = 1;
2090
+
2091
+ // Optional. Define a customizable button to expand the section.
2092
+ // Both expand_button and collapse_button field must be set. Only one
2093
+ // field set will not take into effect.
2094
+ // If this field isn't set, the default button is used.
2095
+ Button expand_button = 2;
2096
+
2097
+ // Optional. Define a customizable button to collapse the section.
2098
+ // Both expand_button and collapse_button field must be set. Only one
2099
+ // field set will not take into effect.
2100
+ // If this field isn't set, the default button is used.
2101
+ Button collapse_button = 3;
2102
+ }
2103
+
1785
2104
  // Represents how to respond when users click an interactive element on
1786
2105
  // a card, such as a button.
1787
2106
  //
1788
- // [Google Workspace Add-ons and Chat
2107
+ // [Google Workspace add-ons and Chat
1789
2108
  // apps](https://developers.google.com/workspace/extend):
1790
2109
  message OnClick {
1791
2110
  oneof data {
@@ -1801,20 +2120,23 @@ message OnClick {
1801
2120
  // web client to do before the open link action response comes back.
1802
2121
  //
1803
2122
  // [Google Workspace
1804
- // Add-ons](https://developers.google.com/workspace/add-ons):
2123
+ // add-ons](https://developers.google.com/workspace/add-ons):
1805
2124
  Action open_dynamic_link_action = 3;
1806
2125
 
1807
2126
  // A new card is pushed to the card stack after clicking if specified.
1808
2127
  //
1809
2128
  // [Google Workspace
1810
- // Add-ons](https://developers.google.com/workspace/add-ons):
2129
+ // add-ons](https://developers.google.com/workspace/add-ons):
1811
2130
  Card card = 4;
2131
+
2132
+ // If specified, this `onClick` opens an overflow menu.
2133
+ OverflowMenu overflow_menu = 8;
1812
2134
  }
1813
2135
  }
1814
2136
 
1815
2137
  // Represents an `onClick` event that opens a hyperlink.
1816
2138
  //
1817
- // [Google Workspace Add-ons and Chat
2139
+ // [Google Workspace add-ons and Chat
1818
2140
  // apps](https://developers.google.com/workspace/extend):
1819
2141
  message OpenLink {
1820
2142
  // When an `OnClick` action opens a link, then the client can either open it
@@ -1824,7 +2146,7 @@ message OpenLink {
1824
2146
  // client doesn't support it. `FULL_SIZE` is supported by all clients.
1825
2147
  //
1826
2148
  // [Google Workspace
1827
- // Add-ons](https://developers.google.com/workspace/add-ons):
2149
+ // add-ons](https://developers.google.com/workspace/add-ons):
1828
2150
  enum OpenAs {
1829
2151
  // The link opens as a full-size window (if that's the frame used by the
1830
2152
  // client).
@@ -1843,7 +2165,7 @@ message OpenLink {
1843
2165
  // can't support both values, `OnClose` takes precedence.
1844
2166
  //
1845
2167
  // [Google Workspace
1846
- // Add-ons](https://developers.google.com/workspace/add-ons):
2168
+ // add-ons](https://developers.google.com/workspace/add-ons):
1847
2169
  enum OnClose {
1848
2170
  // Default value. The card doesn't reload; nothing happens.
1849
2171
  NOTHING = 0;
@@ -1863,14 +2185,14 @@ message OpenLink {
1863
2185
  // How to open a link.
1864
2186
  //
1865
2187
  // [Google Workspace
1866
- // Add-ons](https://developers.google.com/workspace/add-ons):
2188
+ // add-ons](https://developers.google.com/workspace/add-ons):
1867
2189
  OpenAs open_as = 2;
1868
2190
 
1869
2191
  // Whether the client forgets about a link after opening it, or observes it
1870
2192
  // until the window closes.
1871
2193
  //
1872
2194
  // [Google Workspace
1873
- // Add-ons](https://developers.google.com/workspace/add-ons):
2195
+ // add-ons](https://developers.google.com/workspace/add-ons):
1874
2196
  OnClose on_close = 3;
1875
2197
  }
1876
2198
 
@@ -1878,7 +2200,7 @@ message OpenLink {
1878
2200
  // For example, you can invoke an Apps Script script to handle the form.
1879
2201
  // If the action is triggered, the form values are sent to the server.
1880
2202
  //
1881
- // [Google Workspace Add-ons and Chat
2203
+ // [Google Workspace add-ons and Chat
1882
2204
  // apps](https://developers.google.com/workspace/extend):
1883
2205
  message Action {
1884
2206
  // List of string parameters to supply when the action method is invoked.
@@ -1889,7 +2211,7 @@ message Action {
1889
2211
  // To learn more, see
1890
2212
  // [`CommonEventObject`](https://developers.google.com/workspace/chat/api/reference/rest/v1/Event#commoneventobject).
1891
2213
  //
1892
- // [Google Workspace Add-ons and Chat
2214
+ // [Google Workspace add-ons and Chat
1893
2215
  // apps](https://developers.google.com/workspace/extend):
1894
2216
  message ActionParameter {
1895
2217
  // The name of the parameter for the action script.
@@ -1902,7 +2224,7 @@ message Action {
1902
2224
  // Specifies the loading indicator that the action displays while
1903
2225
  // making the call to the action.
1904
2226
  //
1905
- // [Google Workspace Add-ons and Chat
2227
+ // [Google Workspace add-ons and Chat
1906
2228
  // apps](https://developers.google.com/workspace/extend):
1907
2229
  enum LoadIndicator {
1908
2230
  // Displays a spinner to indicate that content is loading.
@@ -1946,7 +2268,7 @@ message Action {
1946
2268
  }
1947
2269
 
1948
2270
  // A custom function to invoke when the containing element is
1949
- // clicked or othrwise activated.
2271
+ // clicked or otherwise activated.
1950
2272
  //
1951
2273
  // For example usage, see [Read form
1952
2274
  // data](https://developers.google.com/workspace/chat/read-form-data).
@@ -1997,4 +2319,121 @@ message Action {
1997
2319
  //
1998
2320
  // [Google Chat apps](https://developers.google.com/workspace/chat):
1999
2321
  Interaction interaction = 5;
2322
+
2323
+ // Optional. Fill this list with the names of widgets that this Action
2324
+ // needs for a valid submission.
2325
+ //
2326
+ // If the widgets listed here don't have a value when this Action is invoked,
2327
+ // the form submission is aborted.
2328
+ //
2329
+ // [Google Workspace add-ons and Chat
2330
+ // apps](https://developers.google.com/workspace/extend):
2331
+ repeated string required_widgets = 6;
2332
+
2333
+ // Optional. If this is true, then all widgets are considered required by
2334
+ // this action.
2335
+ //
2336
+ // [Google Workspace add-ons and Chat
2337
+ // apps](https://developers.google.com/workspace/extend):
2338
+ bool all_widgets_are_required = 7;
2339
+ }
2340
+
2341
+ // Represents the necessary data for validating the widget it's attached to.
2342
+ //
2343
+ // [Google Workspace add-ons and Chat
2344
+ // apps](https://developers.google.com/workspace/extend):
2345
+ message Validation {
2346
+ // The type of the input widget.
2347
+ enum InputType {
2348
+ // Unspecified type. Do not use.
2349
+ INPUT_TYPE_UNSPECIFIED = 0;
2350
+
2351
+ // Regular text that accepts all characters.
2352
+ TEXT = 1;
2353
+
2354
+ // An integer value.
2355
+ INTEGER = 2;
2356
+
2357
+ // A float value.
2358
+ FLOAT = 3;
2359
+
2360
+ // An email address.
2361
+ EMAIL = 4;
2362
+
2363
+ // A emoji selected from system-provided emoji picker.
2364
+ EMOJI_PICKER = 5;
2365
+ }
2366
+
2367
+ // Specify the character limit for text input widgets. Note that this is
2368
+ // only used for text input and is ignored for other widgets.
2369
+ //
2370
+ // [Google Workspace add-ons and Chat
2371
+ // apps](https://developers.google.com/workspace/extend):
2372
+ int32 character_limit = 1;
2373
+
2374
+ // Specify the type of the input widgets.
2375
+ //
2376
+ // [Google Workspace add-ons and Chat
2377
+ // apps](https://developers.google.com/workspace/extend):
2378
+ InputType input_type = 2;
2379
+ }
2380
+
2381
+ // A list of chips layed out horizontally, which can either scroll horizontally
2382
+ // or wrap to the next line.
2383
+ //
2384
+ // [Google Workspace add-ons and Chat
2385
+ // apps](https://developers.google.com/workspace/extend):
2386
+ message ChipList {
2387
+ // The chip list layout.
2388
+ enum Layout {
2389
+ // Don't use. Unspecified.
2390
+ LAYOUT_UNSPECIFIED = 0;
2391
+
2392
+ // Default value. The chip list wraps to the next line if there isn't enough
2393
+ // horizontal space.
2394
+ WRAPPED = 1;
2395
+
2396
+ // The chips scroll horizontally if they don't fit in the available space.
2397
+ HORIZONTAL_SCROLLABLE = 2;
2398
+ }
2399
+
2400
+ // Specified chip list layout.
2401
+ Layout layout = 1;
2402
+
2403
+ // An array of chips.
2404
+ repeated Chip chips = 2;
2405
+ }
2406
+
2407
+ // A text, icon, or text and icon chip that users can click.
2408
+ //
2409
+ // [Google Workspace add-ons and Chat
2410
+ // apps](https://developers.google.com/workspace/extend):
2411
+ message Chip {
2412
+ // The icon image. If both `icon` and `text` are set, then the icon appears
2413
+ // before the text.
2414
+ Icon icon = 1;
2415
+
2416
+ // The text displayed inside the chip.
2417
+ string label = 2;
2418
+
2419
+ // Optional. The action to perform when a user clicks the chip, such as
2420
+ // opening a hyperlink or running a custom function.
2421
+ OnClick on_click = 3;
2422
+
2423
+ // Whether the chip is in an active state and responds to user actions.
2424
+ // Defaults to `true`.
2425
+ // Deprecated. Use `disabled` instead.
2426
+ bool enabled = 4 [deprecated = true];
2427
+
2428
+ // Whether the chip is in an inactive state and ignores user actions.
2429
+ // Defaults to `false`.
2430
+ bool disabled = 6;
2431
+
2432
+ // The alternative text that's used for accessibility.
2433
+ //
2434
+ // Set descriptive text that lets users know what the chip does. For
2435
+ // example, if a chip opens a hyperlink, write: "Opens a new
2436
+ // browser tab and navigates to the Google Chat developer documentation at
2437
+ // https://developers.google.com/workspace/chat".
2438
+ string alt_text = 5;
2000
2439
  }