public
final
class
Action
extends
GeneratedMessageV3
implements
ActionOrBuilder
An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server.
Google Workspace Add-ons and Chat apps :
Protobuf type google.apps.card.v1.Action
Inheritance
Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > ActionImplements
ActionOrBuilderStatic Fields
FUNCTION_FIELD_NUMBER
public
static
final
int
FUNCTION_FIELD_NUMBER
INTERACTION_FIELD_NUMBER
public
static
final
int
INTERACTION_FIELD_NUMBER
LOAD_INDICATOR_FIELD_NUMBER
public
static
final
int
LOAD_INDICATOR_FIELD_NUMBER
PARAMETERS_FIELD_NUMBER
public
static
final
int
PARAMETERS_FIELD_NUMBER
PERSIST_VALUES_FIELD_NUMBER
public
static
final
int
PERSIST_VALUES_FIELD_NUMBER
Static Methods
getDefaultInstance()
public
static
Action
getDefaultInstance
()
getDescriptor()
public
static
final
Descriptors
.
Descriptor
getDescriptor
()
newBuilder()
public
static
Action
.
Builder
newBuilder
()
newBuilder(Action prototype)
public
static
Action
.
Builder
newBuilder
(
Action
prototype
)
parseDelimitedFrom(InputStream input)
public
static
Action
parseDelimitedFrom
(
InputStream
input
)
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public
static
Action
parseDelimitedFrom
(
InputStream
input
,
ExtensionRegistryLite
extensionRegistry
)
parseFrom(byte[] data)
public
static
Action
parseFrom
(
byte
[]
data
)
data
byte
[]
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public
static
Action
parseFrom
(
byte
[]
data
,
ExtensionRegistryLite
extensionRegistry
)
parseFrom(ByteString data)
public
static
Action
parseFrom
(
ByteString
data
)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public
static
Action
parseFrom
(
ByteString
data
,
ExtensionRegistryLite
extensionRegistry
)
parseFrom(CodedInputStream input)
public
static
Action
parseFrom
(
CodedInputStream
input
)
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public
static
Action
parseFrom
(
CodedInputStream
input
,
ExtensionRegistryLite
extensionRegistry
)
parseFrom(InputStream input)
public
static
Action
parseFrom
(
InputStream
input
)
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public
static
Action
parseFrom
(
InputStream
input
,
ExtensionRegistryLite
extensionRegistry
)
parseFrom(ByteBuffer data)
public
static
Action
parseFrom
(
ByteBuffer
data
)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public
static
Action
parseFrom
(
ByteBuffer
data
,
ExtensionRegistryLite
extensionRegistry
)
parser()
public
static
Parser<Action>
parser
()
Methods
equals(Object obj)
public
boolean
equals
(
Object
obj
)
getDefaultInstanceForType()
public
Action
getDefaultInstanceForType
()
getFunction()
public
String
getFunction
()
A custom function to invoke when the containing element is clicked or othrwise activated.
For example usage, see Create interactive cards .
string function = 1;
getFunctionBytes()
public
ByteString
getFunctionBytes
()
A custom function to invoke when the containing element is clicked or othrwise activated.
For example usage, see Create interactive cards .
string function = 1;
getInteraction()
public
Action
.
Interaction
getInteraction
()
Optional. Required when opening a dialog .
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
. 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.apps.card.v1.Action.Interaction interaction = 5;
getInteractionValue()
public
int
getInteractionValue
()
Optional. Required when opening a dialog .
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
. 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.apps.card.v1.Action.Interaction interaction = 5;
getLoadIndicator()
public
Action
.
LoadIndicator
getLoadIndicator
()
Specifies the loading indicator that the action displays while making the call to the action.
.google.apps.card.v1.Action.LoadIndicator load_indicator = 3;
getLoadIndicatorValue()
public
int
getLoadIndicatorValue
()
Specifies the loading indicator that the action displays while making the call to the action.
.google.apps.card.v1.Action.LoadIndicator load_indicator = 3;
getParameters(int index)
public
Action
.
ActionParameter
getParameters
(
int
index
)
List of action parameters.
repeated .google.apps.card.v1.Action.ActionParameter parameters = 2;
getParametersCount()
public
int
getParametersCount
()
List of action parameters.
repeated .google.apps.card.v1.Action.ActionParameter parameters = 2;
getParametersList()
public
List<Action
.
ActionParameter
>
getParametersList
()
List of action parameters.
repeated .google.apps.card.v1.Action.ActionParameter parameters = 2;
getParametersOrBuilder(int index)
public
Action
.
ActionParameterOrBuilder
getParametersOrBuilder
(
int
index
)
List of action parameters.
repeated .google.apps.card.v1.Action.ActionParameter parameters = 2;
getParametersOrBuilderList()
public
List
< ?
extends
Action
.
ActionParameterOrBuilder
>
getParametersOrBuilderList
()
List of action parameters.
repeated .google.apps.card.v1.Action.ActionParameter parameters = 2;
getParserForType()
public
Parser<Action>
getParserForType
()
getPersistValues()
public
boolean
getPersistValues
()
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
to NONE
. For card
messages
in Chat apps, you must also set the action's ResponseType
to UPDATE_MESSAGE
and use the same card_id
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
to SPINNER
.
bool persist_values = 4;
getSerializedSize()
public
int
getSerializedSize
()
hashCode()
public
int
hashCode
()
internalGetFieldAccessorTable()
protected
GeneratedMessageV3
.
FieldAccessorTable
internalGetFieldAccessorTable
()
isInitialized()
public
final
boolean
isInitialized
()
newBuilderForType()
public
Action
.
Builder
newBuilderForType
()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected
Action
.
Builder
newBuilderForType
(
GeneratedMessageV3
.
BuilderParent
parent
)
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected
Object
newInstance
(
GeneratedMessageV3
.
UnusedPrivateParameter
unused
)
toBuilder()
public
Action
.
Builder
toBuilder
()
writeTo(CodedOutputStream output)
public
void
writeTo
(
CodedOutputStream
output
)

