public final class DecoratedText extends GeneratedMessageV3 implements DecoratedTextOrBuilder
A widget that displays text with optional decorations such as a label above
or below the text, an icon in front of the text, a selection widget, or a
button after the text. For an example in
Google Chat apps, see Decorated
text.
Google Workspace Add-ons and Chat
apps:
Protobuf type google.apps.card.v1.DecoratedText
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
BOTTOM_LABEL_FIELD_NUMBER
public static final int BOTTOM_LABEL_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
BUTTON_FIELD_NUMBER
public static final int BUTTON_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
END_ICON_FIELD_NUMBER
public static final int END_ICON_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
ICON_FIELD_NUMBER
public static final int ICON_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
ON_CLICK_FIELD_NUMBER
public static final int ON_CLICK_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
START_ICON_FIELD_NUMBER
public static final int START_ICON_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
SWITCH_CONTROL_FIELD_NUMBER
public static final int SWITCH_CONTROL_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
TEXT_FIELD_NUMBER
public static final int TEXT_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
TOP_LABEL_FIELD_NUMBER
public static final int TOP_LABEL_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
WRAP_TEXT_FIELD_NUMBER
public static final int WRAP_TEXT_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
Static Methods
getDefaultInstance()
public static DecoratedText getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static DecoratedText.Builder newBuilder()
newBuilder(DecoratedText prototype)
public static DecoratedText.Builder newBuilder(DecoratedText prototype)
parseDelimitedFrom(InputStream input)
public static DecoratedText parseDelimitedFrom(InputStream input)
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static DecoratedText parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static DecoratedText parseFrom(byte[] data)
Parameter |
---|
Name | Description |
data | byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static DecoratedText parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static DecoratedText parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static DecoratedText parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
parseFrom(CodedInputStream input)
public static DecoratedText parseFrom(CodedInputStream input)
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static DecoratedText parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(InputStream input)
public static DecoratedText parseFrom(InputStream input)
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static DecoratedText parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static DecoratedText parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static DecoratedText parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<DecoratedText> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter |
---|
Name | Description |
obj | Object
|
Overrides
getBottomLabel()
public String getBottomLabel()
The text that appears below text
. Always wraps.
string bottom_label = 6;
Returns |
---|
Type | Description |
String | The bottomLabel.
|
getBottomLabelBytes()
public ByteString getBottomLabelBytes()
The text that appears below text
. Always wraps.
string bottom_label = 6;
Returns |
---|
Type | Description |
ByteString | The bytes for bottomLabel.
|
getButton()
public Button getButton()
A button that a user can click to trigger an action.
.google.apps.card.v1.Button button = 8;
Returns |
---|
Type | Description |
Button | The button.
|
getButtonOrBuilder()
public ButtonOrBuilder getButtonOrBuilder()
A button that a user can click to trigger an action.
.google.apps.card.v1.Button button = 8;
getControlCase()
public DecoratedText.ControlCase getControlCase()
getDefaultInstanceForType()
public DecoratedText getDefaultInstanceForType()
getEndIcon()
An icon displayed after the text.
Supports
built-in
and
custom
icons.
.google.apps.card.v1.Icon end_icon = 11;
Returns |
---|
Type | Description |
Icon | The endIcon.
|
getEndIconOrBuilder()
public IconOrBuilder getEndIconOrBuilder()
An icon displayed after the text.
Supports
built-in
and
custom
icons.
.google.apps.card.v1.Icon end_icon = 11;
getIcon() (deprecated)
Deprecated. google.apps.card.v1.DecoratedText.icon is deprecated. See
google/apps/card/v1/card.proto;l=794
Deprecated in favor of startIcon
.
.google.apps.card.v1.Icon icon = 1 [deprecated = true];
Returns |
---|
Type | Description |
Icon | The icon.
|
getIconOrBuilder() (deprecated)
public IconOrBuilder getIconOrBuilder()
Deprecated in favor of startIcon
.
.google.apps.card.v1.Icon icon = 1 [deprecated = true];
getOnClick()
public OnClick getOnClick()
This action is triggered when users click topLabel
or bottomLabel
.
.google.apps.card.v1.OnClick on_click = 7;
Returns |
---|
Type | Description |
OnClick | The onClick.
|
getOnClickOrBuilder()
public OnClickOrBuilder getOnClickOrBuilder()
This action is triggered when users click topLabel
or bottomLabel
.
.google.apps.card.v1.OnClick on_click = 7;
getParserForType()
public Parser<DecoratedText> getParserForType()
Overrides
getSerializedSize()
public int getSerializedSize()
Returns |
---|
Type | Description |
int | |
Overrides
getStartIcon()
public Icon getStartIcon()
The icon displayed in front of the text.
.google.apps.card.v1.Icon start_icon = 12;
Returns |
---|
Type | Description |
Icon | The startIcon.
|
getStartIconOrBuilder()
public IconOrBuilder getStartIconOrBuilder()
The icon displayed in front of the text.
.google.apps.card.v1.Icon start_icon = 12;
getSwitchControl()
public 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;
getSwitchControlOrBuilder()
public 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;
getText()
Returns |
---|
Type | Description |
String | The text.
|
getTextBytes()
public ByteString getTextBytes()
Returns |
---|
Type | Description |
ByteString | The bytes for text.
|
getTopLabel()
public String getTopLabel()
The text that appears above text
. Always truncates.
string top_label = 3;
Returns |
---|
Type | Description |
String | The topLabel.
|
getTopLabelBytes()
public ByteString getTopLabelBytes()
The text that appears above text
. Always truncates.
string top_label = 3;
Returns |
---|
Type | Description |
ByteString | The bytes for topLabel.
|
getWrapText()
public 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 |
boolean | The wrapText.
|
hasButton()
public boolean hasButton()
A button that a user can click to trigger an action.
.google.apps.card.v1.Button button = 8;
Returns |
---|
Type | Description |
boolean | Whether the button field is set.
|
hasEndIcon()
public boolean hasEndIcon()
An icon displayed after the text.
Supports
built-in
and
custom
icons.
.google.apps.card.v1.Icon end_icon = 11;
Returns |
---|
Type | Description |
boolean | Whether the endIcon field is set.
|
hasIcon() (deprecated)
Deprecated. google.apps.card.v1.DecoratedText.icon is deprecated. See
google/apps/card/v1/card.proto;l=794
Deprecated in favor of startIcon
.
.google.apps.card.v1.Icon icon = 1 [deprecated = true];
Returns |
---|
Type | Description |
boolean | Whether the icon field is set.
|
hasOnClick()
public boolean hasOnClick()
This action is triggered when users click topLabel
or bottomLabel
.
.google.apps.card.v1.OnClick on_click = 7;
Returns |
---|
Type | Description |
boolean | Whether the onClick field is set.
|
hasStartIcon()
public boolean hasStartIcon()
The icon displayed in front of the text.
.google.apps.card.v1.Icon start_icon = 12;
Returns |
---|
Type | Description |
boolean | Whether the startIcon field is set.
|
hasSwitchControl()
public 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 |
boolean | Whether the switchControl field is set.
|
hashCode()
Returns |
---|
Type | Description |
int | |
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public DecoratedText.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected DecoratedText.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Overrides
toBuilder()
public DecoratedText.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides