Class OAuthCredentials
java.lang.Object
com.hubspot.slack.client.models.auth.OAuthCredentials
- All Implemented Interfaces:
OAuthCredentialsIF
@Generated(from="OAuthCredentialsIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class OAuthCredentials
extends Object
implements OAuthCredentialsIF
Immutable implementation of
OAuthCredentialsIF.
Use the builder to create immutable instances:
OAuthCredentials.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic OAuthCredentials.Builderbuilder()Creates a builder forOAuthCredentials.static OAuthCredentialscopyOf(OAuthCredentialsIF instance) Creates an immutable copy of aOAuthCredentialsIFvalue.booleanThis instance is equal to all instances ofOAuthCredentialsthat have equal attribute values.getBot()getScope()inthashCode()Computes a hash code from attributes:accessToken,teamName,teamId,scope,userId,bot,incomingWebhook.toString()Prints the immutable valueOAuthCredentialswith attribute values.final OAuthCredentialswithAccessToken(String value) Copy the current immutable object by setting a value for theaccessTokenattribute.final OAuthCredentialswithBot(BotCredentials value) Copy the current immutable object by setting a present value for the optionalbotattribute.final OAuthCredentialswithBot(Optional<? extends BotCredentials> optional) Copy the current immutable object by setting an optional value for thebotattribute.final OAuthCredentialsCopy the current immutable object by setting a present value for the optionalincomingWebhookattribute.final OAuthCredentialswithIncomingWebhook(Optional<? extends IncomingWebhook> optional) Copy the current immutable object by setting an optional value for theincomingWebhookattribute.final OAuthCredentialsCopy the current immutable object by setting a present value for the optionalscopeattribute.final OAuthCredentialsCopy the current immutable object by setting an optional value for thescopeattribute.final OAuthCredentialswithTeamId(String value) Copy the current immutable object by setting a value for theteamIdattribute.final OAuthCredentialswithTeamName(String value) Copy the current immutable object by setting a value for theteamNameattribute.final OAuthCredentialswithUserId(String value) Copy the current immutable object by setting a present value for the optionaluserIdattribute.final OAuthCredentialswithUserId(Optional<String> optional) Copy the current immutable object by setting an optional value for theuserIdattribute.
-
Method Details
-
getAccessToken
- Specified by:
getAccessTokenin interfaceOAuthCredentialsIF- Returns:
- The value of the
accessTokenattribute
-
getTeamName
- Specified by:
getTeamNamein interfaceOAuthCredentialsIF- Returns:
- The value of the
teamNameattribute
-
getTeamId
- Specified by:
getTeamIdin interfaceOAuthCredentialsIF- Returns:
- The value of the
teamIdattribute
-
getScope
- Specified by:
getScopein interfaceOAuthCredentialsIF- Returns:
- The value of the
scopeattribute
-
getUserId
- Specified by:
getUserIdin interfaceOAuthCredentialsIF- Returns:
- The value of the
userIdattribute
-
getBot
- Specified by:
getBotin interfaceOAuthCredentialsIF- Returns:
- The value of the
botattribute
-
getIncomingWebhook
- Specified by:
getIncomingWebhookin interfaceOAuthCredentialsIF- Returns:
- The value of the
incomingWebhookattribute
-
withAccessToken
Copy the current immutable object by setting a value for theaccessTokenattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for accessToken- Returns:
- A modified copy or the
thisobject
-
withTeamName
Copy the current immutable object by setting a value for theteamNameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for teamName- Returns:
- A modified copy or the
thisobject
-
withTeamId
Copy the current immutable object by setting a value for theteamIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for teamId- 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
-
withUserId
Copy the current immutable object by setting a present value for the optionaluserIdattribute.- Parameters:
value- The value for userId,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withUserId
Copy the current immutable object by setting an optional value for theuserIdattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for userId- Returns:
- A modified copy or
thisif not changed
-
withBot
Copy the current immutable object by setting a present value for the optionalbotattribute.- Parameters:
value- The value for bot,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withBot
Copy the current immutable object by setting an optional value for thebotattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for bot- Returns:
- A modified copy or
thisif not changed
-
withIncomingWebhook
Copy the current immutable object by setting a present value for the optionalincomingWebhookattribute.- Parameters:
value- The value for incomingWebhook,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withIncomingWebhook
Copy the current immutable object by setting an optional value for theincomingWebhookattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for incomingWebhook- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofOAuthCredentialsthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:accessToken,teamName,teamId,scope,userId,bot,incomingWebhook. -
toString
Prints the immutable valueOAuthCredentialswith attribute values. -
copyOf
Creates an immutable copy of aOAuthCredentialsIFvalue. 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 OAuthCredentials instance
-
builder
Creates a builder forOAuthCredentials.OAuthCredentials.builder() .setAccessToken(String) // requiredaccessToken.setTeamName(String) // requiredteamName.setTeamId(String) // requiredteamId.setScope(Optional<String>) // optionalscope.setUserId(Optional<String>) // optionaluserId.setBot(Optional<BotCredentials>) // optionalbot.setIncomingWebhook(Optional<IncomingWebhook>) // optionalincomingWebhook.build();- Returns:
- A new OAuthCredentials builder
-