Class Action (0.1.0)

  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

Implements

ActionOrBuilder

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

getDescriptor()

  public 
  
 static 
  
 final 
  
 Descriptors 
 . 
 Descriptor 
  
 getDescriptor 
 () 
 
Returns
Type
Description

newBuilder()

  public 
  
 static 
  
 Action 
 . 
 Builder 
  
 newBuilder 
 () 
 
Returns
Type
Description

newBuilder(Action prototype)

  public 
  
 static 
  
 Action 
 . 
 Builder 
  
 newBuilder 
 ( 
 Action 
  
 prototype 
 ) 
 
Parameter
Name
Description
prototype
Returns
Type
Description

parseDelimitedFrom(InputStream input)

  public 
  
 static 
  
 Action 
  
 parseDelimitedFrom 
 ( 
 InputStream 
  
 input 
 ) 
 
Parameter
Name
Description
input
Returns
Type
Description
Exceptions
Type
Description

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

  public 
  
 static 
  
 Action 
  
 parseDelimitedFrom 
 ( 
 InputStream 
  
 input 
 , 
  
 ExtensionRegistryLite 
  
 extensionRegistry 
 ) 
 
Parameters
Name
Description
input
extensionRegistry
Returns
Type
Description
Exceptions
Type
Description

parseFrom(byte[] data)

  public 
  
 static 
  
 Action 
  
 parseFrom 
 ( 
 byte 
 [] 
  
 data 
 ) 
 
Parameter
Name
Description
data
byte []
Returns
Type
Description
Exceptions
Type
Description

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

  public 
  
 static 
  
 Action 
  
 parseFrom 
 ( 
 byte 
 [] 
  
 data 
 , 
  
 ExtensionRegistryLite 
  
 extensionRegistry 
 ) 
 
Parameters
Name
Description
data
byte []
extensionRegistry
Returns
Type
Description
Exceptions
Type
Description

parseFrom(ByteString data)

  public 
  
 static 
  
 Action 
  
 parseFrom 
 ( 
 ByteString 
  
 data 
 ) 
 
Parameter
Name
Description
data
Returns
Type
Description
Exceptions
Type
Description

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

  public 
  
 static 
  
 Action 
  
 parseFrom 
 ( 
 ByteString 
  
 data 
 , 
  
 ExtensionRegistryLite 
  
 extensionRegistry 
 ) 
 
Parameters
Name
Description
data
extensionRegistry
Returns
Type
Description
Exceptions
Type
Description

parseFrom(CodedInputStream input)

  public 
  
 static 
  
 Action 
  
 parseFrom 
 ( 
 CodedInputStream 
  
 input 
 ) 
 
Parameter
Name
Description
Returns
Type
Description
Exceptions
Type
Description

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

  public 
  
 static 
  
 Action 
  
 parseFrom 
 ( 
 CodedInputStream 
  
 input 
 , 
  
 ExtensionRegistryLite 
  
 extensionRegistry 
 ) 
 
Parameters
Name
Description
extensionRegistry
Returns
Type
Description
Exceptions
Type
Description

parseFrom(InputStream input)

  public 
  
 static 
  
 Action 
  
 parseFrom 
 ( 
 InputStream 
  
 input 
 ) 
 
Parameter
Name
Description
input
Returns
Type
Description
Exceptions
Type
Description

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

  public 
  
 static 
  
 Action 
  
 parseFrom 
 ( 
 InputStream 
  
 input 
 , 
  
 ExtensionRegistryLite 
  
 extensionRegistry 
 ) 
 
Parameters
Name
Description
input
extensionRegistry
Returns
Type
Description
Exceptions
Type
Description

parseFrom(ByteBuffer data)

  public 
  
 static 
  
 Action 
  
 parseFrom 
 ( 
 ByteBuffer 
  
 data 
 ) 
 
Parameter
Name
Description
data
Returns
Type
Description
Exceptions
Type
Description

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

  public 
  
 static 
  
 Action 
  
 parseFrom 
 ( 
 ByteBuffer 
  
 data 
 , 
  
 ExtensionRegistryLite 
  
 extensionRegistry 
 ) 
 
Parameters
Name
Description
data
extensionRegistry
Returns
Type
Description
Exceptions
Type
Description

parser()

  public 
  
 static 
  
 Parser<Action> 
  
 parser 
 () 
 
Returns
Type
Description

Methods

equals(Object obj)

  public 
  
 boolean 
  
 equals 
 ( 
 Object 
  
 obj 
 ) 
 
Parameter
Name
Description
obj
Returns
Type
Description
Overrides

getDefaultInstanceForType()

  public 
  
 Action 
  
 getDefaultInstanceForType 
 () 
 
Returns
Type
Description

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;

Returns
Type
Description

The function.

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;

Returns
Type
Description

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;

Returns
Type
Description

The interaction.

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;

Returns
Type
Description

The loadIndicator.

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
Returns
Type
Description

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;

Returns
Type
Description

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
Returns
Type
Description

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 
 () 
 
Returns
Type
Description
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

The persistValues.

getSerializedSize()

  public 
  
 int 
  
 getSerializedSize 
 () 
 
Returns
Type
Description
int
Overrides

hashCode()

  public 
  
 int 
  
 hashCode 
 () 
 
Returns
Type
Description
int
Overrides

internalGetFieldAccessorTable()

  protected 
  
 GeneratedMessageV3 
 . 
 FieldAccessorTable 
  
 internalGetFieldAccessorTable 
 () 
 
Returns
Type
Description
Overrides

isInitialized()

  public 
  
 final 
  
 boolean 
  
 isInitialized 
 () 
 
Returns
Type
Description
Overrides

newBuilderForType()

  public 
  
 Action 
 . 
 Builder 
  
 newBuilderForType 
 () 
 
Returns
Type
Description

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

  protected 
  
 Action 
 . 
 Builder 
  
 newBuilderForType 
 ( 
 GeneratedMessageV3 
 . 
 BuilderParent 
  
 parent 
 ) 
 
Parameter
Name
Description
parent
Returns
Type
Description
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

  protected 
  
 Object 
  
 newInstance 
 ( 
 GeneratedMessageV3 
 . 
 UnusedPrivateParameter 
  
 unused 
 ) 
 
Parameter
Name
Description
Returns
Type
Description
Overrides

toBuilder()

  public 
  
 Action 
 . 
 Builder 
  
 toBuilder 
 () 
 
Returns
Type
Description

writeTo(CodedOutputStream output)

  public 
  
 void 
  
 writeTo 
 ( 
 CodedOutputStream 
  
 output 
 ) 
 
Parameter
Name
Description
Overrides
Exceptions
Type
Description
Design a Mobile Site
View Site in Mobile | Classic
Share by: