Class SlackGroup.Builder
java.lang.Object
com.hubspot.slack.client.models.group.SlackGroup.Builder
- Enclosing class:
SlackGroup
@Generated(from="SlackGroupIF",
generator="Immutables")
@NotThreadSafe
public static final class SlackGroup.Builder
extends Object
Builds instances of type
SlackGroup.
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 SlackGroup.BuilderaddAllMemberIds(Iterable<String> elements) Adds elements tomemberIdslist.final SlackGroup.BuilderaddMemberIds(String element) Adds one element tomemberIdslist.final SlackGroup.BuilderaddMemberIds(String... elements) Adds elements tomemberIdslist.build()Builds a newSlackGroup.final SlackGroup.Builderfrom(SlackGroupIF instance) Fill a builder with attribute values from the providedSlackGroupIFinstance.final SlackGroup.BuildersetArchived(boolean archived) Initializes the value for thearchivedattribute.final SlackGroup.BuildersetCreatedEpochSeconds(long createdEpochSeconds) Initializes the value for thecreatedEpochSecondsattribute.final SlackGroup.BuildersetCreatorId(String creatorId) Initializes the value for thecreatorIdattribute.final SlackGroup.BuilderInitializes the value for theidattribute.final SlackGroup.BuilderInitializes the optional valuelatestto latest.final SlackGroup.BuilderInitializes the optional valuelatestto latest.final SlackGroup.BuildersetMemberIds(Iterable<String> elements) Sets or replaces all elements formemberIdslist.final SlackGroup.BuildersetMpim(boolean mpim) Initializes the value for thempimattribute.final SlackGroup.BuilderInitializes the value for thenameattribute.final SlackGroup.BuildersetPurpose(ChannelMetadata purpose) Initializes the value for thepurposeattribute.final SlackGroup.BuildersetTopic(ChannelMetadata topic) Initializes the value for thetopicattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedSlackGroupIFinstance. 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
-
setId
Initializes the value for theidattribute.- Parameters:
id- The value for id- Returns:
thisbuilder for use in a chained invocation
-
setName
Initializes the value for thenameattribute.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
setCreatedEpochSeconds
Initializes the value for thecreatedEpochSecondsattribute.- Parameters:
createdEpochSeconds- The value for createdEpochSeconds- Returns:
thisbuilder for use in a chained invocation
-
setCreatorId
Initializes the value for thecreatorIdattribute.- Parameters:
creatorId- The value for creatorId- Returns:
thisbuilder for use in a chained invocation
-
setArchived
Initializes the value for thearchivedattribute.- Parameters:
archived- The value for archived- Returns:
thisbuilder for use in a chained invocation
-
setMpim
Initializes the value for thempimattribute.- Parameters:
mpim- The value for mpim- Returns:
thisbuilder for use in a chained invocation
-
addMemberIds
Adds one element tomemberIdslist.- Parameters:
element- A memberIds element- Returns:
thisbuilder for use in a chained invocation
-
addMemberIds
Adds elements tomemberIdslist.- Parameters:
elements- An array of memberIds elements- Returns:
thisbuilder for use in a chained invocation
-
setMemberIds
Sets or replaces all elements formemberIdslist.- Parameters:
elements- An iterable of memberIds elements- Returns:
thisbuilder for use in a chained invocation
-
addAllMemberIds
Adds elements tomemberIdslist.- Parameters:
elements- An iterable of memberIds elements- Returns:
thisbuilder for use in a chained invocation
-
setTopic
Initializes the value for thetopicattribute.- Parameters:
topic- The value for topic- Returns:
thisbuilder for use in a chained invocation
-
setPurpose
Initializes the value for thepurposeattribute.- Parameters:
purpose- The value for purpose- Returns:
thisbuilder for use in a chained invocation
-
setLatest
Initializes the optional valuelatestto latest.- Parameters:
latest- The value for latest,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setLatest
Initializes the optional valuelatestto latest.- Parameters:
latest- The value for latest- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newSlackGroup.- Returns:
- An immutable instance of SlackGroup
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-