Class WidgetMarkup.KeyValue.Builder (0.5.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public WidgetMarkup.KeyValue.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
WidgetMarkup.KeyValue.Builder
Overrides

build()

public WidgetMarkup.KeyValue build()
Returns
TypeDescription
WidgetMarkup.KeyValue

buildPartial()

public WidgetMarkup.KeyValue buildPartial()
Returns
TypeDescription
WidgetMarkup.KeyValue

clear()

public WidgetMarkup.KeyValue.Builder clear()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
WidgetMarkup.KeyValue.Builder

This builder for chaining.

clearContentMultiline()

public WidgetMarkup.KeyValue.Builder clearContentMultiline()

If the content should be multiline.

bool content_multiline = 9;

Returns
TypeDescription
WidgetMarkup.KeyValue.Builder

This builder for chaining.

clearControl()

public WidgetMarkup.KeyValue.Builder clearControl()
Returns
TypeDescription
WidgetMarkup.KeyValue.Builder

clearField(Descriptors.FieldDescriptor field)

public WidgetMarkup.KeyValue.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
WidgetMarkup.KeyValue.Builder

This builder for chaining.

clearIconUrl()

public WidgetMarkup.KeyValue.Builder clearIconUrl()

The icon specified by a URL.

string icon_url = 2;

Returns
TypeDescription
WidgetMarkup.KeyValue.Builder

This builder for chaining.

clearIcons()

public WidgetMarkup.KeyValue.Builder clearIcons()
Returns
TypeDescription
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
TypeDescription
WidgetMarkup.KeyValue.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public WidgetMarkup.KeyValue.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
WidgetMarkup.KeyValue.Builder

This builder for chaining.

clone()

public WidgetMarkup.KeyValue.Builder clone()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for content.

getContentMultiline()

public boolean getContentMultiline()

If the content should be multiline.

bool content_multiline = 9;

Returns
TypeDescription
boolean

The contentMultiline.

getControlCase()

public WidgetMarkup.KeyValue.ControlCase getControlCase()
Returns
TypeDescription
WidgetMarkup.KeyValue.ControlCase

getDefaultInstanceForType()

public WidgetMarkup.KeyValue getDefaultInstanceForType()
Returns
TypeDescription
WidgetMarkup.KeyValue

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
WidgetMarkup.Icon

The icon.

getIconUrl()

public String getIconUrl()

The icon specified by a URL.

string icon_url = 2;

Returns
TypeDescription
String

The iconUrl.

getIconUrlBytes()

public ByteString getIconUrlBytes()

The icon specified by a URL.

string icon_url = 2;

Returns
TypeDescription
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
TypeDescription
int

The enum numeric value on the wire for icon.

getIconsCase()

public WidgetMarkup.KeyValue.IconsCase getIconsCase()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the icon field is set.

hasIconUrl()

public boolean hasIconUrl()

The icon specified by a URL.

string icon_url = 2;

Returns
TypeDescription
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
TypeDescription
boolean

Whether the onClick field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valueWidgetMarkup.Button
Returns
TypeDescription
WidgetMarkup.KeyValue.Builder

mergeFrom(WidgetMarkup.KeyValue other)

public WidgetMarkup.KeyValue.Builder mergeFrom(WidgetMarkup.KeyValue other)
Parameter
NameDescription
otherWidgetMarkup.KeyValue
Returns
TypeDescription
WidgetMarkup.KeyValue.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public WidgetMarkup.KeyValue.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
WidgetMarkup.KeyValue.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public WidgetMarkup.KeyValue.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueWidgetMarkup.OnClick
Returns
TypeDescription
WidgetMarkup.KeyValue.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final WidgetMarkup.KeyValue.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueString

The bottomLabel to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for bottomLabel to set.

Returns
TypeDescription
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
NameDescription
valueWidgetMarkup.Button
Returns
TypeDescription
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
NameDescription
builderForValueWidgetMarkup.Button.Builder
Returns
TypeDescription
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
NameDescription
valueString

The content to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for content to set.

Returns
TypeDescription
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
NameDescription
valueboolean

The contentMultiline to set.

Returns
TypeDescription
WidgetMarkup.KeyValue.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public WidgetMarkup.KeyValue.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueWidgetMarkup.Icon

The icon to set.

Returns
TypeDescription
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
NameDescription
valueString

The iconUrl to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for iconUrl to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
valueWidgetMarkup.OnClick
Returns
TypeDescription
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
NameDescription
builderForValueWidgetMarkup.OnClick.Builder
Returns
TypeDescription
WidgetMarkup.KeyValue.Builder

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

public WidgetMarkup.KeyValue.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The topLabel to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for topLabel to set.

Returns
TypeDescription
WidgetMarkup.KeyValue.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final WidgetMarkup.KeyValue.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
WidgetMarkup.KeyValue.Builder
Overrides