Package com.google.apps.card.v1
Class Action.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<Action.Builder>
com.google.apps.card.v1.Action.Builder
- All Implemented Interfaces:
ActionOrBuilder,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.Descriptorcom.google.protobuf.Descriptors.DescriptorA custom function to invoke when the containing element is clicked or othrwise activated.com.google.protobuf.ByteStringA custom function to invoke when the containing element is clicked or othrwise activated.Optional.intOptional.Specifies the loading indicator that the action displays while making the call to the action.intSpecifies 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.intList of action parameters.List of action parameters.getParametersOrBuilder(int index) List of action parameters.List<? extends Action.ActionParameterOrBuilder>List of action parameters.booleanIndicates whether form values persist after the action.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) final Action.BuildermergeUnknownFields(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.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods 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()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<Action.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<Action.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<Action.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<Action.Builder>
-
setField
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Action.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Action.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<Action.Builder>
-
setRepeatedField
public Action.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Action.Builder>
-
addRepeatedField
public Action.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Action.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Action.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<Action.Builder>
-
mergeFrom
public Action.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin 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:
getFunctionin 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:
getFunctionBytesin 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:
getParametersListin interfaceActionOrBuilder
-
getParametersCount
public int getParametersCount()List of action parameters.
repeated .google.apps.card.v1.Action.ActionParameter parameters = 2;- Specified by:
getParametersCountin interfaceActionOrBuilder
-
getParameters
List of action parameters.
repeated .google.apps.card.v1.Action.ActionParameter parameters = 2;- Specified by:
getParametersin 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:
getParametersOrBuilderin interfaceActionOrBuilder
-
getParametersOrBuilderList
List of action parameters.
repeated .google.apps.card.v1.Action.ActionParameter parameters = 2;- Specified by:
getParametersOrBuilderListin 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:
getLoadIndicatorValuein 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:
getLoadIndicatorin 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:
getPersistValuesin 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:
getInteractionValuein 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:
getInteractionin 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:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Action.Builder>
-
mergeUnknownFields
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Action.Builder>
-