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 Classes
    Modifier and Type
    Class
    Description
    static 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

    Fields
    Modifier and Type
    Field
    Description
    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
     
    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 Type
    Method
    Description
    boolean
     
    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 final com.google.protobuf.Descriptors.Descriptor
     
    An icon displayed after the text.
    An icon displayed after the text.
    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.
    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
     
    boolean
    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
     
     
     
     
    newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
     
    protected Object
    newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
     
     
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(byte[] data)
     
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.ByteString data)
     
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<DecoratedText>
     
     
    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

  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Overrides:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
    • getControlCase

      public DecoratedText.ControlCase getControlCase()
      Specified by:
      getControlCase in interface DecoratedTextOrBuilder
    • hasIcon

      @Deprecated public boolean hasIcon()
      Deprecated.
      google.apps.card.v1.DecoratedText.icon is deprecated. See google/apps/card/v1/card.proto;l=796
       Deprecated in favor of `startIcon`.
       
      .google.apps.card.v1.Icon icon = 1 [deprecated = true];
      Specified by:
      hasIcon in interface DecoratedTextOrBuilder
      Returns:
      Whether the icon field is set.
    • getIcon

      @Deprecated public Icon getIcon()
      Deprecated.
      google.apps.card.v1.DecoratedText.icon is deprecated. See google/apps/card/v1/card.proto;l=796
       Deprecated in favor of `startIcon`.
       
      .google.apps.card.v1.Icon icon = 1 [deprecated = true];
      Specified by:
      getIcon in interface DecoratedTextOrBuilder
      Returns:
      The icon.
    • getIconOrBuilder

      @Deprecated public IconOrBuilder getIconOrBuilder()
      Deprecated.
       Deprecated in favor of `startIcon`.
       
      .google.apps.card.v1.Icon icon = 1 [deprecated = true];
      Specified by:
      getIconOrBuilder in interface DecoratedTextOrBuilder
    • hasStartIcon

      public boolean hasStartIcon()
       The icon displayed in front of the text.
       
      .google.apps.card.v1.Icon start_icon = 12;
      Specified by:
      hasStartIcon in interface DecoratedTextOrBuilder
      Returns:
      Whether the startIcon field is set.
    • getStartIcon

      public Icon getStartIcon()
       The icon displayed in front of the text.
       
      .google.apps.card.v1.Icon start_icon = 12;
      Specified by:
      getStartIcon in interface DecoratedTextOrBuilder
      Returns:
      The startIcon.
    • getStartIconOrBuilder

      public IconOrBuilder getStartIconOrBuilder()
       The icon displayed in front of the text.
       
      .google.apps.card.v1.Icon start_icon = 12;
      Specified by:
      getStartIconOrBuilder in interface DecoratedTextOrBuilder
    • getTopLabel

      public String getTopLabel()
       The text that appears above `text`. Always truncates.
       
      string top_label = 3;
      Specified by:
      getTopLabel in interface DecoratedTextOrBuilder
      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 interface DecoratedTextOrBuilder
      Returns:
      The bytes for topLabel.
    • getText

      public 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;
      Specified by:
      getText in interface DecoratedTextOrBuilder
      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 interface DecoratedTextOrBuilder
      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 interface DecoratedTextOrBuilder
      Returns:
      The wrapText.
    • getBottomLabel

      public String getBottomLabel()
       The text that appears below `text`. Always wraps.
       
      string bottom_label = 6;
      Specified by:
      getBottomLabel in interface DecoratedTextOrBuilder
      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 interface DecoratedTextOrBuilder
      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 interface DecoratedTextOrBuilder
      Returns:
      Whether the onClick field is set.
    • getOnClick

      public OnClick getOnClick()
       This action is triggered when users click `topLabel` or `bottomLabel`.
       
      .google.apps.card.v1.OnClick on_click = 7;
      Specified by:
      getOnClick in interface DecoratedTextOrBuilder
      Returns:
      The onClick.
    • getOnClickOrBuilder

      public OnClickOrBuilder getOnClickOrBuilder()
       This action is triggered when users click `topLabel` or `bottomLabel`.
       
      .google.apps.card.v1.OnClick on_click = 7;
      Specified by:
      getOnClickOrBuilder in interface DecoratedTextOrBuilder
    • 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 interface DecoratedTextOrBuilder
      Returns:
      Whether the button field is set.
    • getButton

      public Button getButton()
       A button that a user can click to trigger an action.
       
      .google.apps.card.v1.Button button = 8;
      Specified by:
      getButton in interface DecoratedTextOrBuilder
      Returns:
      The button.
    • getButtonOrBuilder

      public ButtonOrBuilder getButtonOrBuilder()
       A button that a user can click to trigger an action.
       
      .google.apps.card.v1.Button button = 8;
      Specified by:
      getButtonOrBuilder in interface DecoratedTextOrBuilder
    • 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 interface DecoratedTextOrBuilder
      Returns:
      Whether the switchControl field is set.
    • 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;
      Specified by:
      getSwitchControl in interface DecoratedTextOrBuilder
      Returns:
      The switchControl.
    • 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;
      Specified by:
      getSwitchControlOrBuilder in interface DecoratedTextOrBuilder
    • 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 interface DecoratedTextOrBuilder
      Returns:
      Whether the endIcon field is set.
    • getEndIcon

      public 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;
      Specified by:
      getEndIcon in interface DecoratedTextOrBuilder
      Returns:
      The endIcon.
    • getEndIconOrBuilder

      public 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;
      Specified by:
      getEndIconOrBuilder in interface DecoratedTextOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.ExtendableMessage<com.google.protobuf.GeneratedMessageV3>
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.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

      public static DecoratedText parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static DecoratedText parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static DecoratedText parseDelimitedFrom(InputStream input) throws IOException
      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

      public DecoratedText.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static DecoratedText.Builder newBuilder()
    • newBuilder

      public static DecoratedText.Builder newBuilder(DecoratedText prototype)
    • toBuilder

      public DecoratedText.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected DecoratedText.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static DecoratedText getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<DecoratedText> parser()
    • getParserForType

      public com.google.protobuf.Parser<DecoratedText> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public DecoratedText getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder