diff --git a/google/apps/card/v1/BUILD.bazel b/google/apps/card/v1/BUILD.bazel
index 35360f73fcc91..d173691cbbaf7 100644
--- a/google/apps/card/v1/BUILD.bazel
+++ b/google/apps/card/v1/BUILD.bazel
@@ -1,5 +1,7 @@
# This file was automatically generated by BuildFileGenerator
+# buildifier: disable=load-on-top
+
# This is an API workspace, having public visibility by default makes perfect sense.
package(default_visibility = ["//visibility:public"])
@@ -21,6 +23,7 @@ proto_library(
##############################################################################
# Java
##############################################################################
+# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"java_proto_library",
@@ -44,6 +47,7 @@ java_gapic_assembly_gradle_pkg(
##############################################################################
# Go
##############################################################################
+# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"go_proto_library",
@@ -70,28 +74,45 @@ go_gapic_assembly_pkg(
##############################################################################
# Python
##############################################################################
+# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
- "py_gapic_assembly_pkg",
- "py_gapic_library",
+ "moved_proto_library",
+ "py_grpc_library",
"py_proto_library",
+ "py_gapic_library",
+ "py_gapic_assembly_pkg",
+)
+
+moved_proto_library(
+ name = "card_moved_proto",
+ srcs = [":card_proto"],
+ deps = [
+ "//google/type:color_proto",
+ ],
)
py_proto_library(
name = "card_py_proto",
- deps = [":card_proto"],
+ deps = [":card_moved_proto"],
+)
+
+py_grpc_library(
+ name = "card_py_grpc",
+ srcs = [":card_moved_proto"],
+ deps = [":card_py_proto"],
)
py_gapic_library(
name = "card_py_gapic",
srcs = [":card_proto"],
rest_numeric_enums = False,
- transport = "grpc",
+ transport = "grpc+rest",
)
# Open Source Packages
py_gapic_assembly_pkg(
- name = "card-v1-py",
+ name = "google-apps-card-v1-py",
deps = [
":card_py_gapic",
],
@@ -100,6 +121,7 @@ py_gapic_assembly_pkg(
##############################################################################
# PHP
##############################################################################
+# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"php_gapic_assembly_pkg",
@@ -121,6 +143,7 @@ php_gapic_assembly_pkg(
##############################################################################
# Ruby
##############################################################################
+# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"ruby_grpc_library",
@@ -141,6 +164,7 @@ ruby_grpc_library(
##############################################################################
# C#
##############################################################################
+# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"csharp_proto_library",
@@ -165,6 +189,7 @@ csharp_gapic_assembly_pkg(
##############################################################################
# C++
##############################################################################
+# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"cc_grpc_library",
diff --git a/google/apps/card/v1/README.md b/google/apps/card/v1/README.md
new file mode 100644
index 0000000000000..b06de1c99909b
--- /dev/null
+++ b/google/apps/card/v1/README.md
@@ -0,0 +1,3 @@
+# Card
+
+These protos represent the Card interface displayed in a Google Chat message or Google Workspace Add-on.
diff --git a/google/apps/card/v1/card.proto b/google/apps/card/v1/card.proto
index 538a785b3706a..a53ec1267ed08 100644
--- a/google/apps/card/v1/card.proto
+++ b/google/apps/card/v1/card.proto
@@ -38,15 +38,15 @@ option ruby_package = "Google::Apps::Card::V1";
// To learn how
// to build cards, see the following documentation:
//
-// * For Google Chat apps, see [Design dynamic, interactive, and consistent UIs
-// with cards](https://developers.google.com/chat/ui).
+// * For Google Chat apps, see [Design the components of a card or
+// dialog](https://developers.google.com/workspace/chat/design-components-card-dialog).
// * For Google Workspace Add-ons, see [Card-based
// interfaces](https://developers.google.com/apps-script/add-ons/concepts/cards).
//
// **Example: Card message for a Google Chat app**
//
// ![Example contact
-// card](https://developers.google.com/chat/images/card_api_reference.png)
+// card](https://developers.google.com/workspace/chat/images/card_api_reference.png)
//
// To create the sample card message in Google Chat, use the following JSON:
//
@@ -57,82 +57,82 @@ option ruby_package = "Google::Apps::Card::V1";
// "cardId": "unique-card-id",
// "card": {
// "header": {
-// "title": "Sasha",
-// "subtitle": "Software Engineer",
-// "imageUrl":
-// "https://developers.google.com/chat/images/quickstart-app-avatar.png",
-// "imageType": "CIRCLE",
-// "imageAltText": "Avatar for Sasha",
-// },
-// "sections": [
-// {
-// "header": "Contact Info",
-// "collapsible": true,
-// "uncollapsibleWidgetsCount": 1,
-// "widgets": [
-// {
-// "decoratedText": {
-// "startIcon": {
-// "knownIcon": "EMAIL",
-// },
-// "text": "sasha@example.com",
-// }
-// },
-// {
-// "decoratedText": {
-// "startIcon": {
-// "knownIcon": "PERSON",
-// },
-// "text": "Online",
-// },
-// },
-// {
-// "decoratedText": {
-// "startIcon": {
-// "knownIcon": "PHONE",
-// },
-// "text": "+1 (555) 555-1234",
-// }
-// },
-// {
-// "buttonList": {
-// "buttons": [
-// {
-// "text": "Share",
-// "onClick": {
+// "title": "Sasha",
+// "subtitle": "Software Engineer",
+// "imageUrl":
+// "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png",
+// "imageType": "CIRCLE",
+// "imageAltText": "Avatar for Sasha"
+// },
+// "sections": [
+// {
+// "header": "Contact Info",
+// "collapsible": true,
+// "uncollapsibleWidgetsCount": 1,
+// "widgets": [
+// {
+// "decoratedText": {
+// "startIcon": {
+// "knownIcon": "EMAIL"
+// },
+// "text": "sasha@example.com"
+// }
+// },
+// {
+// "decoratedText": {
+// "startIcon": {
+// "knownIcon": "PERSON"
+// },
+// "text": "Online"
+// }
+// },
+// {
+// "decoratedText": {
+// "startIcon": {
+// "knownIcon": "PHONE"
+// },
+// "text": "+1 (555) 555-1234"
+// }
+// },
+// {
+// "buttonList": {
+// "buttons": [
+// {
+// "text": "Share",
+// "onClick": {
// "openLink": {
-// "url": "https://example.com/share",
-// }
-// }
-// },
-// {
-// "text": "Edit",
-// "onClick": {
-// "action": {
-// "function": "goToView",
-// "parameters": [
-// {
-// "key": "viewType",
-// "value": "EDIT",
-// }
-// ],
-// }
-// }
-// },
-// ],
-// }
-// },
-// ],
-// },
-// ],
-// },
+// "url": "https://example.com/share"
+// }
+// }
+// },
+// {
+// "text": "Edit",
+// "onClick": {
+// "action": {
+// "function": "goToView",
+// "parameters": [
+// {
+// "key": "viewType",
+// "value": "EDIT"
+// }
+// ]
+// }
+// }
+// }
+// ]
+// }
+// }
+// ]
+// }
+// ]
+// }
// }
-// ],
+// ]
// }
// ```
message Card {
- // Represents a card header. For an example in Google Chat apps, see [Card
- // header](https://developers.google.com/chat/ui/widgets/card-header).
+ // Represents a card header. For an example in Google Chat apps, see [Add a
+ // header](https://developers.google.com/workspace/chat/design-components-card-dialog#add_a_header).
//
// [Google Workspace Add-ons and Chat
// apps](https://developers.google.com/workspace/extend):
@@ -170,7 +170,7 @@ message Card {
// Supports simple HTML formatted text. For more information
// about formatting text, see
// [Formatting text in Google Chat
- // apps](https://developers.google.com/chat/format-messages#card-formatting)
+ // apps](https://developers.google.com/workspace/chat/format-messages#card-formatting)
// and
// [Formatting
// text in Google Workspace
@@ -238,11 +238,11 @@ message Card {
// `secondaryButton` causes an error.
//
// For Chat apps, you can use fixed footers in
- // [dialogs](https://developers.google.com/chat/how-tos/dialogs), but not
+ // [dialogs](https://developers.google.com/workspace/chat/dialogs), but not
// [card
- // messages](https://developers.google.com/chat/api/guides/v1/messages/create#create).
- // For an example in Google Chat apps, see [Card
- // footer](https://developers.google.com/chat/ui/widgets/card-fixed-footer).
+ // messages](https://developers.google.com/workspace/chat/create-messages#create).
+ // For an example in Google Chat apps, see [Add a persistent
+ // footer](https://developers.google.com/workspace/chat/design-components-card-dialog#add_a_persistent_footer).
//
// [Google Workspace Add-ons and Chat
// apps](https://developers.google.com/workspace/extend):
@@ -283,8 +283,8 @@ message Card {
// Contains a collection of widgets. Each section has its own, optional
// header. Sections are visually separated by a line divider. For an example
- // in Google Chat apps, see [Card
- // section](https://developers.google.com/chat/ui/widgets/card-section).
+ // in Google Chat apps, see [Define a section of a
+ // card](https://developers.google.com/workspace/chat/design-components-card-dialog#define_a_section_of_a_card).
repeated Section sections = 2;
// The divider style between sections.
@@ -338,9 +338,9 @@ message Card {
// Setting `fixedFooter` without specifying a `primaryButton` or a
// `secondaryButton` causes an error. For Chat apps, you can use fixed footers
// in
- // [dialogs](https://developers.google.com/chat/how-tos/dialogs), but not
+ // [dialogs](https://developers.google.com/workspace/chat/dialogs), but not
// [card
- // messages](https://developers.google.com/chat/api/guides/v1/messages/create#create).
+ // messages](https://developers.google.com/workspace/chat/create-messages#create).
//
// [Google Workspace Add-ons and Chat
// apps](https://developers.google.com/workspace/extend):
@@ -383,7 +383,7 @@ message Widget {
// Specifies whether widgets align to the left, right, or center of a column.
//
- // [Google Chat apps](https://developers.google.com/chat):
+ // [Google Chat apps](https://developers.google.com/workspace/chat):
enum HorizontalAlignment {
// Don't use. Unspecified.
HORIZONTAL_ALIGNMENT_UNSPECIFIED = 0;
@@ -408,7 +408,7 @@ message Widget {
// Displays a text paragraph. Supports simple HTML formatted text. For more
// information about formatting text, see
// [Formatting text in Google Chat
- // apps](https://developers.google.com/chat/format-messages#card-formatting)
+ // apps](https://developers.google.com/workspace/chat/format-messages#card-formatting)
// and
// [Formatting
// text in Google Workspace
@@ -428,7 +428,7 @@ message Widget {
// ```
// "image": {
// "imageUrl":
- // "https://developers.google.com/chat/images/quickstart-app-avatar.png",
+ // "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png",
// "altText": "Chat app avatar"
// }
// ```
@@ -680,12 +680,12 @@ message Widget {
}
// A paragraph of text that supports formatting. For an example in
-// Google Chat apps, see [Text
-// paragraph](https://developers.google.com/chat/ui/widgets/text-paragraph).
+// Google Chat apps, see [Add a paragraph of formatted
+// text](https://developers.google.com/workspace/chat/add-text-image-card-dialog#add_a_paragraph_of_formatted_text).
// For more information
// about formatting text, see
// [Formatting text in Google Chat
-// apps](https://developers.google.com/chat/format-messages#card-formatting)
+// apps](https://developers.google.com/workspace/chat/format-messages#card-formatting)
// and
// [Formatting
// text in Google Workspace
@@ -699,7 +699,8 @@ message TextParagraph {
}
// An image that is specified by a URL and can have an `onClick` action. For an
-// example, see [Image](https://developers.google.com/chat/ui/widgets/image).
+// example, see [Add an
+// image](https://developers.google.com/workspace/chat/add-text-image-card-dialog#add_an_image).
//
// [Google Workspace Add-ons and Chat
// apps](https://developers.google.com/workspace/extend):
@@ -709,7 +710,7 @@ message Image {
// For example:
//
// ```
- // https://developers.google.com/chat/images/quickstart-app-avatar.png
+ // https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png
// ```
string image_url = 1;
@@ -722,7 +723,8 @@ message Image {
// Displays a divider between widgets as a horizontal line. For an example in
// Google Chat apps, see
-// [Divider](https://developers.google.com/chat/ui/widgets/divider).
+// [Add a horizontal divider between
+// widgets](https://developers.google.com/workspace/chat/format-structure-card-dialog#add_a_horizontal_divider_between_widgets).
//
// [Google Workspace Add-ons and Chat
// apps](https://developers.google.com/workspace/extend):
@@ -737,8 +739,8 @@ message Divider {}
// A widget that displays text with optional decorations such as a label above
// or below the text, an icon in front of the text, a selection widget, or a
// button after the text. For an example in
-// Google Chat apps, see [Decorated
-// text](https://developers.google.com/chat/ui/widgets/decorated-text).
+// Google Chat apps, see [Display text with decorative
+// text](https://developers.google.com/workspace/chat/add-text-image-card-dialog#display_text_with_decorative_elements).
//
// [Google Workspace Add-ons and Chat
// apps](https://developers.google.com/workspace/extend):
@@ -768,13 +770,13 @@ message DecoratedText {
// The name by which the switch widget is identified in a form input event.
//
// For details about working with form inputs, see [Receive form
- // data](https://developers.google.com/chat/ui/read-form-data).
+ // data](https://developers.google.com/workspace/chat/read-form-data).
string name = 1;
// The value entered by a user, returned as part of a form input event.
//
// For details about working with form inputs, see [Receive form
- // data](https://developers.google.com/chat/ui/read-form-data).
+ // data](https://developers.google.com/workspace/chat/read-form-data).
string value = 2;
// When `true`, the switch is selected.
@@ -805,7 +807,7 @@ message DecoratedText {
// Supports simple formatting. For more information
// about formatting text, see
// [Formatting text in Google Chat
- // apps](https://developers.google.com/chat/format-messages#card-formatting)
+ // apps](https://developers.google.com/workspace/chat/format-messages#card-formatting)
// and
// [Formatting
// text in Google Workspace
@@ -837,21 +839,22 @@ message DecoratedText {
// An icon displayed after the text.
//
// Supports
- // [built-in](https://developers.google.com/chat/format-messages#builtinicons)
+ // [built-in](https://developers.google.com/workspace/chat/format-messages#builtinicons)
// and
- // [custom](https://developers.google.com/chat/format-messages#customicons)
+ // [custom](https://developers.google.com/workspace/chat/format-messages#customicons)
// icons.
Icon end_icon = 11;
}
}
// A field in which users can enter text. Supports suggestions and on-change
-// actions. For an example in Google Chat apps, see [Text
-// input](https://developers.google.com/chat/ui/widgets/text-input).
+// actions. For an example in Google Chat apps, see [Add a field in which a user
+// can enter
+// text](https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_field_in_which_a_user_can_enter_text).
//
// Chat apps receive and can process the value of entered text during form input
// events. For details about working with form inputs, see [Receive form
-// data](https://developers.google.com/chat/ui/read-form-data).
+// data](https://developers.google.com/workspace/chat/read-form-data).
//
// When you need to collect undefined or abstract data from users,
// use a text input. To collect defined or enumerated data from users, use the
@@ -878,7 +881,7 @@ message TextInput {
// The name by which the text input is identified in a form input event.
//
// For details about working with form inputs, see [Receive form
- // data](https://developers.google.com/chat/ui/read-form-data).
+ // data](https://developers.google.com/workspace/chat/read-form-data).
string name = 1;
// The text that appears above the text input field in the user interface.
@@ -899,7 +902,7 @@ message TextInput {
// The value entered by a user, returned as part of a form input event.
//
// For details about working with form inputs, see [Receive form
- // data](https://developers.google.com/chat/ui/read-form-data).
+ // data](https://developers.google.com/workspace/chat/read-form-data).
string value = 4;
// How a text input field appears in the user interface.
@@ -910,7 +913,7 @@ message TextInput {
// user adding to the field or deleting text.
//
// Examples of actions to take include running a custom function or opening
- // a [dialog](https://developers.google.com/chat/how-tos/dialogs)
+ // a [dialog](https://developers.google.com/workspace/chat/dialogs)
// in Google Chat.
Action on_change_action = 6;
@@ -951,7 +954,7 @@ message TextInput {
// Use this text to prompt users to enter a value. For example, `Enter a
// number from 0 to 100`.
//
- // [Google Chat apps](https://developers.google.com/chat):
+ // [Google Chat apps](https://developers.google.com/workspace/chat):
string placeholder_text = 12;
}
@@ -993,7 +996,8 @@ message Suggestions {
// A list of buttons layed out horizontally. For an example in
// Google Chat apps, see
-// [Button list](https://developers.google.com/chat/ui/widgets/button-list).
+// [Add a
+// button](https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_button).
//
// [Google Workspace Add-ons and Chat
// apps](https://developers.google.com/workspace/extend):
@@ -1005,12 +1009,12 @@ message ButtonList {
// A widget that creates one or more UI items that users can select.
// For example, a dropdown menu or checkboxes. You can use this widget to
// collect data that can be predicted or enumerated. For an example in Google
-// Chat apps, see [Selection
-// input](https://developers.google.com/chat/ui/widgets/selection-input).
+// Chat apps, see [Add selectable UI
+// elements](/workspace/chat/design-interactive-card-dialog#add_selectable_ui_elements).
//
// Chat apps can process the value of items that users select or input. For
// details about working with form inputs, see [Receive form
-// data](https://developers.google.com/chat/ui/read-form-data).
+// data](https://developers.google.com/workspace/chat/read-form-data).
//
// To collect undefined or abstract data from users, use
// the [TextInput][google.apps.card.v1.TextInput] widget.
@@ -1055,14 +1059,14 @@ message SelectionInput {
// * External data: Items are populated from an external data
// source outside of Google Workspace.
//
- // For examples of how to implement multiselect menus, see the
- // [`SelectionInput` widget
- // page](https://developers.google.com/chat/ui/widgets/selection-input#multiselect-menu).
+ // For examples of how to implement multiselect menus, see
+ // [Add a multiselect
+ // menu](https://developers.google.com/workspace/chat/design-interactive-card-dialog#multiselect-menu).
//
// [Google Workspace Add-ons and Chat
// apps](https://developers.google.com/workspace/extend):
- // multiselect for Google Workspace Add-ons are in
- // [Developer Preview](https://developers.google.com/workspace/preview).
+ // Multiselect for Google Workspace Add-ons are in
+ // Developer Preview.
MULTI_SELECT = 4;
}
@@ -1079,7 +1083,7 @@ message SelectionInput {
// input value.
//
// For details about working with form inputs, see [Receive form
- // data](https://developers.google.com/chat/ui/read-form-data).
+ // data](https://developers.google.com/workspace/chat/read-form-data).
string value = 2;
// Whether the item is selected by default. If the selection input only
@@ -1090,7 +1094,7 @@ message SelectionInput {
// For multiselect menus, the URL for the icon displayed next to
// the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS`
// URL. For example,
- // `https://developers.google.com/chat/images/quickstart-app-avatar.png`.
+ // `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`.
string start_icon_uri = 4;
// For multiselect menus, a text description or label that's
@@ -1103,13 +1107,13 @@ message SelectionInput {
// multiselect menu, a data source from Google Workspace. Used to populate
// items in a multiselect menu.
//
- // [Google Chat apps](https://developers.google.com/chat):
+ // [Google Chat apps](https://developers.google.com/workspace/chat):
message PlatformDataSource {
// A data source shared by all [Google Workspace
// applications]
- // (https://developers.google.com/chat/api/reference/rest/v1/HostApp).
+ // (https://developers.google.com/workspace/chat/api/reference/rest/v1/HostApp).
//
- // [Google Chat apps](https://developers.google.com/chat):
+ // [Google Chat apps](https://developers.google.com/workspace/chat):
enum CommonDataSource {
// Default value. Don't use.
UNKNOWN = 0;
@@ -1130,7 +1134,7 @@ message SelectionInput {
// The name that identifies the selection input in a form input event.
//
// For details about working with form inputs, see [Receive form
- // data](https://developers.google.com/chat/ui/read-form-data).
+ // data](https://developers.google.com/workspace/chat/read-form-data).
string name = 1;
// The text that appears above the selection input field in the user
@@ -1155,7 +1159,7 @@ message SelectionInput {
// specified, you must specify a separate button that submits the form.
//
// For details about working with form inputs, see [Receive form
- // data](https://developers.google.com/chat/ui/read-form-data).
+ // data](https://developers.google.com/workspace/chat/read-form-data).
Action on_change_action = 5;
// For multiselect menus, the maximum number of items that a user can select.
@@ -1163,7 +1167,7 @@ message SelectionInput {
int32 multi_select_max_selected_items = 6;
// For multiselect menus, the number of text characters that a user inputs
- // before the Chat app queries autocomplete and displays suggested items
+ // before the app queries autocomplete and displays suggested items
// in the menu.
//
// If unspecified, defaults to 0 characters for static data sources and 3
@@ -1173,7 +1177,7 @@ message SelectionInput {
// For a multiselect menu, the data source that populates
// selection items.
//
- // [Google Chat apps](https://developers.google.com/chat):
+ // [Google Chat apps](https://developers.google.com/workspace/chat):
oneof multi_select_data_source {
// An external data source, such as a relational data base.
Action external_data_source = 8;
@@ -1184,8 +1188,8 @@ message SelectionInput {
}
// Lets users input a date, a time, or both a date and a time. For an example in
-// Google Chat apps, see [Date time
-// picker](https://developers.google.com/chat/ui/widgets/date-time-picker).
+// Google Chat apps, see [Let a user pick a date and
+// time](https://developers.google.com/workspace/chat/design-interactive-card-dialog#let_a_user_pick_a_date_and_time).
//
// Users can input text or use the picker to select dates and times. If users
// input an invalid date or time, the picker shows an error that prompts users
@@ -1213,7 +1217,7 @@ message DateTimePicker {
// The name by which the `DateTimePicker` is identified in a form input event.
//
// For details about working with form inputs, see [Receive form
- // data](https://developers.google.com/chat/ui/read-form-data).
+ // data](https://developers.google.com/workspace/chat/read-form-data).
string name = 1;
// The text that prompts users to input a date, a time, or a date and time.
@@ -1249,7 +1253,8 @@ message DateTimePicker {
// A text, icon, or text and icon button that users can click. For an example in
// Google Chat apps, see
-// [Button list](https://developers.google.com/chat/ui/widgets/button-list).
+// [Add a
+// button](https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_button).
//
// To make an image a clickable button, specify an
// [`Image`][google.apps.card.v1.Image] (not an
@@ -1313,17 +1318,18 @@ message Button {
// Set descriptive text that lets users know what the button does. For
// example, if a button opens a hyperlink, you might write: "Opens a new
// browser tab and navigates to the Google Chat developer documentation at
- // https://developers.google.com/chat".
+ // https://developers.google.com/workspace/chat".
string alt_text = 6;
}
// An icon displayed in a widget on a card. For an example in Google Chat apps,
-// see [Icon](https://developers.google.com/chat/ui/widgets/icon).
+// see [Add an
+// icon](https://developers.google.com/workspace/chat/add-text-image-card-dialog#add_an_icon).
//
// Supports
-// [built-in](https://developers.google.com/chat/format-messages#builtinicons)
+// [built-in](https://developers.google.com/workspace/chat/format-messages#builtinicons)
// and
-// [custom](https://developers.google.com/chat/format-messages#customicons)
+// [custom](https://developers.google.com/workspace/chat/format-messages#customicons)
// icons.
//
// [Google Workspace Add-ons and Chat
@@ -1337,7 +1343,7 @@ message Icon {
// For a bus, specify `BUS`.
//
// For a full list of supported icons, see [built-in
- // icons](https://developers.google.com/chat/format-messages#builtinicons).
+ // icons](https://developers.google.com/workspace/chat/format-messages#builtinicons).
string known_icon = 1;
// Display a custom icon hosted at an HTTPS URL.
@@ -1346,11 +1352,26 @@ message Icon {
//
// ```
// "iconUrl":
- // "https://developers.google.com/chat/images/quickstart-app-avatar.png"
+ // "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png"
// ```
//
// Supported file types include `.png` and `.jpg`.
string icon_url = 2;
+
+ // Display one of the [Google Material
+ // Icons](https://fonts.google.com/icons).
+ //
+ // For example, to display a [checkbox
+ // icon](https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Acheck_box%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4048),
+ // use
+ // ```
+ // "material_icon": {
+ // "name": "check_box"
+ // }
+ // ```
+ //
+ // [Google Chat apps](https://developers.google.com/workspace/chat):
+ MaterialIcon material_icon = 5;
}
// Optional. A description of the icon used for accessibility.
@@ -1358,7 +1379,7 @@ message Icon {
// you should set a helpful description for what the icon displays, and if
// applicable, what it does. For example, `A user's account portrait`, or
// `Opens a new browser tab and navigates to the Google Chat developer
- // documentation at https://developers.google.com/chat`.
+ // documentation at https://developers.google.com/workspace/chat`.
//
// If the icon is set in a [`Button`][google.apps.card.v1.Button], the
// `altText` appears as helper text when the user hovers over the button.
@@ -1371,6 +1392,57 @@ message Icon {
Widget.ImageType image_type = 4;
}
+// A [Google Material Icon](https://fonts.google.com/icons), which includes over
+// 2500+ options.
+//
+// For example, to display a [checkbox
+// icon](https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Acheck_box%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4048)
+// with customized weight and grade, write the following:
+//
+// ```
+// {
+// "name": "check_box",
+// "fill": true,
+// "weight": 300,
+// "grade": -25
+// }
+// ```
+//
+// [Google Chat apps](https://developers.google.com/workspace/chat):
+message MaterialIcon {
+ // The icon name defined in the [Google Material
+ // Icon](https://fonts.google.com/icons), for example, `check_box`. Any
+ // invalid names are abandoned and replaced with empty string and
+ // results in the icon failing to render.
+ string name = 1;
+
+ // Whether the icon renders as filled. Default value is false.
+ //
+ // To preview different icon settings, go to
+ // [Google Font Icons](https://fonts.google.com/icons) and adjust the
+ // settings under **Customize**.
+ bool fill = 2;
+
+ // The stroke weight of the icon. Choose from {100, 200, 300, 400,
+ // 500, 600, 700}. If absent, default value is 400. If any other value is
+ // specified, the default value is used.
+ //
+ // To preview different icon settings, go to
+ // [Google Font Icons](https://fonts.google.com/icons) and adjust the
+ // settings under **Customize**.
+ int32 weight = 3;
+
+ // Weight and grade affect a symbol’s thickness. Adjustments to grade are more
+ // granular than adjustments to weight and have a small impact on the size of
+ // the symbol. Choose from {-25, 0, 200}. If absent, default value is 0. If
+ // any other value is specified, the default value is used.
+ //
+ // To preview different icon settings, go to
+ // [Google Font Icons](https://fonts.google.com/icons) and adjust the
+ // settings under **Customize**.
+ int32 grade = 4;
+}
+
// Represents the crop style applied to an image.
//
// [Google Workspace Add-ons and
@@ -1475,7 +1547,8 @@ message ImageComponent {
// Displays a grid with a collection of items. Items can only include text or
// images. For responsive columns, or to include more than text or images, use
// [`Columns`][google.apps.card.v1.Columns]. For an example in Google Chat apps,
-// see [Grid](https://developers.google.com/chat/ui/widgets/grid).
+// see [Display a Grid with a collection of
+// items](https://developers.google.com/workspace/chat/format-structure-card-dialog#display_a_grid_with_a_collection_of_items).
//
// A grid supports any number of columns and items. The number of rows is
// determined by items divided by columns. A grid with
@@ -1580,7 +1653,8 @@ message Grid {
// The `Columns` widget displays up to 2 columns in a card or dialog. You can
// add widgets to each column; the widgets appear in the order that they are
// specified. For an example in Google Chat apps, see
-// [Columns](https://developers.google.com/chat/ui/widgets/columns).
+// [Display cards and dialogs in
+// columns](https://developers.google.com/workspace/chat/format-structure-card-dialog#display_cards_and_dialogs_in_columns).
//
// The height of each column is determined by the taller column. For example, if
// the first column is taller than the second column, both columns have the
@@ -1605,17 +1679,23 @@ message Grid {
// [Google Workspace Add-ons and Chat
// apps](https://developers.google.com/workspace/extend):
// Columns for Google Workspace Add-ons are in
-// [Developer Preview](https://developers.google.com/workspace/preview).
+// Developer Preview.
message Columns {
// A column.
//
- // [Google Chat apps](https://developers.google.com/chat):
+ // [Google Workspace Add-ons and Chat
+ // apps](https://developers.google.com/workspace/extend):
+ // Columns for Google Workspace Add-ons are in
+ // Developer Preview.
message Column {
// Specifies how a column fills the width of the card. The width of each
// column depends on both the `HorizontalSizeStyle` and the width of the
// widgets within the column.
//
- // [Google Chat apps](https://developers.google.com/chat):
+ // [Google Workspace Add-ons and Chat
+ // apps](https://developers.google.com/workspace/extend):
+ // Columns for Google Workspace Add-ons are in
+ // Developer Preview.
enum HorizontalSizeStyle {
// Don't use. Unspecified.
HORIZONTAL_SIZE_STYLE_UNSPECIFIED = 0;
@@ -1633,7 +1713,10 @@ message Columns {
// Specifies whether widgets align to the top, bottom, or center of a
// column.
//
- // [Google Chat apps](https://developers.google.com/chat):
+ // [Google Workspace Add-ons and Chat
+ // apps](https://developers.google.com/workspace/extend):
+ // Columns for Google Workspace Add-ons are in
+ // Developer Preview.
enum VerticalAlignment {
// Don't use. Unspecified.
VERTICAL_ALIGNMENT_UNSPECIFIED = 0;
@@ -1650,7 +1733,10 @@ message Columns {
// The supported widgets that you can include in a column.
//
- // [Google Chat apps](https://developers.google.com/chat):
+ // [Google Workspace Add-ons and Chat
+ // apps](https://developers.google.com/workspace/extend):
+ // Columns for Google Workspace Add-ons are in
+ // Developer Preview.
message Widgets {
oneof data {
// [TextParagraph][google.apps.card.v1.TextParagraph] widget.
@@ -1677,8 +1763,6 @@ message Columns {
}
// Specifies how a column fills the width of the card.
- //
- // [Google Chat apps](https://developers.google.com/chat):
HorizontalSizeStyle horizontal_size_style = 1;
// Specifies whether widgets align to the left, right, or center of a
@@ -1687,8 +1771,6 @@ message Columns {
// Specifies whether widgets align to the top, bottom, or center of a
// column.
- //
- // [Google Chat apps](https://developers.google.com/chat):
VerticalAlignment vertical_alignment = 3;
// An array of widgets included in a column. Widgets appear in the order
@@ -1805,7 +1887,7 @@ message Action {
// snooze type and snooze time in the list of string parameters.
//
// To learn more, see
- // [`CommonEventObject`](https://developers.google.com/chat/api/reference/rest/v1/Event#commoneventobject).
+ // [`CommonEventObject`](https://developers.google.com/workspace/chat/api/reference/rest/v1/Event#commoneventobject).
//
// [Google Workspace Add-ons and Chat
// apps](https://developers.google.com/workspace/extend):
@@ -1831,7 +1913,7 @@ message Action {
}
// Optional. Required when opening a
- // [dialog](https://developers.google.com/chat/how-tos/dialogs).
+ // [dialog](https://developers.google.com/workspace/chat/dialogs).
//
// What to do in response to an interaction with a user, such as a user
// clicking a button in a card message.
@@ -1841,17 +1923,17 @@ message Action {
//
// By specifying an `interaction`, the app can respond in special interactive
// ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can
- // open a [dialog](https://developers.google.com/chat/how-tos/dialogs).
+ // open a [dialog](https://developers.google.com/workspace/chat/dialogs).
//
// When specified, a loading indicator isn't shown. If specified for
// an add-on, the entire card is stripped and nothing is shown in the client.
//
- // [Google Chat apps](https://developers.google.com/chat):
+ // [Google Chat apps](https://developers.google.com/workspace/chat):
enum Interaction {
// Default value. The `action` executes as normal.
INTERACTION_UNSPECIFIED = 0;
- // Opens a [dialog](https://developers.google.com/chat/how-tos/dialogs), a
+ // Opens a [dialog](https://developers.google.com/workspace/chat/dialogs), a
// windowed, card-based interface that Chat apps use to interact with users.
//
// Only supported by Chat apps in response to button-clicks on card
@@ -1859,15 +1941,15 @@ message Action {
// an add-on, the entire card is stripped and nothing is shown in the
// client.
//
- // [Google Chat apps](https://developers.google.com/chat):
+ // [Google Chat apps](https://developers.google.com/workspace/chat):
OPEN_DIALOG = 1;
}
// A custom function to invoke when the containing element is
// clicked or othrwise activated.
//
- // For example usage, see [Create interactive
- // cards](https://developers.google.com/chat/how-tos/cards-onclick).
+ // For example usage, see [Read form
+ // data](https://developers.google.com/workspace/chat/read-form-data).
string function = 1;
// List of action parameters.
@@ -1884,11 +1966,11 @@ message Action {
// user make changes while the action is being processed, set
// [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator)
// to `NONE`. For [card
- // messages](https://developers.google.com/chat/api/guides/v1/messages/create#create)
+ // messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/create#create)
// in Chat apps, you must also set the action's
- // [`ResponseType`](https://developers.google.com/chat/api/reference/rest/v1/spaces.messages#responsetype)
+ // [`ResponseType`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#responsetype)
// to `UPDATE_MESSAGE` and use the same
- // [`card_id`](https://developers.google.com/chat/api/reference/rest/v1/spaces.messages#CardWithId)
+ // [`card_id`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#CardWithId)
// from the card that contained the action.
//
// If `false`, the form values are cleared when the action is triggered.
@@ -1899,7 +1981,7 @@ message Action {
bool persist_values = 4;
// Optional. Required when opening a
- // [dialog](https://developers.google.com/chat/how-tos/dialogs).
+ // [dialog](https://developers.google.com/workspace/chat/dialogs).
//
// What to do in response to an interaction with a user, such as a user
// clicking a button in a card message.
@@ -1909,10 +1991,10 @@ message Action {
//
// By specifying an `interaction`, the app can respond in special interactive
// ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can
- // open a [dialog](https://developers.google.com/chat/how-tos/dialogs). When
+ // open a [dialog](https://developers.google.com/workspace/chat/dialogs). When
// specified, a loading indicator isn't shown. If specified for
// an add-on, the entire card is stripped and nothing is shown in the client.
//
- // [Google Chat apps](https://developers.google.com/chat):
+ // [Google Chat apps](https://developers.google.com/workspace/chat):
Interaction interaction = 5;
}