# Interface DecoratedTextOrBuilder (2.72.0)

2.72.0 (latest) 2.70.0 2.67.0 2.66.0 2.65.1 2.64.1 2.63.2 2.62.0 2.61.3 2.60.0 2.59.2 2.58.0 2.57.0 2.56.0 2.54.1 2.53.0 2.52.0 2.51.0 2.50.1 2.49.0 2.48.0 2.46.0 2.45.1 2.44.0 2.43.0 2.42.0 2.41.0 2.40.0 2.39.1 2.38.0 2.37.1 2.36.0 2.34.0 2.33.0 2.32.0 2.30.0 2.29.0 2.28.0 2.27.0 2.26.0 2.25.1 2.24.0 2.23.1 2.22.1 2.21.1 2.15.0 2.14.3 2.13.0 2.12.0 2.11.0 2.10.0 2.9.6 2.8.4 2.7.4

    public interface DecoratedTextOrBuilder 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 that appears below `text`. Always wraps.

`string bottom_label = 6;`

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

### getBottomLabelBytes()

    public abstract ByteString getBottomLabelBytes()

The text that appears below `text`. Always wraps.

`string bottom_label = 6;`

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

### getBottomLabelText()

    public abstract TextParagraph getBottomLabelText()

`TextParagraph` equivalent of `bottom_label`. Always wraps. Allows for
more complex formatting than `bottom_label`.

[Google Chat apps](https://developers.google.com/workspace/chat):

`.google.apps.card.v1.TextParagraph bottom_label_text = 19;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.apps.card.v1.TextParagraph` | The bottomLabelText. |

### getBottomLabelTextOrBuilder()

    public abstract TextParagraphOrBuilder getBottomLabelTextOrBuilder()

`TextParagraph` equivalent of `bottom_label`. Always wraps. Allows for
more complex formatting than `bottom_label`.

[Google Chat apps](https://developers.google.com/workspace/chat):

`.google.apps.card.v1.TextParagraph bottom_label_text = 19;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.apps.card.v1.TextParagraphOrBuilder` |   |

### getButton()

    public abstract Button getButton()

A button that a user can click to trigger an action.

`.google.apps.card.v1.Button button = 8;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.apps.card.v1.Button` | The button. |

### getButtonOrBuilder()

    public abstract ButtonOrBuilder getButtonOrBuilder()

A button that a user can click to trigger an action.

`.google.apps.card.v1.Button button = 8;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.apps.card.v1.ButtonOrBuilder` |   |

### getContentText()

    public abstract TextParagraph getContentText()

`TextParagraph` equivalent of `text`. Allows for more complex formatting
than `text`.

[Google Chat apps](https://developers.google.com/workspace/chat):

`.google.apps.card.v1.TextParagraph content_text = 18;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.apps.card.v1.TextParagraph` | The contentText. |

### getContentTextOrBuilder()

    public abstract TextParagraphOrBuilder getContentTextOrBuilder()

`TextParagraph` equivalent of `text`. Allows for more complex formatting
than `text`.

[Google Chat apps](https://developers.google.com/workspace/chat):

`.google.apps.card.v1.TextParagraph content_text = 18;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.apps.card.v1.TextParagraphOrBuilder` |   |

### getControlCase()

    public abstract DecoratedText.ControlCase getControlCase()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.apps.card.v1.DecoratedText.ControlCase` |   |

### getEndIcon()

    public abstract Icon getEndIcon()

An icon displayed after the text.

Supports
[built-in](https://developers.google.com/workspace/chat/format-messages#builtinicons)
and
[custom](https://developers.google.com/workspace/chat/format-messages#customicons)
icons.

`.google.apps.card.v1.Icon end_icon = 11;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.apps.card.v1.Icon` | The endIcon. |

### getEndIconOrBuilder()

    public abstract IconOrBuilder getEndIconOrBuilder()

An icon displayed after the text.

Supports
[built-in](https://developers.google.com/workspace/chat/format-messages#builtinicons)
and
[custom](https://developers.google.com/workspace/chat/format-messages#customicons)
icons.

`.google.apps.card.v1.Icon end_icon = 11;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.apps.card.v1.IconOrBuilder` |   |

### getIcon() (deprecated)

    public abstract Icon getIcon()

**Deprecated.** *google.apps.card.v1.DecoratedText.icon is deprecated. See
google/apps/card/v1/card.proto;l=915*

Deprecated in favor of `startIcon`.

`.google.apps.card.v1.Icon icon = 1 [deprecated = true];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.apps.card.v1.Icon` | The icon. |

### getIconOrBuilder() (deprecated)

    public abstract IconOrBuilder getIconOrBuilder()

Deprecated in favor of `startIcon`.

`.google.apps.card.v1.Icon icon = 1 [deprecated = true];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.apps.card.v1.IconOrBuilder` |   |

### getOnClick()

    public abstract OnClick getOnClick()

This action is triggered when users click `topLabel` or `bottomLabel`.

`.google.apps.card.v1.OnClick on_click = 7;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.apps.card.v1.OnClick` | The onClick. |

### getOnClickOrBuilder()

    public abstract OnClickOrBuilder getOnClickOrBuilder()

This action is triggered when users click `topLabel` or `bottomLabel`.

`.google.apps.card.v1.OnClick on_click = 7;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.apps.card.v1.OnClickOrBuilder` |   |

### getStartIcon()

    public abstract Icon getStartIcon()

The icon displayed in front of the text.

`.google.apps.card.v1.Icon start_icon = 12;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.apps.card.v1.Icon` | The startIcon. |

### getStartIconOrBuilder()

    public abstract IconOrBuilder getStartIconOrBuilder()

The icon displayed in front of the text.

`.google.apps.card.v1.Icon start_icon = 12;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.apps.card.v1.IconOrBuilder` |   |

### getStartIconVerticalAlignment()

    public abstract Widget.VerticalAlignment getStartIconVerticalAlignment()

Optional. Vertical alignment of the start icon. If not set, the icon
will be vertically centered.

[Google Chat apps](https://developers.google.com/workspace/chat):

`.google.apps.card.v1.Widget.VerticalAlignment start_icon_vertical_alignment = 13;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.apps.card.v1.Widget.VerticalAlignment` | The startIconVerticalAlignment. |

### getStartIconVerticalAlignmentValue()

    public abstract int getStartIconVerticalAlignmentValue()

Optional. Vertical alignment of the start icon. If not set, the icon
will be vertically centered.

[Google Chat apps](https://developers.google.com/workspace/chat):

`.google.apps.card.v1.Widget.VerticalAlignment start_icon_vertical_alignment = 13;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for startIconVerticalAlignment. |

### getSwitchControl()

    public abstract DecoratedText.SwitchControl getSwitchControl()

A switch widget that a user can click to change its state and trigger an
action.

`.google.apps.card.v1.DecoratedText.SwitchControl switch_control = 9;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.apps.card.v1.DecoratedText.SwitchControl` | The switchControl. |

### getSwitchControlOrBuilder()

    public abstract DecoratedText.SwitchControlOrBuilder getSwitchControlOrBuilder()

A switch widget that a user can click to change its state and trigger an
action.

`.google.apps.card.v1.DecoratedText.SwitchControl switch_control = 9;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.apps.card.v1.DecoratedText.SwitchControlOrBuilder` |   |

### getText()

    public abstract String getText()

Required. The primary text.

Supports simple formatting. 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 text = 4;`

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

### getTextBytes()

    public abstract ByteString getTextBytes()

Required. The primary text.

Supports simple formatting. 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 text = 4;`

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

### getTopLabel()

    public abstract String getTopLabel()

The text that appears above `text`. Always truncates.

`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 that appears above `text`. Always truncates.

`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. |

### getTopLabelText()

    public abstract TextParagraph getTopLabelText()

`TextParagraph` equivalent of `top_label`. Always truncates. Allows for
more complex formatting than `top_label`.

[Google Chat apps](https://developers.google.com/workspace/chat):

`.google.apps.card.v1.TextParagraph top_label_text = 17;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.apps.card.v1.TextParagraph` | The topLabelText. |

### getTopLabelTextOrBuilder()

    public abstract TextParagraphOrBuilder getTopLabelTextOrBuilder()

`TextParagraph` equivalent of `top_label`. Always truncates. Allows for
more complex formatting than `top_label`.

[Google Chat apps](https://developers.google.com/workspace/chat):

`.google.apps.card.v1.TextParagraph top_label_text = 17;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.apps.card.v1.TextParagraphOrBuilder` |   |

### getWrapText()

    public abstract boolean getWrapText()

The wrap text setting. If `true`, the text wraps and displays on
multiple lines. Otherwise, the text is truncated.

Only applies to `text`, not `topLabel` and `bottomLabel`.

`bool wrap_text = 5;`

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

### hasBottomLabelText()

    public abstract boolean hasBottomLabelText()

`TextParagraph` equivalent of `bottom_label`. Always wraps. Allows for
more complex formatting than `bottom_label`.

[Google Chat apps](https://developers.google.com/workspace/chat):

`.google.apps.card.v1.TextParagraph bottom_label_text = 19;`

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

### hasButton()

    public abstract boolean hasButton()

A button that a user can click to trigger an action.

`.google.apps.card.v1.Button button = 8;`

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

### hasContentText()

    public abstract boolean hasContentText()

`TextParagraph` equivalent of `text`. Allows for more complex formatting
than `text`.

[Google Chat apps](https://developers.google.com/workspace/chat):

`.google.apps.card.v1.TextParagraph content_text = 18;`

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

### hasEndIcon()

    public abstract boolean hasEndIcon()

An icon displayed after the text.

Supports
[built-in](https://developers.google.com/workspace/chat/format-messages#builtinicons)
and
[custom](https://developers.google.com/workspace/chat/format-messages#customicons)
icons.

`.google.apps.card.v1.Icon end_icon = 11;`

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

### hasIcon() (deprecated)

    public abstract boolean hasIcon()

**Deprecated.** *google.apps.card.v1.DecoratedText.icon is deprecated. See
google/apps/card/v1/card.proto;l=915*

Deprecated in favor of `startIcon`.

`.google.apps.card.v1.Icon icon = 1 [deprecated = true];`

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

### hasOnClick()

    public abstract boolean hasOnClick()

This action is triggered when users click `topLabel` or `bottomLabel`.

`.google.apps.card.v1.OnClick on_click = 7;`

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

### hasStartIcon()

    public abstract boolean hasStartIcon()

The icon displayed in front of the text.

`.google.apps.card.v1.Icon start_icon = 12;`

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

### hasSwitchControl()

    public abstract boolean hasSwitchControl()

A switch widget that a user can click to change its state and trigger an
action.

`.google.apps.card.v1.DecoratedText.SwitchControl switch_control = 9;`

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

### hasTopLabelText()

    public abstract boolean hasTopLabelText()

`TextParagraph` equivalent of `top_label`. Always truncates. Allows for
more complex formatting than `top_label`.

[Google Chat apps](https://developers.google.com/workspace/chat):

`.google.apps.card.v1.TextParagraph top_label_text = 17;`

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