Class WidgetMarkup.KeyValue (0.4.0)

public static final class WidgetMarkup.KeyValue extends GeneratedMessageV3 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 Fields

BOTTOM_LABEL_FIELD_NUMBER

public static final int BOTTOM_LABEL_FIELD_NUMBER
Field Value
TypeDescription
int

BUTTON_FIELD_NUMBER

public static final int BUTTON_FIELD_NUMBER
Field Value
TypeDescription
int

CONTENT_FIELD_NUMBER

public static final int CONTENT_FIELD_NUMBER
Field Value
TypeDescription
int

CONTENT_MULTILINE_FIELD_NUMBER

public static final int CONTENT_MULTILINE_FIELD_NUMBER
Field Value
TypeDescription
int

ICON_FIELD_NUMBER

public static final int ICON_FIELD_NUMBER
Field Value
TypeDescription
int

ICON_URL_FIELD_NUMBER

public static final int ICON_URL_FIELD_NUMBER
Field Value
TypeDescription
int

ON_CLICK_FIELD_NUMBER

public static final int ON_CLICK_FIELD_NUMBER
Field Value
TypeDescription
int

TOP_LABEL_FIELD_NUMBER

public static final int TOP_LABEL_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static WidgetMarkup.KeyValue getDefaultInstance()
Returns
TypeDescription
WidgetMarkup.KeyValue

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static WidgetMarkup.KeyValue.Builder newBuilder()
Returns
TypeDescription
WidgetMarkup.KeyValue.Builder

newBuilder(WidgetMarkup.KeyValue prototype)

public static WidgetMarkup.KeyValue.Builder newBuilder(WidgetMarkup.KeyValue prototype)
Parameter
NameDescription
prototypeWidgetMarkup.KeyValue
Returns
TypeDescription
WidgetMarkup.KeyValue.Builder

parseDelimitedFrom(InputStream input)

public static WidgetMarkup.KeyValue parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
WidgetMarkup.KeyValue
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static WidgetMarkup.KeyValue parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
WidgetMarkup.KeyValue
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static WidgetMarkup.KeyValue parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
WidgetMarkup.KeyValue
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static WidgetMarkup.KeyValue parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
WidgetMarkup.KeyValue
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static WidgetMarkup.KeyValue parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
WidgetMarkup.KeyValue
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static WidgetMarkup.KeyValue parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
WidgetMarkup.KeyValue
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static WidgetMarkup.KeyValue parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
WidgetMarkup.KeyValue
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static WidgetMarkup.KeyValue parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
WidgetMarkup.KeyValue
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static WidgetMarkup.KeyValue parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
WidgetMarkup.KeyValue
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static WidgetMarkup.KeyValue parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
WidgetMarkup.KeyValue
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static WidgetMarkup.KeyValue parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
WidgetMarkup.KeyValue
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static WidgetMarkup.KeyValue parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
WidgetMarkup.KeyValue
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<WidgetMarkup.KeyValue> parser()
Returns
TypeDescription
Parser<KeyValue>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
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.

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

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.

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

getParserForType()

public Parser<WidgetMarkup.KeyValue> getParserForType()
Returns
TypeDescription
Parser<KeyValue>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

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.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected WidgetMarkup.KeyValue.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
WidgetMarkup.KeyValue.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException