Package co.cryptoservice.sdk
Record Class KmsKey
java.lang.Object
java.lang.Record
co.cryptoservice.sdk.KmsKey
- Record Components:
algorithm- key algorithmcreatedAt- creation time, ISO 8601enabled- whether the key is enabledkeyId- the provider's key identifier (local keys: local-<hex>)provider- the provider that served the request (local, aws, gcp, vault)usage- the key usage, or null forencryptcurrentVersion- current key version, when versioned, or null when absent
public record KmsKey(String algorithm, String createdAt, boolean enabled, String keyId, String provider, String usage, Integer currentVersion)
extends Record
What
POST /v2/kms/create-key answers: create a managed key in the designated KMS
provider.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thealgorithmrecord component.Returns the value of thecreatedAtrecord component.Returns the value of thecurrentVersionrecord component.booleanenabled()Returns the value of theenabledrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.keyId()Returns the value of thekeyIdrecord component.provider()Returns the value of theproviderrecord component.toString()Names the members; values that may be secret (keys, plaintexts, passwords, signatures) are redacted.usage()Returns the value of theusagerecord component.
-
Constructor Details
-
KmsKey
public KmsKey(String algorithm, String createdAt, boolean enabled, String keyId, String provider, String usage, Integer currentVersion) Creates an instance of aKmsKeyrecord class.- Parameters:
algorithm- the value for thealgorithmrecord componentcreatedAt- the value for thecreatedAtrecord componentenabled- the value for theenabledrecord componentkeyId- the value for thekeyIdrecord componentprovider- the value for theproviderrecord componentusage- the value for theusagerecord componentcurrentVersion- the value for thecurrentVersionrecord component
-
-
Method Details
-
toString
Names the members; values that may be secret (keys, plaintexts, passwords, signatures) are redacted. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
algorithm
Returns the value of thealgorithmrecord component.- Returns:
- the value of the
algorithmrecord component
-
createdAt
Returns the value of thecreatedAtrecord component.- Returns:
- the value of the
createdAtrecord component
-
enabled
public boolean enabled()Returns the value of theenabledrecord component.- Returns:
- the value of the
enabledrecord component
-
keyId
Returns the value of thekeyIdrecord component.- Returns:
- the value of the
keyIdrecord component
-
provider
Returns the value of theproviderrecord component.- Returns:
- the value of the
providerrecord component
-
usage
Returns the value of theusagerecord component.- Returns:
- the value of the
usagerecord component
-
currentVersion
Returns the value of thecurrentVersionrecord component.- Returns:
- the value of the
currentVersionrecord component
-