Class DecoratedText

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
com.google.apps.card.v1.DecoratedText
All Implemented Interfaces:
DecoratedTextOrBuilder, 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:
  • 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()
      Specified by:
      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.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.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • 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.GeneratedMessageV3
    • getDefaultInstanceForType

      public DecoratedText getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder