Package com.google.apps.card.v1
Class Action.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<Action.Builder>
com.google.protobuf.GeneratedMessage.Builder<Action.Builder>
com.google.protobuf.GeneratedMessage.ExtendableBuilder<com.google.protobuf.GeneratedMessageV3,Action.Builder>
com.google.protobuf.GeneratedMessageV3.Builder<Action.Builder>
com.google.apps.card.v1.Action.Builder
- All Implemented Interfaces:
ActionOrBuilder
,com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
Action
public static final class Action.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<Action.Builder>
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](https://developers.google.com/workspace/extend):Protobuf type
google.apps.card.v1.Action
-
Method Summary
Modifier and TypeMethodDescriptionaddAllParameters
(Iterable<? extends Action.ActionParameter> values) List of action parameters.addParameters
(int index, Action.ActionParameter value) List of action parameters.addParameters
(int index, Action.ActionParameter.Builder builderForValue) List of action parameters.List of action parameters.addParameters
(Action.ActionParameter.Builder builderForValue) List of action parameters.List of action parameters.addParametersBuilder
(int index) List of action parameters.addRepeatedField
(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()
clear()
clearField
(com.google.protobuf.Descriptors.FieldDescriptor field) A custom function to invoke when the containing element is clicked or othrwise activated.Optional.Specifies the loading indicator that the action displays while making the call to the action.clearOneof
(com.google.protobuf.Descriptors.OneofDescriptor oneof) List of action parameters.Indicates whether form values persist after the action.clone()
static final com.google.protobuf.Descriptors.Descriptor
com.google.protobuf.Descriptors.Descriptor
A custom function to invoke when the containing element is clicked or othrwise activated.com.google.protobuf.ByteString
A custom function to invoke when the containing element is clicked or othrwise activated.Optional.int
Optional.Specifies the loading indicator that the action displays while making the call to the action.int
Specifies the loading indicator that the action displays while making the call to the action.getParameters
(int index) List of action parameters.getParametersBuilder
(int index) List of action parameters.List of action parameters.int
List of action parameters.List of action parameters.getParametersOrBuilder
(int index) List of action parameters.List
<? extends Action.ActionParameterOrBuilder> List of action parameters.boolean
Indicates whether form values persist after the action.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
final boolean
mergeFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom
(com.google.protobuf.Message other) final Action.Builder
mergeUnknownFields
(com.google.protobuf.UnknownFieldSet unknownFields) removeParameters
(int index) List of action parameters.setFunction
(String value) A custom function to invoke when the containing element is clicked or othrwise activated.setFunctionBytes
(com.google.protobuf.ByteString value) A custom function to invoke when the containing element is clicked or othrwise activated.setInteraction
(Action.Interaction value) Optional.setInteractionValue
(int value) Optional.Specifies the loading indicator that the action displays while making the call to the action.setLoadIndicatorValue
(int value) Specifies the loading indicator that the action displays while making the call to the action.setParameters
(int index, Action.ActionParameter value) List of action parameters.setParameters
(int index, Action.ActionParameter.Builder builderForValue) List of action parameters.setPersistValues
(boolean value) Indicates whether form values persist after the action.setRepeatedField
(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) final Action.Builder
setUnknownFields
(com.google.protobuf.UnknownFieldSet unknownFields) Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getParentForChildren
Methods inherited from class com.google.protobuf.GeneratedMessage.ExtendableBuilder
addExtension, clearExtension, extensionsAreInitialized, getAllFields, getExtension, getExtension, getExtensionCount, getField, getFieldBuilder, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, hasExtension, hasField, mergeExtensionFields, newBuilderForField, parseUnknownField, setExtension, setExtension
Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
getOneofFieldDescriptor, getUnknownFields, getUnknownFieldSetBuilder, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, onBuilt, onChanged, setUnknownFieldSetBuilder, setUnknownFieldsProto3
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFrom
Methods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFrom
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Overrides:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<Action.Builder>
-
clear
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<Action.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessage.Builder<Action.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<Action.Builder>
-
setField
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Action.Builder>
-
clearField
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Action.Builder>
-
clearOneof
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<Action.Builder>
-
setRepeatedField
public Action.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Action.Builder>
-
addRepeatedField
public Action.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Action.Builder>
-
mergeFrom
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Action.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessage.ExtendableBuilder<com.google.protobuf.GeneratedMessageV3,
Action.Builder>
-
mergeFrom
public Action.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Action.Builder>
- Throws:
IOException
-
getFunction
A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
string function = 1;
- Specified by:
getFunction
in interfaceActionOrBuilder
- Returns:
- The function.
-
getFunctionBytes
public com.google.protobuf.ByteString getFunctionBytes()A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
string function = 1;
- Specified by:
getFunctionBytes
in interfaceActionOrBuilder
- Returns:
- The bytes for function.
-
setFunction
A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
string function = 1;
- Parameters:
value
- The function to set.- Returns:
- This builder for chaining.
-
clearFunction
A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
string function = 1;
- Returns:
- This builder for chaining.
-
setFunctionBytes
A custom function to invoke when the containing element is clicked or othrwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).
string function = 1;
- Parameters:
value
- The bytes for function to set.- Returns:
- This builder for chaining.
-
getParametersList
List of action parameters.
repeated .google.apps.card.v1.Action.ActionParameter parameters = 2;
- Specified by:
getParametersList
in interfaceActionOrBuilder
-
getParametersCount
public int getParametersCount()List of action parameters.
repeated .google.apps.card.v1.Action.ActionParameter parameters = 2;
- Specified by:
getParametersCount
in interfaceActionOrBuilder
-
getParameters
List of action parameters.
repeated .google.apps.card.v1.Action.ActionParameter parameters = 2;
- Specified by:
getParameters
in interfaceActionOrBuilder
-
setParameters
List of action parameters.
repeated .google.apps.card.v1.Action.ActionParameter parameters = 2;
-
setParameters
List of action parameters.
repeated .google.apps.card.v1.Action.ActionParameter parameters = 2;
-
addParameters
List of action parameters.
repeated .google.apps.card.v1.Action.ActionParameter parameters = 2;
-
addParameters
List of action parameters.
repeated .google.apps.card.v1.Action.ActionParameter parameters = 2;
-
addParameters
List of action parameters.
repeated .google.apps.card.v1.Action.ActionParameter parameters = 2;
-
addParameters
List of action parameters.
repeated .google.apps.card.v1.Action.ActionParameter parameters = 2;
-
addAllParameters
List of action parameters.
repeated .google.apps.card.v1.Action.ActionParameter parameters = 2;
-
clearParameters
List of action parameters.
repeated .google.apps.card.v1.Action.ActionParameter parameters = 2;
-
removeParameters
List of action parameters.
repeated .google.apps.card.v1.Action.ActionParameter parameters = 2;
-
getParametersBuilder
List of action parameters.
repeated .google.apps.card.v1.Action.ActionParameter parameters = 2;
-
getParametersOrBuilder
List of action parameters.
repeated .google.apps.card.v1.Action.ActionParameter parameters = 2;
- Specified by:
getParametersOrBuilder
in interfaceActionOrBuilder
-
getParametersOrBuilderList
List of action parameters.
repeated .google.apps.card.v1.Action.ActionParameter parameters = 2;
- Specified by:
getParametersOrBuilderList
in interfaceActionOrBuilder
-
addParametersBuilder
List of action parameters.
repeated .google.apps.card.v1.Action.ActionParameter parameters = 2;
-
addParametersBuilder
List of action parameters.
repeated .google.apps.card.v1.Action.ActionParameter parameters = 2;
-
getParametersBuilderList
List of action parameters.
repeated .google.apps.card.v1.Action.ActionParameter parameters = 2;
-
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;
- Specified by:
getLoadIndicatorValue
in interfaceActionOrBuilder
- Returns:
- The enum numeric value on the wire for loadIndicator.
-
setLoadIndicatorValue
Specifies the loading indicator that the action displays while making the call to the action.
.google.apps.card.v1.Action.LoadIndicator load_indicator = 3;
- Parameters:
value
- The enum numeric value on the wire for loadIndicator to set.- Returns:
- This builder for chaining.
-
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;
- Specified by:
getLoadIndicator
in interfaceActionOrBuilder
- Returns:
- The loadIndicator.
-
setLoadIndicator
Specifies the loading indicator that the action displays while making the call to the action.
.google.apps.card.v1.Action.LoadIndicator load_indicator = 3;
- Parameters:
value
- The loadIndicator to set.- Returns:
- This builder for chaining.
-
clearLoadIndicator
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:
- This builder for chaining.
-
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`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `NONE`. For [card messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`ResponseType`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#responsetype) to `UPDATE_MESSAGE` and use the same [`card_id`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#CardWithId) 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`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
bool persist_values = 4;
- Specified by:
getPersistValues
in interfaceActionOrBuilder
- Returns:
- The persistValues.
-
setPersistValues
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`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `NONE`. For [card messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`ResponseType`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#responsetype) to `UPDATE_MESSAGE` and use the same [`card_id`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#CardWithId) 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`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
bool persist_values = 4;
- Parameters:
value
- The persistValues to set.- Returns:
- This builder for chaining.
-
clearPersistValues
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`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `NONE`. For [card messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`ResponseType`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#responsetype) to `UPDATE_MESSAGE` and use the same [`card_id`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#CardWithId) 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`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.
bool persist_values = 4;
- Returns:
- This builder for chaining.
-
getInteractionValue
public int getInteractionValue()Optional. Required when opening a [dialog](https://developers.google.com/workspace/chat/dialogs). 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](https://developers.google.com/workspace/chat/dialogs). 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](https://developers.google.com/workspace/chat):
.google.apps.card.v1.Action.Interaction interaction = 5;
- Specified by:
getInteractionValue
in interfaceActionOrBuilder
- Returns:
- The enum numeric value on the wire for interaction.
-
setInteractionValue
Optional. Required when opening a [dialog](https://developers.google.com/workspace/chat/dialogs). 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](https://developers.google.com/workspace/chat/dialogs). 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](https://developers.google.com/workspace/chat):
.google.apps.card.v1.Action.Interaction interaction = 5;
- Parameters:
value
- The enum numeric value on the wire for interaction to set.- Returns:
- This builder for chaining.
-
getInteraction
Optional. Required when opening a [dialog](https://developers.google.com/workspace/chat/dialogs). 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](https://developers.google.com/workspace/chat/dialogs). 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](https://developers.google.com/workspace/chat):
.google.apps.card.v1.Action.Interaction interaction = 5;
- Specified by:
getInteraction
in interfaceActionOrBuilder
- Returns:
- The interaction.
-
setInteraction
Optional. Required when opening a [dialog](https://developers.google.com/workspace/chat/dialogs). 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](https://developers.google.com/workspace/chat/dialogs). 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](https://developers.google.com/workspace/chat):
.google.apps.card.v1.Action.Interaction interaction = 5;
- Parameters:
value
- The interaction to set.- Returns:
- This builder for chaining.
-
clearInteraction
Optional. Required when opening a [dialog](https://developers.google.com/workspace/chat/dialogs). 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](https://developers.google.com/workspace/chat/dialogs). 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](https://developers.google.com/workspace/chat):
.google.apps.card.v1.Action.Interaction interaction = 5;
- Returns:
- This builder for chaining.
-
setUnknownFields
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Action.Builder>
-
mergeUnknownFields
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Action.Builder>
-