Package com.google.apps.card.v1
Class DecoratedText
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableMessage<com.google.protobuf.GeneratedMessageV3>
com.google.protobuf.GeneratedMessageV3
com.google.apps.card.v1.DecoratedText
- All Implemented Interfaces:
DecoratedTextOrBuilder
,com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>
,com.google.protobuf.Message
,com.google.protobuf.MessageLite
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Serializable
public final class DecoratedText
extends com.google.protobuf.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 [Display text with decorative text](https://developers.google.com/workspace/chat/add-text-image-card-dialog#display_text_with_decorative_elements). [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):Protobuf type
google.apps.card.v1.DecoratedText
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
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.static enum
static final class
Either a toggle-style switch or a checkbox inside a `decoratedText` widget.static interface
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,
BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage.ExtendableMessage
com.google.protobuf.GeneratedMessage.ExtendableMessage.ExtensionSerializer, com.google.protobuf.GeneratedMessage.ExtendableMessage.ExtensionWriter
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message,
T> Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
Fields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, unknownFields
Fields inherited from class com.google.protobuf.AbstractMessage
memoizedSize
Fields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode
-
Method Summary
Modifier and TypeMethodDescriptionboolean
The text that appears below `text`.com.google.protobuf.ByteString
The text that appears below `text`.A button that a user can click to trigger an action.A button that a user can click to trigger an action.static DecoratedText
static final com.google.protobuf.Descriptors.Descriptor
An icon displayed after the text.An icon displayed after the text.getIcon()
Deprecated.google.apps.card.v1.DecoratedText.icon is deprecated.Deprecated.This action is triggered when users click `topLabel` or `bottomLabel`.This action is triggered when users click `topLabel` or `bottomLabel`.com.google.protobuf.Parser
<DecoratedText> int
The icon displayed in front of the text.The icon displayed in front of the text.A switch widget that a user can click to change its state and trigger an action.A switch widget that a user can click to change its state and trigger an action.getText()
Required.com.google.protobuf.ByteString
Required.The text that appears above `text`.com.google.protobuf.ByteString
The text that appears above `text`.boolean
The wrap text setting.boolean
A button that a user can click to trigger an action.boolean
An icon displayed after the text.int
hashCode()
boolean
hasIcon()
Deprecated.google.apps.card.v1.DecoratedText.icon is deprecated.boolean
This action is triggered when users click `topLabel` or `bottomLabel`.boolean
The icon displayed in front of the text.boolean
A switch widget that a user can click to change its state and trigger an action.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
final boolean
static DecoratedText.Builder
static DecoratedText.Builder
newBuilder
(DecoratedText prototype) protected DecoratedText.Builder
newBuilderForType
(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) protected Object
newInstance
(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) static DecoratedText
parseDelimitedFrom
(InputStream input) static DecoratedText
parseDelimitedFrom
(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static DecoratedText
parseFrom
(byte[] data) static DecoratedText
parseFrom
(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static DecoratedText
parseFrom
(com.google.protobuf.ByteString data) static DecoratedText
parseFrom
(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static DecoratedText
parseFrom
(com.google.protobuf.CodedInputStream input) static DecoratedText
parseFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static DecoratedText
parseFrom
(InputStream input) static DecoratedText
parseFrom
(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static DecoratedText
parseFrom
(ByteBuffer data) static DecoratedText
parseFrom
(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser
<DecoratedText> parser()
void
writeTo
(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessageV3
mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType
Methods inherited from class com.google.protobuf.GeneratedMessage.ExtendableMessage
extensionsAreInitialized, extensionsSerializedSize, extensionsSerializedSizeAsMessageSet, getAllFields, getAllFieldsRaw, getExtension, getExtension, getExtensionCount, getExtensionFields, getField, getRepeatedField, getRepeatedFieldCount, hasExtension, hasField, newExtensionSerializer, newExtensionWriter, newMessageSetExtensionSerializer, newMessageSetExtensionWriter
Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getDescriptorForType, getOneofFieldDescriptor, getUnknownFields, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toString
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeTo
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
ICON_FIELD_NUMBER
public static final int ICON_FIELD_NUMBER- See Also:
-
START_ICON_FIELD_NUMBER
public static final int START_ICON_FIELD_NUMBER- See Also:
-
TOP_LABEL_FIELD_NUMBER
public static final int TOP_LABEL_FIELD_NUMBER- See Also:
-
TEXT_FIELD_NUMBER
public static final int TEXT_FIELD_NUMBER- See Also:
-
WRAP_TEXT_FIELD_NUMBER
public static final int WRAP_TEXT_FIELD_NUMBER- See Also:
-
BOTTOM_LABEL_FIELD_NUMBER
public static final int BOTTOM_LABEL_FIELD_NUMBER- See Also:
-
ON_CLICK_FIELD_NUMBER
public static final int ON_CLICK_FIELD_NUMBER- See Also:
-
BUTTON_FIELD_NUMBER
public static final int BUTTON_FIELD_NUMBER- See Also:
-
SWITCH_CONTROL_FIELD_NUMBER
public static final int SWITCH_CONTROL_FIELD_NUMBER- See Also:
-
END_ICON_FIELD_NUMBER
public static final int END_ICON_FIELD_NUMBER- See Also:
-
-
Method Details
-
newInstance
- Overrides:
newInstance
in classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Overrides:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3
-
getControlCase
- Specified by:
getControlCase
in interfaceDecoratedTextOrBuilder
-
hasIcon
Deprecated.google.apps.card.v1.DecoratedText.icon is deprecated. See google/apps/card/v1/card.proto;l=796Deprecated in favor of `startIcon`.
.google.apps.card.v1.Icon icon = 1 [deprecated = true];
- Specified by:
hasIcon
in interfaceDecoratedTextOrBuilder
- Returns:
- Whether the icon field is set.
-
getIcon
Deprecated.google.apps.card.v1.DecoratedText.icon is deprecated. See google/apps/card/v1/card.proto;l=796Deprecated in favor of `startIcon`.
.google.apps.card.v1.Icon icon = 1 [deprecated = true];
- Specified by:
getIcon
in interfaceDecoratedTextOrBuilder
- Returns:
- The icon.
-
getIconOrBuilder
Deprecated.Deprecated in favor of `startIcon`.
.google.apps.card.v1.Icon icon = 1 [deprecated = true];
- Specified by:
getIconOrBuilder
in interfaceDecoratedTextOrBuilder
-
hasStartIcon
public boolean hasStartIcon()The icon displayed in front of the text.
.google.apps.card.v1.Icon start_icon = 12;
- Specified by:
hasStartIcon
in interfaceDecoratedTextOrBuilder
- Returns:
- Whether the startIcon field is set.
-
getStartIcon
The icon displayed in front of the text.
.google.apps.card.v1.Icon start_icon = 12;
- Specified by:
getStartIcon
in interfaceDecoratedTextOrBuilder
- Returns:
- The startIcon.
-
getStartIconOrBuilder
The icon displayed in front of the text.
.google.apps.card.v1.Icon start_icon = 12;
- Specified by:
getStartIconOrBuilder
in interfaceDecoratedTextOrBuilder
-
getTopLabel
The text that appears above `text`. Always truncates.
string top_label = 3;
- Specified by:
getTopLabel
in interfaceDecoratedTextOrBuilder
- Returns:
- The topLabel.
-
getTopLabelBytes
public com.google.protobuf.ByteString getTopLabelBytes()The text that appears above `text`. Always truncates.
string top_label = 3;
- Specified by:
getTopLabelBytes
in interfaceDecoratedTextOrBuilder
- Returns:
- The bytes for topLabel.
-
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;
- Specified by:
getText
in interfaceDecoratedTextOrBuilder
- Returns:
- The text.
-
getTextBytes
public com.google.protobuf.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;
- Specified by:
getTextBytes
in interfaceDecoratedTextOrBuilder
- Returns:
- The bytes for text.
-
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;
- Specified by:
getWrapText
in interfaceDecoratedTextOrBuilder
- Returns:
- The wrapText.
-
getBottomLabel
The text that appears below `text`. Always wraps.
string bottom_label = 6;
- Specified by:
getBottomLabel
in interfaceDecoratedTextOrBuilder
- Returns:
- The bottomLabel.
-
getBottomLabelBytes
public com.google.protobuf.ByteString getBottomLabelBytes()The text that appears below `text`. Always wraps.
string bottom_label = 6;
- Specified by:
getBottomLabelBytes
in interfaceDecoratedTextOrBuilder
- Returns:
- The bytes for bottomLabel.
-
hasOnClick
public boolean hasOnClick()This action is triggered when users click `topLabel` or `bottomLabel`.
.google.apps.card.v1.OnClick on_click = 7;
- Specified by:
hasOnClick
in interfaceDecoratedTextOrBuilder
- Returns:
- Whether the onClick field is set.
-
getOnClick
This action is triggered when users click `topLabel` or `bottomLabel`.
.google.apps.card.v1.OnClick on_click = 7;
- Specified by:
getOnClick
in interfaceDecoratedTextOrBuilder
- Returns:
- The onClick.
-
getOnClickOrBuilder
This action is triggered when users click `topLabel` or `bottomLabel`.
.google.apps.card.v1.OnClick on_click = 7;
- Specified by:
getOnClickOrBuilder
in interfaceDecoratedTextOrBuilder
-
hasButton
public boolean hasButton()A button that a user can click to trigger an action.
.google.apps.card.v1.Button button = 8;
- Specified by:
hasButton
in interfaceDecoratedTextOrBuilder
- Returns:
- Whether the button field is set.
-
getButton
A button that a user can click to trigger an action.
.google.apps.card.v1.Button button = 8;
- Specified by:
getButton
in interfaceDecoratedTextOrBuilder
- Returns:
- The button.
-
getButtonOrBuilder
A button that a user can click to trigger an action.
.google.apps.card.v1.Button button = 8;
- Specified by:
getButtonOrBuilder
in interfaceDecoratedTextOrBuilder
-
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;
- Specified by:
hasSwitchControl
in interfaceDecoratedTextOrBuilder
- Returns:
- Whether the switchControl field is set.
-
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;
- Specified by:
getSwitchControl
in interfaceDecoratedTextOrBuilder
- Returns:
- The switchControl.
-
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;
- Specified by:
getSwitchControlOrBuilder
in interfaceDecoratedTextOrBuilder
-
hasEndIcon
public 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;
- Specified by:
hasEndIcon
in interfaceDecoratedTextOrBuilder
- Returns:
- Whether the endIcon field is set.
-
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;
- Specified by:
getEndIcon
in interfaceDecoratedTextOrBuilder
- Returns:
- The endIcon.
-
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;
- Specified by:
getEndIconOrBuilder
in interfaceDecoratedTextOrBuilder
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessage.ExtendableMessage<com.google.protobuf.GeneratedMessageV3>
-
writeTo
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessage
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in classcom.google.protobuf.AbstractMessage
-
parseFrom
public static DecoratedText parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static DecoratedText parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static DecoratedText parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static DecoratedText parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static DecoratedText parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static DecoratedText parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static DecoratedText parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static DecoratedText parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static DecoratedText parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static DecoratedText parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected DecoratedText.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) - Specified by:
newBuilderForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-