Class OnClick.Builder (2.39.1)

public static final class OnClick.Builder extends GeneratedMessageV3.Builder<OnClick.Builder> 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 Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public OnClick.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
OnClick.Builder
Overrides

build()

public OnClick build()
Returns
Type Description
OnClick

buildPartial()

public OnClick buildPartial()
Returns
Type Description
OnClick

clear()

public OnClick.Builder clear()
Returns
Type Description
OnClick.Builder
Overrides

clearAction()

public OnClick.Builder clearAction()

If specified, an action is triggered by this onClick.

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

Returns
Type Description
OnClick.Builder

clearCard()

public OnClick.Builder clearCard()

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
OnClick.Builder

clearData()

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

clearField(Descriptors.FieldDescriptor field)

public OnClick.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
OnClick.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public OnClick.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
OnClick.Builder
Overrides

clearOpenDynamicLinkAction()

public OnClick.Builder clearOpenDynamicLinkAction()

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
OnClick.Builder
public OnClick.Builder clearOpenLink()

If specified, this onClick triggers an open link action.

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

Returns
Type Description
OnClick.Builder

clone()

public OnClick.Builder clone()
Returns
Type Description
OnClick.Builder
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.

getActionBuilder()

public Action.Builder getActionBuilder()

If specified, an action is triggered by this onClick.

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

Returns
Type Description
Action.Builder

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.

getCardBuilder()

public Card.Builder getCardBuilder()

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.Builder

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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

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.

getOpenDynamicLinkActionBuilder()

public Action.Builder getOpenDynamicLinkActionBuilder()

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.Builder

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.

getOpenLinkBuilder()

public OpenLink.Builder getOpenLinkBuilder()

If specified, this onClick triggers an open link action.

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

Returns
Type Description
OpenLink.Builder

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

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.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeAction(Action value)

public OnClick.Builder mergeAction(Action value)

If specified, an action is triggered by this onClick.

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

Parameter
Name Description
value Action
Returns
Type Description
OnClick.Builder

mergeCard(Card value)

public OnClick.Builder mergeCard(Card value)

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

Google Workspace Add-ons:

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

Parameter
Name Description
value Card
Returns
Type Description
OnClick.Builder

mergeFrom(OnClick other)

public OnClick.Builder mergeFrom(OnClick other)
Parameter
Name Description
other OnClick
Returns
Type Description
OnClick.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public OnClick.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OnClick.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public OnClick.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
OnClick.Builder
Overrides

mergeOpenDynamicLinkAction(Action value)

public OnClick.Builder mergeOpenDynamicLinkAction(Action value)

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;

Parameter
Name Description
value Action
Returns
Type Description
OnClick.Builder
public OnClick.Builder mergeOpenLink(OpenLink value)

If specified, this onClick triggers an open link action.

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

Parameter
Name Description
value OpenLink
Returns
Type Description
OnClick.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final OnClick.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
OnClick.Builder
Overrides

setAction(Action value)

public OnClick.Builder setAction(Action value)

If specified, an action is triggered by this onClick.

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

Parameter
Name Description
value Action
Returns
Type Description
OnClick.Builder

setAction(Action.Builder builderForValue)

public OnClick.Builder setAction(Action.Builder builderForValue)

If specified, an action is triggered by this onClick.

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

Parameter
Name Description
builderForValue Action.Builder
Returns
Type Description
OnClick.Builder

setCard(Card value)

public OnClick.Builder setCard(Card value)

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

Google Workspace Add-ons:

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

Parameter
Name Description
value Card
Returns
Type Description
OnClick.Builder

setCard(Card.Builder builderForValue)

public OnClick.Builder setCard(Card.Builder builderForValue)

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

Google Workspace Add-ons:

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

Parameter
Name Description
builderForValue Card.Builder
Returns
Type Description
OnClick.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public OnClick.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
OnClick.Builder
Overrides

setOpenDynamicLinkAction(Action value)

public OnClick.Builder setOpenDynamicLinkAction(Action value)

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;

Parameter
Name Description
value Action
Returns
Type Description
OnClick.Builder

setOpenDynamicLinkAction(Action.Builder builderForValue)

public OnClick.Builder setOpenDynamicLinkAction(Action.Builder builderForValue)

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;

Parameter
Name Description
builderForValue Action.Builder
Returns
Type Description
OnClick.Builder
public OnClick.Builder setOpenLink(OpenLink value)

If specified, this onClick triggers an open link action.

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

Parameter
Name Description
value OpenLink
Returns
Type Description
OnClick.Builder
public OnClick.Builder setOpenLink(OpenLink.Builder builderForValue)

If specified, this onClick triggers an open link action.

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

Parameter
Name Description
builderForValue OpenLink.Builder
Returns
Type Description
OnClick.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public OnClick.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
OnClick.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final OnClick.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
OnClick.Builder
Overrides