Class WidgetMarkup.KeyValue.Builder (0.11.0)

public static final class WidgetMarkup.KeyValue.Builder extends GeneratedMessageV3.Builder<WidgetMarkup.KeyValue.Builder> implements WidgetMarkup.KeyValueOrBuilder

A UI element contains a key (label) and a value (content). This element can also contain some actions such as onclick button.

Protobuf type google.chat.v1.WidgetMarkup.KeyValue

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public WidgetMarkup.KeyValue build()
Returns
Type Description
WidgetMarkup.KeyValue

buildPartial()

public WidgetMarkup.KeyValue buildPartial()
Returns
Type Description
WidgetMarkup.KeyValue

clear()

public WidgetMarkup.KeyValue.Builder clear()
Returns
Type Description
WidgetMarkup.KeyValue.Builder
Overrides

clearBottomLabel()

public WidgetMarkup.KeyValue.Builder clearBottomLabel()

The text of the bottom label. Formatted text supported. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons.

string bottom_label = 5;

Returns
Type Description
WidgetMarkup.KeyValue.Builder

This builder for chaining.

clearButton()

public WidgetMarkup.KeyValue.Builder clearButton()

A button that can be clicked to trigger an action.

.google.chat.v1.WidgetMarkup.Button button = 7;

Returns
Type Description
WidgetMarkup.KeyValue.Builder

clearContent()

public WidgetMarkup.KeyValue.Builder clearContent()

The text of the content. Formatted text supported and always required. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons.

string content = 4;

Returns
Type Description
WidgetMarkup.KeyValue.Builder

This builder for chaining.

clearContentMultiline()

public WidgetMarkup.KeyValue.Builder clearContentMultiline()

If the content should be multiline.

bool content_multiline = 9;

Returns
Type Description
WidgetMarkup.KeyValue.Builder

This builder for chaining.

clearControl()

public WidgetMarkup.KeyValue.Builder clearControl()
Returns
Type Description
WidgetMarkup.KeyValue.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearIcon()

public WidgetMarkup.KeyValue.Builder clearIcon()

An enum value that's replaced by the Chat API with the corresponding icon image.

.google.chat.v1.WidgetMarkup.Icon icon = 1;

Returns
Type Description
WidgetMarkup.KeyValue.Builder

This builder for chaining.

clearIconUrl()

public WidgetMarkup.KeyValue.Builder clearIconUrl()

The icon specified by a URL.

string icon_url = 2;

Returns
Type Description
WidgetMarkup.KeyValue.Builder

This builder for chaining.

clearIcons()

public WidgetMarkup.KeyValue.Builder clearIcons()
Returns
Type Description
WidgetMarkup.KeyValue.Builder

clearOnClick()

public WidgetMarkup.KeyValue.Builder clearOnClick()

The onclick action. Only the top label, bottom label, and content region are clickable.

.google.chat.v1.WidgetMarkup.OnClick on_click = 6;

Returns
Type Description
WidgetMarkup.KeyValue.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearTopLabel()

public WidgetMarkup.KeyValue.Builder clearTopLabel()

The text of the top label. Formatted text supported. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons.

string top_label = 3;

Returns
Type Description
WidgetMarkup.KeyValue.Builder

This builder for chaining.

clone()

public WidgetMarkup.KeyValue.Builder clone()
Returns
Type Description
WidgetMarkup.KeyValue.Builder
Overrides

getBottomLabel()

public String getBottomLabel()

The text of the bottom label. Formatted text supported. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons.

string bottom_label = 5;

Returns
Type Description
String

The bottomLabel.

getBottomLabelBytes()

public ByteString getBottomLabelBytes()

The text of the bottom label. Formatted text supported. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons.

string bottom_label = 5;

Returns
Type Description
ByteString

The bytes for bottomLabel.

getButton()

public WidgetMarkup.Button getButton()

A button that can be clicked to trigger an action.

.google.chat.v1.WidgetMarkup.Button button = 7;

Returns
Type Description
WidgetMarkup.Button

The button.

getButtonBuilder()

public WidgetMarkup.Button.Builder getButtonBuilder()

A button that can be clicked to trigger an action.

.google.chat.v1.WidgetMarkup.Button button = 7;

Returns
Type Description
WidgetMarkup.Button.Builder

getButtonOrBuilder()

public WidgetMarkup.ButtonOrBuilder getButtonOrBuilder()

A button that can be clicked to trigger an action.

.google.chat.v1.WidgetMarkup.Button button = 7;

Returns
Type Description
WidgetMarkup.ButtonOrBuilder

getContent()

public String getContent()

The text of the content. Formatted text supported and always required. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons.

string content = 4;

Returns
Type Description
String

The content.

getContentBytes()

public ByteString getContentBytes()

The text of the content. Formatted text supported and always required. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons.

string content = 4;

Returns
Type Description
ByteString

The bytes for content.

getContentMultiline()

public boolean getContentMultiline()

If the content should be multiline.

bool content_multiline = 9;

Returns
Type Description
boolean

The contentMultiline.

getControlCase()

public WidgetMarkup.KeyValue.ControlCase getControlCase()
Returns
Type Description
WidgetMarkup.KeyValue.ControlCase

getDefaultInstanceForType()

public WidgetMarkup.KeyValue getDefaultInstanceForType()
Returns
Type Description
WidgetMarkup.KeyValue

getDescriptorForType()

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

getIcon()

public WidgetMarkup.Icon getIcon()

An enum value that's replaced by the Chat API with the corresponding icon image.

.google.chat.v1.WidgetMarkup.Icon icon = 1;

Returns
Type Description
WidgetMarkup.Icon

The icon.

getIconUrl()

public String getIconUrl()

The icon specified by a URL.

string icon_url = 2;

Returns
Type Description
String

The iconUrl.

getIconUrlBytes()

public ByteString getIconUrlBytes()

The icon specified by a URL.

string icon_url = 2;

Returns
Type Description
ByteString

The bytes for iconUrl.

getIconValue()

public int getIconValue()

An enum value that's replaced by the Chat API with the corresponding icon image.

.google.chat.v1.WidgetMarkup.Icon icon = 1;

Returns
Type Description
int

The enum numeric value on the wire for icon.

getIconsCase()

public WidgetMarkup.KeyValue.IconsCase getIconsCase()
Returns
Type Description
WidgetMarkup.KeyValue.IconsCase

getOnClick()

public WidgetMarkup.OnClick getOnClick()

The onclick action. Only the top label, bottom label, and content region are clickable.

.google.chat.v1.WidgetMarkup.OnClick on_click = 6;

Returns
Type Description
WidgetMarkup.OnClick

The onClick.

getOnClickBuilder()

public WidgetMarkup.OnClick.Builder getOnClickBuilder()

The onclick action. Only the top label, bottom label, and content region are clickable.

.google.chat.v1.WidgetMarkup.OnClick on_click = 6;

Returns
Type Description
WidgetMarkup.OnClick.Builder

getOnClickOrBuilder()

public WidgetMarkup.OnClickOrBuilder getOnClickOrBuilder()

The onclick action. Only the top label, bottom label, and content region are clickable.

.google.chat.v1.WidgetMarkup.OnClick on_click = 6;

Returns
Type Description
WidgetMarkup.OnClickOrBuilder

getTopLabel()

public String getTopLabel()

The text of the top label. Formatted text supported. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons.

string top_label = 3;

Returns
Type Description
String

The topLabel.

getTopLabelBytes()

public ByteString getTopLabelBytes()

The text of the top label. Formatted text supported. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons.

string top_label = 3;

Returns
Type Description
ByteString

The bytes for topLabel.

hasButton()

public boolean hasButton()

A button that can be clicked to trigger an action.

.google.chat.v1.WidgetMarkup.Button button = 7;

Returns
Type Description
boolean

Whether the button field is set.

hasIcon()

public boolean hasIcon()

An enum value that's replaced by the Chat API with the corresponding icon image.

.google.chat.v1.WidgetMarkup.Icon icon = 1;

Returns
Type Description
boolean

Whether the icon field is set.

hasIconUrl()

public boolean hasIconUrl()

The icon specified by a URL.

string icon_url = 2;

Returns
Type Description
boolean

Whether the iconUrl field is set.

hasOnClick()

public boolean hasOnClick()

The onclick action. Only the top label, bottom label, and content region are clickable.

.google.chat.v1.WidgetMarkup.OnClick on_click = 6;

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

mergeButton(WidgetMarkup.Button value)

public WidgetMarkup.KeyValue.Builder mergeButton(WidgetMarkup.Button value)

A button that can be clicked to trigger an action.

.google.chat.v1.WidgetMarkup.Button button = 7;

Parameter
Name Description
value WidgetMarkup.Button
Returns
Type Description
WidgetMarkup.KeyValue.Builder

mergeFrom(WidgetMarkup.KeyValue other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeOnClick(WidgetMarkup.OnClick value)

public WidgetMarkup.KeyValue.Builder mergeOnClick(WidgetMarkup.OnClick value)

The onclick action. Only the top label, bottom label, and content region are clickable.

.google.chat.v1.WidgetMarkup.OnClick on_click = 6;

Parameter
Name Description
value WidgetMarkup.OnClick
Returns
Type Description
WidgetMarkup.KeyValue.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setBottomLabel(String value)

public WidgetMarkup.KeyValue.Builder setBottomLabel(String value)

The text of the bottom label. Formatted text supported. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons.

string bottom_label = 5;

Parameter
Name Description
value String

The bottomLabel to set.

Returns
Type Description
WidgetMarkup.KeyValue.Builder

This builder for chaining.

setBottomLabelBytes(ByteString value)

public WidgetMarkup.KeyValue.Builder setBottomLabelBytes(ByteString value)

The text of the bottom label. Formatted text supported. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons.

string bottom_label = 5;

Parameter
Name Description
value ByteString

The bytes for bottomLabel to set.

Returns
Type Description
WidgetMarkup.KeyValue.Builder

This builder for chaining.

setButton(WidgetMarkup.Button value)

public WidgetMarkup.KeyValue.Builder setButton(WidgetMarkup.Button value)

A button that can be clicked to trigger an action.

.google.chat.v1.WidgetMarkup.Button button = 7;

Parameter
Name Description
value WidgetMarkup.Button
Returns
Type Description
WidgetMarkup.KeyValue.Builder

setButton(WidgetMarkup.Button.Builder builderForValue)

public WidgetMarkup.KeyValue.Builder setButton(WidgetMarkup.Button.Builder builderForValue)

A button that can be clicked to trigger an action.

.google.chat.v1.WidgetMarkup.Button button = 7;

Parameter
Name Description
builderForValue WidgetMarkup.Button.Builder
Returns
Type Description
WidgetMarkup.KeyValue.Builder

setContent(String value)

public WidgetMarkup.KeyValue.Builder setContent(String value)

The text of the content. Formatted text supported and always required. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons.

string content = 4;

Parameter
Name Description
value String

The content to set.

Returns
Type Description
WidgetMarkup.KeyValue.Builder

This builder for chaining.

setContentBytes(ByteString value)

public WidgetMarkup.KeyValue.Builder setContentBytes(ByteString value)

The text of the content. Formatted text supported and always required. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons.

string content = 4;

Parameter
Name Description
value ByteString

The bytes for content to set.

Returns
Type Description
WidgetMarkup.KeyValue.Builder

This builder for chaining.

setContentMultiline(boolean value)

public WidgetMarkup.KeyValue.Builder setContentMultiline(boolean value)

If the content should be multiline.

bool content_multiline = 9;

Parameter
Name Description
value boolean

The contentMultiline to set.

Returns
Type Description
WidgetMarkup.KeyValue.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setIcon(WidgetMarkup.Icon value)

public WidgetMarkup.KeyValue.Builder setIcon(WidgetMarkup.Icon value)

An enum value that's replaced by the Chat API with the corresponding icon image.

.google.chat.v1.WidgetMarkup.Icon icon = 1;

Parameter
Name Description
value WidgetMarkup.Icon

The icon to set.

Returns
Type Description
WidgetMarkup.KeyValue.Builder

This builder for chaining.

setIconUrl(String value)

public WidgetMarkup.KeyValue.Builder setIconUrl(String value)

The icon specified by a URL.

string icon_url = 2;

Parameter
Name Description
value String

The iconUrl to set.

Returns
Type Description
WidgetMarkup.KeyValue.Builder

This builder for chaining.

setIconUrlBytes(ByteString value)

public WidgetMarkup.KeyValue.Builder setIconUrlBytes(ByteString value)

The icon specified by a URL.

string icon_url = 2;

Parameter
Name Description
value ByteString

The bytes for iconUrl to set.

Returns
Type Description
WidgetMarkup.KeyValue.Builder

This builder for chaining.

setIconValue(int value)

public WidgetMarkup.KeyValue.Builder setIconValue(int value)

An enum value that's replaced by the Chat API with the corresponding icon image.

.google.chat.v1.WidgetMarkup.Icon icon = 1;

Parameter
Name Description
value int

The enum numeric value on the wire for icon to set.

Returns
Type Description
WidgetMarkup.KeyValue.Builder

This builder for chaining.

setOnClick(WidgetMarkup.OnClick value)

public WidgetMarkup.KeyValue.Builder setOnClick(WidgetMarkup.OnClick value)

The onclick action. Only the top label, bottom label, and content region are clickable.

.google.chat.v1.WidgetMarkup.OnClick on_click = 6;

Parameter
Name Description
value WidgetMarkup.OnClick
Returns
Type Description
WidgetMarkup.KeyValue.Builder

setOnClick(WidgetMarkup.OnClick.Builder builderForValue)

public WidgetMarkup.KeyValue.Builder setOnClick(WidgetMarkup.OnClick.Builder builderForValue)

The onclick action. Only the top label, bottom label, and content region are clickable.

.google.chat.v1.WidgetMarkup.OnClick on_click = 6;

Parameter
Name Description
builderForValue WidgetMarkup.OnClick.Builder
Returns
Type Description
WidgetMarkup.KeyValue.Builder

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

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

setTopLabel(String value)

public WidgetMarkup.KeyValue.Builder setTopLabel(String value)

The text of the top label. Formatted text supported. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons.

string top_label = 3;

Parameter
Name Description
value String

The topLabel to set.

Returns
Type Description
WidgetMarkup.KeyValue.Builder

This builder for chaining.

setTopLabelBytes(ByteString value)

public WidgetMarkup.KeyValue.Builder setTopLabelBytes(ByteString value)

The text of the top label. Formatted text supported. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons.

string top_label = 3;

Parameter
Name Description
value ByteString

The bytes for topLabel to set.

Returns
Type Description
WidgetMarkup.KeyValue.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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