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().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic MessagePage.Builderbuilder()Creates a builder forMessagePage.static MessagePagecopyOf(MessagePageIF instance) Creates an immutable copy of aMessagePageIFvalue.booleanThis instance is equal to all instances ofMessagePagethat have equal attribute values.intgetTotal()inthashCode()Computes a hash code from attributes:total,paging,matches.toString()Prints the immutable valueMessagePagewith attribute values.final MessagePagewithMatches(Message... elements) Copy the current immutable object with elements that replace the content ofmatches.final MessagePagewithMatches(Iterable<? extends Message> elements) Copy the current immutable object with elements that replace the content ofmatches.final MessagePagewithPaging(Paging value) Copy the current immutable object by setting a value for thepagingattribute.final MessagePagewithTotal(int value) Copy the current immutable object by setting a value for thetotalattribute.
-
Method Details
-
getTotal
public int getTotal()- Specified by:
getTotalin interfaceMessagePageIF- Returns:
- The value of the
totalattribute
-
getPaging
- Specified by:
getPagingin interfaceMessagePageIF- Returns:
- The value of the
pagingattribute
-
getMatches
- Specified by:
getMatchesin interfaceMessagePageIF- Returns:
- The value of the
matchesattribute
-
withTotal
Copy the current immutable object by setting a value for thetotalattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for total- Returns:
- A modified copy or the
thisobject
-
withPaging
Copy the current immutable object by setting a value for thepagingattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for paging- Returns:
- A modified copy or the
thisobject
-
withMatches
Copy the current immutable object with elements that replace the content ofmatches.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withMatches
Copy the current immutable object with elements that replace the content ofmatches. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of matches elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofMessagePagethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:total,paging,matches. -
toString
Prints the immutable valueMessagePagewith attribute values. -
copyOf
Creates an immutable copy of aMessagePageIFvalue. 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
Creates a builder forMessagePage.MessagePage.builder() .setTotal(int) // requiredtotal.setPaging(com.hubspot.slack.client.models.response.Paging) // requiredpaging.addMatches|addAllMatches(com.hubspot.slack.client.models.Message) //matcheselements .build();- Returns:
- A new MessagePage builder
-