Class OciCredential.Builder
java.lang.Object
co.yellowdog.platform.model.builders.ValidatedBuilder<OciCredential>
co.yellowdog.platform.account.credentials.OciCredential.Builder
- All Implemented Interfaces:
CredentialBuilder<OciCredential>
- Enclosing class:
OciCredential
public static class OciCredential.Builder
extends ValidatedBuilder<OciCredential>
implements CredentialBuilder<OciCredential>
A builder that can be used to build a new OciCredential that is automatically validated on build.
-
Method Summary
Modifier and TypeMethodDescriptionBuilds the object without enforcing validation constraints.description
(String description) fingerprint
(String fingerprint) The OCI public key fingerprint.passphrase
(String passphrase) The OCI private key passphrase.privateKey
(String privateKey) The OCI private key.privateKeyFile
(@NonNull Path privateKeyFile) Loads the OCI private key value from the specified file.The OCI tenant ID (ocid).toString()
The OCI User ID (ocid).Methods inherited from class co.yellowdog.platform.model.builders.ValidatedBuilder
build, validate
-
Method Details
-
privateKeyFile
public OciCredential.Builder privateKeyFile(@NonNull @NonNull Path privateKeyFile) throws IOException Loads the OCI private key value from the specified file.- Parameters:
privateKeyFile
- the OCI private key file- Returns:
- the builder
- Throws:
IOException
- if an exception is throw whilst reading the file
-
name
- Specified by:
name
in interfaceCredentialBuilder<OciCredential>
- Returns:
this
.
-
description
- Returns:
this
.
-
userId
The OCI User ID (ocid).- Parameters:
userId
- the OCI User ID- Returns:
this
.
-
tenantId
The OCI tenant ID (ocid).- Parameters:
tenantId
- the OCI tenant ID- Returns:
this
.
-
fingerprint
The OCI public key fingerprint.- Parameters:
fingerprint
- the OCI public key fingerprint- Returns:
this
.
-
privateKey
The OCI private key.- Parameters:
privateKey
- the OCI private key- Returns:
this
.
-
passphrase
The OCI private key passphrase.- Parameters:
passphrase
- the OCI private key passphrase- Returns:
this
.
-
buildUnchecked
Description copied from class:ValidatedBuilder
Builds the object without enforcing validation constraints. This should only be used for testing purposes- Specified by:
buildUnchecked
in interfaceCredentialBuilder<OciCredential>
- Overrides:
buildUnchecked
in classValidatedBuilder<OciCredential>
- Returns:
- the object being built
-
toString
-