@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableOAuth2Credentials extends Object implements OAuth2Credentials
OAuth2Credentials.
Use the builder to create immutable instances:
ImmutableOAuth2Credentials.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableOAuth2Credentials.Builder
Builds instances of type
ImmutableOAuth2Credentials. |
| Modifier and Type | Method and Description |
|---|---|
String |
accessToken()
Access Token.
|
static ImmutableOAuth2Credentials.Builder |
builder()
Creates a builder for
ImmutableOAuth2Credentials. |
static ImmutableOAuth2Credentials |
copyOf(OAuth2Credentials instance)
Creates an immutable copy of a
OAuth2Credentials value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableOAuth2Credentials that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
accessToken, refreshToken. |
String |
refreshToken()
Refresh Token.
|
String |
toString()
Prints the immutable value
OAuth2Credentials with attribute values. |
ImmutableOAuth2Credentials |
withAccessToken(String value)
Copy the current immutable object by setting a value for the
accessToken attribute. |
ImmutableOAuth2Credentials |
withRefreshToken(String value)
Copy the current immutable object by setting a value for the
refreshToken attribute. |
public String accessToken()
accessToken in interface OAuth2Credentials@Nullable public String refreshToken()
refreshToken in interface OAuth2Credentialspublic final ImmutableOAuth2Credentials withAccessToken(String value)
accessToken attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for accessTokenthis objectpublic final ImmutableOAuth2Credentials withRefreshToken(@Nullable String value)
refreshToken attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for refreshToken (can be null)this objectpublic boolean equals(@Nullable Object another)
ImmutableOAuth2Credentials that have equal attribute values.public int hashCode()
accessToken, refreshToken.public String toString()
OAuth2Credentials with attribute values.public static ImmutableOAuth2Credentials copyOf(OAuth2Credentials instance)
OAuth2Credentials 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 ImmutableOAuth2Credentials.Builder builder()
ImmutableOAuth2Credentials.
ImmutableOAuth2Credentials.builder()
.accessToken(String) // required accessToken
.refreshToken(String | null) // nullable refreshToken
.build();
Copyright © 2021–2022 Amazon Web Services. All rights reserved.