Class MessagePage

java.lang.Object
com.hubspot.slack.client.models.response.MessagePage
All Implemented Interfaces:
MessagePageIF

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

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

  • Method Details

    • getTotal

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

      public Paging getPaging()
      Specified by:
      getPaging in interface MessagePageIF
      Returns:
      The value of the paging attribute
    • getMatches

      public List<Message> getMatches()
      Specified by:
      getMatches in interface MessagePageIF
      Returns:
      The value of the matches attribute
    • withTotal

      public final MessagePage 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
    • withPaging

      public final MessagePage withPaging(Paging value)
      Copy the current immutable object by setting a value for the paging attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for paging
      Returns:
      A modified copy or the this object
    • withMatches

      public final MessagePage withMatches(Message... elements)
      Copy the current immutable object with elements that replace the content of matches.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withMatches

      public final MessagePage withMatches(Iterable<? extends Message> elements)
      Copy the current immutable object with elements that replace the content of matches. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of matches elements to set
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of MessagePage 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: total, paging, matches.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static MessagePage copyOf(MessagePageIF instance)
      Creates an immutable copy of a MessagePageIF 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 MessagePage instance
    • builder

      public static MessagePage.Builder builder()
      Creates a builder for MessagePage.
       MessagePage.builder()
          .setTotal(int) // required total
          .setPaging(com.hubspot.slack.client.models.response.Paging) // required paging
          .addMatches|addAllMatches(com.hubspot.slack.client.models.Message) // matches elements
          .build();
       
      Returns:
      A new MessagePage builder