Class OnClick (2.37.1)

public final class OnClick extends GeneratedMessageV3 implements OnClickOrBuilder

Represents how to respond when users click an interactive element on a card, such as a button.

Google Workspace Add-ons and Chat apps:

Protobuf type google.apps.card.v1.OnClick

Implements

OnClickOrBuilder

Static Fields

ACTION_FIELD_NUMBER

public static final int ACTION_FIELD_NUMBER
Field Value
TypeDescription
int

CARD_FIELD_NUMBER

public static final int CARD_FIELD_NUMBER
Field Value
TypeDescription
int
public static final int OPEN_DYNAMIC_LINK_ACTION_FIELD_NUMBER
Field Value
TypeDescription
int
public static final int OPEN_LINK_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static OnClick getDefaultInstance()
Returns
TypeDescription
OnClick

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static OnClick.Builder newBuilder()
Returns
TypeDescription
OnClick.Builder

newBuilder(OnClick prototype)

public static OnClick.Builder newBuilder(OnClick prototype)
Parameter
NameDescription
prototypeOnClick
Returns
TypeDescription
OnClick.Builder

parseDelimitedFrom(InputStream input)

public static OnClick parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
OnClick
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static OnClick parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OnClick
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static OnClick parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
OnClick
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static OnClick parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OnClick
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static OnClick parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
OnClick
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static OnClick parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OnClick
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static OnClick parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
OnClick
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static OnClick parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OnClick
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static OnClick parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
OnClick
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static OnClick parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OnClick
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static OnClick parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
OnClick
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static OnClick parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OnClick
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<OnClick> parser()
Returns
TypeDescription
Parser<OnClick>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getAction()

public Action getAction()

If specified, an action is triggered by this onClick.

.google.apps.card.v1.Action action = 1;

Returns
TypeDescription
Action

The action.

getActionOrBuilder()

public ActionOrBuilder getActionOrBuilder()

If specified, an action is triggered by this onClick.

.google.apps.card.v1.Action action = 1;

Returns
TypeDescription
ActionOrBuilder

getCard()

public Card getCard()

A new card is pushed to the card stack after clicking if specified.

Google Workspace Add-ons:

.google.apps.card.v1.Card card = 4;

Returns
TypeDescription
Card

The card.

getCardOrBuilder()

public CardOrBuilder getCardOrBuilder()

A new card is pushed to the card stack after clicking if specified.

Google Workspace Add-ons:

.google.apps.card.v1.Card card = 4;

Returns
TypeDescription
CardOrBuilder

getDataCase()

public OnClick.DataCase getDataCase()
Returns
TypeDescription
OnClick.DataCase

getDefaultInstanceForType()

public OnClick getDefaultInstanceForType()
Returns
TypeDescription
OnClick

getOpenDynamicLinkAction()

public Action getOpenDynamicLinkAction()

An add-on triggers this action when the action needs to open a link. This differs from the open_link above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.

Google Workspace Add-ons:

.google.apps.card.v1.Action open_dynamic_link_action = 3;

Returns
TypeDescription
Action

The openDynamicLinkAction.

getOpenDynamicLinkActionOrBuilder()

public ActionOrBuilder getOpenDynamicLinkActionOrBuilder()

An add-on triggers this action when the action needs to open a link. This differs from the open_link above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.

Google Workspace Add-ons:

.google.apps.card.v1.Action open_dynamic_link_action = 3;

Returns
TypeDescription
ActionOrBuilder
public OpenLink getOpenLink()

If specified, this onClick triggers an open link action.

.google.apps.card.v1.OpenLink open_link = 2;

Returns
TypeDescription
OpenLink

The openLink.

getOpenLinkOrBuilder()

public OpenLinkOrBuilder getOpenLinkOrBuilder()

If specified, this onClick triggers an open link action.

.google.apps.card.v1.OpenLink open_link = 2;

Returns
TypeDescription
OpenLinkOrBuilder

getParserForType()

public Parser<OnClick> getParserForType()
Returns
TypeDescription
Parser<OnClick>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hasAction()

public boolean hasAction()

If specified, an action is triggered by this onClick.

.google.apps.card.v1.Action action = 1;

Returns
TypeDescription
boolean

Whether the action field is set.

hasCard()

public boolean hasCard()

A new card is pushed to the card stack after clicking if specified.

Google Workspace Add-ons:

.google.apps.card.v1.Card card = 4;

Returns
TypeDescription
boolean

Whether the card field is set.

hasOpenDynamicLinkAction()

public boolean hasOpenDynamicLinkAction()

An add-on triggers this action when the action needs to open a link. This differs from the open_link above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back.

Google Workspace Add-ons:

.google.apps.card.v1.Action open_dynamic_link_action = 3;

Returns
TypeDescription
boolean

Whether the openDynamicLinkAction field is set.

public boolean hasOpenLink()

If specified, this onClick triggers an open link action.

.google.apps.card.v1.OpenLink open_link = 2;

Returns
TypeDescription
boolean

Whether the openLink field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public OnClick.Builder newBuilderForType()
Returns
TypeDescription
OnClick.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected OnClick.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
OnClick.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public OnClick.Builder toBuilder()
Returns
TypeDescription
OnClick.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException