java.lang.Object
com.hubspot.slack.client.models.blocks.objects.Text.Builder
Enclosing class:
Text

@Generated(from="TextIF", generator="Immutables") @NotThreadSafe public static final class Text.Builder extends Object
Builds instances of type Text. Initialize attributes and then invoke the build() method to create an immutable instance.

Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

  • Method Details

    • from

      public final Text.Builder from(TextIF instance)
      Fill a builder with attribute values from the provided TextIF instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setType

      public final Text.Builder setType(TextType type)
      Initializes the value for the type attribute.
      Parameters:
      type - The value for type
      Returns:
      this builder for use in a chained invocation
    • setText

      public final Text.Builder setText(String text)
      Initializes the value for the text attribute.
      Parameters:
      text - The value for text
      Returns:
      this builder for use in a chained invocation
    • setEmoji

      public final Text.Builder setEmoji(@Nullable Boolean emoji)
      Initializes the optional value emoji to emoji.
      Parameters:
      emoji - The value for emoji, null is accepted as java.util.Optional.empty()
      Returns:
      this builder for chained invocation
    • setEmoji

      public final Text.Builder setEmoji(Optional<Boolean> emoji)
      Initializes the optional value emoji to emoji.
      Parameters:
      emoji - The value for emoji
      Returns:
      this builder for use in a chained invocation
    • setVerbatim

      public final Text.Builder setVerbatim(@Nullable Boolean verbatim)
      Initializes the optional value verbatim to verbatim.
      Parameters:
      verbatim - The value for verbatim, null is accepted as java.util.Optional.empty()
      Returns:
      this builder for chained invocation
    • setVerbatim

      public final Text.Builder setVerbatim(Optional<Boolean> verbatim)
      Initializes the optional value verbatim to verbatim.
      Parameters:
      verbatim - The value for verbatim
      Returns:
      this builder for use in a chained invocation
    • build

      public Text build()
      Builds a new Text.
      Returns:
      An immutable instance of Text
      Throws:
      com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missing