java.lang.Object
com.hubspot.slack.client.models.response.Paging
All Implemented Interfaces:
PagingIF

@Generated(from="PagingIF", generator="Immutables") @ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class Paging extends Object implements PagingIF
Immutable implementation of PagingIF.

Use the builder to create immutable instances: Paging.builder().

  • Method Details

    • getCount

      public int getCount()
      Specified by:
      getCount in interface PagingIF
      Returns:
      The value of the count attribute
    • getTotal

      public int getTotal()
      Specified by:
      getTotal in interface PagingIF
      Returns:
      The value of the total attribute
    • getPage

      public int getPage()
      Specified by:
      getPage in interface PagingIF
      Returns:
      The value of the page attribute
    • getPages

      public int getPages()
      Specified by:
      getPages in interface PagingIF
      Returns:
      The value of the pages attribute
    • withCount

      public final Paging withCount(int value)
      Copy the current immutable object by setting a value for the count attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for count
      Returns:
      A modified copy or the this object
    • withTotal

      public final Paging withTotal(int value)
      Copy the current immutable object by setting a value for the total attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for total
      Returns:
      A modified copy or the this object
    • withPage

      public final Paging withPage(int value)
      Copy the current immutable object by setting a value for the page attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for page
      Returns:
      A modified copy or the this object
    • withPages

      public final Paging withPages(int value)
      Copy the current immutable object by setting a value for the pages attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for pages
      Returns:
      A modified copy or the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of Paging that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: count, total, page, pages.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value Paging with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static Paging copyOf(PagingIF instance)
      Creates an immutable copy of a PagingIF value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable Paging instance
    • builder

      public static Paging.Builder builder()
      Creates a builder for Paging.
       Paging.builder()
          .setCount(int) // required count
          .setTotal(int) // required total
          .setPage(int) // required page
          .setPages(int) // required pages
          .build();
       
      Returns:
      A new Paging builder