Class SlackUserLite
java.lang.Object
com.hubspot.slack.client.models.users.SlackUserLite
- All Implemented Interfaces:
SlackUserCore,SlackUserLiteIF
@Generated(from="SlackUserLiteIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class SlackUserLite
extends Object
implements SlackUserLiteIF
Immutable implementation of
SlackUserLiteIF.
Use the builder to create immutable instances:
SlackUserLite.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic SlackUserLite.Builderbuilder()Creates a builder forSlackUserLite.static SlackUserLitecopyOf(SlackUserLiteIF instance) Creates an immutable copy of aSlackUserLiteIFvalue.booleanThis instance is equal to all instances ofSlackUserLitethat have equal attribute values.getId()inthashCode()Computes a hash code from attributes:id,username,accessToken.toString()Prints the immutable valueSlackUserLitewith attribute values.final SlackUserLitewithAccessToken(String value) Copy the current immutable object by setting a present value for the optionalaccessTokenattribute.final SlackUserLitewithAccessToken(Optional<String> optional) Copy the current immutable object by setting an optional value for theaccessTokenattribute.final SlackUserLiteCopy the current immutable object by setting a value for theidattribute.final SlackUserLitewithUsername(String value) Copy the current immutable object by setting a present value for the optionalusernameattribute.final SlackUserLitewithUsername(Optional<String> optional) Copy the current immutable object by setting an optional value for theusernameattribute.
-
Method Details
-
getId
- Specified by:
getIdin interfaceSlackUserCore- Returns:
- The value of the
idattribute
-
getUsername
- Specified by:
getUsernamein interfaceSlackUserCore- Returns:
- The value of the
usernameattribute
-
getAccessToken
- Specified by:
getAccessTokenin interfaceSlackUserLiteIF- Returns:
- The value of the
accessTokenattribute
-
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
-
withUsername
Copy the current immutable object by setting a present value for the optionalusernameattribute.- Parameters:
value- The value for username,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withUsername
Copy the current immutable object by setting an optional value for theusernameattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for username- Returns:
- A modified copy or
thisif not changed
-
withAccessToken
Copy the current immutable object by setting a present value for the optionalaccessTokenattribute.- Parameters:
value- The value for accessToken,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withAccessToken
Copy the current immutable object by setting an optional value for theaccessTokenattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for accessToken- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofSlackUserLitethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id,username,accessToken. -
toString
Prints the immutable valueSlackUserLitewith attribute values. -
copyOf
Creates an immutable copy of aSlackUserLiteIFvalue. 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 SlackUserLite instance
-
builder
Creates a builder forSlackUserLite.SlackUserLite.builder() .setId(String) // requiredid.setUsername(Optional<String>) // optionalusername.setAccessToken(Optional<String>) // optionalaccessToken.build();- Returns:
- A new SlackUserLite builder
-