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

@Generated(from="RichTextListIF", generator="Immutables") @NotThreadSafe public static final class RichTextList.Builder extends Object
Builds instances of type RichTextList. 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 RichTextList.Builder from(RichTextListIF instance)
      Fill a builder with attribute values from the provided RichTextListIF instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • addElements

      public final RichTextList.Builder addElements(RichTextSection element)
      Adds one element to elements list.
      Parameters:
      element - A elements element
      Returns:
      this builder for use in a chained invocation
    • addElements

      public final RichTextList.Builder addElements(RichTextSection... elements)
      Adds elements to elements list.
      Parameters:
      elements - An array of elements elements
      Returns:
      this builder for use in a chained invocation
    • setElements

      public final RichTextList.Builder setElements(Iterable<? extends RichTextSection> elements)
      Sets or replaces all elements for elements list.
      Parameters:
      elements - An iterable of elements elements
      Returns:
      this builder for use in a chained invocation
    • addAllElements

      public final RichTextList.Builder addAllElements(Iterable<? extends RichTextSection> elements)
      Adds elements to elements list.
      Parameters:
      elements - An iterable of elements elements
      Returns:
      this builder for use in a chained invocation
    • setStyle

      public final RichTextList.Builder setStyle(RichTextListStyle style)
      Initializes the value for the style attribute.
      Parameters:
      style - The value for style
      Returns:
      this builder for use in a chained invocation
    • setIndent

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

      public final RichTextList.Builder setIndent(Optional<Integer> indent)
      Initializes the optional value indent to indent.
      Parameters:
      indent - The value for indent
      Returns:
      this builder for use in a chained invocation
    • setBorder

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

      public final RichTextList.Builder setBorder(Optional<Integer> border)
      Initializes the optional value border to border.
      Parameters:
      border - The value for border
      Returns:
      this builder for use in a chained invocation
    • setOffset

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

      public final RichTextList.Builder setOffset(Optional<Integer> offset)
      Initializes the optional value offset to offset.
      Parameters:
      offset - The value for offset
      Returns:
      this builder for use in a chained invocation
    • build

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