Class Paging.Builder

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

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

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

      public final Paging.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
    • setPage

      public final Paging.Builder setPage(int page)
      Initializes the value for the page attribute.
      Parameters:
      page - The value for page
      Returns:
      this builder for use in a chained invocation
    • setPages

      public final Paging.Builder setPages(int pages)
      Initializes the value for the pages attribute.
      Parameters:
      pages - The value for pages
      Returns:
      this builder for use in a chained invocation
    • build

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