@ParametersAreNonnullByDefault @Generated(value={"Immutables.generator","OAuthCredentialsIF"}) @Immutable public final class OAuthCredentials extends Object implements OAuthCredentialsIF
OAuthCredentialsIF.
Use the builder to create immutable instances:
OAuthCredentials.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
OAuthCredentials.Builder
Builds instances of type
OAuthCredentials. |
| Modifier and Type | Method and Description |
|---|---|
static OAuthCredentials.Builder |
builder()
Creates a builder for
OAuthCredentials. |
static OAuthCredentials |
copyOf(OAuthCredentialsIF instance)
Creates an immutable copy of a
OAuthCredentialsIF value. |
boolean |
equals(Object another)
This instance is equal to all instances of
OAuthCredentials that have equal attribute values. |
String |
getAccessToken() |
Optional<BotCredentials> |
getBot() |
Optional<IncomingWebhook> |
getIncomingWebhook() |
Optional<String> |
getScope() |
String |
getTeamId() |
String |
getTeamName() |
Optional<String> |
getUserId() |
int |
hashCode()
Computes a hash code from attributes:
accessToken, teamName, teamId, scope, userId, bot, incomingWebhook. |
String |
toString()
Prints the immutable value
OAuthCredentials with attribute values. |
OAuthCredentials |
withAccessToken(String accessToken)
Copy the current immutable object by setting a value for the
accessToken attribute. |
OAuthCredentials |
withBot(BotCredentials value)
Copy the current immutable object by setting a present value for the optional
bot attribute. |
OAuthCredentials |
withBot(Optional<BotCredentials> optional)
Copy the current immutable object by setting an optional value for the
bot attribute. |
OAuthCredentials |
withIncomingWebhook(IncomingWebhook value)
Copy the current immutable object by setting a present value for the optional
incomingWebhook attribute. |
OAuthCredentials |
withIncomingWebhook(Optional<IncomingWebhook> optional)
Copy the current immutable object by setting an optional value for the
incomingWebhook attribute. |
OAuthCredentials |
withScope(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
scope attribute. |
OAuthCredentials |
withScope(String value)
Copy the current immutable object by setting a present value for the optional
scope attribute. |
OAuthCredentials |
withTeamId(String teamId)
Copy the current immutable object by setting a value for the
teamId attribute. |
OAuthCredentials |
withTeamName(String teamName)
Copy the current immutable object by setting a value for the
teamName attribute. |
OAuthCredentials |
withUserId(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
userId attribute. |
OAuthCredentials |
withUserId(String value)
Copy the current immutable object by setting a present value for the optional
userId attribute. |
public String getAccessToken()
getAccessToken in interface OAuthCredentialsIFaccessToken attributepublic String getTeamName()
getTeamName in interface OAuthCredentialsIFteamName attributepublic String getTeamId()
getTeamId in interface OAuthCredentialsIFteamId attributepublic Optional<String> getScope()
getScope in interface OAuthCredentialsIFscope attributepublic Optional<String> getUserId()
getUserId in interface OAuthCredentialsIFuserId attributepublic Optional<BotCredentials> getBot()
getBot in interface OAuthCredentialsIFbot attributepublic Optional<IncomingWebhook> getIncomingWebhook()
getIncomingWebhook in interface OAuthCredentialsIFincomingWebhook attributepublic final OAuthCredentials withAccessToken(String accessToken)
accessToken attribute.
An equals check used to prevent copying of the same value by returning this.accessToken - A new value for accessTokenthis objectpublic final OAuthCredentials withTeamName(String teamName)
teamName attribute.
An equals check used to prevent copying of the same value by returning this.teamName - A new value for teamNamethis objectpublic final OAuthCredentials withTeamId(String teamId)
teamId attribute.
An equals check used to prevent copying of the same value by returning this.teamId - A new value for teamIdthis objectpublic final OAuthCredentials withScope(@Nullable String value)
scope attribute.value - The value for scope, null is accepted as java.util.Optional.empty()this objectpublic final OAuthCredentials withScope(Optional<String> optional)
scope attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for scopethis objectpublic final OAuthCredentials withUserId(@Nullable String value)
userId attribute.value - The value for userId, null is accepted as java.util.Optional.empty()this objectpublic final OAuthCredentials withUserId(Optional<String> optional)
userId attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for userIdthis objectpublic final OAuthCredentials withBot(@Nullable BotCredentials value)
bot attribute.value - The value for bot, null is accepted as java.util.Optional.empty()this objectpublic final OAuthCredentials withBot(Optional<BotCredentials> optional)
bot attribute.
A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.optional - A value for botthis objectpublic final OAuthCredentials withIncomingWebhook(@Nullable IncomingWebhook value)
incomingWebhook attribute.value - The value for incomingWebhook, null is accepted as java.util.Optional.empty()this objectpublic final OAuthCredentials withIncomingWebhook(Optional<IncomingWebhook> optional)
incomingWebhook attribute.
A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.optional - A value for incomingWebhookthis objectpublic boolean equals(@Nullable Object another)
OAuthCredentials that have equal attribute values.public int hashCode()
accessToken, teamName, teamId, scope, userId, bot, incomingWebhook.public String toString()
OAuthCredentials with attribute values.public static OAuthCredentials copyOf(OAuthCredentialsIF instance)
OAuthCredentialsIF value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static OAuthCredentials.Builder builder()
OAuthCredentials.Copyright © 2019. All rights reserved.