Class Chip (2.63.1)

public final class Chip extends GeneratedMessageV3 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 Fields

ALT_TEXT_FIELD_NUMBER

public static final int ALT_TEXT_FIELD_NUMBER
Field Value
Type Description
int

DISABLED_FIELD_NUMBER

public static final int DISABLED_FIELD_NUMBER
Field Value
Type Description
int

ENABLED_FIELD_NUMBER

public static final int ENABLED_FIELD_NUMBER
Field Value
Type Description
int

ICON_FIELD_NUMBER

public static final int ICON_FIELD_NUMBER
Field Value
Type Description
int

LABEL_FIELD_NUMBER

public static final int LABEL_FIELD_NUMBER
Field Value
Type Description
int

ON_CLICK_FIELD_NUMBER

public static final int ON_CLICK_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Chip getDefaultInstance()
Returns
Type Description
Chip

getDescriptor()

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

newBuilder()

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

newBuilder(Chip prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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

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.

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.

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

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

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 Chip.Builder newBuilderForType()
Returns
Type Description
Chip.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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