Represents a application specific resource data, a resource data contains a collection of
key-value pairs of variable names and Variable
.
Only available for Google Workspace add-ons that extend Google Workspace Studio.
Sample usage:
let customResourceData = AddOnsResponseService . newResourceData () . setVariableDataMap ( { "field_1" : fieldData_1 , "field_2" : fieldData_2 } ); let outputVariableData = AddOnsResponseService . newVariableData () . addResourceData ( customResourceData ); let workflowAction = AddOnsResponseService . newReturnOutputVariablesAction () . setVariableDataMap ({ "resource_data" : outputVariableData });
Methods
| Method | Return type | Brief description |
|---|---|---|
Resource
|
Adds a Variable
keyed by its variable name, a value is overwritten if the key
already exists. |
|
Resource
|
Sets the map of the variable data keyed by variable names. |
Detailed documentation
add
Variable
Data(key, value)
Adds a Variable
keyed by its variable name, a value is overwritten if the key
already exists.
Parameters
| Name | Type | Description |
|---|---|---|
key
|
String
|
The variable name to retrieve the corresponding variable data. |
value
|
Variable
|
The Variable
to be added. |
Return
Resource
— This resource data object, for chaining.
set
Variable
Data
Map(fields)
Sets the map of the variable data keyed by variable names.
Parameters
| Name | Type | Description |
|---|---|---|
fields
|
Object
|
A collection of key-value pairs of string and variable data. |
Return
Resource
— This resource data object, for chaining.

