Class VariableData

VariableData

Represents a variable data which can contain a collection of values in various types.

Only available for Google Workspace add-ons that extend Google Workspace Studio.

Sample usage:

constvariableData=AddOnsResponseService.newVariableData().addBooleanValue(true).addIntegerValue(123);

Methods

MethodReturn typeBrief description
addBooleanValue(value)VariableDataAdds a boolean value to the variable data.
addEmailAddress(emailAddress)VariableDataAdds an email address to the variable data.
addFloatValue(value)VariableDataAdds a float value to the variable data.
addGoogleUser(googleUser)VariableDataAdds a google user to the variable data.
addIntegerValue(value)VariableDataAdds an integer value to the variable data.
addResourceData(resourceData)VariableDataAdds aResourceData value to the variable data.
addResourceReference(resourceReference)VariableDataAdds a resource reference ID to the variable data.
addStringValue(value)VariableDataAdds a string value to the variable data.
addTimestampValue(value)VariableDataAdds aTimeStamp value to the variable data.
addWorkflowTextFormat(workflowTextFormat)VariableDataAdds aWorkflowTextFormat value to the variable data.

Detailed documentation

addBooleanValue(value)

Adds a boolean value to the variable data.

Parameters

NameTypeDescription
valueBooleanThe boolean value to be added.

Return

VariableData — This variable data object, for chaining.


addEmailAddress(emailAddress)

Adds an email address to the variable data.

Parameters

NameTypeDescription
emailAddressStringThe email address text value to be added.

Return

VariableData — This variable data object, for chaining.


addFloatValue(value)

Adds a float value to the variable data.

Parameters

NameTypeDescription
valueNumberThe float value to be added.

Return

VariableData — This variable data object, for chaining.


addGoogleUser(googleUser)

Adds a google user to the variable data.

Parameters

NameTypeDescription
googleUserStringThe google user text value to be added, should have format of user/xxxx.

Return

VariableData — This variable data object, for chaining.


addIntegerValue(value)

Adds an integer value to the variable data.

Parameters

NameTypeDescription
valueIntegerThe integer value to be added.

Return

VariableData — This variable data object, for chaining.


addResourceData(resourceData)

Adds aResourceData value to the variable data.

Parameters

NameTypeDescription
resourceDataResourceDataThe resource data value to be added.

Return

VariableData — This variable data object, for chaining.


addResourceReference(resourceReference)

Adds a resource reference ID to the variable data.

Parameters

NameTypeDescription
resourceReferenceStringThe resource ID to the variable data, for example "space/123".

Return

VariableData — This variable data object, for chaining.


addStringValue(value)

Adds a string value to the variable data.

Parameters

NameTypeDescription
valueStringThe string value to be added.

Return

VariableData — This variable data object, for chaining.


addTimestampValue(value)

Adds aTimeStamp value to the variable data.

Parameters

NameTypeDescription
valueTimeStampThe timestamp value to be added.

Return

VariableData — This variable data object, for chaining.


addWorkflowTextFormat(workflowTextFormat)

Adds aWorkflowTextFormat value to the variable data.

Parameters

NameTypeDescription
workflowTextFormatWorkflowTextFormatThe workflow text format to be added.

Return

VariableData — This variable data object, for chaining.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-03 UTC.