Class TextParagraph.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<TextParagraph.Builder>
com.google.apps.card.v1.TextParagraph.Builder
All Implemented Interfaces:
TextParagraphOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
TextParagraph

public static final class TextParagraph.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<TextParagraph.Builder> implements TextParagraphOrBuilder
 A paragraph of text that supports formatting. For an example in
 Google Chat apps, see [Add a paragraph of formatted
 text](https://developers.google.com/workspace/chat/add-text-image-card-dialog#add_a_paragraph_of_formatted_text).
 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).

 [Google Workspace add-ons and
 Chat apps](https://developers.google.com/workspace/extend):
 
Protobuf type google.apps.card.v1.TextParagraph
  • Method Details

    • 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.Builder<TextParagraph.Builder>
    • clear

      public TextParagraph.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<TextParagraph.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<TextParagraph.Builder>
    • getDefaultInstanceForType

      public TextParagraph getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public TextParagraph build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public TextParagraph buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      public TextParagraph.Builder clone()
      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<TextParagraph.Builder>
    • setField

      public TextParagraph.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<TextParagraph.Builder>
    • clearField

      public TextParagraph.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<TextParagraph.Builder>
    • clearOneof

      public TextParagraph.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<TextParagraph.Builder>
    • setRepeatedField

      public TextParagraph.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<TextParagraph.Builder>
    • addRepeatedField

      public TextParagraph.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<TextParagraph.Builder>
    • mergeFrom

      public TextParagraph.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<TextParagraph.Builder>
    • mergeFrom

      public TextParagraph.Builder mergeFrom(TextParagraph other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<TextParagraph.Builder>
    • mergeFrom

      public TextParagraph.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<TextParagraph.Builder>
      Throws:
      IOException
    • getText

      public String getText()
       The text that's shown in the widget.
       
      string text = 1;
      Specified by:
      getText in interface TextParagraphOrBuilder
      Returns:
      The text.
    • getTextBytes

      public com.google.protobuf.ByteString getTextBytes()
       The text that's shown in the widget.
       
      string text = 1;
      Specified by:
      getTextBytes in interface TextParagraphOrBuilder
      Returns:
      The bytes for text.
    • setText

      public TextParagraph.Builder setText(String value)
       The text that's shown in the widget.
       
      string text = 1;
      Parameters:
      value - The text to set.
      Returns:
      This builder for chaining.
    • clearText

      public TextParagraph.Builder clearText()
       The text that's shown in the widget.
       
      string text = 1;
      Returns:
      This builder for chaining.
    • setTextBytes

      public TextParagraph.Builder setTextBytes(com.google.protobuf.ByteString value)
       The text that's shown in the widget.
       
      string text = 1;
      Parameters:
      value - The bytes for text to set.
      Returns:
      This builder for chaining.
    • getMaxLines

      public int getMaxLines()
       The maximum number of lines of text that are displayed in the widget. If
       the text exceeds the specified maximum number of lines, the excess
       content is concealed behind a **show more** button. If the text is equal or
       shorter than the specified maximum number of lines, a **show more** button
       isn't displayed.
      
       The default value is 0, in which case
       all context is displayed. Negative values are ignored.
       
      int32 max_lines = 2;
      Specified by:
      getMaxLines in interface TextParagraphOrBuilder
      Returns:
      The maxLines.
    • setMaxLines

      public TextParagraph.Builder setMaxLines(int value)
       The maximum number of lines of text that are displayed in the widget. If
       the text exceeds the specified maximum number of lines, the excess
       content is concealed behind a **show more** button. If the text is equal or
       shorter than the specified maximum number of lines, a **show more** button
       isn't displayed.
      
       The default value is 0, in which case
       all context is displayed. Negative values are ignored.
       
      int32 max_lines = 2;
      Parameters:
      value - The maxLines to set.
      Returns:
      This builder for chaining.
    • clearMaxLines

      public TextParagraph.Builder clearMaxLines()
       The maximum number of lines of text that are displayed in the widget. If
       the text exceeds the specified maximum number of lines, the excess
       content is concealed behind a **show more** button. If the text is equal or
       shorter than the specified maximum number of lines, a **show more** button
       isn't displayed.
      
       The default value is 0, in which case
       all context is displayed. Negative values are ignored.
       
      int32 max_lines = 2;
      Returns:
      This builder for chaining.
    • getTextSyntaxValue

      public int getTextSyntaxValue()
       The syntax of the text. If not set, the text is rendered as HTML.
      
       [Google Chat apps](https://developers.google.com/workspace/chat):
       
      .google.apps.card.v1.TextParagraph.TextSyntax text_syntax = 4;
      Specified by:
      getTextSyntaxValue in interface TextParagraphOrBuilder
      Returns:
      The enum numeric value on the wire for textSyntax.
    • setTextSyntaxValue

      public TextParagraph.Builder setTextSyntaxValue(int value)
       The syntax of the text. If not set, the text is rendered as HTML.
      
       [Google Chat apps](https://developers.google.com/workspace/chat):
       
      .google.apps.card.v1.TextParagraph.TextSyntax text_syntax = 4;
      Parameters:
      value - The enum numeric value on the wire for textSyntax to set.
      Returns:
      This builder for chaining.
    • getTextSyntax

      public TextParagraph.TextSyntax getTextSyntax()
       The syntax of the text. If not set, the text is rendered as HTML.
      
       [Google Chat apps](https://developers.google.com/workspace/chat):
       
      .google.apps.card.v1.TextParagraph.TextSyntax text_syntax = 4;
      Specified by:
      getTextSyntax in interface TextParagraphOrBuilder
      Returns:
      The textSyntax.
    • setTextSyntax

      public TextParagraph.Builder setTextSyntax(TextParagraph.TextSyntax value)
       The syntax of the text. If not set, the text is rendered as HTML.
      
       [Google Chat apps](https://developers.google.com/workspace/chat):
       
      .google.apps.card.v1.TextParagraph.TextSyntax text_syntax = 4;
      Parameters:
      value - The textSyntax to set.
      Returns:
      This builder for chaining.
    • clearTextSyntax

      public TextParagraph.Builder clearTextSyntax()
       The syntax of the text. If not set, the text is rendered as HTML.
      
       [Google Chat apps](https://developers.google.com/workspace/chat):
       
      .google.apps.card.v1.TextParagraph.TextSyntax text_syntax = 4;
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final TextParagraph.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TextParagraph.Builder>
    • mergeUnknownFields

      public final TextParagraph.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TextParagraph.Builder>