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 Summary
Modifier and TypeMethodDescriptionfinal MessagePage.BuilderaddAllMatches(Iterable<? extends Message> elements) Adds elements tomatcheslist.final MessagePage.BuilderaddMatches(Message element) Adds one element tomatcheslist.final MessagePage.BuilderaddMatches(Message... elements) Adds elements tomatcheslist.build()Builds a newMessagePage.final MessagePage.Builderfrom(MessagePageIF instance) Fill a builder with attribute values from the providedMessagePageIFinstance.final MessagePage.BuildersetMatches(Iterable<? extends Message> elements) Sets or replaces all elements formatcheslist.final MessagePage.BuilderInitializes the value for thepagingattribute.final MessagePage.BuildersetTotal(int total) Initializes the value for thetotalattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedMessagePageIFinstance. 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:
thisbuilder for use in a chained invocation
-
setTotal
Initializes the value for thetotalattribute.- Parameters:
total- The value for total- Returns:
thisbuilder for use in a chained invocation
-
setPaging
Initializes the value for thepagingattribute.- Parameters:
paging- The value for paging- Returns:
thisbuilder for use in a chained invocation
-
addMatches
Adds one element tomatcheslist.- Parameters:
element- A matches element- Returns:
thisbuilder for use in a chained invocation
-
addMatches
Adds elements tomatcheslist.- Parameters:
elements- An array of matches elements- Returns:
thisbuilder for use in a chained invocation
-
setMatches
Sets or replaces all elements formatcheslist.- Parameters:
elements- An iterable of matches elements- Returns:
thisbuilder for use in a chained invocation
-
addAllMatches
Adds elements tomatcheslist.- Parameters:
elements- An iterable of matches elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newMessagePage.- Returns:
- An immutable instance of MessagePage
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-