Package co.cryptoservice.sdk
Record Class KmsCreateKeyRequest
java.lang.Object
java.lang.Record
co.cryptoservice.sdk.KmsCreateKeyRequest
- Record Components:
provider- the KMS provider, or null for the defaultalgorithm- the algorithmusage- the key usage, or null forencryptmetadata- the key metadata, or null
public record KmsCreateKeyRequest(String provider, String algorithm, KmsKeyUsage usage, Map<String,String> metadata)
extends Record
The body of
POST /v2/kms/create-key.-
Constructor Summary
ConstructorsConstructorDescriptionKmsCreateKeyRequest(String provider, String algorithm, KmsKeyUsage usage, Map<String, String> metadata) Creates an instance of aKmsCreateKeyRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thealgorithmrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.metadata()Returns the value of themetadatarecord 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.withAlgorithm(String algorithm) A copy withalgorithmreplaced.withMetadata(Map<String, String> metadata) A copy withmetadatareplaced.withProvider(String provider) A copy withproviderreplaced.withUsage(KmsKeyUsage usage) A copy withusagereplaced.
-
Constructor Details
-
Method Details
-
withProvider
A copy withproviderreplaced.- Parameters:
provider- the KMS provider, or null for the default- Returns:
- the new request
-
withAlgorithm
A copy withalgorithmreplaced.- Parameters:
algorithm- the algorithm- Returns:
- the new request
-
withUsage
A copy withusagereplaced.- Parameters:
usage- the key usage, or null forencrypt- Returns:
- the new request
-
withMetadata
A copy withmetadatareplaced.- Parameters:
metadata- the key metadata, or null- Returns:
- the new request
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
provider
Returns the value of theproviderrecord component.- Returns:
- the value of the
providerrecord component
-
algorithm
Returns the value of thealgorithmrecord component.- Returns:
- the value of the
algorithmrecord component
-
usage
Returns the value of theusagerecord component.- Returns:
- the value of the
usagerecord component
-
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-