@NotThreadSafe public static final class ImmutableBasicAuthCredentials.Builder extends Object
ImmutableBasicAuthCredentials.
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 |
|---|---|
ImmutableBasicAuthCredentials |
build()
Builds a new
ImmutableBasicAuthCredentials. |
ImmutableBasicAuthCredentials.Builder |
from(BasicAuthCredentials instance)
Fill a builder with attribute values from the provided
BasicAuthCredentials instance. |
ImmutableBasicAuthCredentials.Builder |
password(String password)
Initializes the value for the
password attribute. |
ImmutableBasicAuthCredentials.Builder |
userName(String userName)
Initializes the value for the
userName attribute. |
public final ImmutableBasicAuthCredentials.Builder from(BasicAuthCredentials instance)
BasicAuthCredentials 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 ImmutableBasicAuthCredentials.Builder userName(String userName)
userName attribute.userName - The value for userNamethis builder for use in a chained invocationpublic final ImmutableBasicAuthCredentials.Builder password(String password)
password attribute.password - The value for passwordthis builder for use in a chained invocationpublic ImmutableBasicAuthCredentials build()
ImmutableBasicAuthCredentials.IllegalStateException - if any required attributes are missingCopyright © 2021–2022 Amazon Web Services. All rights reserved.