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
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
FUNCTION_FIELD_NUMBER
public static final int FUNCTION_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
INTERACTION_FIELD_NUMBER
public static final int INTERACTION_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
LOAD_INDICATOR_FIELD_NUMBER
public static final int LOAD_INDICATOR_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
PARAMETERS_FIELD_NUMBER
public static final int PARAMETERS_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
PERSIST_VALUES_FIELD_NUMBER
public static final int PERSIST_VALUES_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
Static Methods
getDefaultInstance()
public static Action getDefaultInstance()
Returns |
Type |
Description |
Action |
|
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static Action.Builder newBuilder()
newBuilder(Action prototype)
public static Action.Builder newBuilder(Action prototype)
Parameter |
Name |
Description |
prototype |
Action
|
public static Action parseDelimitedFrom(InputStream input)
Returns |
Type |
Description |
Action |
|
public static Action parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
Action |
|
parseFrom(byte[] data)
public static Action parseFrom(byte[] data)
Parameter |
Name |
Description |
data |
byte[]
|
Returns |
Type |
Description |
Action |
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Action parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
Action |
|
parseFrom(ByteString data)
public static Action parseFrom(ByteString data)
Returns |
Type |
Description |
Action |
|
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Action parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
Action |
|
public static Action parseFrom(CodedInputStream input)
Returns |
Type |
Description |
Action |
|
public static Action parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
Action |
|
public static Action parseFrom(InputStream input)
Returns |
Type |
Description |
Action |
|
public static Action parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
Action |
|
parseFrom(ByteBuffer data)
public static Action parseFrom(ByteBuffer data)
Returns |
Type |
Description |
Action |
|
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Action parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
Action |
|
parser()
public static Parser<Action> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter |
Name |
Description |
obj |
Object
|
Overrides
getDefaultInstanceForType()
public Action getDefaultInstanceForType()
Returns |
Type |
Description |
Action |
|
getFunction()
public String getFunction()
A custom function to invoke when the containing element is
clicked or othrwise activated.
For example usage, see Read form
data.
string function = 1;
Returns |
Type |
Description |
String |
The function.
|
getFunctionBytes()
public ByteString getFunctionBytes()
A custom function to invoke when the containing element is
clicked or othrwise activated.
For example usage, see Read form
data.
string function = 1;
Returns |
Type |
Description |
ByteString |
The bytes for function.
|
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 Chat apps:
.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 Chat apps:
.google.apps.card.v1.Action.Interaction interaction = 5;
Returns |
Type |
Description |
int |
The enum numeric value on the wire for interaction.
|
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;
Returns |
Type |
Description |
int |
The enum numeric value on the wire for loadIndicator.
|
getParameters(int index)
public Action.ActionParameter getParameters(int index)
List of action parameters.
repeated .google.apps.card.v1.Action.ActionParameter parameters = 2;
Parameter |
Name |
Description |
index |
int
|
getParametersCount()
public int getParametersCount()
List of action parameters.
repeated .google.apps.card.v1.Action.ActionParameter parameters = 2;
Returns |
Type |
Description |
int |
|
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;
Parameter |
Name |
Description |
index |
int
|
getParametersOrBuilderList()
public List<? extends Action.ActionParameterOrBuilder> getParametersOrBuilderList()
List of action parameters.
repeated .google.apps.card.v1.Action.ActionParameter parameters = 2;
Returns |
Type |
Description |
List<? extends com.google.apps.card.v1.Action.ActionParameterOrBuilder> |
|
getParserForType()
public Parser<Action> getParserForType()
Overrides
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;
Returns |
Type |
Description |
boolean |
The persistValues.
|
getSerializedSize()
public int getSerializedSize()
Returns |
Type |
Description |
int |
|
Overrides
hashCode()
Returns |
Type |
Description |
int |
|
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public Action.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Action.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Returns |
Type |
Description |
Object |
|
Overrides
toBuilder()
public Action.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides