Class Chip.Builder (2.63.1)

public static final class Chip.Builder extends GeneratedMessageV3.Builder<Chip.Builder> implements ChipOrBuilder

A text, icon, or text and icon chip that users can click.

Google Workspace add-ons and Chat apps:

Protobuf type google.apps.card.v1.Chip

Implements

ChipOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Chip build()
Returns
Type Description
Chip

buildPartial()

public Chip buildPartial()
Returns
Type Description
Chip

clear()

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

clearAltText()

public Chip.Builder clearAltText()

The alternative text that's used for accessibility.

Set descriptive text that lets users know what the chip does. For example, if a chip opens a hyperlink, write: "Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/workspace/chat".

string alt_text = 5;

Returns
Type Description
Chip.Builder

This builder for chaining.

clearDisabled()

public Chip.Builder clearDisabled()

Whether the chip is in an inactive state and ignores user actions. Defaults to false.

bool disabled = 6;

Returns
Type Description
Chip.Builder

This builder for chaining.

clearEnabled() (deprecated)

public Chip.Builder clearEnabled()

Deprecated. google.apps.card.v1.Chip.enabled is deprecated. See google/apps/card/v1/card.proto;l=2425

Whether the chip is in an active state and responds to user actions. Defaults to true. Deprecated. Use disabled instead.

bool enabled = 4 [deprecated = true];

Returns
Type Description
Chip.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearIcon()

public Chip.Builder clearIcon()

The icon image. If both icon and text are set, then the icon appears before the text.

.google.apps.card.v1.Icon icon = 1;

Returns
Type Description
Chip.Builder

clearLabel()

public Chip.Builder clearLabel()

The text displayed inside the chip.

string label = 2;

Returns
Type Description
Chip.Builder

This builder for chaining.

clearOnClick()

public Chip.Builder clearOnClick()

Optional. The action to perform when a user clicks the chip, such as opening a hyperlink or running a custom function.

.google.apps.card.v1.OnClick on_click = 3;

Returns
Type Description
Chip.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

public Chip.Builder clone()
Returns
Type Description
Chip.Builder
Overrides

getAltText()

public String getAltText()

The alternative text that's used for accessibility.

Set descriptive text that lets users know what the chip does. For example, if a chip opens a hyperlink, write: "Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/workspace/chat".

string alt_text = 5;

Returns
Type Description
String

The altText.

getAltTextBytes()

public ByteString getAltTextBytes()

The alternative text that's used for accessibility.

Set descriptive text that lets users know what the chip does. For example, if a chip opens a hyperlink, write: "Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/workspace/chat".

string alt_text = 5;

Returns
Type Description
ByteString

The bytes for altText.

getDefaultInstanceForType()

public Chip getDefaultInstanceForType()
Returns
Type Description
Chip

getDescriptorForType()

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

getDisabled()

public boolean getDisabled()

Whether the chip is in an inactive state and ignores user actions. Defaults to false.

bool disabled = 6;

Returns
Type Description
boolean

The disabled.

getEnabled() (deprecated)

public boolean getEnabled()

Deprecated. google.apps.card.v1.Chip.enabled is deprecated. See google/apps/card/v1/card.proto;l=2425

Whether the chip is in an active state and responds to user actions. Defaults to true. Deprecated. Use disabled instead.

bool enabled = 4 [deprecated = true];

Returns
Type Description
boolean

The enabled.

getIcon()

public Icon getIcon()

The icon image. If both icon and text are set, then the icon appears before the text.

.google.apps.card.v1.Icon icon = 1;

Returns
Type Description
Icon

The icon.

getIconBuilder()

public Icon.Builder getIconBuilder()

The icon image. If both icon and text are set, then the icon appears before the text.

.google.apps.card.v1.Icon icon = 1;

Returns
Type Description
Icon.Builder

getIconOrBuilder()

public IconOrBuilder getIconOrBuilder()

The icon image. If both icon and text are set, then the icon appears before the text.

.google.apps.card.v1.Icon icon = 1;

Returns
Type Description
IconOrBuilder

getLabel()

public String getLabel()

The text displayed inside the chip.

string label = 2;

Returns
Type Description
String

The label.

getLabelBytes()

public ByteString getLabelBytes()

The text displayed inside the chip.

string label = 2;

Returns
Type Description
ByteString

The bytes for label.

getOnClick()

public OnClick getOnClick()

Optional. The action to perform when a user clicks the chip, such as opening a hyperlink or running a custom function.

.google.apps.card.v1.OnClick on_click = 3;

Returns
Type Description
OnClick

The onClick.

getOnClickBuilder()

public OnClick.Builder getOnClickBuilder()

Optional. The action to perform when a user clicks the chip, such as opening a hyperlink or running a custom function.

.google.apps.card.v1.OnClick on_click = 3;

Returns
Type Description
OnClick.Builder

getOnClickOrBuilder()

public OnClickOrBuilder getOnClickOrBuilder()

Optional. The action to perform when a user clicks the chip, such as opening a hyperlink or running a custom function.

.google.apps.card.v1.OnClick on_click = 3;

Returns
Type Description
OnClickOrBuilder

hasIcon()

public boolean hasIcon()

The icon image. If both icon and text are set, then the icon appears before the text.

.google.apps.card.v1.Icon icon = 1;

Returns
Type Description
boolean

Whether the icon field is set.

hasOnClick()

public boolean hasOnClick()

Optional. The action to perform when a user clicks the chip, such as opening a hyperlink or running a custom function.

.google.apps.card.v1.OnClick on_click = 3;

Returns
Type Description
boolean

Whether the onClick field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Chip other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeIcon(Icon value)

public Chip.Builder mergeIcon(Icon value)

The icon image. If both icon and text are set, then the icon appears before the text.

.google.apps.card.v1.Icon icon = 1;

Parameter
Name Description
value Icon
Returns
Type Description
Chip.Builder

mergeOnClick(OnClick value)

public Chip.Builder mergeOnClick(OnClick value)

Optional. The action to perform when a user clicks the chip, such as opening a hyperlink or running a custom function.

.google.apps.card.v1.OnClick on_click = 3;

Parameter
Name Description
value OnClick
Returns
Type Description
Chip.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAltText(String value)

public Chip.Builder setAltText(String value)

The alternative text that's used for accessibility.

Set descriptive text that lets users know what the chip does. For example, if a chip opens a hyperlink, write: "Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/workspace/chat".

string alt_text = 5;

Parameter
Name Description
value String

The altText to set.

Returns
Type Description
Chip.Builder

This builder for chaining.

setAltTextBytes(ByteString value)

public Chip.Builder setAltTextBytes(ByteString value)

The alternative text that's used for accessibility.

Set descriptive text that lets users know what the chip does. For example, if a chip opens a hyperlink, write: "Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/workspace/chat".

string alt_text = 5;

Parameter
Name Description
value ByteString

The bytes for altText to set.

Returns
Type Description
Chip.Builder

This builder for chaining.

setDisabled(boolean value)

public Chip.Builder setDisabled(boolean value)

Whether the chip is in an inactive state and ignores user actions. Defaults to false.

bool disabled = 6;

Parameter
Name Description
value boolean

The disabled to set.

Returns
Type Description
Chip.Builder

This builder for chaining.

setEnabled(boolean value) (deprecated)

public Chip.Builder setEnabled(boolean value)

Deprecated. google.apps.card.v1.Chip.enabled is deprecated. See google/apps/card/v1/card.proto;l=2425

Whether the chip is in an active state and responds to user actions. Defaults to true. Deprecated. Use disabled instead.

bool enabled = 4 [deprecated = true];

Parameter
Name Description
value boolean

The enabled to set.

Returns
Type Description
Chip.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setIcon(Icon value)

public Chip.Builder setIcon(Icon value)

The icon image. If both icon and text are set, then the icon appears before the text.

.google.apps.card.v1.Icon icon = 1;

Parameter
Name Description
value Icon
Returns
Type Description
Chip.Builder

setIcon(Icon.Builder builderForValue)

public Chip.Builder setIcon(Icon.Builder builderForValue)

The icon image. If both icon and text are set, then the icon appears before the text.

.google.apps.card.v1.Icon icon = 1;

Parameter
Name Description
builderForValue Icon.Builder
Returns
Type Description
Chip.Builder

setLabel(String value)

public Chip.Builder setLabel(String value)

The text displayed inside the chip.

string label = 2;

Parameter
Name Description
value String

The label to set.

Returns
Type Description
Chip.Builder

This builder for chaining.

setLabelBytes(ByteString value)

public Chip.Builder setLabelBytes(ByteString value)

The text displayed inside the chip.

string label = 2;

Parameter
Name Description
value ByteString

The bytes for label to set.

Returns
Type Description
Chip.Builder

This builder for chaining.

setOnClick(OnClick value)

public Chip.Builder setOnClick(OnClick value)

Optional. The action to perform when a user clicks the chip, such as opening a hyperlink or running a custom function.

.google.apps.card.v1.OnClick on_click = 3;

Parameter
Name Description
value OnClick
Returns
Type Description
Chip.Builder

setOnClick(OnClick.Builder builderForValue)

public Chip.Builder setOnClick(OnClick.Builder builderForValue)

Optional. The action to perform when a user clicks the chip, such as opening a hyperlink or running a custom function.

.google.apps.card.v1.OnClick on_click = 3;

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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