Package co.cryptoservice.sdk
Record Class KmsGenerateDataKeyRequest
java.lang.Object
java.lang.Record
co.cryptoservice.sdk.KmsGenerateDataKeyRequest
- Record Components:
keyId- the server-held key's identifierkeySpec- the data-key specification, or null for the defaultprovider- the KMS provider, or null for the default
public record KmsGenerateDataKeyRequest(String keyId, String keySpec, String provider)
extends Record
The body of
POST /v2/kms/generate-data-key.-
Constructor Summary
ConstructorsConstructorDescriptionKmsGenerateDataKeyRequest(String keyId, String keySpec, String provider) Checks that every required member is present. -
Method Summary
Modifier and TypeMethodDescriptionfinal 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.keySpec()Returns the value of thekeySpecrecord component.static KmsGenerateDataKeyRequestA request with only the required members; the optional ones are null.provider()Returns the value of theproviderrecord component.toString()Names the members; values that may be secret (keys, plaintexts, passwords, signatures) are redacted.withKeySpec(String keySpec) A copy withkeySpecreplaced.withProvider(String provider) A copy withproviderreplaced.
-
Constructor Details
-
KmsGenerateDataKeyRequest
Checks that every required member is present.- Throws:
NullPointerException- when a required member is null
-
-
Method Details
-
of
A request with only the required members; the optional ones are null.- Parameters:
keyId- the server-held key's identifier- Returns:
- the request
-
withKeySpec
A copy withkeySpecreplaced.- Parameters:
keySpec- the data-key specification, or null for the default- Returns:
- the new request
-
withProvider
A copy withproviderreplaced.- Parameters:
provider- the KMS provider, or null for the default- 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). -
keyId
Returns the value of thekeyIdrecord component.- Returns:
- the value of the
keyIdrecord component
-
keySpec
Returns the value of thekeySpecrecord component.- Returns:
- the value of the
keySpecrecord component
-
provider
Returns the value of theproviderrecord component.- Returns:
- the value of the
providerrecord component
-