Package com.hubspot.slack.client.models
Class SlackChannel
java.lang.Object
com.hubspot.slack.client.models.SlackChannel
- All Implemented Interfaces:
SlackChannelIF
@Generated(from="SlackChannelIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class SlackChannel
extends Object
implements SlackChannelIF
Immutable implementation of
SlackChannelIF.
Use the builder to create immutable instances:
SlackChannel.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic SlackChannel.Builderbuilder()Creates a builder forSlackChannel.static SlackChannelcopyOf(SlackChannelIF instance) Creates an immutable copy of aSlackChannelIFvalue.booleanThis instance is equal to all instances ofSlackChannelthat have equal attribute values.getId()getName()inthashCode()Computes a hash code from attributes:id,name,isArchived,isGeneral,isPrivate,isMember,isShared,channelType.toString()Prints the immutable valueSlackChannelwith attribute values.final SlackChannelCopy the current immutable object by setting a value for theidattribute.final SlackChannelwithIsArchived(Boolean value) Copy the current immutable object by setting a present value for the optionalisArchivedattribute.final SlackChannelwithIsArchived(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for theisArchivedattribute.final SlackChannelwithIsGeneral(Boolean value) Copy the current immutable object by setting a present value for the optionalisGeneralattribute.final SlackChannelwithIsGeneral(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for theisGeneralattribute.final SlackChannelwithIsMember(Boolean value) Copy the current immutable object by setting a present value for the optionalisMemberattribute.final SlackChannelwithIsMember(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for theisMemberattribute.final SlackChannelwithIsPrivate(Boolean value) Copy the current immutable object by setting a present value for the optionalisPrivateattribute.final SlackChannelwithIsPrivate(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for theisPrivateattribute.final SlackChannelwithIsShared(Boolean value) Copy the current immutable object by setting a present value for the optionalisSharedattribute.final SlackChannelwithIsShared(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for theisSharedattribute.final SlackChannelCopy the current immutable object by setting a value for thenameattribute.
-
Method Details
-
getId
- Specified by:
getIdin interfaceSlackChannelIF- Returns:
- The value of the
idattribute
-
getName
- Specified by:
getNamein interfaceSlackChannelIF- Returns:
- The value of the
nameattribute
-
getIsArchived
- Specified by:
getIsArchivedin interfaceSlackChannelIF- Returns:
- The value of the
isArchivedattribute
-
getIsGeneral
- Specified by:
getIsGeneralin interfaceSlackChannelIF- Returns:
- The value of the
isGeneralattribute
-
getIsPrivate
- Specified by:
getIsPrivatein interfaceSlackChannelIF- Returns:
- The value of the
isPrivateattribute
-
getIsMember
- Specified by:
getIsMemberin interfaceSlackChannelIF- Returns:
- The value of the
isMemberattribute
-
getChannelType
- Specified by:
getChannelTypein interfaceSlackChannelIF- Returns:
- The computed-at-construction value of the
channelTypeattribute
-
withId
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id- Returns:
- A modified copy or the
thisobject
-
withName
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name- Returns:
- A modified copy or the
thisobject
-
withIsArchived
Copy the current immutable object by setting a present value for the optionalisArchivedattribute.- Parameters:
value- The value for isArchived,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withIsArchived
Copy the current immutable object by setting an optional value for theisArchivedattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for isArchived- Returns:
- A modified copy or
thisif not changed
-
withIsGeneral
Copy the current immutable object by setting a present value for the optionalisGeneralattribute.- Parameters:
value- The value for isGeneral,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withIsGeneral
Copy the current immutable object by setting an optional value for theisGeneralattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for isGeneral- Returns:
- A modified copy or
thisif not changed
-
withIsPrivate
Copy the current immutable object by setting a present value for the optionalisPrivateattribute.- Parameters:
value- The value for isPrivate,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withIsPrivate
Copy the current immutable object by setting an optional value for theisPrivateattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for isPrivate- Returns:
- A modified copy or
thisif not changed
-
withIsMember
Copy the current immutable object by setting a present value for the optionalisMemberattribute.- Parameters:
value- The value for isMember,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withIsMember
Copy the current immutable object by setting an optional value for theisMemberattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for isMember- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofSlackChannelthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id,name,isArchived,isGeneral,isPrivate,isMember,isShared,channelType. -
toString
Prints the immutable valueSlackChannelwith attribute values. -
copyOf
Creates an immutable copy of aSlackChannelIFvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable SlackChannel instance
-
builder
Creates a builder forSlackChannel.SlackChannel.builder() .setId(String) // requiredid.setName(String) // requiredname.setIsArchived(Optional<Boolean>) // optionalisArchived.setIsGeneral(Optional<Boolean>) // optionalisGeneral.setIsPrivate(Optional<Boolean>) // optionalisPrivate.setIsMember(Optional<Boolean>) // optionalisMember.setIsShared(Optional<Boolean>) // optionalisShared.build();- Returns:
- A new SlackChannel builder
-