# Interface WidgetMarkup.KeyValueOrBuilder (0.57.0)

0.57.0 (latest) 0.55.0 0.52.0 0.51.0 0.49.0 0.47.0 0.46.0 0.45.0 0.44.0 0.42.0 0.40.0 0.39.0 0.38.0 0.37.0 0.36.0 0.34.0 0.32.0 0.31.0 0.28.0 0.27.0 0.26.0 0.24.0 0.23.0 0.22.0 0.21.0 0.20.0 0.19.0 0.18.0 0.17.0 0.16.0 0.15.0 0.13.0 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.0 0.3.0 0.1.0

    public static interface WidgetMarkup.KeyValueOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getBottomLabel()

    public abstract String getBottomLabel()

The text of the bottom label. Formatted text supported. For more
information about formatting text, see [Formatting text in Google Chat
apps](https://developers.google.com/workspace/chat/format-messages#card-formatting)
and
[Formatting
text in Google Workspace
Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).

`string bottom_label = 5;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The bottomLabel. |

### getBottomLabelBytes()

    public abstract ByteString getBottomLabelBytes()

The text of the bottom label. Formatted text supported. For more
information about formatting text, see [Formatting text in Google Chat
apps](https://developers.google.com/workspace/chat/format-messages#card-formatting)
and
[Formatting
text in Google Workspace
Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).

`string bottom_label = 5;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for bottomLabel. |

### getButton()

    public abstract WidgetMarkup.Button getButton()

A button that can be clicked to trigger an action.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.WidgetMarkup.Button` | The button. |

### getButtonOrBuilder()

    public abstract WidgetMarkup.ButtonOrBuilder getButtonOrBuilder()

A button that can be clicked to trigger an action.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.WidgetMarkup.ButtonOrBuilder` |   |

### getContent()

    public abstract 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](https://developers.google.com/workspace/chat/format-messages#card-formatting)
and
[Formatting
text in Google Workspace
Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).

`string content = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The content. |

### getContentBytes()

    public abstract 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](https://developers.google.com/workspace/chat/format-messages#card-formatting)
and
[Formatting
text in Google Workspace
Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).

`string content = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for content. |

### getContentMultiline()

    public abstract boolean getContentMultiline()

If the content should be multiline.

`bool content_multiline = 9;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The contentMultiline. |

### getControlCase()

    public abstract WidgetMarkup.KeyValue.ControlCase getControlCase()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.WidgetMarkup.KeyValue.ControlCase` |   |

### getIcon()

    public abstract 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** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.WidgetMarkup.Icon` | The icon. |

### getIconUrl()

    public abstract String getIconUrl()

The icon specified by a URL.

`string icon_url = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The iconUrl. |

### getIconUrlBytes()

    public abstract ByteString getIconUrlBytes()

The icon specified by a URL.

`string icon_url = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for iconUrl. |

### getIconValue()

    public abstract 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** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for icon. |

### getIconsCase()

    public abstract WidgetMarkup.KeyValue.IconsCase getIconsCase()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.WidgetMarkup.KeyValue.IconsCase` |   |

### getOnClick()

    public abstract 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** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.WidgetMarkup.OnClick` | The onClick. |

### getOnClickOrBuilder()

    public abstract 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** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.WidgetMarkup.OnClickOrBuilder` |   |

### getTopLabel()

    public abstract String getTopLabel()

The text of the top label. Formatted text supported. For more information
about formatting text, see
[Formatting text in Google Chat
apps](https://developers.google.com/workspace/chat/format-messages#card-formatting)
and
[Formatting
text in Google Workspace
Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).

`string top_label = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The topLabel. |

### getTopLabelBytes()

    public abstract ByteString getTopLabelBytes()

The text of the top label. Formatted text supported. For more information
about formatting text, see
[Formatting text in Google Chat
apps](https://developers.google.com/workspace/chat/format-messages#card-formatting)
and
[Formatting
text in Google Workspace
Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).

`string top_label = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for topLabel. |

### hasButton()

    public abstract boolean hasButton()

A button that can be clicked to trigger an action.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the button field is set. |

### hasIcon()

    public abstract 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** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the icon field is set. |

### hasIconUrl()

    public abstract boolean hasIconUrl()

The icon specified by a URL.

`string icon_url = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the iconUrl field is set. |

### hasOnClick()

    public abstract 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** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the onClick field is set. |