Class 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, java.io.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:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  DecoratedText.Builder
      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 class  DecoratedText.ControlCase  
      static class  DecoratedText.SwitchControl
      Either a toggle-style switch or a checkbox inside a `decoratedText` widget.
      static interface  DecoratedText.SwitchControlOrBuilder  
      • 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 extends java.lang.Object>
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

        com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.lang.String getBottomLabel()
      The text that appears below `text`.
      com.google.protobuf.ByteString getBottomLabelBytes()
      The text that appears below `text`.
      Button getButton()
      A button that a user can click to trigger an action.
      ButtonOrBuilder getButtonOrBuilder()
      A button that a user can click to trigger an action.
      DecoratedText.ControlCase getControlCase()  
      static DecoratedText getDefaultInstance()  
      DecoratedText getDefaultInstanceForType()  
      static com.google.protobuf.Descriptors.Descriptor getDescriptor()  
      Icon getEndIcon()
      An icon displayed after the text.
      IconOrBuilder getEndIconOrBuilder()
      An icon displayed after the text.
      Icon getIcon()
      Deprecated.
      google.apps.card.v1.DecoratedText.icon is deprecated.
      IconOrBuilder getIconOrBuilder()
      Deprecated.
      OnClick getOnClick()
      This action is triggered when users click `topLabel` or `bottomLabel`.
      OnClickOrBuilder getOnClickOrBuilder()
      This action is triggered when users click `topLabel` or `bottomLabel`.
      com.google.protobuf.Parser<DecoratedText> getParserForType()  
      int getSerializedSize()  
      Icon getStartIcon()
      The icon displayed in front of the text.
      IconOrBuilder getStartIconOrBuilder()
      The icon displayed in front of the text.
      DecoratedText.SwitchControl getSwitchControl()
      A switch widget that a user can click to change its state and trigger an action.
      DecoratedText.SwitchControlOrBuilder getSwitchControlOrBuilder()
      A switch widget that a user can click to change its state and trigger an action.
      java.lang.String getText()
      Required.
      com.google.protobuf.ByteString getTextBytes()
      Required.
      java.lang.String getTopLabel()
      The text that appears above `text`.
      com.google.protobuf.ByteString getTopLabelBytes()
      The text that appears above `text`.
      boolean getWrapText()
      The wrap text setting.
      boolean hasButton()
      A button that a user can click to trigger an action.
      boolean hasEndIcon()
      An icon displayed after the text.
      int hashCode()  
      boolean hasIcon()
      Deprecated.
      google.apps.card.v1.DecoratedText.icon is deprecated.
      boolean hasOnClick()
      This action is triggered when users click `topLabel` or `bottomLabel`.
      boolean hasStartIcon()
      The icon displayed in front of the text.
      boolean hasSwitchControl()
      A switch widget that a user can click to change its state and trigger an action.
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()  
      boolean isInitialized()  
      static DecoratedText.Builder newBuilder()  
      static DecoratedText.Builder newBuilder​(DecoratedText prototype)  
      DecoratedText.Builder newBuilderForType()  
      protected DecoratedText.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)  
      protected java.lang.Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)  
      static DecoratedText parseDelimitedFrom​(java.io.InputStream input)  
      static DecoratedText parseDelimitedFrom​(java.io.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​(java.io.InputStream input)  
      static DecoratedText parseFrom​(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static DecoratedText parseFrom​(java.nio.ByteBuffer data)  
      static DecoratedText parseFrom​(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static com.google.protobuf.Parser<DecoratedText> parser()  
      DecoratedText.Builder toBuilder()  
      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
    • Method Detail

      • newInstance

        protected java.lang.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
      • 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.
      • 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.
      • getTopLabel

        public java.lang.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 java.lang.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 java.lang.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.
      • 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.
      • 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.
      • 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 java.io.IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessage
        Throws:
        java.io.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​(java.lang.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​(java.nio.ByteBuffer data)
                                       throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static DecoratedText parseFrom​(java.nio.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​(java.io.InputStream input)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

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

        public static DecoratedText parseDelimitedFrom​(java.io.InputStream input)
                                                throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

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

        public static DecoratedText parseFrom​(com.google.protobuf.CodedInputStream input)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static DecoratedText parseFrom​(com.google.protobuf.CodedInputStream input,
                                              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • newBuilderForType

        public DecoratedText.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • 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