Class ImmutableDockerCredentials.Builder
- java.lang.Object
-
- com.sap.cloudfoundry.client.facade.domain.ImmutableDockerCredentials.Builder
-
- Enclosing class:
- ImmutableDockerCredentials
public static final class ImmutableDockerCredentials.Builder extends Object
Builds instances of typeImmutableDockerCredentials. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableDockerCredentialsbuild()Builds a newImmutableDockerCredentials.ImmutableDockerCredentials.Builderfrom(DockerCredentials instance)Fill a builder with attribute values from the providedDockerCredentialsinstance.ImmutableDockerCredentials.Builderpassword(String password)Initializes the value for thepasswordattribute.ImmutableDockerCredentials.Builderusername(String username)Initializes the value for theusernameattribute.
-
-
-
Method Detail
-
from
public final ImmutableDockerCredentials.Builder from(DockerCredentials instance)
Fill a builder with attribute values from the providedDockerCredentialsinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
username
public final ImmutableDockerCredentials.Builder username(String username)
Initializes the value for theusernameattribute.- Parameters:
username- The value for username- Returns:
thisbuilder for use in a chained invocation
-
password
public final ImmutableDockerCredentials.Builder password(String password)
Initializes the value for thepasswordattribute.- Parameters:
password- The value for password- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableDockerCredentials build()
Builds a newImmutableDockerCredentials.- Returns:
- An immutable instance of DockerCredentials
- Throws:
IllegalStateException- if any required attributes are missing
-
-