Class OAuthV2Credentials
java.lang.Object
com.hubspot.slack.client.models.auth.OAuthV2CredentialsIF
com.hubspot.slack.client.models.auth.OAuthV2Credentials
@Generated(from="OAuthV2CredentialsIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class OAuthV2Credentials
extends OAuthV2CredentialsIF
Immutable implementation of
OAuthV2CredentialsIF.
Use the builder to create immutable instances:
OAuthV2Credentials.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic OAuthV2Credentials.Builderbuilder()Creates a builder forOAuthV2Credentials.static OAuthV2CredentialscopyOf(OAuthV2CredentialsIF instance) Creates an immutable copy of aOAuthV2CredentialsIFvalue.booleanThis instance is equal to all instances ofOAuthV2Credentialsthat have equal attribute values.getScope()getTeam()inthashCode()Computes a hash code from attributes:botAccessToken,team,scope,authedUser,botUserId.toString()Prints the immutable valueOAuthV2Credentialswith attribute values.final OAuthV2CredentialswithAuthedUser(SlackUserLite value) Copy the current immutable object by setting a value for theauthedUserattribute.final OAuthV2CredentialswithBotAccessToken(String value) Copy the current immutable object by setting a value for thebotAccessTokenattribute.final OAuthV2CredentialswithBotUserId(String value) Copy the current immutable object by setting a value for thebotUserIdattribute.final OAuthV2CredentialsCopy the current immutable object by setting a present value for the optionalscopeattribute.final OAuthV2CredentialsCopy the current immutable object by setting an optional value for thescopeattribute.final OAuthV2CredentialswithTeam(SlackTeamLite value) Copy the current immutable object by setting a value for theteamattribute.Methods inherited from class com.hubspot.slack.client.models.auth.OAuthV2CredentialsIF
getTeamId, getTeamName, getUserAccessToken, getUserId
-
Method Details
-
getBotAccessToken
- Specified by:
getBotAccessTokenin classOAuthV2CredentialsIF- Returns:
- The value of the
botAccessTokenattribute
-
getTeam
- Specified by:
getTeamin classOAuthV2CredentialsIF- Returns:
- The value of the
teamattribute
-
getScope
- Specified by:
getScopein classOAuthV2CredentialsIF- Returns:
- The value of the
scopeattribute
-
getAuthedUser
- Specified by:
getAuthedUserin classOAuthV2CredentialsIF- Returns:
- The value of the
authedUserattribute
-
getBotUserId
- Specified by:
getBotUserIdin classOAuthV2CredentialsIF- Returns:
- The value of the
botUserIdattribute
-
withBotAccessToken
Copy the current immutable object by setting a value for thebotAccessTokenattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for botAccessToken- Returns:
- A modified copy or the
thisobject
-
withTeam
Copy the current immutable object by setting a value for theteamattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for team- Returns:
- A modified copy or the
thisobject
-
withScope
Copy the current immutable object by setting a present value for the optionalscopeattribute.- Parameters:
value- The value for scope,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withScope
Copy the current immutable object by setting an optional value for thescopeattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for scope- Returns:
- A modified copy or
thisif not changed
-
withAuthedUser
Copy the current immutable object by setting a value for theauthedUserattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for authedUser- Returns:
- A modified copy or the
thisobject
-
withBotUserId
Copy the current immutable object by setting a value for thebotUserIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for botUserId- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofOAuthV2Credentialsthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:botAccessToken,team,scope,authedUser,botUserId. -
toString
Prints the immutable valueOAuthV2Credentialswith attribute values. -
copyOf
Creates an immutable copy of aOAuthV2CredentialsIFvalue. 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 OAuthV2Credentials instance
-
builder
Creates a builder forOAuthV2Credentials.OAuthV2Credentials.builder() .setBotAccessToken(String) // requiredbotAccessToken.setTeam(com.hubspot.slack.client.models.teams.SlackTeamLite) // requiredteam.setScope(Optional<String>) // optionalscope.setAuthedUser(com.hubspot.slack.client.models.users.SlackUserLite) // requiredauthedUser.setBotUserId(String) // requiredbotUserId.build();- Returns:
- A new OAuthV2Credentials builder
-