Class MessagePage.Builder

java.lang.Object
com.hubspot.slack.client.models.response.MessagePage.Builder
Enclosing class:
MessagePage

@Generated(from="MessagePageIF", generator="Immutables") @NotThreadSafe public static final class MessagePage.Builder extends Object
Builds instances of type MessagePage. 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 MessagePage.Builder from(MessagePageIF instance)
      Fill a builder with attribute values from the provided MessagePageIF 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
    • setTotal

      public final MessagePage.Builder setTotal(int total)
      Initializes the value for the total attribute.
      Parameters:
      total - The value for total
      Returns:
      this builder for use in a chained invocation
    • setPaging

      public final MessagePage.Builder setPaging(Paging paging)
      Initializes the value for the paging attribute.
      Parameters:
      paging - The value for paging
      Returns:
      this builder for use in a chained invocation
    • addMatches

      public final MessagePage.Builder addMatches(Message element)
      Adds one element to matches list.
      Parameters:
      element - A matches element
      Returns:
      this builder for use in a chained invocation
    • addMatches

      public final MessagePage.Builder addMatches(Message... elements)
      Adds elements to matches list.
      Parameters:
      elements - An array of matches elements
      Returns:
      this builder for use in a chained invocation
    • setMatches

      public final MessagePage.Builder setMatches(Iterable<? extends Message> elements)
      Sets or replaces all elements for matches list.
      Parameters:
      elements - An iterable of matches elements
      Returns:
      this builder for use in a chained invocation
    • addAllMatches

      public final MessagePage.Builder addAllMatches(Iterable<? extends Message> elements)
      Adds elements to matches list.
      Parameters:
      elements - An iterable of matches elements
      Returns:
      this builder for use in a chained invocation
    • build

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