@NotThreadSafe public static final class SlackGroup.Builder extends Object
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.
| Modifier and Type | Method and Description |
|---|---|
SlackGroup.Builder |
addAllMemberIds(Iterable<String> elements)
Adds elements to
memberIds list. |
SlackGroup.Builder |
addMemberIds(String... elements)
Adds elements to
memberIds list. |
SlackGroup.Builder |
addMemberIds(String element)
Adds one element to
memberIds list. |
SlackGroup |
build()
Builds a new
SlackGroup. |
SlackGroup.Builder |
from(SlackGroupIF instance)
Fill a builder with attribute values from the provided
SlackGroupIF instance. |
SlackGroup.Builder |
setArchived(boolean archived)
Initializes the value for the
archived attribute. |
SlackGroup.Builder |
setCreatedEpochSeconds(long createdEpochSeconds)
Initializes the value for the
createdEpochSeconds attribute. |
SlackGroup.Builder |
setCreatorId(String creatorId)
Initializes the value for the
creatorId attribute. |
SlackGroup.Builder |
setId(String id)
Initializes the value for the
id attribute. |
SlackGroup.Builder |
setLatest(Message latest)
Initializes the optional value
latest to latest. |
SlackGroup.Builder |
setLatest(Optional<Message> latest)
Initializes the optional value
latest to latest. |
SlackGroup.Builder |
setMemberIds(Iterable<String> elements)
Sets or replaces all elements for
memberIds list. |
SlackGroup.Builder |
setMpim(boolean mpim)
Initializes the value for the
mpim attribute. |
SlackGroup.Builder |
setName(String name)
Initializes the value for the
name attribute. |
SlackGroup.Builder |
setPurpose(ChannelMetadata purpose)
Initializes the value for the
purpose attribute. |
SlackGroup.Builder |
setTopic(ChannelMetadata topic)
Initializes the value for the
topic attribute. |
public final SlackGroup.Builder from(SlackGroupIF instance)
SlackGroupIF instance.
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.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final SlackGroup.Builder setId(String id)
id attribute.id - The value for idthis builder for use in a chained invocationpublic final SlackGroup.Builder setName(String name)
name attribute.name - The value for namethis builder for use in a chained invocationpublic final SlackGroup.Builder setCreatedEpochSeconds(long createdEpochSeconds)
createdEpochSeconds attribute.createdEpochSeconds - The value for createdEpochSecondsthis builder for use in a chained invocationpublic final SlackGroup.Builder setCreatorId(String creatorId)
creatorId attribute.creatorId - The value for creatorIdthis builder for use in a chained invocationpublic final SlackGroup.Builder setArchived(boolean archived)
archived attribute.archived - The value for archivedthis builder for use in a chained invocationpublic final SlackGroup.Builder setMpim(boolean mpim)
mpim attribute.mpim - The value for mpimthis builder for use in a chained invocationpublic final SlackGroup.Builder addMemberIds(String element)
memberIds list.element - A memberIds elementthis builder for use in a chained invocationpublic final SlackGroup.Builder addMemberIds(String... elements)
memberIds list.elements - An array of memberIds elementsthis builder for use in a chained invocationpublic final SlackGroup.Builder setMemberIds(Iterable<String> elements)
memberIds list.elements - An iterable of memberIds elementsthis builder for use in a chained invocationpublic final SlackGroup.Builder addAllMemberIds(Iterable<String> elements)
memberIds list.elements - An iterable of memberIds elementsthis builder for use in a chained invocationpublic final SlackGroup.Builder setTopic(ChannelMetadata topic)
topic attribute.topic - The value for topicthis builder for use in a chained invocationpublic final SlackGroup.Builder setPurpose(ChannelMetadata purpose)
purpose attribute.purpose - The value for purposethis builder for use in a chained invocationpublic final SlackGroup.Builder setLatest(@Nullable Message latest)
latest to latest.latest - The value for latest, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final SlackGroup.Builder setLatest(Optional<Message> latest)
latest to latest.latest - The value for latestthis builder for use in a chained invocationpublic SlackGroup build() throws com.hubspot.immutables.validation.InvalidImmutableStateException
SlackGroup.com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missingCopyright © 2019. All rights reserved.