Class OnClick (2.39.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
Type Description
int

CARD_FIELD_NUMBER

public static final int CARD_FIELD_NUMBER
Field Value
Type Description
int
public static final int OPEN_DYNAMIC_LINK_ACTION_FIELD_NUMBER
Field Value
Type Description
int
public static final int OPEN_LINK_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static OnClick getDefaultInstance()
Returns
Type Description
OnClick

getDescriptor()

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

newBuilder()

public static OnClick.Builder newBuilder()
Returns
Type Description
OnClick.Builder

newBuilder(OnClick prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getAction()

public Action getAction()

If specified, an action is triggered by this onClick.

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

Returns
Type Description
Action

The action.

getActionOrBuilder()

public ActionOrBuilder getActionOrBuilder()

If specified, an action is triggered by this onClick.

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

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

getDataCase()

public OnClick.DataCase getDataCase()
Returns
Type Description
OnClick.DataCase

getDefaultInstanceForType()

public OnClick getDefaultInstanceForType()
Returns
Type Description
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
Type Description
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
Type Description
ActionOrBuilder
public OpenLink getOpenLink()

If specified, this onClick triggers an open link action.

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

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

getParserForType()

public Parser<OnClick> getParserForType()
Returns
Type Description
Parser<OnClick>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hasAction()

public boolean hasAction()

If specified, an action is triggered by this onClick.

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

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

Whether the openLink field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public OnClick.Builder newBuilderForType()
Returns
Type Description
OnClick.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

public OnClick.Builder toBuilder()
Returns
Type Description
OnClick.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException