Class KeyVersion.Builder
- java.lang.Object
-
- com.oracle.bmc.keymanagement.model.KeyVersion.Builder
-
- Enclosing class:
- KeyVersion
public static class KeyVersion.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KeyVersion
build()
KeyVersion.Builder
compartmentId(String compartmentId)
The OCID of the compartment that contains this key version.KeyVersion.Builder
copy(KeyVersion model)
KeyVersion.Builder
externalKeyReferenceDetails(ExternalKeyReferenceDetails externalKeyReferenceDetails)
KeyVersion.Builder
id(String id)
The OCID of the key version.KeyVersion.Builder
isAutoRotated(Boolean isAutoRotated)
A Boolean Value indicating whether this keyversion is generated from auto rotation of keyKeyVersion.Builder
isPrimary(Boolean isPrimary)
A Boolean value that indicates whether the KeyVersion belongs to primary Vault or replica Vault.KeyVersion.Builder
keyId(String keyId)
The OCID of the key associated with this key version.KeyVersion.Builder
lifecycleState(KeyVersion.LifecycleState lifecycleState)
The key version’s current lifecycle state.KeyVersion.Builder
origin(KeyVersion.Origin origin)
The source of the key material.KeyVersion.Builder
publicKey(String publicKey)
The public key in PEM format.KeyVersion.Builder
replicaDetails(KeyVersionReplicaDetails replicaDetails)
KeyVersion.Builder
restoredFromKeyVersionId(String restoredFromKeyVersionId)
The OCID of the key version from which this key version was restored.KeyVersion.Builder
timeCreated(Date timeCreated)
The date and time this key version was created, expressed in RFC 3339 timestamp format.KeyVersion.Builder
timeOfDeletion(Date timeOfDeletion)
An optional property indicating when to delete the key version, expressed in RFC 3339 timestamp format.KeyVersion.Builder
vaultId(String vaultId)
The OCID of the vault that contains this key version.
-
-
-
Method Detail
-
compartmentId
public KeyVersion.Builder compartmentId(String compartmentId)
The OCID of the compartment that contains this key version.- Parameters:
compartmentId
- the value to set- Returns:
- this builder
-
id
public KeyVersion.Builder id(String id)
The OCID of the key version.- Parameters:
id
- the value to set- Returns:
- this builder
-
keyId
public KeyVersion.Builder keyId(String keyId)
The OCID of the key associated with this key version.- Parameters:
keyId
- the value to set- Returns:
- this builder
-
publicKey
public KeyVersion.Builder publicKey(String publicKey)
The public key in PEM format.(This value pertains only to RSA and ECDSA keys.)
- Parameters:
publicKey
- the value to set- Returns:
- this builder
-
lifecycleState
public KeyVersion.Builder lifecycleState(KeyVersion.LifecycleState lifecycleState)
The key version’s current lifecycle state.Example: ENABLED
- Parameters:
lifecycleState
- the value to set- Returns:
- this builder
-
origin
public KeyVersion.Builder origin(KeyVersion.Origin origin)
The source of the key material.When this value is INTERNAL, Key Management created the key material. When this value is EXTERNAL, the key material was imported from an external source.
- Parameters:
origin
- the value to set- Returns:
- this builder
-
timeCreated
public KeyVersion.Builder timeCreated(Date timeCreated)
The date and time this key version was created, expressed in RFC 3339 timestamp format.Example: "2018-04-03T21:10:29.600Z"
- Parameters:
timeCreated
- the value to set- Returns:
- this builder
-
timeOfDeletion
public KeyVersion.Builder timeOfDeletion(Date timeOfDeletion)
An optional property indicating when to delete the key version, expressed in RFC 3339 timestamp format.Example: 2019-04-03T21:10:29.600Z
- Parameters:
timeOfDeletion
- the value to set- Returns:
- this builder
-
vaultId
public KeyVersion.Builder vaultId(String vaultId)
The OCID of the vault that contains this key version.- Parameters:
vaultId
- the value to set- Returns:
- this builder
-
restoredFromKeyVersionId
public KeyVersion.Builder restoredFromKeyVersionId(String restoredFromKeyVersionId)
The OCID of the key version from which this key version was restored.- Parameters:
restoredFromKeyVersionId
- the value to set- Returns:
- this builder
-
replicaDetails
public KeyVersion.Builder replicaDetails(KeyVersionReplicaDetails replicaDetails)
-
isPrimary
public KeyVersion.Builder isPrimary(Boolean isPrimary)
A Boolean value that indicates whether the KeyVersion belongs to primary Vault or replica Vault.- Parameters:
isPrimary
- the value to set- Returns:
- this builder
-
externalKeyReferenceDetails
public KeyVersion.Builder externalKeyReferenceDetails(ExternalKeyReferenceDetails externalKeyReferenceDetails)
-
isAutoRotated
public KeyVersion.Builder isAutoRotated(Boolean isAutoRotated)
A Boolean Value indicating whether this keyversion is generated from auto rotation of key- Parameters:
isAutoRotated
- the value to set- Returns:
- this builder
-
build
public KeyVersion build()
-
copy
public KeyVersion.Builder copy(KeyVersion model)
-
-