From 09bf15abade9094e5cd663ec01a769dc3acdc7d9 Mon Sep 17 00:00:00 2001
From: Yoshi Automation Method Details
keep - The Keep application's activity reports return information about various Google Keep activity events. The Keep activity report is only available for Google Workspace Business and Enterprise customers.
vault - The Vault activity reports return information about various types of Vault activity events.
gemini_in_workspace_apps - The Gemini for Workspace activity reports return information about various types of Gemini activity events performed by users within a Workspace application.
+ classroom - The Classroom activity reports return information about different types of [Classroom activity events](https://developers.google.com/workspace/admin/reports/v1/appendix/activity/classroom).
actorIpAddress: string, The Internet Protocol (IP) Address of host where the event was performed. This is an additional way to filter a report's summary using the IP address of the user whose activity is being reported. This IP address may or may not reflect the user's physical location. For example, the IP address can be the user's proxy server's address or a virtual private network (VPN) address. This parameter supports both IPv4 and IPv6 address versions.
customerId: string, The unique ID of the customer to retrieve data for.
endTime: string, Sets the end of the range of time shown in the report. The date is in the RFC 3339 format, for example 2010-10-28T10:26:35.000Z. The default value is the approximate time of the API request. An API report has three basic time concepts: - *Date of the API's request for a report*: When the API created and retrieved the report. - *Report's start time*: The beginning of the timespan shown in the report. The `startTime` must be before the `endTime` (if specified) and the current time when the request is made, or the API returns an error. - *Report's end time*: The end of the timespan shown in the report. For example, the timespan of events summarized in a report can start in April and end in May. The report itself can be requested in August. If the `endTime` is not specified, the report returns all activities from the `startTime` until the current time or the most recent 180 days if the `startTime` is more than 180 days in the past.
@@ -351,6 +352,7 @@ Method Details
chrome - The Chrome activity reports return information about Chrome browser and Chrome OS events.
data_studio - The Data Studio activity reports return information about various types of Data Studio activity events.
keep - The Keep application's activity reports return information about various Google Keep activity events. The Keep activity report is only available for Google Workspace Business and Enterprise customers.
+ classroom - The Classroom activity reports return information about different types of [Classroom activity events](https://developers.google.com/workspace/admin/reports/v1/appendix/activity/classroom).
body: object, The request body.
The object takes the form of:
diff --git a/googleapiclient/discovery_cache/documents/admin.reports_v1.json b/googleapiclient/discovery_cache/documents/admin.reports_v1.json
index 51e3c975fa2..3063bf1bf40 100644
--- a/googleapiclient/discovery_cache/documents/admin.reports_v1.json
+++ b/googleapiclient/discovery_cache/documents/admin.reports_v1.json
@@ -151,7 +151,8 @@
"data_studio",
"keep",
"vault",
-"gemini_in_workspace_apps"
+"gemini_in_workspace_apps",
+"classroom"
],
"enumDescriptions": [
"The Google Workspace Access Transparency activity reports return information about different types of Access Transparency activity events.",
@@ -176,10 +177,11 @@
"The Data Studio activity reports return information about various types of Data Studio activity events.",
"The Keep application's activity reports return information about various Google Keep activity events. The Keep activity report is only available for Google Workspace Business and Enterprise customers.",
"The Vault activity reports return information about various types of Vault activity events.",
-"The Gemini for Workspace activity reports return information about various types of Gemini activity events performed by users within a Workspace application."
+"The Gemini for Workspace activity reports return information about various types of Gemini activity events performed by users within a Workspace application.",
+"The Classroom activity reports return information about different types of [Classroom activity events](https://developers.google.com/workspace/admin/reports/v1/appendix/activity/classroom)."
],
"location": "path",
-"pattern": "(access_transparency)|(admin)|(calendar)|(chat)|(chrome)|(context_aware_access)|(data_studio)|(drive)|(gcp)|(gplus)|(groups)|(groups_enterprise)|(jamboard)|(keep)|(login)|(meet)|(mobile)|(rules)|(saml)|(token)|(user_accounts)|(vault)|(gemini_in_workspace_apps)",
+"pattern": "(access_transparency)|(admin)|(calendar)|(chat)|(chrome)|(classroom)|(context_aware_access)|(data_studio)|(drive)|(gcp)|(gplus)|(groups)|(groups_enterprise)|(jamboard)|(keep)|(login)|(meet)|(mobile)|(rules)|(saml)|(token)|(user_accounts)|(vault)|(gemini_in_workspace_apps)",
"required": true,
"type": "string"
},
@@ -292,7 +294,8 @@
"context_aware_access",
"chrome",
"data_studio",
-"keep"
+"keep",
+"classroom"
],
"enumDescriptions": [
"The Google Workspace Access Transparency activity reports return information about different types of Access Transparency activity events.",
@@ -315,10 +318,11 @@
"The Context-aware access activity reports return information about users' access denied events due to Context-aware access rules.",
"The Chrome activity reports return information about Chrome browser and Chrome OS events.",
"The Data Studio activity reports return information about various types of Data Studio activity events.",
-"The Keep application's activity reports return information about various Google Keep activity events. The Keep activity report is only available for Google Workspace Business and Enterprise customers."
+"The Keep application's activity reports return information about various Google Keep activity events. The Keep activity report is only available for Google Workspace Business and Enterprise customers.",
+"The Classroom activity reports return information about different types of [Classroom activity events](https://developers.google.com/workspace/admin/reports/v1/appendix/activity/classroom)."
],
"location": "path",
-"pattern": "(access_transparency)|(admin)|(calendar)|(chat)|(chrome)|(context_aware_access)|(data_studio)|(drive)|(gcp)|(gplus)|(groups)|(groups_enterprise)|(jamboard)|(keep)|(login)|(meet)|(mobile)|(rules)|(saml)|(token)|(user_accounts)",
+"pattern": "(access_transparency)|(admin)|(calendar)|(chat)|(chrome)|(classroom)|(context_aware_access)|(data_studio)|(drive)|(gcp)|(gplus)|(groups)|(groups_enterprise)|(jamboard)|(keep)|(login)|(meet)|(mobile)|(rules)|(saml)|(token)|(user_accounts)",
"required": true,
"type": "string"
},
@@ -629,7 +633,7 @@
}
}
},
-"revision": "20250707",
+"revision": "20250813",
"rootUrl": "https://admin.googleapis.com/",
"schemas": {
"Activities": {
From 47972ff9189dbc10f525cf6155c71b7b03764175 Mon Sep 17 00:00:00 2001
From: Yoshi Automation Method Details
{ # Collection of key/value string pairs.
"encrypted": True or False, # Required. Flag that specifies whether entry values will be encrypted. This field is retained for backward compatibility and the value of encrypted will always be `true`. Apigee X and hybrid do not support unencrypted key value maps.
- "maskedValues": True or False, # Required. Flag that specifies whether entry values will be masked when returned.
"name": "A String", # Required. ID of the key value map.
}
@@ -119,7 +118,6 @@ Method Details
{ # Collection of key/value string pairs.
"encrypted": True or False, # Required. Flag that specifies whether entry values will be encrypted. This field is retained for backward compatibility and the value of encrypted will always be `true`. Apigee X and hybrid do not support unencrypted key value maps.
- "maskedValues": True or False, # Required. Flag that specifies whether entry values will be masked when returned.
"name": "A String", # Required. ID of the key value map.
}
@@ -140,7 +138,6 @@ Method Details
{ # Collection of key/value string pairs.
"encrypted": True or False, # Required. Flag that specifies whether entry values will be encrypted. This field is retained for backward compatibility and the value of encrypted will always be `true`. Apigee X and hybrid do not support unencrypted key value maps.
- "maskedValues": True or False, # Required. Flag that specifies whether entry values will be masked when returned.
"name": "A String", # Required. ID of the key value map.
}
diff --git a/docs/dyn/apigee_v1.organizations.environments.keyvaluemaps.html b/docs/dyn/apigee_v1.organizations.environments.keyvaluemaps.html
index 4e322d4acc1..14f9006c9b6 100644
--- a/docs/dyn/apigee_v1.organizations.environments.keyvaluemaps.html
+++ b/docs/dyn/apigee_v1.organizations.environments.keyvaluemaps.html
@@ -105,7 +105,6 @@ Method Details
{ # Collection of key/value string pairs.
"encrypted": True or False, # Required. Flag that specifies whether entry values will be encrypted. This field is retained for backward compatibility and the value of encrypted will always be `true`. Apigee X and hybrid do not support unencrypted key value maps.
- "maskedValues": True or False, # Required. Flag that specifies whether entry values will be masked when returned.
"name": "A String", # Required. ID of the key value map.
}
@@ -119,7 +118,6 @@ Method Details
{ # Collection of key/value string pairs.
"encrypted": True or False, # Required. Flag that specifies whether entry values will be encrypted. This field is retained for backward compatibility and the value of encrypted will always be `true`. Apigee X and hybrid do not support unencrypted key value maps.
- "maskedValues": True or False, # Required. Flag that specifies whether entry values will be masked when returned.
"name": "A String", # Required. ID of the key value map.
}
@@ -140,7 +138,6 @@ Method Details
{ # Collection of key/value string pairs.
"encrypted": True or False, # Required. Flag that specifies whether entry values will be encrypted. This field is retained for backward compatibility and the value of encrypted will always be `true`. Apigee X and hybrid do not support unencrypted key value maps.
- "maskedValues": True or False, # Required. Flag that specifies whether entry values will be masked when returned.
"name": "A String", # Required. ID of the key value map.
}
diff --git a/docs/dyn/apigee_v1.organizations.keyvaluemaps.html b/docs/dyn/apigee_v1.organizations.keyvaluemaps.html
index d85662a9fca..76a827a8142 100644
--- a/docs/dyn/apigee_v1.organizations.keyvaluemaps.html
+++ b/docs/dyn/apigee_v1.organizations.keyvaluemaps.html
@@ -105,7 +105,6 @@ Method Details
{ # Collection of key/value string pairs.
"encrypted": True or False, # Required. Flag that specifies whether entry values will be encrypted. This field is retained for backward compatibility and the value of encrypted will always be `true`. Apigee X and hybrid do not support unencrypted key value maps.
- "maskedValues": True or False, # Required. Flag that specifies whether entry values will be masked when returned.
"name": "A String", # Required. ID of the key value map.
}
@@ -119,7 +118,6 @@ Method Details
{ # Collection of key/value string pairs.
"encrypted": True or False, # Required. Flag that specifies whether entry values will be encrypted. This field is retained for backward compatibility and the value of encrypted will always be `true`. Apigee X and hybrid do not support unencrypted key value maps.
- "maskedValues": True or False, # Required. Flag that specifies whether entry values will be masked when returned.
"name": "A String", # Required. ID of the key value map.
}
@@ -140,7 +138,6 @@ Method Details
{ # Collection of key/value string pairs.
"encrypted": True or False, # Required. Flag that specifies whether entry values will be encrypted. This field is retained for backward compatibility and the value of encrypted will always be `true`. Apigee X and hybrid do not support unencrypted key value maps.
- "maskedValues": True or False, # Required. Flag that specifies whether entry values will be masked when returned.
"name": "A String", # Required. ID of the key value map.
}
diff --git a/googleapiclient/discovery_cache/documents/apigee.v1.json b/googleapiclient/discovery_cache/documents/apigee.v1.json
index 90228351d65..addcf057ae2 100644
--- a/googleapiclient/discovery_cache/documents/apigee.v1.json
+++ b/googleapiclient/discovery_cache/documents/apigee.v1.json
@@ -11127,7 +11127,7 @@
}
}
},
-"revision": "20250731",
+"revision": "20250808",
"rootUrl": "https://apigee.googleapis.com/",
"schemas": {
"EdgeConfigstoreBundleBadBundle": {
@@ -15248,10 +15248,6 @@
"description": "Required. Flag that specifies whether entry values will be encrypted. This field is retained for backward compatibility and the value of encrypted will always be `true`. Apigee X and hybrid do not support unencrypted key value maps.",
"type": "boolean"
},
-"maskedValues": {
-"description": "Required. Flag that specifies whether entry values will be masked when returned.",
-"type": "boolean"
-},
"name": {
"description": "Required. ID of the key value map.",
"type": "string"
From 2959c38c257d93320d310d72f0d76e1f4268c699 Mon Sep 17 00:00:00 2001
From: Yoshi Automation Method Details
# Object with schema name: DataSourceParameter
],
"immutable": True or False, # Cannot be changed after initial creation.
+ "maxListSize": "A String", # For list parameters, the max size of the list.
"maxValue": 3.14, # For integer and double values specifies maximum allowed value.
"minValue": 3.14, # For integer and double values specifies minimum allowed value.
"paramId": "A String", # Parameter identifier.
@@ -224,6 +225,7 @@ Method Details
# Object with schema name: DataSourceParameter
],
"immutable": True or False, # Cannot be changed after initial creation.
+ "maxListSize": "A String", # For list parameters, the max size of the list.
"maxValue": 3.14, # For integer and double values specifies maximum allowed value.
"minValue": 3.14, # For integer and double values specifies minimum allowed value.
"paramId": "A String", # Parameter identifier.
diff --git a/docs/dyn/bigquerydatatransfer_v1.projects.locations.dataSources.html b/docs/dyn/bigquerydatatransfer_v1.projects.locations.dataSources.html
index 0d2a1835666..ee866ea97c3 100644
--- a/docs/dyn/bigquerydatatransfer_v1.projects.locations.dataSources.html
+++ b/docs/dyn/bigquerydatatransfer_v1.projects.locations.dataSources.html
@@ -159,6 +159,7 @@ Method Details
# Object with schema name: DataSourceParameter
],
"immutable": True or False, # Cannot be changed after initial creation.
+ "maxListSize": "A String", # For list parameters, the max size of the list.
"maxValue": 3.14, # For integer and double values specifies maximum allowed value.
"minValue": 3.14, # For integer and double values specifies minimum allowed value.
"paramId": "A String", # Parameter identifier.
@@ -224,6 +225,7 @@ Method Details
# Object with schema name: DataSourceParameter
],
"immutable": True or False, # Cannot be changed after initial creation.
+ "maxListSize": "A String", # For list parameters, the max size of the list.
"maxValue": 3.14, # For integer and double values specifies maximum allowed value.
"minValue": 3.14, # For integer and double values specifies minimum allowed value.
"paramId": "A String", # Parameter identifier.
diff --git a/docs/dyn/bigquerydatatransfer_v1.projects.locations.html b/docs/dyn/bigquerydatatransfer_v1.projects.locations.html
index ecc99821931..b328ad6694d 100644
--- a/docs/dyn/bigquerydatatransfer_v1.projects.locations.html
+++ b/docs/dyn/bigquerydatatransfer_v1.projects.locations.html
@@ -168,7 +168,7 @@ Method Details
Args:
name: string, The resource that owns the locations collection, if applicable. (required)
- extraLocationTypes: string, Optional. A list of extra location types that should be used as conditions for controlling the visibility of the locations. (repeated)
+ extraLocationTypes: string, Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage. (repeated)
filter: string, A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).
pageSize: integer, The maximum number of results to return. If not set, the service selects a default.
pageToken: string, A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.
diff --git a/googleapiclient/discovery_cache/documents/bigquerydatatransfer.v1.json b/googleapiclient/discovery_cache/documents/bigquerydatatransfer.v1.json
index e591123c83c..4bab3906220 100644
--- a/googleapiclient/discovery_cache/documents/bigquerydatatransfer.v1.json
+++ b/googleapiclient/discovery_cache/documents/bigquerydatatransfer.v1.json
@@ -418,7 +418,7 @@
],
"parameters": {
"extraLocationTypes": {
-"description": "Optional. A list of extra location types that should be used as conditions for controlling the visibility of the locations.",
+"description": "Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage.",
"location": "query",
"repeated": true,
"type": "string"
@@ -1488,7 +1488,7 @@
}
}
},
-"revision": "20250603",
+"revision": "20250813",
"rootUrl": "https://bigquerydatatransfer.googleapis.com/",
"schemas": {
"CheckValidCredsRequest": {
@@ -1665,6 +1665,11 @@
"description": "Cannot be changed after initial creation.",
"type": "boolean"
},
+"maxListSize": {
+"description": "For list parameters, the max size of the list.",
+"format": "int64",
+"type": "string"
+},
"maxValue": {
"description": "For integer and double values specifies maximum allowed value.",
"format": "double",
From 3726cf782e08133eb33425d59914ffe3a581c294 Mon Sep 17 00:00:00 2001
From: Yoshi Automation Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -203,6 +232,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -299,6 +329,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -393,6 +434,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -441,12 +516,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -469,6 +548,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -512,6 +602,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -602,6 +703,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -644,12 +760,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -698,12 +849,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -726,6 +881,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -763,6 +929,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -833,6 +1000,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -862,6 +1058,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -958,6 +1155,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -1052,6 +1260,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -1100,12 +1342,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -1128,6 +1374,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -1171,6 +1428,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -1261,6 +1529,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -1303,12 +1586,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -1357,12 +1675,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -1385,6 +1707,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -1422,6 +1755,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -1705,6 +2039,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -1734,6 +2097,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -1830,6 +2194,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -1924,6 +2299,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -1972,12 +2381,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -2000,6 +2413,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -2043,6 +2467,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -2133,8 +2568,23 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
- "grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
- "borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
+ "borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
"strokeColor": { # Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn't have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ... # The colors to use when the type is `BORDER_TYPE_STROKE`. To set the stroke color, specify a value for the `red`, `green`, and `blue` fields. The value must be a float number between 0 and 1 based on the RGB color value, where `0` (0/255) represents the absence of color and `1` (255/255) represents the maximum intensity of the color. For example, the following sets the color to red at its maximum intensity: ``` "color": { "red": 1, "green": 0, "blue": 0, } ``` The `alpha` field is unavailable for stroke color. If specified, this field is ignored.
"alpha": 3.14, # The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).
@@ -2175,12 +2625,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -2229,12 +2714,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -2257,6 +2746,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -2294,6 +2794,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -2494,6 +2995,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -2523,6 +3053,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -2619,6 +3150,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -2713,6 +3255,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -2761,12 +3337,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -2789,6 +3369,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -2832,6 +3423,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -2922,6 +3524,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -2964,12 +3581,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -3018,12 +3670,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -3046,6 +3702,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -3083,6 +3750,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -3153,6 +3821,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -3182,6 +3879,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -3278,6 +3976,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -3372,6 +4081,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -3420,12 +4163,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -3448,6 +4195,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -3491,6 +4249,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -3581,6 +4350,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -3623,12 +4407,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -3677,12 +4496,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -3705,6 +4528,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -3742,6 +4576,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -4025,6 +4860,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -4054,6 +4918,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -4150,6 +5015,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -4244,7 +5120,41 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
- "externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
+ "externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
"interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
@@ -4292,12 +5202,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -4320,6 +5234,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -4363,6 +5288,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -4453,6 +5389,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -4495,12 +5446,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -4549,12 +5535,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -4577,6 +5567,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -4614,6 +5615,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -4832,6 +5834,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -4861,6 +5892,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -4957,6 +5989,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -5051,6 +6094,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -5099,12 +6176,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -5127,6 +6208,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -5170,6 +6262,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -5260,6 +6363,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -5302,12 +6420,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -5356,12 +6509,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -5384,6 +6541,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -5421,6 +6589,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -5491,6 +6660,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -5520,6 +6718,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -5616,6 +6815,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -5710,6 +6920,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -5758,12 +7002,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -5786,6 +7034,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -5829,6 +7088,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -5919,6 +7189,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -5961,28 +7246,63 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
- "externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
- "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
- "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
- "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
- "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
- "parameters": [ # List of action parameters.
- { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
- "key": "A String", # The name of the parameter for the action script.
- "value": "A String", # The value of the parameter.
- },
- ],
- "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
- "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
- "A String",
- ],
- },
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
+ "externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
"hintText": "A String", # Optional. Text that appears below the selection input field meant to assist users by prompting them to enter a certain value. This text is always visible. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
"items": [ # An array of selectable items. For example, an array of radio buttons or checkboxes. Supports up to 100 items.
{ # An item that users can select in a selection input, such as a checkbox or switch. Supports up to 100 items. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -6015,12 +7335,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -6043,6 +7367,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -6080,6 +7415,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -6363,6 +7699,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -6392,6 +7757,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -6488,6 +7854,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -6582,6 +7959,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -6630,12 +8041,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -6658,6 +8073,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -6701,6 +8127,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -6791,6 +8228,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -6833,12 +8285,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -6887,12 +8374,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -6915,6 +8406,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -6952,6 +8454,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -7158,6 +8661,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -7187,6 +8719,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -7283,6 +8816,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -7377,6 +8921,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -7425,12 +9003,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -7453,6 +9035,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -7496,6 +9089,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -7586,6 +9190,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -7628,12 +9247,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -7682,12 +9336,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -7710,6 +9368,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -7747,6 +9416,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -7817,6 +9487,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -7846,6 +9545,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -7942,6 +9642,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -8036,6 +9747,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -8084,12 +9829,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -8112,6 +9861,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -8155,6 +9915,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -8245,6 +10016,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -8287,12 +10073,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -8341,12 +10162,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -8369,6 +10194,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -8406,6 +10242,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -8689,6 +10526,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -8718,6 +10584,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -8814,6 +10681,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -8908,6 +10786,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -8956,12 +10868,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -8984,6 +10900,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -9027,6 +10954,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -9117,6 +11055,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -9159,12 +11112,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -9213,12 +11201,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -9241,6 +11233,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -9278,6 +11281,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -9489,6 +11493,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -9518,6 +11551,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -9614,6 +11648,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -9708,6 +11753,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -9756,12 +11835,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -9784,6 +11867,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -9827,6 +11921,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -9917,6 +12022,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -9959,12 +12079,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -10013,12 +12168,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -10041,6 +12200,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -10078,6 +12248,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -10148,6 +12319,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -10177,6 +12377,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -10273,6 +12474,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -10367,6 +12579,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -10415,12 +12661,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -10443,6 +12693,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -10486,6 +12747,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -10576,6 +12848,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -10609,21 +12896,56 @@ Method Details
},
"imageUri": "A String", # The image URL.
},
- "layout": "A String", # The layout to use for the grid item.
- "subtitle": "A String", # The grid item's subtitle.
- "title": "A String", # The grid item's title.
+ "layout": "A String", # The layout to use for the grid item.
+ "subtitle": "A String", # The grid item's subtitle.
+ "title": "A String", # The grid item's title.
+ },
+ ],
+ "onClick": # Object with schema name: GoogleAppsCardV1OnClick # This callback is reused by each individual grid item, but with the item's identifier and index in the items list added to the callback's parameters.
+ "title": "A String", # The text that displays in the grid header.
+ },
+ "horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
+ "altText": "A String", # The alternative text of this image that's used for accessibility.
+ "imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
+ "onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
+ },
+ "selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
},
],
- "onClick": # Object with schema name: GoogleAppsCardV1OnClick # This callback is reused by each individual grid item, but with the item's identifier and index in the items list added to the callback's parameters.
- "title": "A String", # The text that displays in the grid header.
- },
- "horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
- "image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
- "altText": "A String", # The alternative text of this image that's used for accessibility.
- "imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
- "onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
- },
- "selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -10672,12 +12994,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -10700,6 +13026,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -10737,6 +13074,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -11020,6 +13358,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -11049,6 +13416,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -11145,6 +13513,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -11239,6 +13618,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -11287,12 +13700,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -11315,6 +13732,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -11358,6 +13786,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -11448,6 +13887,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -11490,12 +13944,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -11544,12 +14033,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -11572,6 +14065,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -11609,6 +14113,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -11803,6 +14308,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -11832,6 +14366,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -11928,6 +14463,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -12022,6 +14568,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -12070,12 +14650,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -12098,6 +14682,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -12141,6 +14736,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -12231,6 +14837,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -12273,12 +14894,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -12327,12 +14983,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -12355,6 +15015,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -12392,6 +15063,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -12462,6 +15134,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -12491,6 +15192,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -12587,6 +15289,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -12681,6 +15394,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -12729,12 +15476,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -12757,6 +15508,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -12800,6 +15562,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -12890,6 +15663,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -12932,12 +15720,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -12986,12 +15809,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -13014,6 +15841,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -13051,6 +15889,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -13334,6 +16173,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -13363,6 +16231,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -13459,6 +16328,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -13553,6 +16433,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -13601,12 +16515,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -13629,6 +16547,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -13672,6 +16601,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -13762,6 +16702,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -13804,12 +16759,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -13858,12 +16848,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -13886,6 +16880,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -13923,6 +16928,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -14117,6 +17123,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -14146,6 +17181,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -14242,6 +17278,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -14336,6 +17383,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -14384,12 +17465,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -14412,6 +17497,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -14455,6 +17551,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -14545,6 +17652,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -14578,21 +17700,56 @@ Method Details
},
"imageUri": "A String", # The image URL.
},
- "layout": "A String", # The layout to use for the grid item.
- "subtitle": "A String", # The grid item's subtitle.
- "title": "A String", # The grid item's title.
+ "layout": "A String", # The layout to use for the grid item.
+ "subtitle": "A String", # The grid item's subtitle.
+ "title": "A String", # The grid item's title.
+ },
+ ],
+ "onClick": # Object with schema name: GoogleAppsCardV1OnClick # This callback is reused by each individual grid item, but with the item's identifier and index in the items list added to the callback's parameters.
+ "title": "A String", # The text that displays in the grid header.
+ },
+ "horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
+ "altText": "A String", # The alternative text of this image that's used for accessibility.
+ "imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
+ "onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
+ },
+ "selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
},
],
- "onClick": # Object with schema name: GoogleAppsCardV1OnClick # This callback is reused by each individual grid item, but with the item's identifier and index in the items list added to the callback's parameters.
- "title": "A String", # The text that displays in the grid header.
- },
- "horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
- "image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
- "altText": "A String", # The alternative text of this image that's used for accessibility.
- "imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
- "onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
- },
- "selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -14641,12 +17798,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -14669,6 +17830,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -14706,6 +17878,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -14776,6 +17949,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -14805,6 +18007,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -14901,6 +18104,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -14995,6 +18209,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -15043,12 +18291,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -15071,6 +18323,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -15114,6 +18377,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -15204,6 +18478,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -15246,12 +18535,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -15300,12 +18624,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -15328,6 +18656,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -15365,6 +18704,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -15648,6 +18988,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -15677,6 +19046,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -15773,6 +19143,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -15867,6 +19248,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -15915,12 +19330,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -15943,6 +19362,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -15986,6 +19416,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -16076,6 +19517,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -16118,12 +19574,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -16172,12 +19663,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -16200,6 +19695,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -16237,6 +19743,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -16431,6 +19938,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -16460,6 +19996,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -16556,6 +20093,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -16650,6 +20198,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -16698,12 +20280,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -16726,6 +20312,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -16769,6 +20366,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -16859,6 +20467,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -16901,12 +20524,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -16955,12 +20613,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -16983,6 +20645,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -17020,6 +20693,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -17090,6 +20764,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -17119,6 +20822,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -17215,6 +20919,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -17309,6 +21024,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -17357,12 +21106,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -17385,6 +21138,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -17428,6 +21192,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -17518,6 +21293,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -17560,12 +21350,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -17614,12 +21439,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -17642,6 +21471,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -17679,6 +21519,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -17962,6 +21803,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -17991,6 +21861,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -18087,6 +21958,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -18181,6 +22063,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -18229,12 +22145,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -18257,6 +22177,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -18300,6 +22231,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -18390,6 +22332,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -18432,12 +22389,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -18486,12 +22478,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -18514,6 +22510,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -18551,6 +22558,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
diff --git a/docs/dyn/chat_v1.spaces.spaceEvents.html b/docs/dyn/chat_v1.spaces.spaceEvents.html
index 57945450ee4..ea7a78ea32b 100644
--- a/docs/dyn/chat_v1.spaces.spaceEvents.html
+++ b/docs/dyn/chat_v1.spaces.spaceEvents.html
@@ -289,6 +289,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -318,6 +347,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -414,6 +444,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -508,6 +549,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -556,12 +631,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -584,6 +663,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -627,6 +717,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -717,6 +818,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -759,12 +875,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -813,12 +964,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -841,6 +996,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -878,6 +1044,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -948,6 +1115,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -977,6 +1173,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -1073,6 +1270,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -1167,6 +1375,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -1215,12 +1457,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -1243,6 +1489,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -1286,6 +1543,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -1376,6 +1644,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -1418,12 +1701,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -1472,12 +1790,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -1500,6 +1822,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -1537,6 +1870,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -1820,6 +2154,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -1849,6 +2212,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -1945,6 +2309,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -2039,6 +2414,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -2087,12 +2496,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -2115,6 +2528,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -2158,12 +2582,23 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
- "label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
- "name": "A String", # 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/workspace/chat/read-form-data).
- "onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
- "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
- "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
- "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ "label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
+ "name": "A String", # 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/workspace/chat/read-form-data).
+ "onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
"loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
"parameters": [ # List of action parameters.
{ # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
@@ -2248,6 +2683,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -2290,12 +2740,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -2344,12 +2829,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -2372,6 +2861,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -2409,6 +2909,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -2598,6 +3099,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -2627,6 +3157,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -2723,6 +3254,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -2817,6 +3359,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -2865,12 +3441,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -2893,6 +3473,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -2936,6 +3527,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -3026,6 +3628,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -3068,12 +3685,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -3122,12 +3774,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -3150,6 +3806,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -3187,6 +3854,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -3257,6 +3925,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -3286,6 +3983,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -3382,6 +4080,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -3476,6 +4185,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -3524,12 +4267,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -3552,6 +4299,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -3595,6 +4353,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -3685,6 +4454,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -3727,12 +4511,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -3781,12 +4600,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -3809,6 +4632,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -3846,6 +4680,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -4129,11 +4964,40 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
- "fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
- "primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
- "secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
- },
- "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): # The header of the card. A header usually contains a leading image and a title. Headers always appear at the top of a card.
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
+ "fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
+ "secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
+ },
+ "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): # The header of the card. A header usually contains a leading image and a title. Headers always appear at the top of a card.
"imageAltText": "A String", # The alternative text of this image that's used for accessibility.
"imageType": "A String", # The shape used to crop the image. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"imageUrl": "A String", # The HTTPS URL of the image in the card header.
@@ -4158,6 +5022,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -4254,6 +5119,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -4348,6 +5224,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -4396,12 +5306,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -4424,6 +5338,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -4467,6 +5392,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -4557,6 +5493,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -4599,12 +5550,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -4653,12 +5639,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -4681,6 +5671,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -4718,6 +5719,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -4907,6 +5909,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -4936,6 +5967,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -5032,6 +6064,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -5126,6 +6169,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -5174,12 +6251,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -5202,6 +6283,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -5245,6 +6337,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -5335,6 +6438,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -5377,12 +6495,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -5431,12 +6584,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -5459,6 +6616,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -5496,6 +6664,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -5566,6 +6735,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -5595,6 +6793,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -5691,6 +6890,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -5785,6 +6995,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -5833,12 +7077,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -5861,6 +7109,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -5904,6 +7163,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -5994,6 +7264,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -6036,12 +7321,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -6090,12 +7410,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -6118,6 +7442,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -6155,6 +7490,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -6438,6 +7774,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -6467,6 +7832,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -6563,6 +7929,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -6657,6 +8034,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -6705,12 +8116,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -6733,6 +8148,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -6776,6 +8202,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -6866,6 +8303,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -6908,12 +8360,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -6962,12 +8449,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -6990,6 +8481,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -7027,6 +8529,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -7214,6 +8717,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -7243,6 +8775,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -7339,6 +8872,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -7420,19 +8964,53 @@ Method Details
"A String",
],
},
- "selected": True or False, # When `true`, the switch is selected.
- "value": "A String", # 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/workspace/chat/read-form-data).
- },
- "text": "A String", # Required. The primary text. Supports simple formatting. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
- "topLabel": "A String", # The text that appears above `text`. Always truncates.
- "wrapText": True or False, # The wrap text setting. If `true`, the text wraps and displays on multiple lines. Otherwise, the text is truncated. Only applies to `text`, not `topLabel` and `bottomLabel`.
- },
- "image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Image widget.
- "altText": "A String", # The alternative text of this image that's used for accessibility.
- "imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
- "onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
- },
- "selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "selected": True or False, # When `true`, the switch is selected.
+ "value": "A String", # 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/workspace/chat/read-form-data).
+ },
+ "text": "A String", # Required. The primary text. Supports simple formatting. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "topLabel": "A String", # The text that appears above `text`. Always truncates.
+ "wrapText": True or False, # The wrap text setting. If `true`, the text wraps and displays on multiple lines. Otherwise, the text is truncated. Only applies to `text`, not `topLabel` and `bottomLabel`.
+ },
+ "image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Image widget.
+ "altText": "A String", # The alternative text of this image that's used for accessibility.
+ "imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
+ "onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
+ },
+ "selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -7481,12 +9059,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -7509,6 +9091,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -7552,6 +9145,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -7642,6 +9246,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -7684,12 +9303,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -7738,12 +9392,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -7766,6 +9424,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -7803,6 +9472,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -7873,6 +9543,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -7902,6 +9601,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -7998,6 +9698,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -8092,6 +9803,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -8140,12 +9885,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -8168,6 +9917,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -8211,6 +9971,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -8301,6 +10072,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -8343,12 +10129,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -8397,12 +10218,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -8425,6 +10250,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -8462,6 +10298,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -8745,6 +10582,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -8774,6 +10640,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -8870,6 +10737,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -8964,6 +10842,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -9012,12 +10924,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -9040,6 +10956,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -9083,6 +11010,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -9173,6 +11111,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -9215,12 +11168,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -9269,12 +11257,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -9297,6 +11289,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -9334,6 +11337,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -9519,6 +11523,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -9548,6 +11581,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -9644,6 +11678,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -9738,6 +11783,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -9786,12 +11865,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -9814,6 +11897,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -9857,6 +11951,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -9947,6 +12052,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -9989,12 +12109,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -10043,12 +12198,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -10071,6 +12230,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -10108,6 +12278,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -10178,6 +12349,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -10207,6 +12407,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -10303,6 +12504,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -10397,6 +12609,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -10445,12 +12691,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -10473,6 +12723,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -10516,6 +12777,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -10606,6 +12878,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -10648,12 +12935,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -10702,12 +13024,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -10730,6 +13056,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -10767,6 +13104,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -11050,6 +13388,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -11079,6 +13446,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -11175,6 +13543,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -11269,6 +13648,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -11317,12 +13730,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -11345,6 +13762,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -11388,6 +13816,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -11478,6 +13917,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -11520,12 +13974,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -11574,12 +14063,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -11602,6 +14095,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -11639,6 +14143,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -11824,6 +14329,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -11853,6 +14387,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -11949,6 +14484,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -12043,6 +14589,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -12091,12 +14671,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -12119,6 +14703,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -12162,6 +14757,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -12252,6 +14858,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -12294,12 +14915,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -12348,12 +15004,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -12376,6 +15036,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -12413,6 +15084,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -12483,6 +15155,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -12512,6 +15213,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -12608,6 +15310,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -12702,6 +15415,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -12750,12 +15497,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -12778,6 +15529,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -12821,6 +15583,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -12911,6 +15684,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -12953,12 +15741,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -13007,12 +15830,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -13035,6 +15862,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -13072,6 +15910,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -13355,6 +16194,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -13384,6 +16252,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -13480,6 +16349,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -13574,6 +16454,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -13622,12 +16536,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -13650,6 +16568,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -13693,6 +16622,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -13783,6 +16723,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -13825,12 +16780,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -13879,12 +16869,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -13907,6 +16901,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -13944,6 +16949,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -14530,6 +17536,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -14559,6 +17594,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -14655,6 +17691,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -14749,6 +17796,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -14797,12 +17878,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -14825,6 +17910,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -14868,6 +17964,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -14958,6 +18065,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -15000,12 +18122,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -15054,12 +18211,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -15082,6 +18243,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -15119,6 +18291,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -15189,6 +18362,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -15218,6 +18420,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -15314,6 +18517,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -15408,6 +18622,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -15456,12 +18704,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -15484,6 +18736,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -15527,6 +18790,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -15617,6 +18891,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -15659,12 +18948,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -15713,12 +19037,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -15741,6 +19069,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -15778,6 +19117,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -16061,6 +19401,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -16090,6 +19459,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -16186,6 +19556,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -16280,6 +19661,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -16328,12 +19743,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -16356,6 +19775,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -16399,6 +19829,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -16489,6 +19930,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -16531,12 +19987,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -16585,12 +20076,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -16613,6 +20108,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -16650,6 +20156,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -16839,6 +20346,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -16868,6 +20404,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -16964,6 +20501,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -17058,6 +20606,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -17106,12 +20688,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -17134,6 +20720,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -17177,6 +20774,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -17267,6 +20875,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -17309,12 +20932,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -17363,12 +21021,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -17391,6 +21053,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -17428,6 +21101,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -17498,6 +21172,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -17527,6 +21230,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -17623,6 +21327,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -17717,6 +21432,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -17765,12 +21514,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -17793,6 +21546,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -17836,6 +21600,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -17926,6 +21701,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -17968,12 +21758,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -18022,12 +21847,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -18050,6 +21879,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -18087,6 +21927,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -18369,7 +22210,36 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # The `onClick` action for this action item.
},
],
- "displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -18399,6 +22269,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -18495,6 +22366,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -18589,6 +22471,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -18637,12 +22553,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -18665,6 +22585,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -18708,6 +22639,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -18798,6 +22740,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -18840,12 +22797,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -18894,12 +22886,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -18922,6 +22918,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -18959,6 +22966,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -19148,6 +23156,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -19177,6 +23214,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -19273,6 +23311,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -19367,6 +23416,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -19415,12 +23498,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -19443,6 +23530,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -19486,6 +23584,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -19576,6 +23685,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -19618,12 +23742,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -19672,12 +23831,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -19700,6 +23863,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -19737,6 +23911,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -19807,6 +23982,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -19836,6 +24040,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -19932,6 +24137,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -20026,6 +24242,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -20074,12 +24324,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -20102,6 +24356,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -20145,6 +24410,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -20235,6 +24511,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -20277,12 +24568,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -20331,12 +24657,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -20359,6 +24689,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -20396,6 +24737,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -20679,6 +25021,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -20708,6 +25079,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -20804,6 +25176,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -20898,6 +25281,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -20946,12 +25363,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -20974,6 +25395,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -21017,6 +25449,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -21107,6 +25550,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -21149,12 +25607,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -21203,12 +25696,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -21231,6 +25728,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -21268,6 +25776,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -21455,6 +25964,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -21484,6 +26022,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -21580,6 +26119,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -21674,6 +26224,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -21722,12 +26306,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -21750,6 +26338,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -21793,6 +26392,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -21883,6 +26493,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -21925,12 +26550,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -21979,12 +26639,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -22007,6 +26671,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -22044,6 +26719,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -22114,6 +26790,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -22143,6 +26848,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -22239,6 +26945,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -22320,19 +27037,53 @@ Method Details
"A String",
],
},
- "selected": True or False, # When `true`, the switch is selected.
- "value": "A String", # 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/workspace/chat/read-form-data).
- },
- "text": "A String", # Required. The primary text. Supports simple formatting. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
- "topLabel": "A String", # The text that appears above `text`. Always truncates.
- "wrapText": True or False, # The wrap text setting. If `true`, the text wraps and displays on multiple lines. Otherwise, the text is truncated. Only applies to `text`, not `topLabel` and `bottomLabel`.
- },
- "image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Image widget.
- "altText": "A String", # The alternative text of this image that's used for accessibility.
- "imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
- "onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
- },
- "selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "selected": True or False, # When `true`, the switch is selected.
+ "value": "A String", # 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/workspace/chat/read-form-data).
+ },
+ "text": "A String", # Required. The primary text. Supports simple formatting. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "topLabel": "A String", # The text that appears above `text`. Always truncates.
+ "wrapText": True or False, # The wrap text setting. If `true`, the text wraps and displays on multiple lines. Otherwise, the text is truncated. Only applies to `text`, not `topLabel` and `bottomLabel`.
+ },
+ "image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Image widget.
+ "altText": "A String", # The alternative text of this image that's used for accessibility.
+ "imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
+ "onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
+ },
+ "selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -22381,12 +27132,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -22409,6 +27164,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -22452,6 +27218,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -22542,6 +27319,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -22584,12 +27376,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -22638,12 +27465,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -22666,6 +27497,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -22703,6 +27545,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -22986,6 +27829,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -23015,6 +27887,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -23111,6 +27984,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -23205,6 +28089,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -23253,12 +28171,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -23281,6 +28203,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -23324,6 +28257,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -23414,6 +28358,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -23456,12 +28415,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -23510,12 +28504,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -23538,6 +28536,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -23575,6 +28584,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -23760,6 +28770,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -23789,6 +28828,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -23885,6 +28925,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -23979,6 +29030,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -24027,12 +29112,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -24055,6 +29144,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -24098,6 +29198,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -24188,6 +29299,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -24230,12 +29356,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -24284,12 +29445,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -24312,6 +29477,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -24349,6 +29525,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -24419,6 +29596,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -24448,6 +29654,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -24544,6 +29751,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -24638,6 +29856,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -24686,12 +29938,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -24714,6 +29970,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -24757,6 +30024,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -24847,6 +30125,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -24889,12 +30182,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -24943,12 +30271,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -24971,6 +30303,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -25008,6 +30351,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -25291,6 +30635,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -25320,6 +30693,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -25416,6 +30790,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -25510,6 +30895,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -25558,12 +30977,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -25586,6 +31009,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -25629,6 +31063,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -25719,6 +31164,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -25761,12 +31221,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -25815,12 +31310,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -25843,6 +31342,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -25880,6 +31390,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -26065,6 +31576,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -26094,6 +31634,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -26190,6 +31731,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -26284,6 +31836,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -26332,12 +31918,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -26360,6 +31950,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -26403,6 +32004,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -26493,6 +32105,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -26535,12 +32162,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -26589,12 +32251,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -26617,6 +32283,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -26654,6 +32331,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -26724,6 +32402,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -26753,6 +32460,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -26849,6 +32557,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -26943,6 +32662,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -26991,12 +32744,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -27019,6 +32776,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -27062,6 +32830,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -27152,6 +32931,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -27194,12 +32988,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -27248,12 +33077,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -27276,6 +33109,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -27313,6 +33157,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
@@ -27596,6 +33441,35 @@ Method Details
},
],
"displayStyle": "A String", # In Google Workspace add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace add-ons](https://developers.google.com/workspace/add-ons):
+ "expressionData": [ # The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "conditions": [ # The list of conditions that are determined by the expression evaluation result.
+ { # Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "expressionDataCondition": { # Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The condition that is determined by the expression data.
+ "conditionType": "A String", # The type of the condition.
+ },
+ },
+ ],
+ "eventActions": [ # The list of actions that the ExpressionData can be used.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
+ "expression": "A String", # The uncompiled expression.
+ "id": "A String", # The unique identifier of the ExpressionData.
+ },
+ ],
"fixedFooter": { # A persistent (sticky) footer that that appears at the bottom of the 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/workspace/chat/dialogs), but not [card 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): # The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"primaryButton": # Object with schema name: GoogleAppsCardV1Button # The primary button of the fixed footer. The button must be a text button with text and color set.
"secondaryButton": # Object with schema name: GoogleAppsCardV1Button # The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`.
@@ -27625,6 +33499,7 @@ Method Details
},
"collapsible": True or False, # Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.
"header": "A String", # Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
+ "id": "A String", # A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"uncollapsibleWidgetsCount": 42, # The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.
"widgets": [ # All the widgets in the section. Must contain at least one widget.
{ # Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.
@@ -27721,6 +33596,17 @@ Method Details
"layout": "A String", # Specified chip list layout.
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # DateTimePicker widget.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -27815,6 +33701,40 @@ Method Details
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # SelectionInput widget.
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -27863,12 +33783,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -27891,6 +33815,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -27934,6 +33869,17 @@ Method Details
],
},
"dateTimePicker": { # Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` "dateTimePicker": { "name": "appointment_time", "label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": 796435200000 } ```
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"label": "A String", # The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.
"name": "A String", # 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/workspace/chat/read-form-data).
"onChangeAction": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface.
@@ -28024,6 +33970,21 @@ Method Details
},
"divider": { # Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [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): For example, the following JSON creates a divider: ``` "divider": {} ``` # Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
},
+ "eventActions": [ # Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ "commonWidgetAction": { # Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # Common widget action.
+ "updateVisibilityAction": { # Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. # The action to update the visibility of a widget.
+ "visibility": "A String", # The new visibility.
+ },
+ },
+ "postEventTriggers": [ # The list of triggers that will be triggered after the EventAction is executed.
+ { # Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "actionRuleId": "A String", # The unique identifier of the ActionRule.
+ },
+ ],
+ },
+ ],
"grid": { # 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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ``` # Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```
"borderStyle": { # The style options for the border of a card or widget, including the border type and color. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The border style to apply to each grid item.
"cornerRadius": 42, # The corner radius for the border.
@@ -28066,12 +34027,47 @@ Method Details
"title": "A String", # The text that displays in the grid header.
},
"horizontalAlignment": "A String", # Specifies whether widgets align to the left, right, or center of a column.
+ "id": "A String", # A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
"image": { # An image that is specified by a URL and can have an `onClick` action. For an 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): # Displays an image. For example, the following JSON creates an image with alternative text: ``` "image": { "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText": "Chat app avatar" } ```
"altText": "A String", # The alternative text of this image that's used for accessibility.
"imageUrl": "A String", # The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```
"onClick": # Object with schema name: GoogleAppsCardV1OnClick # When a user clicks the image, the click triggers this action.
},
"selectionInput": { # A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` "selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true }, { "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected": false } ] } ```
+ "dataSourceConfigs": [ # Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ { # A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # The data is from a Google Workspace application.
+ "commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
+ },
+ "remoteDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # The data is from a remote data provider.
+ "allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
+ "interaction": "A String", # Optional. Required when opening a [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. If unspecified, the app responds by executing an `action`—like opening a link or running a function—as normal. 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/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/workspace/chat):
+ "loadIndicator": "A String", # Specifies the loading indicator that the action displays while making the call to the action.
+ "parameters": [ # List of action parameters.
+ { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`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):
+ "key": "A String", # The name of the parameter for the action script.
+ "value": "A String", # The value of the parameter.
+ },
+ ],
+ "persistValues": True or False, # Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the 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/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`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/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. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
+ "requiredWidgets": [ # Optional. Fill this list with the names of widgets that this Action needs for a valid submission. If the widgets listed here don't have a value when this Action is invoked, the form submission is aborted. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
+ "A String",
+ ],
+ },
+ },
+ ],
"externalDataSource": { # An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # An external data source, such as a relational database.
"allWidgetsAreRequired": True or False, # Optional. If this is true, then all widgets are considered required by this action. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"function": "A String", # A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
@@ -28120,12 +34116,16 @@ Method Details
},
"platformDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Workspace.
"commonDataSource": "A String", # A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.
- "hostAppDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries).
"chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
"spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
"defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
},
},
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
},
},
"type": "A String", # The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.
@@ -28148,6 +34148,17 @@ Method Details
],
},
"hintText": "A String", # Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.
+ "hostAppDataSource": { # A data source from a Google Workspace application. The data source populates available items for a widget. # A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
+ "chatDataSource": { # For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # A data source from Google Chat.
+ "spaceDataSource": { # A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat): # Google Chat spaces that the user is a member of.
+ "defaultToCurrentSpace": True or False, # If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.
+ },
+ },
+ "workflowDataSource": { # * Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google. # A data source from Google Workflow.
+ "includeVariables": True or False, # Whether to include variables from the previous step in the data source.
+ "type": "A String", # The type of data source.
+ },
+ },
"initialSuggestions": { # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): # Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
"items": [ # A list of suggestions used for autocomplete recommendations in text input fields.
{ # One suggested value that users can enter in a text input field. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):
@@ -28185,6 +34196,7 @@ Method Details
"maxLines": 42, # The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a **show more** button. If the text is equal or shorter than the specified maximum number of lines, a **show more** button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored.
"text": "A String", # The text that's shown in the widget.
},
+ "visibility": "A String", # Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.
},
],
},
diff --git a/googleapiclient/discovery_cache/documents/chat.v1.json b/googleapiclient/discovery_cache/documents/chat.v1.json
index 01f01612ad6..89208f5122c 100644
--- a/googleapiclient/discovery_cache/documents/chat.v1.json
+++ b/googleapiclient/discovery_cache/documents/chat.v1.json
@@ -1528,7 +1528,7 @@
}
}
},
-"revision": "20250731",
+"revision": "20250812",
"rootUrl": "https://chat.googleapis.com/",
"schemas": {
"AccessSettings": {
@@ -2641,6 +2641,13 @@
],
"type": "string"
},
+"expressionData": {
+"description": "The expression data for the card. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.",
+"items": {
+"$ref": "GoogleAppsCardV1ExpressionData"
+},
+"type": "array"
+},
"fixedFooter": {
"$ref": "GoogleAppsCardV1CardFixedFooter",
"description": "The fixed footer shown at the bottom of this 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/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):"
@@ -2946,10 +2953,55 @@
},
"type": "object"
},
+"GoogleAppsCardV1CommonWidgetAction": {
+"description": "Represents an action that is not specific to a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.",
+"id": "GoogleAppsCardV1CommonWidgetAction",
+"properties": {
+"updateVisibilityAction": {
+"$ref": "GoogleAppsCardV1UpdateVisibilityAction",
+"description": "The action to update the visibility of a widget."
+}
+},
+"type": "object"
+},
+"GoogleAppsCardV1Condition": {
+"description": "Represents a condition that can be used to trigger an action. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.",
+"id": "GoogleAppsCardV1Condition",
+"properties": {
+"actionRuleId": {
+"description": "The unique identifier of the ActionRule.",
+"type": "string"
+},
+"expressionDataCondition": {
+"$ref": "GoogleAppsCardV1ExpressionDataCondition",
+"description": "The condition that is determined by the expression data."
+}
+},
+"type": "object"
+},
+"GoogleAppsCardV1DataSourceConfig": {
+"description": "A configuration object that helps configure the data sources for a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.",
+"id": "GoogleAppsCardV1DataSourceConfig",
+"properties": {
+"platformDataSource": {
+"$ref": "GoogleAppsCardV1PlatformDataSource",
+"description": "The data is from a Google Workspace application."
+},
+"remoteDataSource": {
+"$ref": "GoogleAppsCardV1Action",
+"description": "The data is from a remote data provider."
+}
+},
+"type": "object"
+},
"GoogleAppsCardV1DateTimePicker": {
"description": "Lets users input a date, a time, or both a date and a time. Supports form submission validation. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. For an example in 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 to input the information correctly. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):",
"id": "GoogleAppsCardV1DateTimePicker",
"properties": {
+"hostAppDataSource": {
+"$ref": "HostAppDataSourceMarkup",
+"description": "A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflows, but not Google Chat API or Google Workspace Add-ons."
+},
"label": {
"description": "The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.",
"type": "string"
@@ -3043,6 +3095,78 @@
"properties": {},
"type": "object"
},
+"GoogleAppsCardV1EventAction": {
+"description": "Represents an actionthat can be performed on an ui element. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.",
+"id": "GoogleAppsCardV1EventAction",
+"properties": {
+"actionRuleId": {
+"description": "The unique identifier of the ActionRule.",
+"type": "string"
+},
+"commonWidgetAction": {
+"$ref": "GoogleAppsCardV1CommonWidgetAction",
+"description": "Common widget action."
+},
+"postEventTriggers": {
+"description": "The list of triggers that will be triggered after the EventAction is executed.",
+"items": {
+"$ref": "GoogleAppsCardV1Trigger"
+},
+"type": "array"
+}
+},
+"type": "object"
+},
+"GoogleAppsCardV1ExpressionData": {
+"description": "Represents the data that is used to evaluate an expression. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.",
+"id": "GoogleAppsCardV1ExpressionData",
+"properties": {
+"conditions": {
+"description": "The list of conditions that are determined by the expression evaluation result.",
+"items": {
+"$ref": "GoogleAppsCardV1Condition"
+},
+"type": "array"
+},
+"eventActions": {
+"description": "The list of actions that the ExpressionData can be used.",
+"items": {
+"$ref": "GoogleAppsCardV1EventAction"
+},
+"type": "array"
+},
+"expression": {
+"description": "The uncompiled expression.",
+"type": "string"
+},
+"id": {
+"description": "The unique identifier of the ExpressionData.",
+"type": "string"
+}
+},
+"type": "object"
+},
+"GoogleAppsCardV1ExpressionDataCondition": {
+"description": "Represents a condition that is evaluated using CEL. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.",
+"id": "GoogleAppsCardV1ExpressionDataCondition",
+"properties": {
+"conditionType": {
+"description": "The type of the condition.",
+"enum": [
+"CONDITION_TYPE_UNSPECIFIED",
+"EXPRESSION_EVALUATION_SUCCESS",
+"EXPRESSION_EVALUATION_FAILURE"
+],
+"enumDescriptions": [
+"Unspecified condition type.",
+"The expression evaluation was successful.",
+"The expression evaluation was unsuccessful."
+],
+"type": "string"
+}
+},
+"type": "object"
+},
"GoogleAppsCardV1Grid": {
"description": "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`. For an example in Google Chat apps, 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 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` \"grid\": { \"title\": \"A fine collection of items\", \"columnCount\": 2, \"borderStyle\": { \"type\": \"STROKE\", \"cornerRadius\": 4 }, \"items\": [ { \"image\": { \"imageUri\": \"https://www.example.com/image.png\", \"cropStyle\": { \"type\": \"SQUARE\" }, \"borderStyle\": { \"type\": \"STROKE\" } }, \"title\": \"An item\", \"textAlignment\": \"CENTER\" } ], \"onClick\": { \"openLink\": { \"url\": \"https://www.example.com\" } } } ```",
"id": "GoogleAppsCardV1Grid",
@@ -3400,6 +3524,10 @@
"description": "Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).",
"type": "string"
},
+"id": {
+"description": "A unique ID assigned to the section that's used to identify the section to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.",
+"type": "string"
+},
"uncollapsibleWidgetsCount": {
"description": "The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.",
"format": "int32",
@@ -3419,6 +3547,13 @@
"description": "A widget that creates one or more UI items that users can select. Supports form submission validation for `dropdown` and `multiselect` menus only. When `Action.all_widgets_are_required` is set to `true` or this widget is specified in `Action.required_widgets`, the submission action is blocked unless a value is selected. 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 [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/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):",
"id": "GoogleAppsCardV1SelectionInput",
"properties": {
+"dataSourceConfigs": {
+"description": "Optional. The data source configs for the selection control. This field provides more fine-grained control over the data source. If specified, the `multi_select_max_selected_items` field, `multi_select_min_query_length` field, `external_data_source` field and `platform_data_source` field are ignored. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.",
+"items": {
+"$ref": "GoogleAppsCardV1DataSourceConfig"
+},
+"type": "array"
+},
"externalDataSource": {
"$ref": "GoogleAppsCardV1Action",
"description": "An external data source, such as a relational database."
@@ -3581,6 +3716,10 @@
"description": "Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.",
"type": "string"
},
+"hostAppDataSource": {
+"$ref": "HostAppDataSourceMarkup",
+"description": "A data source that's unique to a Google Workspace host application, such as Gmail emails, Google Calendar events, or Google Chat messages. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons."
+},
"initialSuggestions": {
"$ref": "GoogleAppsCardV1Suggestions",
"description": "Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):"
@@ -3640,6 +3779,38 @@
},
"type": "object"
},
+"GoogleAppsCardV1Trigger": {
+"description": "Represents a trigger. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.",
+"id": "GoogleAppsCardV1Trigger",
+"properties": {
+"actionRuleId": {
+"description": "The unique identifier of the ActionRule.",
+"type": "string"
+}
+},
+"type": "object"
+},
+"GoogleAppsCardV1UpdateVisibilityAction": {
+"description": "Represents an action that updates the visibility of a widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.",
+"id": "GoogleAppsCardV1UpdateVisibilityAction",
+"properties": {
+"visibility": {
+"description": "The new visibility.",
+"enum": [
+"VISIBILITY_UNSPECIFIED",
+"VISIBLE",
+"HIDDEN"
+],
+"enumDescriptions": [
+"Unspecified visibility. Do not use.",
+"The UI element is visible.",
+"The UI element is hidden."
+],
+"type": "string"
+}
+},
+"type": "object"
+},
"GoogleAppsCardV1Validation": {
"description": "Represents the necessary data for validating the widget it's attached to. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend):",
"id": "GoogleAppsCardV1Validation",
@@ -3704,6 +3875,13 @@
"$ref": "GoogleAppsCardV1Divider",
"description": "Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` \"divider\": { } ```"
},
+"eventActions": {
+"description": "Specifies the event actions that can be performed on the widget. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.",
+"items": {
+"$ref": "GoogleAppsCardV1EventAction"
+},
+"type": "array"
+},
"grid": {
"$ref": "GoogleAppsCardV1Grid",
"description": "Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` \"grid\": { \"title\": \"A fine collection of items\", \"columnCount\": 2, \"borderStyle\": { \"type\": \"STROKE\", \"cornerRadius\": 4 }, \"items\": [ { \"image\": { \"imageUri\": \"https://www.example.com/image.png\", \"cropStyle\": { \"type\": \"SQUARE\" }, \"borderStyle\": { \"type\": \"STROKE\" } }, \"title\": \"An item\", \"textAlignment\": \"CENTER\" } ], \"onClick\": { \"openLink\": { \"url\": \"https://www.example.com\" } } } ```"
@@ -3724,6 +3902,10 @@
],
"type": "string"
},
+"id": {
+"description": "A unique ID assigned to the widget that's used to identify the widget to be mutated. The ID has a character limit of 64 characters and should be in the format of `[a-zA-Z0-9-]+` and. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.",
+"type": "string"
+},
"image": {
"$ref": "GoogleAppsCardV1Image",
"description": "Displays an image. For example, the following JSON creates an image with alternative text: ``` \"image\": { \"imageUrl\": \"https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png\", \"altText\": \"Chat app avatar\" } ```"
@@ -3739,6 +3921,20 @@
"textParagraph": {
"$ref": "GoogleAppsCardV1TextParagraph",
"description": "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/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). For example, the following JSON creates a bolded text: ``` \"textParagraph\": { \"text\": \" *bold text*\" } ```"
+},
+"visibility": {
+"description": "Specifies whether the widget is visible or hidden. The default value is `VISIBLE`. Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons.",
+"enum": [
+"VISIBILITY_UNSPECIFIED",
+"VISIBLE",
+"HIDDEN"
+],
+"enumDescriptions": [
+"Unspecified visibility. Do not use.",
+"The UI element is visible.",
+"The UI element is hidden."
+],
+"type": "string"
}
},
"type": "object"
@@ -3794,12 +3990,16 @@
"type": "object"
},
"HostAppDataSourceMarkup": {
-"description": "For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat):",
+"description": "A data source from a Google Workspace application. The data source populates available items for a widget.",
"id": "HostAppDataSourceMarkup",
"properties": {
"chatDataSource": {
"$ref": "ChatClientDataSourceMarkup",
"description": "A data source from Google Chat."
+},
+"workflowDataSource": {
+"$ref": "WorkflowDataSourceMarkup",
+"description": "A data source from Google Workflow."
}
},
"type": "object"
@@ -5547,6 +5747,33 @@
}
},
"type": "object"
+},
+"WorkflowDataSourceMarkup": {
+"description": "* Only supported by Google Workspace Workflow, but not Google Chat apps or Google Workspace add-ons. In a `TextInput` or `SelectionInput` widget with MULTI_SELECT type or a `DateTimePicker`, provide data source from Google.",
+"id": "WorkflowDataSourceMarkup",
+"properties": {
+"includeVariables": {
+"description": "Whether to include variables from the previous step in the data source.",
+"type": "boolean"
+},
+"type": {
+"description": "The type of data source.",
+"enum": [
+"UNKNOWN",
+"USER",
+"SPACE",
+"USER_WITH_FREE_FORM"
+],
+"enumDescriptions": [
+"Default value. Don't use.",
+"Google Workspace users. The user can only view and select users from their Google Workspace organization.",
+"Google Chat spaces that the user is a member of.",
+"Users can choose to view and select existing members from their Google Workspace organization or manually enter an email address or a valid domain."
+],
+"type": "string"
+}
+},
+"type": "object"
}
},
"servicePath": "",
From b717005337968fc34075365bb3b25ac9e7a2aaee Mon Sep 17 00:00:00 2001
From: Yoshi Automation Method Details
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"discount": 3.14, # Discount percentage, represented as decimal. For example, a 20% discount will be represent as 0.2.
+ "discountComponents": [ # Breakdown of the discount into its components. This will be empty if there is no discount present.
+ { # Represents a single component of the total discount applicable on a Price.
+ "discountAbsolute": { # Represents an amount of money with its currency type. # Fixed value discount.
+ "currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
+ "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
+ "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
+ },
+ "discountPercentage": 3.14, # Discount percentage, represented as decimal. For example, a 20% discount will be represented as 0.2.
+ "discountType": "A String", # Type of the discount.
+ },
+ ],
"effectivePrice": { # Represents an amount of money with its currency type. # Effective Price after applying the discounts.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"externalPriceUri": "A String", # Link to external price list, such as link to Google Voice rate card.
+ "pricePeriod": { # Represents period in days/months/years. # The time period with respect to which base and effective prices are defined. Example: 1 month, 6 months, 1 year, etc.
+ "duration": 42, # Total duration of Period Type defined.
+ "periodType": "A String", # Period Type.
+ },
},
"pricePhases": [ # Specifies the price by time range.
{ # Specifies the price by the duration of months. For example, a 20% discount for the first six months, then a 10% discount starting on the seventh month.
@@ -820,12 +835,27 @@ Method Details
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"discount": 3.14, # Discount percentage, represented as decimal. For example, a 20% discount will be represent as 0.2.
+ "discountComponents": [ # Breakdown of the discount into its components. This will be empty if there is no discount present.
+ { # Represents a single component of the total discount applicable on a Price.
+ "discountAbsolute": { # Represents an amount of money with its currency type. # Fixed value discount.
+ "currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
+ "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
+ "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
+ },
+ "discountPercentage": 3.14, # Discount percentage, represented as decimal. For example, a 20% discount will be represented as 0.2.
+ "discountType": "A String", # Type of the discount.
+ },
+ ],
"effectivePrice": { # Represents an amount of money with its currency type. # Effective Price after applying the discounts.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"externalPriceUri": "A String", # Link to external price list, such as link to Google Voice rate card.
+ "pricePeriod": { # Represents period in days/months/years. # The time period with respect to which base and effective prices are defined. Example: 1 month, 6 months, 1 year, etc.
+ "duration": 42, # Total duration of Period Type defined.
+ "periodType": "A String", # Period Type.
+ },
},
"priceTiers": [ # Price by the resource tiers.
{ # Defines price at resource tier level. For example, an offer with following definition : * Tier 1: Provide 25% discount for all seats between 1 and 25. * Tier 2: Provide 10% discount for all seats between 26 and 100. * Tier 3: Provide flat 15% discount for all seats above 100. Each of these tiers is represented as a PriceTier.
@@ -838,12 +868,27 @@ Method Details
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"discount": 3.14, # Discount percentage, represented as decimal. For example, a 20% discount will be represent as 0.2.
+ "discountComponents": [ # Breakdown of the discount into its components. This will be empty if there is no discount present.
+ { # Represents a single component of the total discount applicable on a Price.
+ "discountAbsolute": { # Represents an amount of money with its currency type. # Fixed value discount.
+ "currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
+ "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
+ "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
+ },
+ "discountPercentage": 3.14, # Discount percentage, represented as decimal. For example, a 20% discount will be represented as 0.2.
+ "discountType": "A String", # Type of the discount.
+ },
+ ],
"effectivePrice": { # Represents an amount of money with its currency type. # Effective Price after applying the discounts.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"externalPriceUri": "A String", # Link to external price list, such as link to Google Voice rate card.
+ "pricePeriod": { # Represents period in days/months/years. # The time period with respect to which base and effective prices are defined. Example: 1 month, 6 months, 1 year, etc.
+ "duration": 42, # Total duration of Period Type defined.
+ "periodType": "A String", # Period Type.
+ },
},
},
],
diff --git a/docs/dyn/cloudchannel_v1.accounts.customers.html b/docs/dyn/cloudchannel_v1.accounts.customers.html
index c51247d7b65..5582f8a48fe 100644
--- a/docs/dyn/cloudchannel_v1.accounts.customers.html
+++ b/docs/dyn/cloudchannel_v1.accounts.customers.html
@@ -615,12 +615,27 @@ Method Details
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"discount": 3.14, # Discount percentage, represented as decimal. For example, a 20% discount will be represent as 0.2.
+ "discountComponents": [ # Breakdown of the discount into its components. This will be empty if there is no discount present.
+ { # Represents a single component of the total discount applicable on a Price.
+ "discountAbsolute": { # Represents an amount of money with its currency type. # Fixed value discount.
+ "currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
+ "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
+ "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
+ },
+ "discountPercentage": 3.14, # Discount percentage, represented as decimal. For example, a 20% discount will be represented as 0.2.
+ "discountType": "A String", # Type of the discount.
+ },
+ ],
"effectivePrice": { # Represents an amount of money with its currency type. # Effective Price after applying the discounts.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"externalPriceUri": "A String", # Link to external price list, such as link to Google Voice rate card.
+ "pricePeriod": { # Represents period in days/months/years. # The time period with respect to which base and effective prices are defined. Example: 1 month, 6 months, 1 year, etc.
+ "duration": 42, # Total duration of Period Type defined.
+ "periodType": "A String", # Period Type.
+ },
},
"pricePhases": [ # Specifies the price by time range.
{ # Specifies the price by the duration of months. For example, a 20% discount for the first six months, then a 10% discount starting on the seventh month.
@@ -634,12 +649,27 @@ Method Details
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"discount": 3.14, # Discount percentage, represented as decimal. For example, a 20% discount will be represent as 0.2.
+ "discountComponents": [ # Breakdown of the discount into its components. This will be empty if there is no discount present.
+ { # Represents a single component of the total discount applicable on a Price.
+ "discountAbsolute": { # Represents an amount of money with its currency type. # Fixed value discount.
+ "currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
+ "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
+ "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
+ },
+ "discountPercentage": 3.14, # Discount percentage, represented as decimal. For example, a 20% discount will be represented as 0.2.
+ "discountType": "A String", # Type of the discount.
+ },
+ ],
"effectivePrice": { # Represents an amount of money with its currency type. # Effective Price after applying the discounts.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"externalPriceUri": "A String", # Link to external price list, such as link to Google Voice rate card.
+ "pricePeriod": { # Represents period in days/months/years. # The time period with respect to which base and effective prices are defined. Example: 1 month, 6 months, 1 year, etc.
+ "duration": 42, # Total duration of Period Type defined.
+ "periodType": "A String", # Period Type.
+ },
},
"priceTiers": [ # Price by the resource tiers.
{ # Defines price at resource tier level. For example, an offer with following definition : * Tier 1: Provide 25% discount for all seats between 1 and 25. * Tier 2: Provide 10% discount for all seats between 26 and 100. * Tier 3: Provide flat 15% discount for all seats above 100. Each of these tiers is represented as a PriceTier.
@@ -652,12 +682,27 @@ Method Details
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"discount": 3.14, # Discount percentage, represented as decimal. For example, a 20% discount will be represent as 0.2.
+ "discountComponents": [ # Breakdown of the discount into its components. This will be empty if there is no discount present.
+ { # Represents a single component of the total discount applicable on a Price.
+ "discountAbsolute": { # Represents an amount of money with its currency type. # Fixed value discount.
+ "currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
+ "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
+ "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
+ },
+ "discountPercentage": 3.14, # Discount percentage, represented as decimal. For example, a 20% discount will be represented as 0.2.
+ "discountType": "A String", # Type of the discount.
+ },
+ ],
"effectivePrice": { # Represents an amount of money with its currency type. # Effective Price after applying the discounts.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"externalPriceUri": "A String", # Link to external price list, such as link to Google Voice rate card.
+ "pricePeriod": { # Represents period in days/months/years. # The time period with respect to which base and effective prices are defined. Example: 1 month, 6 months, 1 year, etc.
+ "duration": 42, # Total duration of Period Type defined.
+ "periodType": "A String", # Period Type.
+ },
},
},
],
diff --git a/docs/dyn/cloudchannel_v1.accounts.html b/docs/dyn/cloudchannel_v1.accounts.html
index ec269f57d81..c113d923fd5 100644
--- a/docs/dyn/cloudchannel_v1.accounts.html
+++ b/docs/dyn/cloudchannel_v1.accounts.html
@@ -331,12 +331,27 @@ Method Details
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"discount": 3.14, # Discount percentage, represented as decimal. For example, a 20% discount will be represent as 0.2.
+ "discountComponents": [ # Breakdown of the discount into its components. This will be empty if there is no discount present.
+ { # Represents a single component of the total discount applicable on a Price.
+ "discountAbsolute": { # Represents an amount of money with its currency type. # Fixed value discount.
+ "currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
+ "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
+ "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
+ },
+ "discountPercentage": 3.14, # Discount percentage, represented as decimal. For example, a 20% discount will be represented as 0.2.
+ "discountType": "A String", # Type of the discount.
+ },
+ ],
"effectivePrice": { # Represents an amount of money with its currency type. # Effective Price after applying the discounts.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"externalPriceUri": "A String", # Link to external price list, such as link to Google Voice rate card.
+ "pricePeriod": { # Represents period in days/months/years. # The time period with respect to which base and effective prices are defined. Example: 1 month, 6 months, 1 year, etc.
+ "duration": 42, # Total duration of Period Type defined.
+ "periodType": "A String", # Period Type.
+ },
},
"pricePhases": [ # Specifies the price by time range.
{ # Specifies the price by the duration of months. For example, a 20% discount for the first six months, then a 10% discount starting on the seventh month.
@@ -350,12 +365,27 @@ Method Details
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"discount": 3.14, # Discount percentage, represented as decimal. For example, a 20% discount will be represent as 0.2.
+ "discountComponents": [ # Breakdown of the discount into its components. This will be empty if there is no discount present.
+ { # Represents a single component of the total discount applicable on a Price.
+ "discountAbsolute": { # Represents an amount of money with its currency type. # Fixed value discount.
+ "currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
+ "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
+ "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
+ },
+ "discountPercentage": 3.14, # Discount percentage, represented as decimal. For example, a 20% discount will be represented as 0.2.
+ "discountType": "A String", # Type of the discount.
+ },
+ ],
"effectivePrice": { # Represents an amount of money with its currency type. # Effective Price after applying the discounts.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"externalPriceUri": "A String", # Link to external price list, such as link to Google Voice rate card.
+ "pricePeriod": { # Represents period in days/months/years. # The time period with respect to which base and effective prices are defined. Example: 1 month, 6 months, 1 year, etc.
+ "duration": 42, # Total duration of Period Type defined.
+ "periodType": "A String", # Period Type.
+ },
},
"priceTiers": [ # Price by the resource tiers.
{ # Defines price at resource tier level. For example, an offer with following definition : * Tier 1: Provide 25% discount for all seats between 1 and 25. * Tier 2: Provide 10% discount for all seats between 26 and 100. * Tier 3: Provide flat 15% discount for all seats above 100. Each of these tiers is represented as a PriceTier.
@@ -368,12 +398,27 @@ Method Details
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"discount": 3.14, # Discount percentage, represented as decimal. For example, a 20% discount will be represent as 0.2.
+ "discountComponents": [ # Breakdown of the discount into its components. This will be empty if there is no discount present.
+ { # Represents a single component of the total discount applicable on a Price.
+ "discountAbsolute": { # Represents an amount of money with its currency type. # Fixed value discount.
+ "currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
+ "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
+ "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
+ },
+ "discountPercentage": 3.14, # Discount percentage, represented as decimal. For example, a 20% discount will be represented as 0.2.
+ "discountType": "A String", # Type of the discount.
+ },
+ ],
"effectivePrice": { # Represents an amount of money with its currency type. # Effective Price after applying the discounts.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"externalPriceUri": "A String", # Link to external price list, such as link to Google Voice rate card.
+ "pricePeriod": { # Represents period in days/months/years. # The time period with respect to which base and effective prices are defined. Example: 1 month, 6 months, 1 year, etc.
+ "duration": 42, # Total duration of Period Type defined.
+ "periodType": "A String", # Period Type.
+ },
},
},
],
diff --git a/docs/dyn/cloudchannel_v1.accounts.offers.html b/docs/dyn/cloudchannel_v1.accounts.offers.html
index 50c1d446d8d..c22060f5ba8 100644
--- a/docs/dyn/cloudchannel_v1.accounts.offers.html
+++ b/docs/dyn/cloudchannel_v1.accounts.offers.html
@@ -195,12 +195,27 @@ Method Details
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"discount": 3.14, # Discount percentage, represented as decimal. For example, a 20% discount will be represent as 0.2.
+ "discountComponents": [ # Breakdown of the discount into its components. This will be empty if there is no discount present.
+ { # Represents a single component of the total discount applicable on a Price.
+ "discountAbsolute": { # Represents an amount of money with its currency type. # Fixed value discount.
+ "currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
+ "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
+ "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
+ },
+ "discountPercentage": 3.14, # Discount percentage, represented as decimal. For example, a 20% discount will be represented as 0.2.
+ "discountType": "A String", # Type of the discount.
+ },
+ ],
"effectivePrice": { # Represents an amount of money with its currency type. # Effective Price after applying the discounts.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"externalPriceUri": "A String", # Link to external price list, such as link to Google Voice rate card.
+ "pricePeriod": { # Represents period in days/months/years. # The time period with respect to which base and effective prices are defined. Example: 1 month, 6 months, 1 year, etc.
+ "duration": 42, # Total duration of Period Type defined.
+ "periodType": "A String", # Period Type.
+ },
},
"pricePhases": [ # Specifies the price by time range.
{ # Specifies the price by the duration of months. For example, a 20% discount for the first six months, then a 10% discount starting on the seventh month.
@@ -214,12 +229,27 @@ Method Details
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"discount": 3.14, # Discount percentage, represented as decimal. For example, a 20% discount will be represent as 0.2.
+ "discountComponents": [ # Breakdown of the discount into its components. This will be empty if there is no discount present.
+ { # Represents a single component of the total discount applicable on a Price.
+ "discountAbsolute": { # Represents an amount of money with its currency type. # Fixed value discount.
+ "currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
+ "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
+ "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
+ },
+ "discountPercentage": 3.14, # Discount percentage, represented as decimal. For example, a 20% discount will be represented as 0.2.
+ "discountType": "A String", # Type of the discount.
+ },
+ ],
"effectivePrice": { # Represents an amount of money with its currency type. # Effective Price after applying the discounts.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"externalPriceUri": "A String", # Link to external price list, such as link to Google Voice rate card.
+ "pricePeriod": { # Represents period in days/months/years. # The time period with respect to which base and effective prices are defined. Example: 1 month, 6 months, 1 year, etc.
+ "duration": 42, # Total duration of Period Type defined.
+ "periodType": "A String", # Period Type.
+ },
},
"priceTiers": [ # Price by the resource tiers.
{ # Defines price at resource tier level. For example, an offer with following definition : * Tier 1: Provide 25% discount for all seats between 1 and 25. * Tier 2: Provide 10% discount for all seats between 26 and 100. * Tier 3: Provide flat 15% discount for all seats above 100. Each of these tiers is represented as a PriceTier.
@@ -232,12 +262,27 @@ Method Details
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"discount": 3.14, # Discount percentage, represented as decimal. For example, a 20% discount will be represent as 0.2.
+ "discountComponents": [ # Breakdown of the discount into its components. This will be empty if there is no discount present.
+ { # Represents a single component of the total discount applicable on a Price.
+ "discountAbsolute": { # Represents an amount of money with its currency type. # Fixed value discount.
+ "currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
+ "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
+ "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
+ },
+ "discountPercentage": 3.14, # Discount percentage, represented as decimal. For example, a 20% discount will be represented as 0.2.
+ "discountType": "A String", # Type of the discount.
+ },
+ ],
"effectivePrice": { # Represents an amount of money with its currency type. # Effective Price after applying the discounts.
"currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
"nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
"units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
},
"externalPriceUri": "A String", # Link to external price list, such as link to Google Voice rate card.
+ "pricePeriod": { # Represents period in days/months/years. # The time period with respect to which base and effective prices are defined. Example: 1 month, 6 months, 1 year, etc.
+ "duration": 42, # Total duration of Period Type defined.
+ "periodType": "A String", # Period Type.
+ },
},
},
],
diff --git a/googleapiclient/discovery_cache/documents/cloudchannel.v1.json b/googleapiclient/discovery_cache/documents/cloudchannel.v1.json
index c829dd68ff5..2850c4c01ea 100644
--- a/googleapiclient/discovery_cache/documents/cloudchannel.v1.json
+++ b/googleapiclient/discovery_cache/documents/cloudchannel.v1.json
@@ -2289,7 +2289,7 @@
}
}
},
-"revision": "20250614",
+"revision": "20250809",
"rootUrl": "https://cloudchannel.googleapis.com/",
"schemas": {
"GoogleCloudChannelV1ActivateEntitlementRequest": {
@@ -3035,6 +3035,42 @@
},
"type": "object"
},
+"GoogleCloudChannelV1DiscountComponent": {
+"description": "Represents a single component of the total discount applicable on a Price.",
+"id": "GoogleCloudChannelV1DiscountComponent",
+"properties": {
+"discountAbsolute": {
+"$ref": "GoogleTypeMoney",
+"description": "Fixed value discount."
+},
+"discountPercentage": {
+"description": "Discount percentage, represented as decimal. For example, a 20% discount will be represented as 0.2.",
+"format": "double",
+"type": "number"
+},
+"discountType": {
+"description": "Type of the discount.",
+"enum": [
+"DISCOUNT_TYPE_UNSPECIFIED",
+"REGIONAL_DISCOUNT",
+"PROMOTIONAL_DISCOUNT",
+"SALES_DISCOUNT",
+"RESELLER_MARGIN",
+"DEAL_CODE"
+],
+"enumDescriptions": [
+"Not used.",
+"Regional discount.",
+"Promotional discount.",
+"Sales-provided discount.",
+"Reseller margin.",
+"Deal code discount."
+],
+"type": "string"
+}
+},
+"type": "object"
+},
"GoogleCloudChannelV1EduData": {
"description": "Required Edu Attributes",
"id": "GoogleCloudChannelV1EduData",
@@ -4157,6 +4193,13 @@
"format": "double",
"type": "number"
},
+"discountComponents": {
+"description": "Breakdown of the discount into its components. This will be empty if there is no discount present.",
+"items": {
+"$ref": "GoogleCloudChannelV1DiscountComponent"
+},
+"type": "array"
+},
"effectivePrice": {
"$ref": "GoogleTypeMoney",
"description": "Effective Price after applying the discounts."
@@ -4164,6 +4207,10 @@
"externalPriceUri": {
"description": "Link to external price list, such as link to Google Voice rate card.",
"type": "string"
+},
+"pricePeriod": {
+"$ref": "GoogleCloudChannelV1Period",
+"description": "The time period with respect to which base and effective prices are defined. Example: 1 month, 6 months, 1 year, etc."
}
},
"type": "object"
From f74bfde21f938700a5385e5ed010ab7b4f170e24 Mon Sep 17 00:00:00 2001
From: Yoshi Automation Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optional": "A String", # Deprecated in favor of optionalMode. This field can only be specified if logging is enabled for this backend service. Configures whether all, none or a subset of optional fields should be added to the reported logs. One of [INCLUDE_ALL_OPTIONAL, EXCLUDE_ALL_OPTIONAL, CUSTOM]. Default is EXCLUDE_ALL_OPTIONAL.
@@ -755,7 +755,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -1276,7 +1276,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optional": "A String", # Deprecated in favor of optionalMode. This field can only be specified if logging is enabled for this backend service. Configures whether all, none or a subset of optional fields should be added to the reported logs. One of [INCLUDE_ALL_OPTIONAL, EXCLUDE_ALL_OPTIONAL, CUSTOM]. Default is EXCLUDE_ALL_OPTIONAL.
@@ -1562,7 +1562,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -2163,7 +2163,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optional": "A String", # Deprecated in favor of optionalMode. This field can only be specified if logging is enabled for this backend service. Configures whether all, none or a subset of optional fields should be added to the reported logs. One of [INCLUDE_ALL_OPTIONAL, EXCLUDE_ALL_OPTIONAL, CUSTOM]. Default is EXCLUDE_ALL_OPTIONAL.
@@ -2449,7 +2449,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -2794,7 +2794,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optional": "A String", # Deprecated in favor of optionalMode. This field can only be specified if logging is enabled for this backend service. Configures whether all, none or a subset of optional fields should be added to the reported logs. One of [INCLUDE_ALL_OPTIONAL, EXCLUDE_ALL_OPTIONAL, CUSTOM]. Default is EXCLUDE_ALL_OPTIONAL.
@@ -3080,7 +3080,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -3323,7 +3323,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optional": "A String", # Deprecated in favor of optionalMode. This field can only be specified if logging is enabled for this backend service. Configures whether all, none or a subset of optional fields should be added to the reported logs. One of [INCLUDE_ALL_OPTIONAL, EXCLUDE_ALL_OPTIONAL, CUSTOM]. Default is EXCLUDE_ALL_OPTIONAL.
@@ -3609,7 +3609,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -3868,7 +3868,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optional": "A String", # Deprecated in favor of optionalMode. This field can only be specified if logging is enabled for this backend service. Configures whether all, none or a subset of optional fields should be added to the reported logs. One of [INCLUDE_ALL_OPTIONAL, EXCLUDE_ALL_OPTIONAL, CUSTOM]. Default is EXCLUDE_ALL_OPTIONAL.
@@ -4154,7 +4154,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -4882,7 +4882,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optional": "A String", # Deprecated in favor of optionalMode. This field can only be specified if logging is enabled for this backend service. Configures whether all, none or a subset of optional fields should be added to the reported logs. One of [INCLUDE_ALL_OPTIONAL, EXCLUDE_ALL_OPTIONAL, CUSTOM]. Default is EXCLUDE_ALL_OPTIONAL.
@@ -5168,7 +5168,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
diff --git a/docs/dyn/compute_alpha.instanceTemplates.html b/docs/dyn/compute_alpha.instanceTemplates.html
index d2d92e82cb5..a68b2f83729 100644
--- a/docs/dyn/compute_alpha.instanceTemplates.html
+++ b/docs/dyn/compute_alpha.instanceTemplates.html
@@ -284,6 +284,8 @@ Method Details
"acceleratorType": "A String", # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
},
],
+ "identity": "A String",
+ "identityCertificate": True or False,
"keyRevocationActionType": "A String", # KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified.
"labels": { # Labels to apply to instances that are created from these properties.
"a_key": "A String",
@@ -835,6 +837,8 @@ Method Details
"acceleratorType": "A String", # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
},
],
+ "identity": "A String",
+ "identityCertificate": True or False,
"keyRevocationActionType": "A String", # KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified.
"labels": { # Labels to apply to instances that are created from these properties.
"a_key": "A String",
@@ -1253,6 +1257,8 @@ Method Details
"acceleratorType": "A String", # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
},
],
+ "identity": "A String",
+ "identityCertificate": True or False,
"keyRevocationActionType": "A String", # KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified.
"labels": { # Labels to apply to instances that are created from these properties.
"a_key": "A String",
@@ -1757,6 +1763,8 @@ Method Details
"acceleratorType": "A String", # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
},
],
+ "identity": "A String",
+ "identityCertificate": True or False,
"keyRevocationActionType": "A String", # KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified.
"labels": { # Labels to apply to instances that are created from these properties.
"a_key": "A String",
diff --git a/docs/dyn/compute_alpha.instances.html b/docs/dyn/compute_alpha.instances.html
index 81e7f11f7c3..43c67b7435f 100644
--- a/docs/dyn/compute_alpha.instances.html
+++ b/docs/dyn/compute_alpha.instances.html
@@ -906,6 +906,8 @@ Method Details
],
"hostname": "A String", # Specifies the hostname of the instance. The specified hostname must be RFC1035 compliant. If hostname is not specified, the default hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal DNS.
"id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
+ "identity": "A String",
+ "identityCertificate": True or False,
"instanceEncryptionKey": { # Encrypts suspended data for an instance with a customer-managed encryption key. If you are creating a new instance, this field will encrypt the local SSD and in-memory contents of the instance during the suspend operation. If you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key during the suspend operation.
"kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key The fully-qualifed key name may be returned for resource GET requests. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key /cryptoKeyVersions/1
"kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used. For example: "kmsKeyServiceAccount": "name@project_id.iam.gserviceaccount.com/
@@ -1815,6 +1817,8 @@ Method Details
"acceleratorType": "A String", # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
},
],
+ "identity": "A String",
+ "identityCertificate": True or False,
"keyRevocationActionType": "A String", # KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified.
"labels": { # Labels to apply to instances that are created from these properties.
"a_key": "A String",
@@ -2837,6 +2841,8 @@ Method Details
],
"hostname": "A String", # Specifies the hostname of the instance. The specified hostname must be RFC1035 compliant. If hostname is not specified, the default hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal DNS.
"id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
+ "identity": "A String",
+ "identityCertificate": True or False,
"instanceEncryptionKey": { # Encrypts suspended data for an instance with a customer-managed encryption key. If you are creating a new instance, this field will encrypt the local SSD and in-memory contents of the instance during the suspend operation. If you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key during the suspend operation.
"kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key The fully-qualifed key name may be returned for resource GET requests. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key /cryptoKeyVersions/1
"kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used. For example: "kmsKeyServiceAccount": "name@project_id.iam.gserviceaccount.com/
@@ -4002,6 +4008,8 @@ Method Details
],
"hostname": "A String", # Specifies the hostname of the instance. The specified hostname must be RFC1035 compliant. If hostname is not specified, the default hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal DNS.
"id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
+ "identity": "A String",
+ "identityCertificate": True or False,
"instanceEncryptionKey": { # Encrypts suspended data for an instance with a customer-managed encryption key. If you are creating a new instance, this field will encrypt the local SSD and in-memory contents of the instance during the suspend operation. If you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key during the suspend operation.
"kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key The fully-qualifed key name may be returned for resource GET requests. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key /cryptoKeyVersions/1
"kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used. For example: "kmsKeyServiceAccount": "name@project_id.iam.gserviceaccount.com/
@@ -4642,6 +4650,8 @@ Method Details
],
"hostname": "A String", # Specifies the hostname of the instance. The specified hostname must be RFC1035 compliant. If hostname is not specified, the default hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal DNS.
"id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
+ "identity": "A String",
+ "identityCertificate": True or False,
"instanceEncryptionKey": { # Encrypts suspended data for an instance with a customer-managed encryption key. If you are creating a new instance, this field will encrypt the local SSD and in-memory contents of the instance during the suspend operation. If you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key during the suspend operation.
"kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key The fully-qualifed key name may be returned for resource GET requests. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key /cryptoKeyVersions/1
"kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used. For example: "kmsKeyServiceAccount": "name@project_id.iam.gserviceaccount.com/
@@ -8784,6 +8794,8 @@ Method Details
],
"hostname": "A String", # Specifies the hostname of the instance. The specified hostname must be RFC1035 compliant. If hostname is not specified, the default hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal DNS.
"id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
+ "identity": "A String",
+ "identityCertificate": True or False,
"instanceEncryptionKey": { # Encrypts suspended data for an instance with a customer-managed encryption key. If you are creating a new instance, this field will encrypt the local SSD and in-memory contents of the instance during the suspend operation. If you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key during the suspend operation.
"kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key The fully-qualifed key name may be returned for resource GET requests. For example: "kmsKeyName": "projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key /cryptoKeyVersions/1
"kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used. For example: "kmsKeyServiceAccount": "name@project_id.iam.gserviceaccount.com/
diff --git a/docs/dyn/compute_alpha.machineImages.html b/docs/dyn/compute_alpha.machineImages.html
index 5546a61b493..1afb0a5f074 100644
--- a/docs/dyn/compute_alpha.machineImages.html
+++ b/docs/dyn/compute_alpha.machineImages.html
@@ -399,6 +399,8 @@ Method Details
"acceleratorType": "A String", # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
},
],
+ "identity": "A String",
+ "identityCertificate": True or False,
"keyRevocationActionType": "A String", # KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified.
"labels": { # Labels to apply to instances that are created from these properties.
"a_key": "A String",
@@ -1044,6 +1046,8 @@ Method Details
"acceleratorType": "A String", # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
},
],
+ "identity": "A String",
+ "identityCertificate": True or False,
"keyRevocationActionType": "A String", # KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified.
"labels": { # Labels to apply to instances that are created from these properties.
"a_key": "A String",
@@ -1771,6 +1775,8 @@ Method Details
"acceleratorType": "A String", # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
},
],
+ "identity": "A String",
+ "identityCertificate": True or False,
"keyRevocationActionType": "A String", # KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified.
"labels": { # Labels to apply to instances that are created from these properties.
"a_key": "A String",
diff --git a/docs/dyn/compute_alpha.regionBackendServices.html b/docs/dyn/compute_alpha.regionBackendServices.html
index d1a7dcee3df..a6cee0519ad 100644
--- a/docs/dyn/compute_alpha.regionBackendServices.html
+++ b/docs/dyn/compute_alpha.regionBackendServices.html
@@ -439,7 +439,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optional": "A String", # Deprecated in favor of optionalMode. This field can only be specified if logging is enabled for this backend service. Configures whether all, none or a subset of optional fields should be added to the reported logs. One of [INCLUDE_ALL_OPTIONAL, EXCLUDE_ALL_OPTIONAL, CUSTOM]. Default is EXCLUDE_ALL_OPTIONAL.
@@ -725,7 +725,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -1039,7 +1039,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optional": "A String", # Deprecated in favor of optionalMode. This field can only be specified if logging is enabled for this backend service. Configures whether all, none or a subset of optional fields should be added to the reported logs. One of [INCLUDE_ALL_OPTIONAL, EXCLUDE_ALL_OPTIONAL, CUSTOM]. Default is EXCLUDE_ALL_OPTIONAL.
@@ -1325,7 +1325,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -1671,7 +1671,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optional": "A String", # Deprecated in favor of optionalMode. This field can only be specified if logging is enabled for this backend service. Configures whether all, none or a subset of optional fields should be added to the reported logs. One of [INCLUDE_ALL_OPTIONAL, EXCLUDE_ALL_OPTIONAL, CUSTOM]. Default is EXCLUDE_ALL_OPTIONAL.
@@ -1957,7 +1957,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -2201,7 +2201,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optional": "A String", # Deprecated in favor of optionalMode. This field can only be specified if logging is enabled for this backend service. Configures whether all, none or a subset of optional fields should be added to the reported logs. One of [INCLUDE_ALL_OPTIONAL, EXCLUDE_ALL_OPTIONAL, CUSTOM]. Default is EXCLUDE_ALL_OPTIONAL.
@@ -2487,7 +2487,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -2747,7 +2747,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optional": "A String", # Deprecated in favor of optionalMode. This field can only be specified if logging is enabled for this backend service. Configures whether all, none or a subset of optional fields should be added to the reported logs. One of [INCLUDE_ALL_OPTIONAL, EXCLUDE_ALL_OPTIONAL, CUSTOM]. Default is EXCLUDE_ALL_OPTIONAL.
@@ -3033,7 +3033,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -3633,7 +3633,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optional": "A String", # Deprecated in favor of optionalMode. This field can only be specified if logging is enabled for this backend service. Configures whether all, none or a subset of optional fields should be added to the reported logs. One of [INCLUDE_ALL_OPTIONAL, EXCLUDE_ALL_OPTIONAL, CUSTOM]. Default is EXCLUDE_ALL_OPTIONAL.
@@ -3919,7 +3919,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
diff --git a/docs/dyn/compute_alpha.regionCompositeHealthChecks.html b/docs/dyn/compute_alpha.regionCompositeHealthChecks.html
index de29dc130ec..f326b44d2d2 100644
--- a/docs/dyn/compute_alpha.regionCompositeHealthChecks.html
+++ b/docs/dyn/compute_alpha.regionCompositeHealthChecks.html
@@ -127,7 +127,6 @@ Method Details
An object of the form:
{ # Contains a list of CompositeHealthChecksScopedList.
- "etag": "A String",
"id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
"items": { # A list of CompositeHealthChecksScopedList resources.
"a_key": { # Name of the scope containing this set of CompositeHealthChecks.
@@ -163,9 +162,6 @@ Method Details
"kind": "compute#compositeHealthCheckAggregatedList", # Type of resource.
"nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
"selfLink": "A String", # [Output Only] Server-defined URL for this resource.
- "unreachables": [ # [Output Only] Unreachable resources.
- "A String",
- ],
"warning": { # [Output Only] Informational warning message.
"code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
"data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" }
@@ -522,7 +518,6 @@ Method Details
An object of the form:
{
- "etag": "A String",
"id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
"items": [ # A list of CompositeHealthCheck resources.
{ # Represents a composite health check. A composite health check resource specifies the health source resources and the health destination resource to which the aggregated health result from the health source resources is delivered.
@@ -544,9 +539,6 @@ Method Details
"kind": "compute#compositeHealthCheckList", # [Output Only] Type of the resource. Always compute#compositeHealthCheck for composite health checks.
"nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
"selfLink": "A String", # [Output Only] Server-defined URL for this resource.
- "unreachables": [ # [Output Only] Unreachable resources. end_interface: MixerListResponseWithEtagBuilder
- "A String",
- ],
"warning": { # [Output Only] Informational warning message.
"code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
"data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" }
diff --git a/docs/dyn/compute_alpha.regionHealthAggregationPolicies.html b/docs/dyn/compute_alpha.regionHealthAggregationPolicies.html
index a01038edc59..bff37f273c2 100644
--- a/docs/dyn/compute_alpha.regionHealthAggregationPolicies.html
+++ b/docs/dyn/compute_alpha.regionHealthAggregationPolicies.html
@@ -518,7 +518,6 @@ Method Details
An object of the form:
{
- "etag": "A String",
"id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
"items": [ # A list of HealthAggregationPolicy resources.
{ # Represents a health aggregation policy. A health aggregation policy resource defines a policy to aggregate health. For more information, see Health checks overview.
@@ -539,9 +538,6 @@ Method Details
"kind": "compute#healthAggregationPolicyList", # [Output Only] Type of the resource. Always compute#healthAggregationPolicy for health aggregation policies.
"nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
"selfLink": "A String", # [Output Only] Server-defined URL for this resource.
- "unreachables": [ # [Output Only] Unreachable resources. end_interface: MixerListResponseWithEtagBuilder
- "A String",
- ],
"warning": { # [Output Only] Informational warning message.
"code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
"data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" }
diff --git a/docs/dyn/compute_alpha.regionHealthSources.html b/docs/dyn/compute_alpha.regionHealthSources.html
index 991404e8c27..8859d84f3d1 100644
--- a/docs/dyn/compute_alpha.regionHealthSources.html
+++ b/docs/dyn/compute_alpha.regionHealthSources.html
@@ -127,7 +127,6 @@ Method Details
An object of the form:
{ # Contains a list of HealthSourcesScopedList.
- "etag": "A String",
"id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
"items": { # A list of HealthSourcesScopedList resources.
"a_key": { # Name of the scope containing this set of HealthSources.
@@ -164,9 +163,6 @@ Method Details
"kind": "compute#healthSourceAggregatedList", # Type of resource.
"nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
"selfLink": "A String", # [Output Only] Server-defined URL for this resource.
- "unreachables": [ # [Output Only] Unreachable resources.
- "A String",
- ],
"warning": { # [Output Only] Informational warning message.
"code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
"data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" }
@@ -525,7 +521,6 @@ Method Details
An object of the form:
{
- "etag": "A String",
"id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
"items": [ # A list of HealthSource resources.
{ # Represents a health source. A health source resource specifies the source resources and the health aggregation policy applied to the source resources to determine the aggregated health status.
@@ -548,9 +543,6 @@ Method Details
"kind": "compute#healthSourceList", # [Output Only] Type of the resource. Always compute#healthSource for health sources.
"nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
"selfLink": "A String", # [Output Only] Server-defined URL for this resource.
- "unreachables": [ # [Output Only] Unreachable resources. end_interface: MixerListResponseWithEtagBuilder
- "A String",
- ],
"warning": { # [Output Only] Informational warning message.
"code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
"data": [ # [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" }
diff --git a/docs/dyn/compute_alpha.regionInstanceTemplates.html b/docs/dyn/compute_alpha.regionInstanceTemplates.html
index 63647681a93..1fcfcbf1899 100644
--- a/docs/dyn/compute_alpha.regionInstanceTemplates.html
+++ b/docs/dyn/compute_alpha.regionInstanceTemplates.html
@@ -395,6 +395,8 @@ Method Details
"acceleratorType": "A String", # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
},
],
+ "identity": "A String",
+ "identityCertificate": True or False,
"keyRevocationActionType": "A String", # KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified.
"labels": { # Labels to apply to instances that are created from these properties.
"a_key": "A String",
@@ -765,6 +767,8 @@ Method Details
"acceleratorType": "A String", # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
},
],
+ "identity": "A String",
+ "identityCertificate": True or False,
"keyRevocationActionType": "A String", # KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified.
"labels": { # Labels to apply to instances that are created from these properties.
"a_key": "A String",
@@ -1270,6 +1274,8 @@ Method Details
"acceleratorType": "A String", # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
},
],
+ "identity": "A String",
+ "identityCertificate": True or False,
"keyRevocationActionType": "A String", # KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified.
"labels": { # Labels to apply to instances that are created from these properties.
"a_key": "A String",
diff --git a/docs/dyn/compute_alpha.regionInstances.html b/docs/dyn/compute_alpha.regionInstances.html
index 5499bc4d593..db15e225ec9 100644
--- a/docs/dyn/compute_alpha.regionInstances.html
+++ b/docs/dyn/compute_alpha.regionInstances.html
@@ -361,6 +361,8 @@ Method Details
"acceleratorType": "A String", # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
},
],
+ "identity": "A String",
+ "identityCertificate": True or False,
"keyRevocationActionType": "A String", # KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified.
"labels": { # Labels to apply to instances that are created from these properties.
"a_key": "A String",
diff --git a/docs/dyn/compute_alpha.regionTargetHttpsProxies.html b/docs/dyn/compute_alpha.regionTargetHttpsProxies.html
index 9e90f39dda6..3ae13758808 100644
--- a/docs/dyn/compute_alpha.regionTargetHttpsProxies.html
+++ b/docs/dyn/compute_alpha.regionTargetHttpsProxies.html
@@ -252,7 +252,7 @@ Method Details
Returns:
An object of the form:
- { # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/alpha/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/alpha/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
+ { # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/alpha/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/alpha/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpsProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpsProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
"authentication": "A String", # [Deprecated] Use serverTlsPolicy instead.
"authorization": "A String", # [Deprecated] Use authorizationPolicy instead.
"authorizationPolicy": "A String", # Optional. A URL referring to a networksecurity.AuthorizationPolicy resource that describes how the proxy should authorize inbound traffic. If left blank, access will not be restricted by an authorization policy. Refer to the AuthorizationPolicy resource for additional details. authorizationPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. Note: This field currently has no impact.
@@ -292,7 +292,7 @@ Method Details
body: object, The request body.
The object takes the form of:
-{ # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/alpha/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/alpha/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
+{ # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/alpha/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/alpha/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpsProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpsProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
"authentication": "A String", # [Deprecated] Use serverTlsPolicy instead.
"authorization": "A String", # [Deprecated] Use authorizationPolicy instead.
"authorizationPolicy": "A String", # Optional. A URL referring to a networksecurity.AuthorizationPolicy resource that describes how the proxy should authorize inbound traffic. If left blank, access will not be restricted by an authorization policy. Refer to the AuthorizationPolicy resource for additional details. authorizationPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. Note: This field currently has no impact.
@@ -462,7 +462,7 @@ Method Details
{ # Contains a list of TargetHttpsProxy resources.
"id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
"items": [ # A list of TargetHttpsProxy resources.
- { # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/alpha/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/alpha/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
+ { # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/alpha/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/alpha/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpsProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpsProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
"authentication": "A String", # [Deprecated] Use serverTlsPolicy instead.
"authorization": "A String", # [Deprecated] Use authorizationPolicy instead.
"authorizationPolicy": "A String", # Optional. A URL referring to a networksecurity.AuthorizationPolicy resource that describes how the proxy should authorize inbound traffic. If left blank, access will not be restricted by an authorization policy. Refer to the AuthorizationPolicy resource for additional details. authorizationPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. Note: This field currently has no impact.
@@ -532,7 +532,7 @@ Method Details
body: object, The request body.
The object takes the form of:
-{ # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/alpha/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/alpha/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
+{ # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/alpha/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/alpha/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpsProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpsProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
"authentication": "A String", # [Deprecated] Use serverTlsPolicy instead.
"authorization": "A String", # [Deprecated] Use authorizationPolicy instead.
"authorizationPolicy": "A String", # Optional. A URL referring to a networksecurity.AuthorizationPolicy resource that describes how the proxy should authorize inbound traffic. If left blank, access will not be restricted by an authorization policy. Refer to the AuthorizationPolicy resource for additional details. authorizationPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. Note: This field currently has no impact.
diff --git a/docs/dyn/compute_alpha.targetHttpsProxies.html b/docs/dyn/compute_alpha.targetHttpsProxies.html
index 1359eae427e..ec323ed489e 100644
--- a/docs/dyn/compute_alpha.targetHttpsProxies.html
+++ b/docs/dyn/compute_alpha.targetHttpsProxies.html
@@ -146,7 +146,7 @@ Method Details
"items": { # A list of TargetHttpsProxiesScopedList resources.
"a_key": { # Name of the scope containing this set of TargetHttpsProxies.
"targetHttpsProxies": [ # A list of TargetHttpsProxies contained in this scope.
- { # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/alpha/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/alpha/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
+ { # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/alpha/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/alpha/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpsProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpsProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
"authentication": "A String", # [Deprecated] Use serverTlsPolicy instead.
"authorization": "A String", # [Deprecated] Use authorizationPolicy instead.
"authorizationPolicy": "A String", # Optional. A URL referring to a networksecurity.AuthorizationPolicy resource that describes how the proxy should authorize inbound traffic. If left blank, access will not be restricted by an authorization policy. Refer to the AuthorizationPolicy resource for additional details. authorizationPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. Note: This field currently has no impact.
@@ -365,7 +365,7 @@ Method Details
Returns:
An object of the form:
- { # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/alpha/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/alpha/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
+ { # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/alpha/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/alpha/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpsProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpsProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
"authentication": "A String", # [Deprecated] Use serverTlsPolicy instead.
"authorization": "A String", # [Deprecated] Use authorizationPolicy instead.
"authorizationPolicy": "A String", # Optional. A URL referring to a networksecurity.AuthorizationPolicy resource that describes how the proxy should authorize inbound traffic. If left blank, access will not be restricted by an authorization policy. Refer to the AuthorizationPolicy resource for additional details. authorizationPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. Note: This field currently has no impact.
@@ -404,7 +404,7 @@ Method Details
body: object, The request body.
The object takes the form of:
-{ # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/alpha/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/alpha/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
+{ # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/alpha/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/alpha/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpsProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpsProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
"authentication": "A String", # [Deprecated] Use serverTlsPolicy instead.
"authorization": "A String", # [Deprecated] Use authorizationPolicy instead.
"authorizationPolicy": "A String", # Optional. A URL referring to a networksecurity.AuthorizationPolicy resource that describes how the proxy should authorize inbound traffic. If left blank, access will not be restricted by an authorization policy. Refer to the AuthorizationPolicy resource for additional details. authorizationPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. Note: This field currently has no impact.
@@ -573,7 +573,7 @@ Method Details
{ # Contains a list of TargetHttpsProxy resources.
"id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
"items": [ # A list of TargetHttpsProxy resources.
- { # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/alpha/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/alpha/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
+ { # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/alpha/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/alpha/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpsProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpsProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
"authentication": "A String", # [Deprecated] Use serverTlsPolicy instead.
"authorization": "A String", # [Deprecated] Use authorizationPolicy instead.
"authorizationPolicy": "A String", # Optional. A URL referring to a networksecurity.AuthorizationPolicy resource that describes how the proxy should authorize inbound traffic. If left blank, access will not be restricted by an authorization policy. Refer to the AuthorizationPolicy resource for additional details. authorizationPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. Note: This field currently has no impact.
@@ -642,7 +642,7 @@ Method Details
body: object, The request body.
The object takes the form of:
-{ # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/alpha/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/alpha/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
+{ # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/alpha/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/alpha/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpsProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpsProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
"authentication": "A String", # [Deprecated] Use serverTlsPolicy instead.
"authorization": "A String", # [Deprecated] Use authorizationPolicy instead.
"authorizationPolicy": "A String", # Optional. A URL referring to a networksecurity.AuthorizationPolicy resource that describes how the proxy should authorize inbound traffic. If left blank, access will not be restricted by an authorization policy. Refer to the AuthorizationPolicy resource for additional details. authorizationPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. Note: This field currently has no impact.
diff --git a/docs/dyn/compute_alpha.zoneQueuedResources.html b/docs/dyn/compute_alpha.zoneQueuedResources.html
index f48918e64bb..a85f8b6ba0f 100644
--- a/docs/dyn/compute_alpha.zoneQueuedResources.html
+++ b/docs/dyn/compute_alpha.zoneQueuedResources.html
@@ -399,6 +399,8 @@ Method Details
"acceleratorType": "A String", # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
},
],
+ "identity": "A String",
+ "identityCertificate": True or False,
"keyRevocationActionType": "A String", # KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified.
"labels": { # Labels to apply to instances that are created from these properties.
"a_key": "A String",
@@ -1279,6 +1281,8 @@ Method Details
"acceleratorType": "A String", # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
},
],
+ "identity": "A String",
+ "identityCertificate": True or False,
"keyRevocationActionType": "A String", # KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified.
"labels": { # Labels to apply to instances that are created from these properties.
"a_key": "A String",
@@ -1852,6 +1856,8 @@ Method Details
"acceleratorType": "A String", # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
},
],
+ "identity": "A String",
+ "identityCertificate": True or False,
"keyRevocationActionType": "A String", # KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified.
"labels": { # Labels to apply to instances that are created from these properties.
"a_key": "A String",
@@ -2555,6 +2561,8 @@ Method Details
"acceleratorType": "A String", # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
},
],
+ "identity": "A String",
+ "identityCertificate": True or False,
"keyRevocationActionType": "A String", # KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified.
"labels": { # Labels to apply to instances that are created from these properties.
"a_key": "A String",
diff --git a/docs/dyn/compute_beta.backendServices.html b/docs/dyn/compute_beta.backendServices.html
index 7e9c9f8099c..74d13e135a7 100644
--- a/docs/dyn/compute_beta.backendServices.html
+++ b/docs/dyn/compute_beta.backendServices.html
@@ -462,7 +462,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optionalFields": [ # This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM. Contains a list of optional fields you want to include in the logs. For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace
@@ -532,7 +532,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -1044,7 +1044,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optionalFields": [ # This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM. Contains a list of optional fields you want to include in the logs. For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace
@@ -1114,7 +1114,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -1689,7 +1689,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optionalFields": [ # This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM. Contains a list of optional fields you want to include in the logs. For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace
@@ -1759,7 +1759,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -2096,7 +2096,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optionalFields": [ # This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM. Contains a list of optional fields you want to include in the logs. For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace
@@ -2166,7 +2166,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -2402,7 +2402,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optionalFields": [ # This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM. Contains a list of optional fields you want to include in the logs. For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace
@@ -2472,7 +2472,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -2724,7 +2724,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optionalFields": [ # This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM. Contains a list of optional fields you want to include in the logs. For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace
@@ -2794,7 +2794,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -3512,7 +3512,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optionalFields": [ # This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM. Contains a list of optional fields you want to include in the logs. For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace
@@ -3582,7 +3582,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
diff --git a/docs/dyn/compute_beta.regionBackendServices.html b/docs/dyn/compute_beta.regionBackendServices.html
index 7630f6cebc5..3f6e56738c6 100644
--- a/docs/dyn/compute_beta.regionBackendServices.html
+++ b/docs/dyn/compute_beta.regionBackendServices.html
@@ -432,7 +432,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optionalFields": [ # This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM. Contains a list of optional fields you want to include in the logs. For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace
@@ -502,7 +502,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -809,7 +809,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optionalFields": [ # This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM. Contains a list of optional fields you want to include in the logs. For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace
@@ -879,7 +879,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -1217,7 +1217,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optionalFields": [ # This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM. Contains a list of optional fields you want to include in the logs. For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace
@@ -1287,7 +1287,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -1524,7 +1524,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optionalFields": [ # This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM. Contains a list of optional fields you want to include in the logs. For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace
@@ -1594,7 +1594,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -1847,7 +1847,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optionalFields": [ # This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM. Contains a list of optional fields you want to include in the logs. For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace
@@ -1917,7 +1917,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -2508,7 +2508,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optionalFields": [ # This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM. Contains a list of optional fields you want to include in the logs. For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace
@@ -2578,7 +2578,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
diff --git a/docs/dyn/compute_beta.regionMultiMigs.html b/docs/dyn/compute_beta.regionMultiMigs.html
index fac1aa23167..403a153add2 100644
--- a/docs/dyn/compute_beta.regionMultiMigs.html
+++ b/docs/dyn/compute_beta.regionMultiMigs.html
@@ -250,6 +250,59 @@ Method Details
"workloadPolicy": "A String", # The URL of the workload policy for this multi-MIG. It can be a full or partial URL. For example, the following are all valid URLs to a workload policy: - https://www.googleapis.com/compute/v1/projects/project/regions/region /resourcePolicies/resourcePolicy - projects/project/regions/region/resourcePolicies/resourcePolicy - regions/region/resourcePolicies/resourcePolicy
},
"selfLink": "A String", # [Output only] Server-defined URL for the resource.
+ "status": {
+ "appliedAcceleratorTopologies": [ # [Output Only] The accelerator topology applied to this multi-MIG. Currently only one accelerator topology is supported.
+ {
+ "acceleratorTopology": "A String", # [Output Only] Topology in the format of: "16x16", "4x4x4", etc. The value is the same as configured in the WorkloadPolicy.
+ "acceleratorTopologyState": "A String", # [Output Only] The state of the accelerator topology.
+ "acceleratorTopologyStateLastCheck": { # [Output Only] The result of the latest accelerator topology state check.
+ "error": { # [Output Only] Encountered errors on the last state check.
+ "errors": [ # [Output Only] The array of errors encountered while processing this operation.
+ {
+ "code": "A String", # [Output Only] The error type identifier for this error.
+ "errorDetails": [ # [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
+ {
+ "errorInfo": { # Describes the cause of the error with structured details. Example of an error when contacting the "pubsub.googleapis.com" API when it is not enabled: { "reason": "API_DISABLED" "domain": "googleapis.com" "metadata": { "resource": "projects/123", "service": "pubsub.googleapis.com" } } This response indicates that the pubsub.googleapis.com API is not enabled. Example of an error that is returned when attempting to create a Spanner instance in a region that is out of stock: { "reason": "STOCKOUT" "domain": "spanner.googleapis.com", "metadata": { "availableRegions": "us-central1,us-east2" } }
+ "domain": "A String", # The logical grouping to which the "reason" belongs. The error domain is typically the registered service name of the tool or product that generates the error. Example: "pubsub.googleapis.com". If the error is generated by some common infrastructure, the error domain must be a globally unique value that identifies the infrastructure. For Google API infrastructure, the error domain is "googleapis.com".
+ "metadatas": { # Additional structured details about this error. Keys must match a regular expression of `a-z+` but should ideally be lowerCamelCase. Also, they must be limited to 64 characters in length. When identifying the current value of an exceeded limit, the units should be contained in the key, not the value. For example, rather than `{"instanceLimit": "100/request"}`, should be returned as, `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number of instances that can be created in a single (batch) request.
+ "a_key": "A String",
+ },
+ "reason": "A String", # The reason of the error. This is a constant value that identifies the proximate cause of the error. Error reasons are unique within a particular domain of errors. This should be at most 63 characters and match a regular expression of `A-Z+[A-Z0-9]`, which represents UPPER_SNAKE_CASE.
+ },
+ "help": { # Provides links to documentation or for performing an out of band action. For example, if a quota check failed with an error indicating the calling project hasn't enabled the accessed service, this can contain a URL pointing directly to the right place in the developer console to flip the bit.
+ "links": [ # URL(s) pointing to additional information on handling the current error.
+ { # Describes a URL link.
+ "description": "A String", # Describes what the link offers.
+ "url": "A String", # The URL of the link.
+ },
+ ],
+ },
+ "localizedMessage": { # Provides a localized error message that is safe to return to the user which can be attached to an RPC error.
+ "locale": "A String", # The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt. Examples are: "en-US", "fr-CH", "es-MX"
+ "message": "A String", # The localized error message in the above locale.
+ },
+ "quotaInfo": { # Additional details for quota exceeded error for resource quota.
+ "dimensions": { # The map holding related quota dimensions.
+ "a_key": "A String",
+ },
+ "futureLimit": 3.14, # Future quota limit being rolled out. The limit's unit depends on the quota type or metric.
+ "limit": 3.14, # Current effective quota limit. The limit's unit depends on the quota type or metric.
+ "limitName": "A String", # The name of the quota limit.
+ "metricName": "A String", # The Compute Engine quota metric name.
+ "rolloutStatus": "A String", # Rollout status of the future quota limit.
+ },
+ },
+ ],
+ "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
+ "message": "A String", # [Output Only] An optional, human-readable error message.
+ },
+ ],
+ },
+ "timestamp": "A String", # [Output Only] Timestamp is shown only if there is an error. The field has // RFC3339 // text format.
+ },
+ },
+ ],
+ },
}
@@ -274,6 +327,59 @@ Method Details
"workloadPolicy": "A String", # The URL of the workload policy for this multi-MIG. It can be a full or partial URL. For example, the following are all valid URLs to a workload policy: - https://www.googleapis.com/compute/v1/projects/project/regions/region /resourcePolicies/resourcePolicy - projects/project/regions/region/resourcePolicies/resourcePolicy - regions/region/resourcePolicies/resourcePolicy
},
"selfLink": "A String", # [Output only] Server-defined URL for the resource.
+ "status": {
+ "appliedAcceleratorTopologies": [ # [Output Only] The accelerator topology applied to this multi-MIG. Currently only one accelerator topology is supported.
+ {
+ "acceleratorTopology": "A String", # [Output Only] Topology in the format of: "16x16", "4x4x4", etc. The value is the same as configured in the WorkloadPolicy.
+ "acceleratorTopologyState": "A String", # [Output Only] The state of the accelerator topology.
+ "acceleratorTopologyStateLastCheck": { # [Output Only] The result of the latest accelerator topology state check.
+ "error": { # [Output Only] Encountered errors on the last state check.
+ "errors": [ # [Output Only] The array of errors encountered while processing this operation.
+ {
+ "code": "A String", # [Output Only] The error type identifier for this error.
+ "errorDetails": [ # [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
+ {
+ "errorInfo": { # Describes the cause of the error with structured details. Example of an error when contacting the "pubsub.googleapis.com" API when it is not enabled: { "reason": "API_DISABLED" "domain": "googleapis.com" "metadata": { "resource": "projects/123", "service": "pubsub.googleapis.com" } } This response indicates that the pubsub.googleapis.com API is not enabled. Example of an error that is returned when attempting to create a Spanner instance in a region that is out of stock: { "reason": "STOCKOUT" "domain": "spanner.googleapis.com", "metadata": { "availableRegions": "us-central1,us-east2" } }
+ "domain": "A String", # The logical grouping to which the "reason" belongs. The error domain is typically the registered service name of the tool or product that generates the error. Example: "pubsub.googleapis.com". If the error is generated by some common infrastructure, the error domain must be a globally unique value that identifies the infrastructure. For Google API infrastructure, the error domain is "googleapis.com".
+ "metadatas": { # Additional structured details about this error. Keys must match a regular expression of `a-z+` but should ideally be lowerCamelCase. Also, they must be limited to 64 characters in length. When identifying the current value of an exceeded limit, the units should be contained in the key, not the value. For example, rather than `{"instanceLimit": "100/request"}`, should be returned as, `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number of instances that can be created in a single (batch) request.
+ "a_key": "A String",
+ },
+ "reason": "A String", # The reason of the error. This is a constant value that identifies the proximate cause of the error. Error reasons are unique within a particular domain of errors. This should be at most 63 characters and match a regular expression of `A-Z+[A-Z0-9]`, which represents UPPER_SNAKE_CASE.
+ },
+ "help": { # Provides links to documentation or for performing an out of band action. For example, if a quota check failed with an error indicating the calling project hasn't enabled the accessed service, this can contain a URL pointing directly to the right place in the developer console to flip the bit.
+ "links": [ # URL(s) pointing to additional information on handling the current error.
+ { # Describes a URL link.
+ "description": "A String", # Describes what the link offers.
+ "url": "A String", # The URL of the link.
+ },
+ ],
+ },
+ "localizedMessage": { # Provides a localized error message that is safe to return to the user which can be attached to an RPC error.
+ "locale": "A String", # The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt. Examples are: "en-US", "fr-CH", "es-MX"
+ "message": "A String", # The localized error message in the above locale.
+ },
+ "quotaInfo": { # Additional details for quota exceeded error for resource quota.
+ "dimensions": { # The map holding related quota dimensions.
+ "a_key": "A String",
+ },
+ "futureLimit": 3.14, # Future quota limit being rolled out. The limit's unit depends on the quota type or metric.
+ "limit": 3.14, # Current effective quota limit. The limit's unit depends on the quota type or metric.
+ "limitName": "A String", # The name of the quota limit.
+ "metricName": "A String", # The Compute Engine quota metric name.
+ "rolloutStatus": "A String", # Rollout status of the future quota limit.
+ },
+ },
+ ],
+ "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
+ "message": "A String", # [Output Only] An optional, human-readable error message.
+ },
+ ],
+ },
+ "timestamp": "A String", # [Output Only] Timestamp is shown only if there is an error. The field has // RFC3339 // text format.
+ },
+ },
+ ],
+ },
}
requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents you from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
@@ -427,6 +533,59 @@ Method Details
"workloadPolicy": "A String", # The URL of the workload policy for this multi-MIG. It can be a full or partial URL. For example, the following are all valid URLs to a workload policy: - https://www.googleapis.com/compute/v1/projects/project/regions/region /resourcePolicies/resourcePolicy - projects/project/regions/region/resourcePolicies/resourcePolicy - regions/region/resourcePolicies/resourcePolicy
},
"selfLink": "A String", # [Output only] Server-defined URL for the resource.
+ "status": {
+ "appliedAcceleratorTopologies": [ # [Output Only] The accelerator topology applied to this multi-MIG. Currently only one accelerator topology is supported.
+ {
+ "acceleratorTopology": "A String", # [Output Only] Topology in the format of: "16x16", "4x4x4", etc. The value is the same as configured in the WorkloadPolicy.
+ "acceleratorTopologyState": "A String", # [Output Only] The state of the accelerator topology.
+ "acceleratorTopologyStateLastCheck": { # [Output Only] The result of the latest accelerator topology state check.
+ "error": { # [Output Only] Encountered errors on the last state check.
+ "errors": [ # [Output Only] The array of errors encountered while processing this operation.
+ {
+ "code": "A String", # [Output Only] The error type identifier for this error.
+ "errorDetails": [ # [Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.
+ {
+ "errorInfo": { # Describes the cause of the error with structured details. Example of an error when contacting the "pubsub.googleapis.com" API when it is not enabled: { "reason": "API_DISABLED" "domain": "googleapis.com" "metadata": { "resource": "projects/123", "service": "pubsub.googleapis.com" } } This response indicates that the pubsub.googleapis.com API is not enabled. Example of an error that is returned when attempting to create a Spanner instance in a region that is out of stock: { "reason": "STOCKOUT" "domain": "spanner.googleapis.com", "metadata": { "availableRegions": "us-central1,us-east2" } }
+ "domain": "A String", # The logical grouping to which the "reason" belongs. The error domain is typically the registered service name of the tool or product that generates the error. Example: "pubsub.googleapis.com". If the error is generated by some common infrastructure, the error domain must be a globally unique value that identifies the infrastructure. For Google API infrastructure, the error domain is "googleapis.com".
+ "metadatas": { # Additional structured details about this error. Keys must match a regular expression of `a-z+` but should ideally be lowerCamelCase. Also, they must be limited to 64 characters in length. When identifying the current value of an exceeded limit, the units should be contained in the key, not the value. For example, rather than `{"instanceLimit": "100/request"}`, should be returned as, `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number of instances that can be created in a single (batch) request.
+ "a_key": "A String",
+ },
+ "reason": "A String", # The reason of the error. This is a constant value that identifies the proximate cause of the error. Error reasons are unique within a particular domain of errors. This should be at most 63 characters and match a regular expression of `A-Z+[A-Z0-9]`, which represents UPPER_SNAKE_CASE.
+ },
+ "help": { # Provides links to documentation or for performing an out of band action. For example, if a quota check failed with an error indicating the calling project hasn't enabled the accessed service, this can contain a URL pointing directly to the right place in the developer console to flip the bit.
+ "links": [ # URL(s) pointing to additional information on handling the current error.
+ { # Describes a URL link.
+ "description": "A String", # Describes what the link offers.
+ "url": "A String", # The URL of the link.
+ },
+ ],
+ },
+ "localizedMessage": { # Provides a localized error message that is safe to return to the user which can be attached to an RPC error.
+ "locale": "A String", # The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt. Examples are: "en-US", "fr-CH", "es-MX"
+ "message": "A String", # The localized error message in the above locale.
+ },
+ "quotaInfo": { # Additional details for quota exceeded error for resource quota.
+ "dimensions": { # The map holding related quota dimensions.
+ "a_key": "A String",
+ },
+ "futureLimit": 3.14, # Future quota limit being rolled out. The limit's unit depends on the quota type or metric.
+ "limit": 3.14, # Current effective quota limit. The limit's unit depends on the quota type or metric.
+ "limitName": "A String", # The name of the quota limit.
+ "metricName": "A String", # The Compute Engine quota metric name.
+ "rolloutStatus": "A String", # Rollout status of the future quota limit.
+ },
+ },
+ ],
+ "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
+ "message": "A String", # [Output Only] An optional, human-readable error message.
+ },
+ ],
+ },
+ "timestamp": "A String", # [Output Only] Timestamp is shown only if there is an error. The field has // RFC3339 // text format.
+ },
+ },
+ ],
+ },
},
],
"kind": "compute#multiMigList", # Type of resource.
diff --git a/docs/dyn/compute_beta.regionTargetHttpsProxies.html b/docs/dyn/compute_beta.regionTargetHttpsProxies.html
index 2fed4cbf42d..a07050156e7 100644
--- a/docs/dyn/compute_beta.regionTargetHttpsProxies.html
+++ b/docs/dyn/compute_beta.regionTargetHttpsProxies.html
@@ -251,7 +251,7 @@ Method Details
Returns:
An object of the form:
- { # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/beta/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/beta/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
+ { # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/beta/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/beta/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpsProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpsProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
"authentication": "A String", # [Deprecated] Use serverTlsPolicy instead.
"authorization": "A String", # [Deprecated] Use authorizationPolicy instead.
"authorizationPolicy": "A String", # Optional. A URL referring to a networksecurity.AuthorizationPolicy resource that describes how the proxy should authorize inbound traffic. If left blank, access will not be restricted by an authorization policy. Refer to the AuthorizationPolicy resource for additional details. authorizationPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. Note: This field currently has no impact.
@@ -290,7 +290,7 @@ Method Details
body: object, The request body.
The object takes the form of:
-{ # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/beta/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/beta/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
+{ # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/beta/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/beta/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpsProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpsProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
"authentication": "A String", # [Deprecated] Use serverTlsPolicy instead.
"authorization": "A String", # [Deprecated] Use authorizationPolicy instead.
"authorizationPolicy": "A String", # Optional. A URL referring to a networksecurity.AuthorizationPolicy resource that describes how the proxy should authorize inbound traffic. If left blank, access will not be restricted by an authorization policy. Refer to the AuthorizationPolicy resource for additional details. authorizationPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. Note: This field currently has no impact.
@@ -458,7 +458,7 @@ Method Details
{ # Contains a list of TargetHttpsProxy resources.
"id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
"items": [ # A list of TargetHttpsProxy resources.
- { # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/beta/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/beta/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
+ { # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/beta/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/beta/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpsProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpsProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
"authentication": "A String", # [Deprecated] Use serverTlsPolicy instead.
"authorization": "A String", # [Deprecated] Use authorizationPolicy instead.
"authorizationPolicy": "A String", # Optional. A URL referring to a networksecurity.AuthorizationPolicy resource that describes how the proxy should authorize inbound traffic. If left blank, access will not be restricted by an authorization policy. Refer to the AuthorizationPolicy resource for additional details. authorizationPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. Note: This field currently has no impact.
@@ -527,7 +527,7 @@ Method Details
body: object, The request body.
The object takes the form of:
-{ # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/beta/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/beta/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
+{ # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/beta/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/beta/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpsProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpsProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
"authentication": "A String", # [Deprecated] Use serverTlsPolicy instead.
"authorization": "A String", # [Deprecated] Use authorizationPolicy instead.
"authorizationPolicy": "A String", # Optional. A URL referring to a networksecurity.AuthorizationPolicy resource that describes how the proxy should authorize inbound traffic. If left blank, access will not be restricted by an authorization policy. Refer to the AuthorizationPolicy resource for additional details. authorizationPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. Note: This field currently has no impact.
diff --git a/docs/dyn/compute_beta.targetHttpsProxies.html b/docs/dyn/compute_beta.targetHttpsProxies.html
index 1d6c4fdaf9c..ff4e9d5cdad 100644
--- a/docs/dyn/compute_beta.targetHttpsProxies.html
+++ b/docs/dyn/compute_beta.targetHttpsProxies.html
@@ -146,7 +146,7 @@ Method Details
"items": { # A list of TargetHttpsProxiesScopedList resources.
"a_key": { # Name of the scope containing this set of TargetHttpsProxies.
"targetHttpsProxies": [ # A list of TargetHttpsProxies contained in this scope.
- { # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/beta/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/beta/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
+ { # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/beta/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/beta/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpsProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpsProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
"authentication": "A String", # [Deprecated] Use serverTlsPolicy instead.
"authorization": "A String", # [Deprecated] Use authorizationPolicy instead.
"authorizationPolicy": "A String", # Optional. A URL referring to a networksecurity.AuthorizationPolicy resource that describes how the proxy should authorize inbound traffic. If left blank, access will not be restricted by an authorization policy. Refer to the AuthorizationPolicy resource for additional details. authorizationPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. Note: This field currently has no impact.
@@ -363,7 +363,7 @@ Method Details
Returns:
An object of the form:
- { # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/beta/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/beta/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
+ { # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/beta/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/beta/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpsProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpsProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
"authentication": "A String", # [Deprecated] Use serverTlsPolicy instead.
"authorization": "A String", # [Deprecated] Use authorizationPolicy instead.
"authorizationPolicy": "A String", # Optional. A URL referring to a networksecurity.AuthorizationPolicy resource that describes how the proxy should authorize inbound traffic. If left blank, access will not be restricted by an authorization policy. Refer to the AuthorizationPolicy resource for additional details. authorizationPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. Note: This field currently has no impact.
@@ -401,7 +401,7 @@ Method Details
body: object, The request body.
The object takes the form of:
-{ # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/beta/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/beta/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
+{ # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/beta/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/beta/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpsProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpsProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
"authentication": "A String", # [Deprecated] Use serverTlsPolicy instead.
"authorization": "A String", # [Deprecated] Use authorizationPolicy instead.
"authorizationPolicy": "A String", # Optional. A URL referring to a networksecurity.AuthorizationPolicy resource that describes how the proxy should authorize inbound traffic. If left blank, access will not be restricted by an authorization policy. Refer to the AuthorizationPolicy resource for additional details. authorizationPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. Note: This field currently has no impact.
@@ -568,7 +568,7 @@ Method Details
{ # Contains a list of TargetHttpsProxy resources.
"id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
"items": [ # A list of TargetHttpsProxy resources.
- { # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/beta/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/beta/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
+ { # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/beta/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/beta/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpsProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpsProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
"authentication": "A String", # [Deprecated] Use serverTlsPolicy instead.
"authorization": "A String", # [Deprecated] Use authorizationPolicy instead.
"authorizationPolicy": "A String", # Optional. A URL referring to a networksecurity.AuthorizationPolicy resource that describes how the proxy should authorize inbound traffic. If left blank, access will not be restricted by an authorization policy. Refer to the AuthorizationPolicy resource for additional details. authorizationPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. Note: This field currently has no impact.
@@ -636,7 +636,7 @@ Method Details
body: object, The request body.
The object takes the form of:
-{ # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/beta/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/beta/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
+{ # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/beta/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/beta/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpsProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpsProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
"authentication": "A String", # [Deprecated] Use serverTlsPolicy instead.
"authorization": "A String", # [Deprecated] Use authorizationPolicy instead.
"authorizationPolicy": "A String", # Optional. A URL referring to a networksecurity.AuthorizationPolicy resource that describes how the proxy should authorize inbound traffic. If left blank, access will not be restricted by an authorization policy. Refer to the AuthorizationPolicy resource for additional details. authorizationPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. Note: This field currently has no impact.
diff --git a/docs/dyn/compute_v1.backendServices.html b/docs/dyn/compute_v1.backendServices.html
index 8a4c449f220..f6c26cb01ae 100644
--- a/docs/dyn/compute_v1.backendServices.html
+++ b/docs/dyn/compute_v1.backendServices.html
@@ -446,7 +446,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optionalFields": [ # This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM. Contains a list of optional fields you want to include in the logs. For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace
@@ -509,7 +509,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -1007,7 +1007,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optionalFields": [ # This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM. Contains a list of optional fields you want to include in the logs. For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace
@@ -1070,7 +1070,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -1360,7 +1360,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optionalFields": [ # This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM. Contains a list of optional fields you want to include in the logs. For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace
@@ -1423,7 +1423,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -1746,7 +1746,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optionalFields": [ # This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM. Contains a list of optional fields you want to include in the logs. For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace
@@ -1809,7 +1809,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -2031,7 +2031,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optionalFields": [ # This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM. Contains a list of optional fields you want to include in the logs. For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace
@@ -2094,7 +2094,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -2332,7 +2332,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optionalFields": [ # This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM. Contains a list of optional fields you want to include in the logs. For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace
@@ -2395,7 +2395,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -3099,7 +3099,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optionalFields": [ # This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM. Contains a list of optional fields you want to include in the logs. For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace
@@ -3162,7 +3162,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
diff --git a/docs/dyn/compute_v1.regionBackendServices.html b/docs/dyn/compute_v1.regionBackendServices.html
index ab5d224f86b..41f9d80ded0 100644
--- a/docs/dyn/compute_v1.regionBackendServices.html
+++ b/docs/dyn/compute_v1.regionBackendServices.html
@@ -419,7 +419,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optionalFields": [ # This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM. Contains a list of optional fields you want to include in the logs. For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace
@@ -482,7 +482,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -775,7 +775,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optionalFields": [ # This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM. Contains a list of optional fields you want to include in the logs. For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace
@@ -838,7 +838,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -1162,7 +1162,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optionalFields": [ # This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM. Contains a list of optional fields you want to include in the logs. For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace
@@ -1225,7 +1225,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -1448,7 +1448,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optionalFields": [ # This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM. Contains a list of optional fields you want to include in the logs. For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace
@@ -1511,7 +1511,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -1750,7 +1750,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optionalFields": [ # This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM. Contains a list of optional fields you want to include in the logs. For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace
@@ -1813,7 +1813,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
@@ -2390,7 +2390,7 @@ Method Details
},
},
],
- "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
+ "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured—that is, if session affinity remains at the default value of NONE—then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.
"logConfig": { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
"enable": True or False, # Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.
"optionalFields": [ # This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM. Contains a list of optional fields you want to include in the logs. For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace
@@ -2453,7 +2453,7 @@ Method Details
"serviceBindings": [ # URLs of networkservices.ServiceBinding resources. Can only be set if load balancing scheme is INTERNAL_SELF_MANAGED. If set, lists of backends and health checks must be both empty.
"A String",
],
- "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
+ "serviceLbPolicy": "A String", # URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.
"sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity). sessionAffinity cannot be specified with haPolicy.
"strongSessionAffinityCookie": { # The HTTP cookie used for stateful session affinity. # Describes the HTTP cookie used for stateful session affinity. This field is applicable and required if the sessionAffinity is set to STRONG_COOKIE_AFFINITY.
"name": "A String", # Name of the cookie.
diff --git a/docs/dyn/compute_v1.regionTargetHttpsProxies.html b/docs/dyn/compute_v1.regionTargetHttpsProxies.html
index 4785084cd41..f43a86eda4b 100644
--- a/docs/dyn/compute_v1.regionTargetHttpsProxies.html
+++ b/docs/dyn/compute_v1.regionTargetHttpsProxies.html
@@ -248,7 +248,7 @@ Method Details
Returns:
An object of the form:
- { # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/v1/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/v1/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
+ { # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/v1/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/v1/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpsProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpsProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
"authorizationPolicy": "A String", # Optional. A URL referring to a networksecurity.AuthorizationPolicy resource that describes how the proxy should authorize inbound traffic. If left blank, access will not be restricted by an authorization policy. Refer to the AuthorizationPolicy resource for additional details. authorizationPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. Note: This field currently has no impact.
"certificateMap": "A String", # URL of a certificate map that identifies a certificate map associated with the given target proxy. This field can only be set for Global external Application Load Balancer or Classic Application Load Balancer. For other products use Certificate Manager Certificates instead. If set, sslCertificates will be ignored. Accepted format is //certificatemanager.googleapis.com/projects/{project }/locations/{location}/certificateMaps/{resourceName}.
"creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
@@ -282,7 +282,7 @@ Method Details
body: object, The request body.
The object takes the form of:
-{ # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/v1/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/v1/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
+{ # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/v1/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/v1/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpsProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpsProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
"authorizationPolicy": "A String", # Optional. A URL referring to a networksecurity.AuthorizationPolicy resource that describes how the proxy should authorize inbound traffic. If left blank, access will not be restricted by an authorization policy. Refer to the AuthorizationPolicy resource for additional details. authorizationPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. Note: This field currently has no impact.
"certificateMap": "A String", # URL of a certificate map that identifies a certificate map associated with the given target proxy. This field can only be set for Global external Application Load Balancer or Classic Application Load Balancer. For other products use Certificate Manager Certificates instead. If set, sslCertificates will be ignored. Accepted format is //certificatemanager.googleapis.com/projects/{project }/locations/{location}/certificateMaps/{resourceName}.
"creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
@@ -445,7 +445,7 @@ Method Details
{ # Contains a list of TargetHttpsProxy resources.
"id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
"items": [ # A list of TargetHttpsProxy resources.
- { # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/v1/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/v1/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
+ { # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/v1/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/v1/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpsProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpsProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
"authorizationPolicy": "A String", # Optional. A URL referring to a networksecurity.AuthorizationPolicy resource that describes how the proxy should authorize inbound traffic. If left blank, access will not be restricted by an authorization policy. Refer to the AuthorizationPolicy resource for additional details. authorizationPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. Note: This field currently has no impact.
"certificateMap": "A String", # URL of a certificate map that identifies a certificate map associated with the given target proxy. This field can only be set for Global external Application Load Balancer or Classic Application Load Balancer. For other products use Certificate Manager Certificates instead. If set, sslCertificates will be ignored. Accepted format is //certificatemanager.googleapis.com/projects/{project }/locations/{location}/certificateMaps/{resourceName}.
"creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
@@ -509,7 +509,7 @@ Method Details
body: object, The request body.
The object takes the form of:
-{ # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/v1/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/v1/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
+{ # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/v1/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/v1/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpsProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpsProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
"authorizationPolicy": "A String", # Optional. A URL referring to a networksecurity.AuthorizationPolicy resource that describes how the proxy should authorize inbound traffic. If left blank, access will not be restricted by an authorization policy. Refer to the AuthorizationPolicy resource for additional details. authorizationPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. Note: This field currently has no impact.
"certificateMap": "A String", # URL of a certificate map that identifies a certificate map associated with the given target proxy. This field can only be set for Global external Application Load Balancer or Classic Application Load Balancer. For other products use Certificate Manager Certificates instead. If set, sslCertificates will be ignored. Accepted format is //certificatemanager.googleapis.com/projects/{project }/locations/{location}/certificateMaps/{resourceName}.
"creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
diff --git a/docs/dyn/compute_v1.targetHttpsProxies.html b/docs/dyn/compute_v1.targetHttpsProxies.html
index 6281cf0764d..6e080c19106 100644
--- a/docs/dyn/compute_v1.targetHttpsProxies.html
+++ b/docs/dyn/compute_v1.targetHttpsProxies.html
@@ -143,7 +143,7 @@ Method Details
"items": { # A list of TargetHttpsProxiesScopedList resources.
"a_key": { # Name of the scope containing this set of TargetHttpsProxies.
"targetHttpsProxies": [ # A list of TargetHttpsProxies contained in this scope.
- { # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/v1/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/v1/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
+ { # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/v1/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/v1/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpsProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpsProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
"authorizationPolicy": "A String", # Optional. A URL referring to a networksecurity.AuthorizationPolicy resource that describes how the proxy should authorize inbound traffic. If left blank, access will not be restricted by an authorization policy. Refer to the AuthorizationPolicy resource for additional details. authorizationPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. Note: This field currently has no impact.
"certificateMap": "A String", # URL of a certificate map that identifies a certificate map associated with the given target proxy. This field can only be set for Global external Application Load Balancer or Classic Application Load Balancer. For other products use Certificate Manager Certificates instead. If set, sslCertificates will be ignored. Accepted format is //certificatemanager.googleapis.com/projects/{project }/locations/{location}/certificateMaps/{resourceName}.
"creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
@@ -355,7 +355,7 @@ Method Details
Returns:
An object of the form:
- { # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/v1/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/v1/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
+ { # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/v1/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/v1/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpsProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpsProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
"authorizationPolicy": "A String", # Optional. A URL referring to a networksecurity.AuthorizationPolicy resource that describes how the proxy should authorize inbound traffic. If left blank, access will not be restricted by an authorization policy. Refer to the AuthorizationPolicy resource for additional details. authorizationPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. Note: This field currently has no impact.
"certificateMap": "A String", # URL of a certificate map that identifies a certificate map associated with the given target proxy. This field can only be set for Global external Application Load Balancer or Classic Application Load Balancer. For other products use Certificate Manager Certificates instead. If set, sslCertificates will be ignored. Accepted format is //certificatemanager.googleapis.com/projects/{project }/locations/{location}/certificateMaps/{resourceName}.
"creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
@@ -388,7 +388,7 @@ Method Details
body: object, The request body.
The object takes the form of:
-{ # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/v1/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/v1/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
+{ # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/v1/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/v1/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpsProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpsProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
"authorizationPolicy": "A String", # Optional. A URL referring to a networksecurity.AuthorizationPolicy resource that describes how the proxy should authorize inbound traffic. If left blank, access will not be restricted by an authorization policy. Refer to the AuthorizationPolicy resource for additional details. authorizationPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. Note: This field currently has no impact.
"certificateMap": "A String", # URL of a certificate map that identifies a certificate map associated with the given target proxy. This field can only be set for Global external Application Load Balancer or Classic Application Load Balancer. For other products use Certificate Manager Certificates instead. If set, sslCertificates will be ignored. Accepted format is //certificatemanager.googleapis.com/projects/{project }/locations/{location}/certificateMaps/{resourceName}.
"creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
@@ -550,7 +550,7 @@ Method Details
{ # Contains a list of TargetHttpsProxy resources.
"id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
"items": [ # A list of TargetHttpsProxy resources.
- { # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/v1/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/v1/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
+ { # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/v1/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/v1/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpsProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpsProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
"authorizationPolicy": "A String", # Optional. A URL referring to a networksecurity.AuthorizationPolicy resource that describes how the proxy should authorize inbound traffic. If left blank, access will not be restricted by an authorization policy. Refer to the AuthorizationPolicy resource for additional details. authorizationPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. Note: This field currently has no impact.
"certificateMap": "A String", # URL of a certificate map that identifies a certificate map associated with the given target proxy. This field can only be set for Global external Application Load Balancer or Classic Application Load Balancer. For other products use Certificate Manager Certificates instead. If set, sslCertificates will be ignored. Accepted format is //certificatemanager.googleapis.com/projects/{project }/locations/{location}/certificateMaps/{resourceName}.
"creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
@@ -613,7 +613,7 @@ Method Details
body: object, The request body.
The object takes the form of:
-{ # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/v1/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/v1/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
+{ # Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/v1/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/v1/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpsProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpsProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.
"authorizationPolicy": "A String", # Optional. A URL referring to a networksecurity.AuthorizationPolicy resource that describes how the proxy should authorize inbound traffic. If left blank, access will not be restricted by an authorization policy. Refer to the AuthorizationPolicy resource for additional details. authorizationPolicy only applies to a global TargetHttpsProxy attached to globalForwardingRules with the loadBalancingScheme set to INTERNAL_SELF_MANAGED. Note: This field currently has no impact.
"certificateMap": "A String", # URL of a certificate map that identifies a certificate map associated with the given target proxy. This field can only be set for Global external Application Load Balancer or Classic Application Load Balancer. For other products use Certificate Manager Certificates instead. If set, sslCertificates will be ignored. Accepted format is //certificatemanager.googleapis.com/projects/{project }/locations/{location}/certificateMaps/{resourceName}.
"creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
diff --git a/googleapiclient/discovery_cache/documents/compute.alpha.json b/googleapiclient/discovery_cache/documents/compute.alpha.json
index 387f1613006..c32bb493d97 100644
--- a/googleapiclient/discovery_cache/documents/compute.alpha.json
+++ b/googleapiclient/discovery_cache/documents/compute.alpha.json
@@ -51140,7 +51140,7 @@
}
}
},
-"revision": "20250729",
+"revision": "20250807",
"rootUrl": "https://compute.googleapis.com/",
"schemas": {
"AWSV4Signature": {
@@ -54928,7 +54928,7 @@ false
"type": "array"
},
"localityLbPolicy": {
-"description": "The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured\u2014that is, if session affinity remains at the default value of NONE\u2014then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.",
+"description": "The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured\u2014that is, if session affinity remains at the default value of NONE\u2014then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.",
"enum": [
"INVALID_LB_POLICY",
"LEAST_REQUEST",
@@ -54943,7 +54943,7 @@ false
"enumDescriptions": [
"",
"An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests.",
-"This algorithm implements consistent hashing to backends. Maglev can be used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824",
+"This algorithm implements consistent hashing to backends. Maglev can be used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer.",
"Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer.",
"The load balancer selects a random healthy host.",
"The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests.",
@@ -55055,7 +55055,7 @@ false
"type": "array"
},
"serviceLbPolicy": {
-"description": "URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.",
+"description": "URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.",
"type": "string"
},
"sessionAffinity": {
@@ -55989,7 +55989,7 @@ false
"enumDescriptions": [
"",
"An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests.",
-"This algorithm implements consistent hashing to backends. Maglev can be used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824",
+"This algorithm implements consistent hashing to backends. Maglev can be used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer.",
"Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer.",
"The load balancer selects a random healthy host.",
"The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests.",
@@ -57462,6 +57462,7 @@ false
"GENERAL_PURPOSE_N2",
"GENERAL_PURPOSE_N2D",
"GENERAL_PURPOSE_N4",
+"GENERAL_PURPOSE_N4D",
"GENERAL_PURPOSE_T2D",
"GRAPHICS_OPTIMIZED",
"MEMORY_OPTIMIZED",
@@ -57507,6 +57508,7 @@ false
"",
"",
"",
+"",
"Note for internal users: When adding a new enum Type for v1, make sure to also add it in the comment for the `optional Type type` definition. This ensures that the public documentation displays the new enum Type."
],
"type": "string"
@@ -58071,9 +58073,6 @@ false
"description": "Contains a list of CompositeHealthChecksScopedList.",
"id": "CompositeHealthCheckAggregatedList",
"properties": {
-"etag": {
-"type": "string"
-},
"id": {
"description": "[Output Only] Unique identifier for the resource; defined by the server.",
"type": "string"
@@ -58099,13 +58098,6 @@ false
"description": "[Output Only] Server-defined URL for this resource.",
"type": "string"
},
-"unreachables": {
-"description": "[Output Only] Unreachable resources.",
-"items": {
-"type": "string"
-},
-"type": "array"
-},
"warning": {
"description": "[Output Only] Informational warning message.",
"properties": {
@@ -58236,9 +58228,6 @@ false
"CompositeHealthCheckList": {
"id": "CompositeHealthCheckList",
"properties": {
-"etag": {
-"type": "string"
-},
"id": {
"description": "[Output Only] Unique identifier for the resource; defined by the server.",
"type": "string"
@@ -58263,13 +58252,6 @@ false
"description": "[Output Only] Server-defined URL for this resource.",
"type": "string"
},
-"unreachables": {
-"description": "[Output Only] Unreachable resources. end_interface: MixerListResponseWithEtagBuilder",
-"items": {
-"type": "string"
-},
-"type": "array"
-},
"warning": {
"description": "[Output Only] Informational warning message.",
"properties": {
@@ -61852,10 +61834,12 @@ false
"description": "The type of the firewall policy. This field can be either VPC_POLICY or RDMA_ROCE_POLICY. Note: if not specified then VPC_POLICY will be used.",
"enum": [
"RDMA_ROCE_POLICY",
+"ULL_POLICY",
"VPC_POLICY"
],
"enumDescriptions": [
"",
+"",
""
],
"type": "string"
@@ -65846,9 +65830,6 @@ false
"HealthAggregationPolicyList": {
"id": "HealthAggregationPolicyList",
"properties": {
-"etag": {
-"type": "string"
-},
"id": {
"description": "[Output Only] Unique identifier for the resource; defined by the server.",
"type": "string"
@@ -65873,13 +65854,6 @@ false
"description": "[Output Only] Server-defined URL for this resource.",
"type": "string"
},
-"unreachables": {
-"description": "[Output Only] Unreachable resources. end_interface: MixerListResponseWithEtagBuilder",
-"items": {
-"type": "string"
-},
-"type": "array"
-},
"warning": {
"description": "[Output Only] Informational warning message.",
"properties": {
@@ -67234,9 +67208,6 @@ false
"description": "Contains a list of HealthSourcesScopedList.",
"id": "HealthSourceAggregatedList",
"properties": {
-"etag": {
-"type": "string"
-},
"id": {
"description": "[Output Only] Unique identifier for the resource; defined by the server.",
"type": "string"
@@ -67262,13 +67233,6 @@ false
"description": "[Output Only] Server-defined URL for this resource.",
"type": "string"
},
-"unreachables": {
-"description": "[Output Only] Unreachable resources.",
-"items": {
-"type": "string"
-},
-"type": "array"
-},
"warning": {
"description": "[Output Only] Informational warning message.",
"properties": {
@@ -67399,9 +67363,6 @@ false
"HealthSourceList": {
"id": "HealthSourceList",
"properties": {
-"etag": {
-"type": "string"
-},
"id": {
"description": "[Output Only] Unique identifier for the resource; defined by the server.",
"type": "string"
@@ -67426,13 +67387,6 @@ false
"description": "[Output Only] Server-defined URL for this resource.",
"type": "string"
},
-"unreachables": {
-"description": "[Output Only] Unreachable resources. end_interface: MixerListResponseWithEtagBuilder",
-"items": {
-"type": "string"
-},
-"type": "array"
-},
"warning": {
"description": "[Output Only] Informational warning message.",
"properties": {
@@ -69253,6 +69207,12 @@ false
"format": "uint64",
"type": "string"
},
+"identity": {
+"type": "string"
+},
+"identityCertificate": {
+"type": "boolean"
+},
"instanceEncryptionKey": {
"$ref": "CustomerEncryptionKey",
"description": "Encrypts suspended data for an instance with a customer-managed encryption key. If you are creating a new instance, this field will encrypt the local SSD and in-memory contents of the instance during the suspend operation. If you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key during the suspend operation."
@@ -73089,6 +73049,12 @@ false
},
"type": "array"
},
+"identity": {
+"type": "string"
+},
+"identityCertificate": {
+"type": "boolean"
+},
"keyRevocationActionType": {
"description": "KeyRevocationActionType of the instance. Supported options are \"STOP\" and \"NONE\". The default value is \"NONE\" if it is not specified.",
"enum": [
@@ -85476,10 +85442,12 @@ false
"items": {
"enum": [
"RDMA_ROCE_POLICY",
+"ULL_POLICY",
"VPC_POLICY"
],
"enumDescriptions": [
"",
+"",
""
],
"type": "string"
@@ -107319,12 +107287,14 @@ false
"enum": [
"COMPATIBLE",
"CUSTOM",
+"FIPS_202205",
"MODERN",
"RESTRICTED"
],
"enumDescriptions": [
"Compatible profile. Allows the broadset set of clients, even those which support only out-of-date SSL features to negotiate with the load balancer.",
"Custom profile. Allow only the set of allowed SSL features specified in the customFeatures field.",
+"FIPS complatible profile. Supports a reduced set of SSL features, intended to meet FIPS 140-3 compliance requirements.",
"Modern profile. Supports a wide set of SSL features, allowing modern clients to negotiate SSL with the load balancer.",
"Restricted profile. Supports a reduced set of SSL features, intended to meet stricter compliance requirements."
],
@@ -111190,7 +111160,7 @@ false
"type": "object"
},
"TargetHttpsProxy": {
-"description": "Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/alpha/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/alpha/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.",
+"description": "Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/alpha/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/alpha/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpsProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpsProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.",
"id": "TargetHttpsProxy",
"properties": {
"authentication": {
@@ -114388,6 +114358,7 @@ false
"FAILURE_MEMORY",
"FAILURE_NETWORK",
"FAILURE_NVLINK",
+"FAILURE_REDUNDANT_HARDWARE_FAULT",
"INFRASTRUCTURE_RELOCATION",
"MAINTENANCE_REASON_UNKNOWN",
"PLANNED_NETWORK_UPDATE",
@@ -114403,6 +114374,7 @@ false
"Maintenance due to memory errors.",
"Maintenance due to network errors.",
"Maintenance due to NVLink failure.",
+"Maintenance due to redundant hardware fault.",
"Maintenance due to infrastructure relocation.",
"Unknown maintenance reason. Do not use this value.",
"Maintenance due to planned network update.",
diff --git a/googleapiclient/discovery_cache/documents/compute.beta.json b/googleapiclient/discovery_cache/documents/compute.beta.json
index 4602d8067aa..2b7daa77fae 100644
--- a/googleapiclient/discovery_cache/documents/compute.beta.json
+++ b/googleapiclient/discovery_cache/documents/compute.beta.json
@@ -45747,7 +45747,7 @@
}
}
},
-"revision": "20250729",
+"revision": "20250807",
"rootUrl": "https://compute.googleapis.com/",
"schemas": {
"AWSV4Signature": {
@@ -49346,7 +49346,7 @@ false
"type": "array"
},
"localityLbPolicy": {
-"description": "The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured\u2014that is, if session affinity remains at the default value of NONE\u2014then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.",
+"description": "The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured\u2014that is, if session affinity remains at the default value of NONE\u2014then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.",
"enum": [
"INVALID_LB_POLICY",
"LEAST_REQUEST",
@@ -49361,7 +49361,7 @@ false
"enumDescriptions": [
"",
"An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests.",
-"This algorithm implements consistent hashing to backends. Maglev can be used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824",
+"This algorithm implements consistent hashing to backends. Maglev can be used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer.",
"Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer.",
"The load balancer selects a random healthy host.",
"The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests.",
@@ -49467,7 +49467,7 @@ false
"type": "array"
},
"serviceLbPolicy": {
-"description": "URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.",
+"description": "URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.",
"type": "string"
},
"sessionAffinity": {
@@ -50367,7 +50367,7 @@ false
"enumDescriptions": [
"",
"An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests.",
-"This algorithm implements consistent hashing to backends. Maglev can be used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824",
+"This algorithm implements consistent hashing to backends. Maglev can be used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer.",
"Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer.",
"The load balancer selects a random healthy host.",
"The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests.",
@@ -71154,6 +71154,9 @@ false
"selfLink": {
"description": "[Output only] Server-defined URL for the resource.",
"type": "string"
+},
+"status": {
+"$ref": "MultiMigStatus"
}
},
"type": "object"
@@ -71169,6 +71172,112 @@ false
},
"type": "object"
},
+"MultiMigStatus": {
+"id": "MultiMigStatus",
+"properties": {
+"appliedAcceleratorTopologies": {
+"description": "[Output Only] The accelerator topology applied to this multi-MIG. Currently only one accelerator topology is supported.",
+"items": {
+"$ref": "MultiMigStatusAcceleratorTopology"
+},
+"type": "array"
+}
+},
+"type": "object"
+},
+"MultiMigStatusAcceleratorTopology": {
+"id": "MultiMigStatusAcceleratorTopology",
+"properties": {
+"acceleratorTopology": {
+"description": "[Output Only] Topology in the format of: \"16x16\", \"4x4x4\", etc. The value is the same as configured in the WorkloadPolicy.",
+"type": "string"
+},
+"acceleratorTopologyState": {
+"description": "[Output Only] The state of the accelerator topology.",
+"enum": [
+"ACTIVATING",
+"ACTIVE",
+"ACTIVE_DEGRADED",
+"DEACTIVATING",
+"FAILED",
+"INCOMPLETE"
+],
+"enumDescriptions": [
+"The accelerator topology is being activated.",
+"The accelerator topology is active.",
+"The accelerator topology is active but operating in degraded mode.",
+"The accelerator topology is being deactivated.",
+"The accelerator topology failed.",
+"The configuration is incomplete and the accelerator topology cannot be activated due to insufficient number of running VMs."
+],
+"type": "string"
+},
+"acceleratorTopologyStateLastCheck": {
+"$ref": "MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheck",
+"description": "[Output Only] The result of the latest accelerator topology state check."
+}
+},
+"type": "object"
+},
+"MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheck": {
+"id": "MultiMigStatusAcceleratorTopologyAcceleratorTopologyStateLastCheck",
+"properties": {
+"error": {
+"description": "[Output Only] Encountered errors on the last state check.",
+"properties": {
+"errors": {
+"description": "[Output Only] The array of errors encountered while processing this operation.",
+"items": {
+"properties": {
+"code": {
+"description": "[Output Only] The error type identifier for this error.",
+"type": "string"
+},
+"errorDetails": {
+"description": "[Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.",
+"items": {
+"properties": {
+"errorInfo": {
+"$ref": "ErrorInfo"
+},
+"help": {
+"$ref": "Help"
+},
+"localizedMessage": {
+"$ref": "LocalizedMessage"
+},
+"quotaInfo": {
+"$ref": "QuotaExceededInfo"
+}
+},
+"type": "object"
+},
+"type": "array"
+},
+"location": {
+"description": "[Output Only] Indicates the field in the request that caused the error. This property is optional.",
+"type": "string"
+},
+"message": {
+"description": "[Output Only] An optional, human-readable error message.",
+"type": "string"
+}
+},
+"type": "object"
+},
+"type": "array"
+}
+},
+"type": "object"
+},
+"timestamp": {
+"description": "[Output Only] Timestamp is shown only if there is an error. The field has // RFC3339 // text format.",
+"format": "google-datetime",
+"type": "string"
+}
+},
+"type": "object"
+},
"MultiMigsList": {
"id": "MultiMigsList",
"properties": {
@@ -96495,7 +96604,7 @@ false
"type": "object"
},
"TargetHttpsProxy": {
-"description": "Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/beta/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/beta/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.",
+"description": "Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/beta/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/beta/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpsProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpsProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.",
"id": "TargetHttpsProxy",
"properties": {
"authentication": {
@@ -99549,6 +99658,7 @@ false
"FAILURE_MEMORY",
"FAILURE_NETWORK",
"FAILURE_NVLINK",
+"FAILURE_REDUNDANT_HARDWARE_FAULT",
"INFRASTRUCTURE_RELOCATION",
"MAINTENANCE_REASON_UNKNOWN",
"PLANNED_NETWORK_UPDATE",
@@ -99564,6 +99674,7 @@ false
"Maintenance due to memory errors.",
"Maintenance due to network errors.",
"Maintenance due to NVLink failure.",
+"Maintenance due to redundant hardware fault.",
"Maintenance due to infrastructure relocation.",
"Unknown maintenance reason. Do not use this value.",
"Maintenance due to planned network update.",
diff --git a/googleapiclient/discovery_cache/documents/compute.v1.json b/googleapiclient/discovery_cache/documents/compute.v1.json
index 75fe5df52f0..06f217b7102 100644
--- a/googleapiclient/discovery_cache/documents/compute.v1.json
+++ b/googleapiclient/discovery_cache/documents/compute.v1.json
@@ -39996,7 +39996,7 @@
}
}
},
-"revision": "20250729",
+"revision": "20250807",
"rootUrl": "https://compute.googleapis.com/",
"schemas": {
"AWSV4Signature": {
@@ -43341,7 +43341,7 @@ false
"type": "array"
},
"localityLbPolicy": {
-"description": "The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824 - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured\u2014that is, if session affinity remains at the default value of NONE\u2014then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.",
+"description": "The load balancing algorithm used within the scope of the locality. The possible values are: - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default. - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. - RANDOM: The load balancer selects a random healthy host. - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer. - WEIGHTED_ROUND_ROBIN: Per-endpoint Weighted Round Robin Load Balancing using weights computed from Backend reported Custom Metrics. If set, the Backend Service responses are expected to contain non-standard HTTP response header field Endpoint-Load-Metrics. The reported metrics to use for computing the weights are specified via the customMetrics field. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2 or H2C, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED, INTERNAL_MANAGED, or EXTERNAL_MANAGED. If sessionAffinity is not configured\u2014that is, if session affinity remains at the default value of NONE\u2014then the default value for localityLbPolicy is ROUND_ROBIN. If session affinity is set to a value other than NONE, then the default value for localityLbPolicy is MAGLEV. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true. localityLbPolicy cannot be specified with haPolicy.",
"enum": [
"INVALID_LB_POLICY",
"LEAST_REQUEST",
@@ -43356,7 +43356,7 @@ false
"enumDescriptions": [
"",
"An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests.",
-"This algorithm implements consistent hashing to backends. Maglev can be used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824",
+"This algorithm implements consistent hashing to backends. Maglev can be used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer.",
"Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer.",
"The load balancer selects a random healthy host.",
"The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests.",
@@ -43458,7 +43458,7 @@ false
"type": "array"
},
"serviceLbPolicy": {
-"description": "URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.",
+"description": "URL to networkservices.ServiceLbPolicy resource. Can only be set if load balancing scheme is EXTERNAL_MANAGED, INTERNAL_MANAGED or INTERNAL_SELF_MANAGED and the scope is global.",
"type": "string"
},
"sessionAffinity": {
@@ -44336,7 +44336,7 @@ false
"enumDescriptions": [
"",
"An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests.",
-"This algorithm implements consistent hashing to backends. Maglev can be used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824",
+"This algorithm implements consistent hashing to backends. Maglev can be used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see Maglev: A Fast and Reliable Software Network Load Balancer.",
"Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer.",
"The load balancer selects a random healthy host.",
"The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests.",
@@ -86210,7 +86210,7 @@ false
"type": "object"
},
"TargetHttpsProxy": {
-"description": "Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/v1/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/v1/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.",
+"description": "Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/v1/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/v1/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpsProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpsProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.",
"id": "TargetHttpsProxy",
"properties": {
"authorizationPolicy": {
@@ -89247,6 +89247,7 @@ false
"FAILURE_MEMORY",
"FAILURE_NETWORK",
"FAILURE_NVLINK",
+"FAILURE_REDUNDANT_HARDWARE_FAULT",
"INFRASTRUCTURE_RELOCATION",
"MAINTENANCE_REASON_UNKNOWN",
"PLANNED_NETWORK_UPDATE",
@@ -89262,6 +89263,7 @@ false
"Maintenance due to memory errors.",
"Maintenance due to network errors.",
"Maintenance due to NVLink failure.",
+"Maintenance due to redundant hardware fault.",
"Maintenance due to infrastructure relocation.",
"Unknown maintenance reason. Do not use this value.",
"Maintenance due to planned network update.",
From e6361989ff22cf3b2a91ddb1930fb4acf15eb2ee Mon Sep 17 00:00:00 2001
From: Yoshi Automation Method Details
Args:
name: string, The resource that owns the locations collection, if applicable. (required)
- extraLocationTypes: string, Optional. A list of extra location types that should be used as conditions for controlling the visibility of the locations. (repeated)
+ extraLocationTypes: string, Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage. (repeated)
filter: string, A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).
pageSize: integer, The maximum number of results to return. If not set, the service selects a default.
pageToken: string, A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.
diff --git a/docs/dyn/connectors_v1.projects.locations.providers.connectors.versions.html b/docs/dyn/connectors_v1.projects.locations.providers.connectors.versions.html
index d3197a12bee..5b7e27efc68 100644
--- a/docs/dyn/connectors_v1.projects.locations.providers.connectors.versions.html
+++ b/docs/dyn/connectors_v1.projects.locations.providers.connectors.versions.html
@@ -342,7 +342,11 @@ Method Details
"maxInstanceRequestConcurrency": 42, # Max Instance Request Conncurrency for Cloud Run service.
"migrateDeploymentModel": True or False, # Indicate whether connector is being migrated to cloud run deployment model.
"migrateTls": True or False, # Indicate whether connector is being migrated to TLS.
- "networkEgressMode": "A String", # Indicate whether connector is being migrated to use direct VPC egress.
+ "networkEgressModeOverride": { # NetworkEgressModeOverride provides the network egress mode override for a connector. # Network egress mode override to migrate to direct VPC egress.
+ "isEventingOverrideEnabled": True or False, # boolean should be set to true to make sure only eventing enabled connections are migrated to direct vpc egress.
+ "isJobsOverrideEnabled": True or False, # boolean should be set to true to make sure only async operations enabled connections are migrated to direct vpc egress.
+ "networkEgressMode": "A String", # Determines the VPC Egress mode for the connector.
+ },
"provisionCloudSpanner": True or False, # Indicate whether cloud spanner is required for connector job.
"provisionMemstore": True or False, # Indicate whether memstore is required for connector job.
"ratelimitThreshold": "A String", # Max QPS supported by the connector version before throttling of requests.
@@ -1201,7 +1205,11 @@ Method Details
"maxInstanceRequestConcurrency": 42, # Max Instance Request Conncurrency for Cloud Run service.
"migrateDeploymentModel": True or False, # Indicate whether connector is being migrated to cloud run deployment model.
"migrateTls": True or False, # Indicate whether connector is being migrated to TLS.
- "networkEgressMode": "A String", # Indicate whether connector is being migrated to use direct VPC egress.
+ "networkEgressModeOverride": { # NetworkEgressModeOverride provides the network egress mode override for a connector. # Network egress mode override to migrate to direct VPC egress.
+ "isEventingOverrideEnabled": True or False, # boolean should be set to true to make sure only eventing enabled connections are migrated to direct vpc egress.
+ "isJobsOverrideEnabled": True or False, # boolean should be set to true to make sure only async operations enabled connections are migrated to direct vpc egress.
+ "networkEgressMode": "A String", # Determines the VPC Egress mode for the connector.
+ },
"provisionCloudSpanner": True or False, # Indicate whether cloud spanner is required for connector job.
"provisionMemstore": True or False, # Indicate whether memstore is required for connector job.
"ratelimitThreshold": "A String", # Max QPS supported by the connector version before throttling of requests.
diff --git a/docs/dyn/connectors_v2.projects.locations.connections.actions.html b/docs/dyn/connectors_v2.projects.locations.connections.actions.html
index 4c81da9d687..770cf7aec7a 100644
--- a/docs/dyn/connectors_v2.projects.locations.connections.actions.html
+++ b/docs/dyn/connectors_v2.projects.locations.connections.actions.html
@@ -119,6 +119,11 @@ Method Details
An object of the form:
{ # Response message for ActionService.ExecuteAction
+ "metadata": { # Metadata like service latency, etc.
+ "a_key": {
+ "a_key": "", # Properties of the object. Contains field @type with type URL.
+ },
+ },
"results": [ # In the case of successful invocation of the specified action, the results Struct contains values based on the response of the action invoked. 1. If the action execution produces any entities as a result, they are returned as an array of Structs with the 'key' being the field name and the 'value' being the value of that field in each result row. { 'results': [{'key': 'value'}, ...] }
{
"a_key": "", # Properties of the object.
@@ -205,6 +210,11 @@ Method Details
"nullable": True or False, # Specifies whether a null value is allowed.
},
],
+ "metadata": { # Metadata like service latency, etc.
+ "a_key": {
+ "a_key": "", # Properties of the object. Contains field @type with type URL.
+ },
+ },
"name": "A String", # Name of the action.
"resultJsonSchema": { # JsonSchema representation of schema metadata # JsonSchema representation of this actions's result schema
"additionalDetails": { # Additional details apart from standard json schema fields, this gives flexibility to store metadata about the schema
@@ -344,6 +354,11 @@ Method Details
"nullable": True or False, # Specifies whether a null value is allowed.
},
],
+ "metadata": { # Metadata like service latency, etc.
+ "a_key": {
+ "a_key": "", # Properties of the object. Contains field @type with type URL.
+ },
+ },
"name": "A String", # Name of the action.
"resultJsonSchema": { # JsonSchema representation of schema metadata # JsonSchema representation of this actions's result schema
"additionalDetails": { # Additional details apart from standard json schema fields, this gives flexibility to store metadata about the schema
@@ -400,6 +415,11 @@ Method Details
],
},
],
+ "metadata": { # Metadata like service latency, etc.
+ "a_key": {
+ "a_key": "", # Properties of the object. Contains field @type with type URL.
+ },
+ },
"nextPageToken": "A String", # Next page token if more actions available.
"unsupportedActionNames": [ # List of actions which contain unsupported Datatypes. Check datatype.proto for more information.
"A String",
diff --git a/docs/dyn/connectors_v2.projects.locations.connections.entityTypes.entities.html b/docs/dyn/connectors_v2.projects.locations.connections.entityTypes.entities.html
index c58788f350a..62e19e2d308 100644
--- a/docs/dyn/connectors_v2.projects.locations.connections.entityTypes.entities.html
+++ b/docs/dyn/connectors_v2.projects.locations.connections.entityTypes.entities.html
@@ -120,6 +120,11 @@ Method Details
"fields": { # Fields of the entity. The key is name of the field and the value contains the applicable `google.protobuf.Value` entry for this field.
"a_key": "",
},
+ "metadata": { # Metadata like service latency, etc.
+ "a_key": {
+ "a_key": "", # Properties of the object. Contains field @type with type URL.
+ },
+ },
"name": "A String", # Output only. Resource name of the Entity. Format: projects/{project}/locations/{location}/connections/{connection}/entityTypes/{type}/entities/{id}
}
@@ -135,6 +140,11 @@ Method Details
"fields": { # Fields of the entity. The key is name of the field and the value contains the applicable `google.protobuf.Value` entry for this field.
"a_key": "",
},
+ "metadata": { # Metadata like service latency, etc.
+ "a_key": {
+ "a_key": "", # Properties of the object. Contains field @type with type URL.
+ },
+ },
"name": "A String", # Output only. Resource name of the Entity. Format: projects/{project}/locations/{location}/connections/{connection}/entityTypes/{type}/entities/{id}
}
@@ -194,6 +204,11 @@ Method Details
"fields": { # Fields of the entity. The key is name of the field and the value contains the applicable `google.protobuf.Value` entry for this field.
"a_key": "",
},
+ "metadata": { # Metadata like service latency, etc.
+ "a_key": {
+ "a_key": "", # Properties of the object. Contains field @type with type URL.
+ },
+ },
"name": "A String", # Output only. Resource name of the Entity. Format: projects/{project}/locations/{location}/connections/{connection}/entityTypes/{type}/entities/{id}
}
@@ -223,9 +238,19 @@ Method Details
"fields": { # Fields of the entity. The key is name of the field and the value contains the applicable `google.protobuf.Value` entry for this field.
"a_key": "",
},
+ "metadata": { # Metadata like service latency, etc.
+ "a_key": {
+ "a_key": "", # Properties of the object. Contains field @type with type URL.
+ },
+ },
"name": "A String", # Output only. Resource name of the Entity. Format: projects/{project}/locations/{location}/connections/{connection}/entityTypes/{type}/entities/{id}
},
],
+ "metadata": { # Metadata like service latency, etc.
+ "a_key": {
+ "a_key": "", # Properties of the object. Contains field @type with type URL.
+ },
+ },
"nextPageToken": "A String", # Next page token if more records are available.
}
@@ -257,6 +282,11 @@ Method Details
"fields": { # Fields of the entity. The key is name of the field and the value contains the applicable `google.protobuf.Value` entry for this field.
"a_key": "",
},
+ "metadata": { # Metadata like service latency, etc.
+ "a_key": {
+ "a_key": "", # Properties of the object. Contains field @type with type URL.
+ },
+ },
"name": "A String", # Output only. Resource name of the Entity. Format: projects/{project}/locations/{location}/connections/{connection}/entityTypes/{type}/entities/{id}
}
@@ -272,6 +302,11 @@ Method Details
"fields": { # Fields of the entity. The key is name of the field and the value contains the applicable `google.protobuf.Value` entry for this field.
"a_key": "",
},
+ "metadata": { # Metadata like service latency, etc.
+ "a_key": {
+ "a_key": "", # Properties of the object. Contains field @type with type URL.
+ },
+ },
"name": "A String", # Output only. Resource name of the Entity. Format: projects/{project}/locations/{location}/connections/{connection}/entityTypes/{type}/entities/{id}
}
@@ -289,6 +324,11 @@ Method Details
"fields": { # Fields of the entity. The key is name of the field and the value contains the applicable `google.protobuf.Value` entry for this field.
"a_key": "",
},
+ "metadata": { # Metadata like service latency, etc.
+ "a_key": {
+ "a_key": "", # Properties of the object. Contains field @type with type URL.
+ },
+ },
"name": "A String", # Output only. Resource name of the Entity. Format: projects/{project}/locations/{location}/connections/{connection}/entityTypes/{type}/entities/{id}
}
@@ -302,6 +342,11 @@ Method Details
An object of the form:
{ # Response message for EntityService.UpdateEntitiesWithConditions
+ "metadata": { # Metadata like service latency, etc.
+ "a_key": {
+ "a_key": "", # Properties of the object. Contains field @type with type URL.
+ },
+ },
"response": { # Response returned by the external system.
"a_key": "", # Properties of the object.
},
diff --git a/docs/dyn/connectors_v2.projects.locations.connections.entityTypes.html b/docs/dyn/connectors_v2.projects.locations.connections.entityTypes.html
index bb27db49a77..f3defa1be8c 100644
--- a/docs/dyn/connectors_v2.projects.locations.connections.entityTypes.html
+++ b/docs/dyn/connectors_v2.projects.locations.connections.entityTypes.html
@@ -83,7 +83,7 @@ Instance Methods
close()
Close httplib2 connections.
- get(name, view=None, x__xgafv=None)
get(name, contextMetadata=None, view=None, x__xgafv=None)
Gets metadata of given entity type
list(parent, pageSize=None, pageToken=None, view=None, x__xgafv=None)
get(name, view=None, x__xgafv=None)
+ get(name, contextMetadata=None, view=None, x__xgafv=None)
Gets metadata of given entity type
Args:
name: string, Required. Resource name of the Entity Type. Format: projects/{project}/locations/{location}/connections/{connection}/entityTypes/{entityType} (required)
+ contextMetadata: string, Context metadata for request could be used to fetch customization of entity type schema.
view: string, Specifies view for entity type schema.
Allowed values
ENTITY_TYPE_SCHEMA_VIEW_UNSPECIFIED - VIEW_UNSPECIFIED. The unset value. Defaults to BASIC View.
@@ -117,6 +118,7 @@ Method Details
An object of the form:
{ # EntityType message contains metadata information about a single entity type present in the external system.
+ "defaultSortBy": "A String",
"fields": [ # List containing metadata information about each field of the entity type.
{ # Message contains EntityType's Field metadata.
"additionalDetails": { # The following map contains fields that are not explicitly mentioned above,this give connectors the flexibility to add new metadata fields.
@@ -178,6 +180,11 @@ Method Details
"A String",
],
},
+ "metadata": { # Metadata like service latency, etc.
+ "a_key": {
+ "a_key": "", # Properties of the object. Contains field @type with type URL.
+ },
+ },
"name": "A String", # The name of the entity type.
"operations": [
"A String",
@@ -207,9 +214,15 @@ Method Details
An object of the form:
{ # Response message for EntityService.ListEntityTypes
+ "metadata": { # Metadata like service latency, etc.
+ "a_key": {
+ "a_key": "", # Properties of the object. Contains field @type with type URL.
+ },
+ },
"nextPageToken": "A String", # Next page token if more entity types available.
"types": [ # List of metadata related to all entity types.
{ # EntityType message contains metadata information about a single entity type present in the external system.
+ "defaultSortBy": "A String",
"fields": [ # List containing metadata information about each field of the entity type.
{ # Message contains EntityType's Field metadata.
"additionalDetails": { # The following map contains fields that are not explicitly mentioned above,this give connectors the flexibility to add new metadata fields.
@@ -271,6 +284,11 @@ Method Details
"A String",
],
},
+ "metadata": { # Metadata like service latency, etc.
+ "a_key": {
+ "a_key": "", # Properties of the object. Contains field @type with type URL.
+ },
+ },
"name": "A String", # The name of the entity type.
"operations": [
"A String",
diff --git a/docs/dyn/connectors_v2.projects.locations.connections.html b/docs/dyn/connectors_v2.projects.locations.connections.html
index 7597bd80c26..82b98dd5122 100644
--- a/docs/dyn/connectors_v2.projects.locations.connections.html
+++ b/docs/dyn/connectors_v2.projects.locations.connections.html
@@ -84,6 +84,11 @@ Instance Methods
Returns the entityTypes Resource.
+
+ tools()
+
+Returns the tools Resource.
+
checkReadiness(name, x__xgafv=None)
Reports readiness status of the connector. Similar logic to GetStatus but modified for kubernetes health check to understand.
@@ -138,6 +143,11 @@ Method Details
{ # The status of the connector.
"description": "A String", # When the connector is not in ACTIVE state, the description must be populated to specify the reason why it's not in ACTIVE state.
+ "metadata": { # Metadata like service latency, etc.
+ "a_key": {
+ "a_key": "", # Properties of the object. Contains field @type with type URL.
+ },
+ },
"state": "A String", # State of the connector.
}
+ close()
Close httplib2 connections.
+
+ execute(name, body=None, x__xgafv=None)
Executes a specific tool.
+
+ list(parent, pageSize=None, pageToken=None, x__xgafv=None)
Lists all available tools.
+ +Retrieves the next page of results.
+close()
+ Close httplib2 connections.+
execute(name, body=None, x__xgafv=None)
+ Executes a specific tool.
+
+Args:
+ name: string, Required. Resource name of the Tool. Format: projects/{project}/locations/{location}/connections/{connection}/tools/{tool} (required)
+ body: object, The request body.
+ The object takes the form of:
+
+{ # Request message for ConnectorAgentService.ExecuteTool
+ "parameters": { # Input parameters for the tool.
+ "a_key": "", # Properties of the object.
+ },
+}
+
+ x__xgafv: string, V1 error format.
+ Allowed values
+ 1 - v1 error format
+ 2 - v2 error format
+
+Returns:
+ An object of the form:
+
+ { # Response message for ConnectorAgentService.ExecuteTool
+ "result": { # Output from the tool execution.
+ "a_key": "", # Properties of the object.
+ },
+}
+list(parent, pageSize=None, pageToken=None, x__xgafv=None)
+ Lists all available tools.
+
+Args:
+ parent: string, Required. Resource name of the Connection. Format: projects/{project}/locations/{location}/connections/{connection} (required)
+ pageSize: integer, Page size.
+ pageToken: string, Page token.
+ x__xgafv: string, V1 error format.
+ Allowed values
+ 1 - v1 error format
+ 2 - v2 error format
+
+Returns:
+ An object of the form:
+
+ { # Response message for ConnectorAgentService.ListTools
+ "nextPageToken": "A String", # Next page token.
+ "tools": [ # List of available tools.
+ { # Message representing a single tool.
+ "description": "A String", # Description of the tool.
+ "inputSchema": { # JsonSchema representation of schema metadata # JSON schema for the input parameters of the tool.
+ "additionalDetails": { # Additional details apart from standard json schema fields, this gives flexibility to store metadata about the schema
+ "a_key": "", # Properties of the object.
+ },
+ "default": "", # The default value of the field or object described by this schema.
+ "description": "A String", # A description of this schema.
+ "enum": [ # Possible values for an enumeration. This works in conjunction with `type` to represent types with a fixed set of legal values
+ "",
+ ],
+ "format": "A String", # Format of the value as per https://json-schema.org/understanding-json-schema/reference/string.html#format
+ "items": # Object with schema name: JsonSchema # Schema that applies to array values, applicable only if this is of type `array`.
+ "jdbcType": "A String", # JDBC datatype of the field.
+ "properties": { # The child schemas, applicable only if this is of type `object`. The key is the name of the property and the value is the json schema that describes that property
+ "a_key": # Object with schema name: JsonSchema
+ },
+ "required": [ # Whether this property is required.
+ "A String",
+ ],
+ "type": [ # JSON Schema Validation: A Vocabulary for Structural Validation of JSON
+ "A String",
+ ],
+ },
+ "name": "A String", # Name of the tool.
+ "outputSchema": { # JsonSchema representation of schema metadata # JSON schema for the output of the tool.
+ "additionalDetails": { # Additional details apart from standard json schema fields, this gives flexibility to store metadata about the schema
+ "a_key": "", # Properties of the object.
+ },
+ "default": "", # The default value of the field or object described by this schema.
+ "description": "A String", # A description of this schema.
+ "enum": [ # Possible values for an enumeration. This works in conjunction with `type` to represent types with a fixed set of legal values
+ "",
+ ],
+ "format": "A String", # Format of the value as per https://json-schema.org/understanding-json-schema/reference/string.html#format
+ "items": # Object with schema name: JsonSchema # Schema that applies to array values, applicable only if this is of type `array`.
+ "jdbcType": "A String", # JDBC datatype of the field.
+ "properties": { # The child schemas, applicable only if this is of type `object`. The key is the name of the property and the value is the json schema that describes that property
+ "a_key": # Object with schema name: JsonSchema
+ },
+ "required": [ # Whether this property is required.
+ "A String",
+ ],
+ "type": [ # JSON Schema Validation: A Vocabulary for Structural Validation of JSON
+ "A String",
+ ],
+ },
+ },
+ ],
+}
+list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
Get AuthorizedView
+
+ getIamPolicy(resource, options_requestedPolicyVersion=None, x__xgafv=None)
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)
List AuthorizedViewSets
@@ -117,6 +120,12 @@Retrieves the next page of results.
+
+ setIamPolicy(resource, body=None, x__xgafv=None)
Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
+
+ testIamPermissions(resource, body=None, x__xgafv=None)
Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
close()
@@ -199,6 +208,54 @@ getIamPolicy(resource, options_requestedPolicyVersion=None, x__xgafv=None)
+ Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
+
+Args:
+ resource: string, REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. (required)
+ options_requestedPolicyVersion: integer, Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+ x__xgafv: string, V1 error format.
+ Allowed values
+ 1 - v1 error format
+ 2 - v2 error format
+
+Returns:
+ An object of the form:
+
+ { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
+ "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
+ { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type": "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com` from DATA_WRITE logging.
+ "auditLogConfigs": [ # The configuration for logging of each type of permission.
+ { # Provides the configuration for logging a type of permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.
+ "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.
+ "A String",
+ ],
+ "logType": "A String", # The log type that this config enables.
+ },
+ ],
+ "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
+ },
+ ],
+ "bindings": [ # Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.
+ { # Associates `members`, or principals, with a `role`.
+ "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+ "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
+ "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
+ "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
+ "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
+ },
+ "members": [ # Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
+ "A String",
+ ],
+ "role": "A String", # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).
+ },
+ ],
+ "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
+ "version": 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+}
+list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)
List AuthorizedViewSets @@ -449,4 +506,119 @@Method Details
setIamPolicy(resource, body=None, x__xgafv=None)
+ Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
+
+Args:
+ resource: string, REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. (required)
+ body: object, The request body.
+ The object takes the form of:
+
+{ # Request message for `SetIamPolicy` method.
+ "policy": { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). # REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them.
+ "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
+ { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type": "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com` from DATA_WRITE logging.
+ "auditLogConfigs": [ # The configuration for logging of each type of permission.
+ { # Provides the configuration for logging a type of permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.
+ "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.
+ "A String",
+ ],
+ "logType": "A String", # The log type that this config enables.
+ },
+ ],
+ "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
+ },
+ ],
+ "bindings": [ # Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.
+ { # Associates `members`, or principals, with a `role`.
+ "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+ "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
+ "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
+ "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
+ "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
+ },
+ "members": [ # Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
+ "A String",
+ ],
+ "role": "A String", # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).
+ },
+ ],
+ "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
+ "version": 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+ },
+ "updateMask": "A String", # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: "bindings, etag"`
+}
+
+ x__xgafv: string, V1 error format.
+ Allowed values
+ 1 - v1 error format
+ 2 - v2 error format
+
+Returns:
+ An object of the form:
+
+ { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
+ "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
+ { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type": "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com` from DATA_WRITE logging.
+ "auditLogConfigs": [ # The configuration for logging of each type of permission.
+ { # Provides the configuration for logging a type of permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.
+ "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.
+ "A String",
+ ],
+ "logType": "A String", # The log type that this config enables.
+ },
+ ],
+ "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
+ },
+ ],
+ "bindings": [ # Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.
+ { # Associates `members`, or principals, with a `role`.
+ "condition": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+ "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
+ "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
+ "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
+ "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
+ },
+ "members": [ # Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
+ "A String",
+ ],
+ "role": "A String", # Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).
+ },
+ ],
+ "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
+ "version": 42, # Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
+}
+testIamPermissions(resource, body=None, x__xgafv=None)
+ Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
+
+Args:
+ resource: string, REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. (required)
+ body: object, The request body.
+ The object takes the form of:
+
+{ # Request message for `TestIamPermissions` method.
+ "permissions": [ # The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
+ "A String",
+ ],
+}
+
+ x__xgafv: string, V1 error format.
+ Allowed values
+ 1 - v1 error format
+ 2 - v2 error format
+
+Returns:
+ An object of the form:
+
+ { # Response message for `TestIamPermissions` method.
+ "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
+ "A String",
+ ],
+}
+