Package com.hubspot.slack.client.models
Class SlackChannel.Builder
java.lang.Object
com.hubspot.slack.client.models.SlackChannel.Builder
- Enclosing class:
SlackChannel
@Generated(from="SlackChannelIF",
generator="Immutables")
@NotThreadSafe
public static final class SlackChannel.Builder
extends Object
Builds instances of type
SlackChannel.
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 TypeMethodDescriptionbuild()Builds a newSlackChannel.final SlackChannel.Builderfrom(SlackChannelIF instance) Fill a builder with attribute values from the providedSlackChannelIFinstance.final SlackChannel.BuilderInitializes the value for theidattribute.final SlackChannel.BuildersetIsArchived(Boolean isArchived) Initializes the optional valueisArchivedto isArchived.final SlackChannel.BuildersetIsArchived(Optional<Boolean> isArchived) Initializes the optional valueisArchivedto isArchived.final SlackChannel.BuildersetIsGeneral(Boolean isGeneral) Initializes the optional valueisGeneralto isGeneral.final SlackChannel.BuildersetIsGeneral(Optional<Boolean> isGeneral) Initializes the optional valueisGeneralto isGeneral.final SlackChannel.BuildersetIsMember(Boolean isMember) Initializes the optional valueisMemberto isMember.final SlackChannel.BuildersetIsMember(Optional<Boolean> isMember) Initializes the optional valueisMemberto isMember.final SlackChannel.BuildersetIsPrivate(Boolean isPrivate) Initializes the optional valueisPrivateto isPrivate.final SlackChannel.BuildersetIsPrivate(Optional<Boolean> isPrivate) Initializes the optional valueisPrivateto isPrivate.final SlackChannel.BuildersetIsShared(Boolean isShared) Initializes the optional valueisSharedto isShared.final SlackChannel.BuildersetIsShared(Optional<Boolean> isShared) Initializes the optional valueisSharedto isShared.final SlackChannel.BuilderInitializes the value for thenameattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedSlackChannelIFinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- 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
-
setIsArchived
Initializes the optional valueisArchivedto isArchived.- Parameters:
isArchived- The value for isArchived,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setIsArchived
Initializes the optional valueisArchivedto isArchived.- Parameters:
isArchived- The value for isArchived- Returns:
thisbuilder for use in a chained invocation
-
setIsGeneral
Initializes the optional valueisGeneralto isGeneral.- Parameters:
isGeneral- The value for isGeneral,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setIsGeneral
Initializes the optional valueisGeneralto isGeneral.- Parameters:
isGeneral- The value for isGeneral- Returns:
thisbuilder for use in a chained invocation
-
setIsPrivate
Initializes the optional valueisPrivateto isPrivate.- Parameters:
isPrivate- The value for isPrivate,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setIsPrivate
Initializes the optional valueisPrivateto isPrivate.- Parameters:
isPrivate- The value for isPrivate- Returns:
thisbuilder for use in a chained invocation
-
setIsMember
Initializes the optional valueisMemberto isMember.- Parameters:
isMember- The value for isMember,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setIsMember
Initializes the optional valueisMemberto isMember.- Parameters:
isMember- The value for isMember- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newSlackChannel.- Returns:
- An immutable instance of SlackChannel
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-