Class SlackUsergroup.Builder
java.lang.Object
com.hubspot.slack.client.models.usergroups.SlackUsergroup.Builder
- Enclosing class:
SlackUsergroup
@Generated(from="SlackUsergroupIF",
generator="Immutables")
@NotThreadSafe
public static final class SlackUsergroup.Builder
extends Object
Builds instances of type
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.
-
Method Summary
Modifier and TypeMethodDescriptionfinal SlackUsergroup.BuilderaddAllUserIdsInGroup(Iterable<String> elements) Adds elements touserIdsInGrouplist.final SlackUsergroup.BuilderaddUserIdsInGroup(String element) Adds one element touserIdsInGrouplist.final SlackUsergroup.BuilderaddUserIdsInGroup(String... elements) Adds elements touserIdsInGrouplist.build()Builds a newSlackUsergroup.final SlackUsergroup.Builderfrom(SlackUsergroupIF instance) Fill a builder with attribute values from the providedSlackUsergroupIFinstance.final SlackUsergroup.BuildersetAutoType(String autoType) Initializes the optional valueautoTypeto autoType.final SlackUsergroup.BuildersetAutoType(Optional<String> autoType) Initializes the optional valueautoTypeto autoType.final SlackUsergroup.BuildersetCreatedBy(String createdBy) Initializes the optional valuecreatedByto createdBy.final SlackUsergroup.BuildersetCreatedBy(Optional<String> createdBy) Initializes the optional valuecreatedByto createdBy.final SlackUsergroup.BuildersetDateCreatedEpochSeconds(int dateCreatedEpochSeconds) Initializes the value for thedateCreatedEpochSecondsattribute.final SlackUsergroup.BuildersetDateDeletedEpochSeconds(int dateDeletedEpochSeconds) Initializes the value for thedateDeletedEpochSecondsattribute.final SlackUsergroup.BuildersetDateUpdatedEpochSeconds(int dateUpdatedEpochSeconds) Initializes the value for thedateUpdatedEpochSecondsattribute.final SlackUsergroup.BuildersetDeletedBy(String deletedBy) Initializes the optional valuedeletedByto deletedBy.final SlackUsergroup.BuildersetDeletedBy(Optional<String> deletedBy) Initializes the optional valuedeletedByto deletedBy.final SlackUsergroup.BuildersetDescription(String description) Initializes the optional valuedescriptionto description.final SlackUsergroup.BuildersetDescription(Optional<String> description) Initializes the optional valuedescriptionto description.final SlackUsergroup.BuildersetExternal(boolean external) Initializes the value for theexternalattribute.final SlackUsergroup.BuilderInitializes the value for thehandleattribute.final SlackUsergroup.BuilderInitializes the value for theidattribute.final SlackUsergroup.BuilderInitializes the value for thenameattribute.final SlackUsergroup.BuildersetPreferences(UsergroupPreferences preferences) Initializes the value for thepreferencesattribute.final SlackUsergroup.BuilderInitializes the value for theteamIdattribute.final SlackUsergroup.BuildersetUpdatedBy(String updatedBy) Initializes the optional valueupdatedByto updatedBy.final SlackUsergroup.BuildersetUpdatedBy(Optional<String> updatedBy) Initializes the optional valueupdatedByto updatedBy.final SlackUsergroup.BuildersetUserCount(Integer userCount) Initializes the optional valueuserCountto userCount.final SlackUsergroup.BuildersetUserCount(Optional<Integer> userCount) Initializes the optional valueuserCountto userCount.final SlackUsergroup.BuildersetUsergroup(boolean usergroup) Initializes the value for theusergroupattribute.final SlackUsergroup.BuildersetUserIdsInGroup(Iterable<String> elements) Sets or replaces all elements foruserIdsInGrouplist.
-
Method Details
-
from
Fill a builder with attribute values from the providedSlackUsergroupIFinstance. 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
-
setTeamId
Initializes the value for theteamIdattribute.- Parameters:
teamId- The value for teamId- Returns:
thisbuilder for use in a chained invocation
-
setUsergroup
Initializes the value for theusergroupattribute.- Parameters:
usergroup- The value for usergroup- 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
-
setDescription
Initializes the optional valuedescriptionto description.- Parameters:
description- The value for description,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setDescription
Initializes the optional valuedescriptionto description.- Parameters:
description- The value for description- Returns:
thisbuilder for use in a chained invocation
-
setHandle
Initializes the value for thehandleattribute.- Parameters:
handle- The value for handle- Returns:
thisbuilder for use in a chained invocation
-
setExternal
Initializes the value for theexternalattribute.- Parameters:
external- The value for external- Returns:
thisbuilder for use in a chained invocation
-
setDateCreatedEpochSeconds
Initializes the value for thedateCreatedEpochSecondsattribute.- Parameters:
dateCreatedEpochSeconds- The value for dateCreatedEpochSeconds- Returns:
thisbuilder for use in a chained invocation
-
setDateUpdatedEpochSeconds
Initializes the value for thedateUpdatedEpochSecondsattribute.- Parameters:
dateUpdatedEpochSeconds- The value for dateUpdatedEpochSeconds- Returns:
thisbuilder for use in a chained invocation
-
setDateDeletedEpochSeconds
Initializes the value for thedateDeletedEpochSecondsattribute.- Parameters:
dateDeletedEpochSeconds- The value for dateDeletedEpochSeconds- Returns:
thisbuilder for use in a chained invocation
-
setAutoType
Initializes the optional valueautoTypeto autoType.- Parameters:
autoType- The value for autoType,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setAutoType
Initializes the optional valueautoTypeto autoType.- Parameters:
autoType- The value for autoType- Returns:
thisbuilder for use in a chained invocation
-
setCreatedBy
Initializes the optional valuecreatedByto createdBy.- Parameters:
createdBy- The value for createdBy,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setCreatedBy
Initializes the optional valuecreatedByto createdBy.- Parameters:
createdBy- The value for createdBy- Returns:
thisbuilder for use in a chained invocation
-
setUpdatedBy
Initializes the optional valueupdatedByto updatedBy.- Parameters:
updatedBy- The value for updatedBy,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setUpdatedBy
Initializes the optional valueupdatedByto updatedBy.- Parameters:
updatedBy- The value for updatedBy- Returns:
thisbuilder for use in a chained invocation
-
setDeletedBy
Initializes the optional valuedeletedByto deletedBy.- Parameters:
deletedBy- The value for deletedBy,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setDeletedBy
Initializes the optional valuedeletedByto deletedBy.- Parameters:
deletedBy- The value for deletedBy- Returns:
thisbuilder for use in a chained invocation
-
setPreferences
Initializes the value for thepreferencesattribute.- Parameters:
preferences- The value for preferences- Returns:
thisbuilder for use in a chained invocation
-
addUserIdsInGroup
Adds one element touserIdsInGrouplist.- Parameters:
element- A userIdsInGroup element- Returns:
thisbuilder for use in a chained invocation
-
addUserIdsInGroup
Adds elements touserIdsInGrouplist.- Parameters:
elements- An array of userIdsInGroup elements- Returns:
thisbuilder for use in a chained invocation
-
setUserIdsInGroup
Sets or replaces all elements foruserIdsInGrouplist.- Parameters:
elements- An iterable of userIdsInGroup elements- Returns:
thisbuilder for use in a chained invocation
-
addAllUserIdsInGroup
Adds elements touserIdsInGrouplist.- Parameters:
elements- An iterable of userIdsInGroup elements- Returns:
thisbuilder for use in a chained invocation
-
setUserCount
Initializes the optional valueuserCountto userCount.- Parameters:
userCount- The value for userCount,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setUserCount
Initializes the optional valueuserCountto userCount.- Parameters:
userCount- The value for userCount- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newSlackUsergroup.- Returns:
- An immutable instance of SlackUsergroup
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-