@NotThreadSafe public static final class ImmutableApiKeyCredentials.Builder extends Object
ImmutableApiKeyCredentials.
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 |
|---|---|
ImmutableApiKeyCredentials.Builder |
apiKey(String apiKey)
Initializes the value for the
apiKey attribute. |
ImmutableApiKeyCredentials |
build()
Builds a new
ImmutableApiKeyCredentials. |
ImmutableApiKeyCredentials.Builder |
from(ApiKeyCredentials instance)
Fill a builder with attribute values from the provided
ApiKeyCredentials instance. |
ImmutableApiKeyCredentials.Builder |
secretKey(String secretKey)
Initializes the value for the
secretKey attribute. |
public final ImmutableApiKeyCredentials.Builder from(ApiKeyCredentials instance)
ApiKeyCredentials 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 ImmutableApiKeyCredentials.Builder apiKey(String apiKey)
apiKey attribute.apiKey - The value for apiKeythis builder for use in a chained invocationpublic final ImmutableApiKeyCredentials.Builder secretKey(@Nullable String secretKey)
secretKey attribute.secretKey - The value for secretKey (can be null)this builder for use in a chained invocationpublic ImmutableApiKeyCredentials build()
ImmutableApiKeyCredentials.IllegalStateException - if any required attributes are missingCopyright © 2021–2022 Amazon Web Services. All rights reserved.