@NotThreadSafe public static final class SlackUsergroup.Builder extends Object
SlackUsergroup.
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 |
|---|---|
SlackUsergroup.Builder |
addAllUserIdsInGroup(Iterable<String> elements)
Adds elements to
userIdsInGroup list. |
SlackUsergroup.Builder |
addUserIdsInGroup(String... elements)
Adds elements to
userIdsInGroup list. |
SlackUsergroup.Builder |
addUserIdsInGroup(String element)
Adds one element to
userIdsInGroup list. |
SlackUsergroup |
build()
Builds a new
SlackUsergroup. |
SlackUsergroup.Builder |
from(SlackUsergroupIF instance)
Fill a builder with attribute values from the provided
SlackUsergroupIF instance. |
SlackUsergroup.Builder |
setAutoType(Optional<String> autoType)
Initializes the optional value
autoType to autoType. |
SlackUsergroup.Builder |
setAutoType(String autoType)
Initializes the optional value
autoType to autoType. |
SlackUsergroup.Builder |
setCreatedBy(Optional<String> createdBy)
Initializes the optional value
createdBy to createdBy. |
SlackUsergroup.Builder |
setCreatedBy(String createdBy)
Initializes the optional value
createdBy to createdBy. |
SlackUsergroup.Builder |
setDateCreatedEpochSeconds(int dateCreatedEpochSeconds)
Initializes the value for the
dateCreatedEpochSeconds attribute. |
SlackUsergroup.Builder |
setDateDeletedEpochSeconds(int dateDeletedEpochSeconds)
Initializes the value for the
dateDeletedEpochSeconds attribute. |
SlackUsergroup.Builder |
setDateUpdatedEpochSeconds(int dateUpdatedEpochSeconds)
Initializes the value for the
dateUpdatedEpochSeconds attribute. |
SlackUsergroup.Builder |
setDeletedBy(Optional<String> deletedBy)
Initializes the optional value
deletedBy to deletedBy. |
SlackUsergroup.Builder |
setDeletedBy(String deletedBy)
Initializes the optional value
deletedBy to deletedBy. |
SlackUsergroup.Builder |
setDescription(Optional<String> description)
Initializes the optional value
description to description. |
SlackUsergroup.Builder |
setDescription(String description)
Initializes the optional value
description to description. |
SlackUsergroup.Builder |
setExternal(boolean external)
Initializes the value for the
external attribute. |
SlackUsergroup.Builder |
setHandle(String handle)
Initializes the value for the
handle attribute. |
SlackUsergroup.Builder |
setId(String id)
Initializes the value for the
id attribute. |
SlackUsergroup.Builder |
setName(String name)
Initializes the value for the
name attribute. |
SlackUsergroup.Builder |
setPreferences(UsergroupPreferences preferences)
Initializes the value for the
preferences attribute. |
SlackUsergroup.Builder |
setTeamId(String teamId)
Initializes the value for the
teamId attribute. |
SlackUsergroup.Builder |
setUpdatedBy(Optional<String> updatedBy)
Initializes the optional value
updatedBy to updatedBy. |
SlackUsergroup.Builder |
setUpdatedBy(String updatedBy)
Initializes the optional value
updatedBy to updatedBy. |
SlackUsergroup.Builder |
setUserCount(Integer userCount)
Initializes the optional value
userCount to userCount. |
SlackUsergroup.Builder |
setUserCount(Optional<Integer> userCount)
Initializes the optional value
userCount to userCount. |
SlackUsergroup.Builder |
setUsergroup(boolean usergroup)
Initializes the value for the
usergroup attribute. |
SlackUsergroup.Builder |
setUserIdsInGroup(Iterable<String> elements)
Sets or replaces all elements for
userIdsInGroup list. |
public final SlackUsergroup.Builder from(SlackUsergroupIF instance)
SlackUsergroupIF 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 SlackUsergroup.Builder setId(String id)
id attribute.id - The value for idthis builder for use in a chained invocationpublic final SlackUsergroup.Builder setTeamId(String teamId)
teamId attribute.teamId - The value for teamIdthis builder for use in a chained invocationpublic final SlackUsergroup.Builder setUsergroup(boolean usergroup)
usergroup attribute.usergroup - The value for usergroupthis builder for use in a chained invocationpublic final SlackUsergroup.Builder setName(String name)
name attribute.name - The value for namethis builder for use in a chained invocationpublic final SlackUsergroup.Builder setDescription(@Nullable String description)
description to description.description - The value for description, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final SlackUsergroup.Builder setDescription(Optional<String> description)
description to description.description - The value for descriptionthis builder for use in a chained invocationpublic final SlackUsergroup.Builder setHandle(String handle)
handle attribute.handle - The value for handlethis builder for use in a chained invocationpublic final SlackUsergroup.Builder setExternal(boolean external)
external attribute.external - The value for externalthis builder for use in a chained invocationpublic final SlackUsergroup.Builder setDateCreatedEpochSeconds(int dateCreatedEpochSeconds)
dateCreatedEpochSeconds attribute.dateCreatedEpochSeconds - The value for dateCreatedEpochSecondsthis builder for use in a chained invocationpublic final SlackUsergroup.Builder setDateUpdatedEpochSeconds(int dateUpdatedEpochSeconds)
dateUpdatedEpochSeconds attribute.dateUpdatedEpochSeconds - The value for dateUpdatedEpochSecondsthis builder for use in a chained invocationpublic final SlackUsergroup.Builder setDateDeletedEpochSeconds(int dateDeletedEpochSeconds)
dateDeletedEpochSeconds attribute.dateDeletedEpochSeconds - The value for dateDeletedEpochSecondsthis builder for use in a chained invocationpublic final SlackUsergroup.Builder setAutoType(@Nullable String autoType)
autoType to autoType.autoType - The value for autoType, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final SlackUsergroup.Builder setAutoType(Optional<String> autoType)
autoType to autoType.autoType - The value for autoTypethis builder for use in a chained invocationpublic final SlackUsergroup.Builder setCreatedBy(@Nullable String createdBy)
createdBy to createdBy.createdBy - The value for createdBy, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final SlackUsergroup.Builder setCreatedBy(Optional<String> createdBy)
createdBy to createdBy.createdBy - The value for createdBythis builder for use in a chained invocationpublic final SlackUsergroup.Builder setUpdatedBy(@Nullable String updatedBy)
updatedBy to updatedBy.updatedBy - The value for updatedBy, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final SlackUsergroup.Builder setUpdatedBy(Optional<String> updatedBy)
updatedBy to updatedBy.updatedBy - The value for updatedBythis builder for use in a chained invocationpublic final SlackUsergroup.Builder setDeletedBy(@Nullable String deletedBy)
deletedBy to deletedBy.deletedBy - The value for deletedBy, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final SlackUsergroup.Builder setDeletedBy(Optional<String> deletedBy)
deletedBy to deletedBy.deletedBy - The value for deletedBythis builder for use in a chained invocationpublic final SlackUsergroup.Builder setPreferences(UsergroupPreferences preferences)
preferences attribute.preferences - The value for preferencesthis builder for use in a chained invocationpublic final SlackUsergroup.Builder addUserIdsInGroup(String element)
userIdsInGroup list.element - A userIdsInGroup elementthis builder for use in a chained invocationpublic final SlackUsergroup.Builder addUserIdsInGroup(String... elements)
userIdsInGroup list.elements - An array of userIdsInGroup elementsthis builder for use in a chained invocationpublic final SlackUsergroup.Builder setUserIdsInGroup(Iterable<String> elements)
userIdsInGroup list.elements - An iterable of userIdsInGroup elementsthis builder for use in a chained invocationpublic final SlackUsergroup.Builder addAllUserIdsInGroup(Iterable<String> elements)
userIdsInGroup list.elements - An iterable of userIdsInGroup elementsthis builder for use in a chained invocationpublic final SlackUsergroup.Builder setUserCount(@Nullable Integer userCount)
userCount to userCount.userCount - The value for userCount, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final SlackUsergroup.Builder setUserCount(Optional<Integer> userCount)
userCount to userCount.userCount - The value for userCountthis builder for use in a chained invocationpublic SlackUsergroup build() throws com.hubspot.immutables.validation.InvalidImmutableStateException
SlackUsergroup.com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missingCopyright © 2019. All rights reserved.