Class RichTextUserElement.Style.Builder

java.lang.Object
com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextUserElement.Style.Builder
Enclosing class:
RichTextUserElement.Style

@Generated(from="RichTextUserElementIF.StyleIF", generator="Immutables") @NotThreadSafe public static final class RichTextUserElement.Style.Builder extends Object
Builds instances of type Style. 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

      Fill a builder with attribute values from the provided StyleIF 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
    • setBold

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

      public final RichTextUserElement.Style.Builder setBold(Optional<Boolean> bold)
      Initializes the optional value bold to bold.
      Parameters:
      bold - The value for bold
      Returns:
      this builder for use in a chained invocation
    • setItalic

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

      public final RichTextUserElement.Style.Builder setItalic(Optional<Boolean> italic)
      Initializes the optional value italic to italic.
      Parameters:
      italic - The value for italic
      Returns:
      this builder for use in a chained invocation
    • setStrike

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

      public final RichTextUserElement.Style.Builder setStrike(Optional<Boolean> strike)
      Initializes the optional value strike to strike.
      Parameters:
      strike - The value for strike
      Returns:
      this builder for use in a chained invocation
    • setHighlight

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

      public final RichTextUserElement.Style.Builder setHighlight(Optional<Boolean> highlight)
      Initializes the optional value highlight to highlight.
      Parameters:
      highlight - The value for highlight
      Returns:
      this builder for use in a chained invocation
    • setClientHighlight

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

      public final RichTextUserElement.Style.Builder setClientHighlight(Optional<Boolean> clientHighlight)
      Initializes the optional value clientHighlight to clientHighlight.
      Parameters:
      clientHighlight - The value for clientHighlight
      Returns:
      this builder for use in a chained invocation
    • setUnlink

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

      public final RichTextUserElement.Style.Builder setUnlink(Optional<Boolean> unlink)
      Initializes the optional value unlink to unlink.
      Parameters:
      unlink - The value for unlink
      Returns:
      this builder for use in a chained invocation
    • setUnderline

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

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

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