@NotThreadSafe public static final class ImmutableOAuth2Credentials.Builder extends Object
ImmutableOAuth2Credentials.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
| Modifier and Type | Method and Description |
|---|---|
ImmutableOAuth2Credentials.Builder |
accessToken(String accessToken)
Initializes the value for the
accessToken attribute. |
ImmutableOAuth2Credentials |
build()
Builds a new
ImmutableOAuth2Credentials. |
ImmutableOAuth2Credentials.Builder |
from(OAuth2Credentials instance)
Fill a builder with attribute values from the provided
OAuth2Credentials instance. |
ImmutableOAuth2Credentials.Builder |
refreshToken(String refreshToken)
Initializes the value for the
refreshToken attribute. |
public final ImmutableOAuth2Credentials.Builder from(OAuth2Credentials instance)
OAuth2Credentials instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ImmutableOAuth2Credentials.Builder accessToken(String accessToken)
accessToken attribute.accessToken - The value for accessTokenthis builder for use in a chained invocationpublic final ImmutableOAuth2Credentials.Builder refreshToken(@Nullable String refreshToken)
refreshToken attribute.refreshToken - The value for refreshToken (can be null)this builder for use in a chained invocationpublic ImmutableOAuth2Credentials build()
ImmutableOAuth2Credentials.IllegalStateException - if any required attributes are missingCopyright © 2021–2022 Amazon Web Services. All rights reserved.