public static final class KmsWrappedCryptoKey.Builder extends GeneratedMessage.Builder<KmsWrappedCryptoKey.Builder> implements KmsWrappedCryptoKeyOrBuilderInclude to use an existing data crypto key wrapped by KMS. The wrapped key must be a 128-, 192-, or 256-bit key. Authorization requires the following IAM permissions when sending a request to perform a crypto transformation using a KMS-wrapped crypto key: dlp.kms.encrypt
For more information, see Creating a wrapped key.
Note: When you use Cloud KMS for cryptographic operations, charges apply.
Protobuf type google.privacy.dlp.v2.KmsWrappedCryptoKey
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > KmsWrappedCryptoKey.BuilderImplements
KmsWrappedCryptoKeyOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public KmsWrappedCryptoKey build()| Returns | |
|---|---|
| Type | Description |
KmsWrappedCryptoKey |
|
buildPartial()
public KmsWrappedCryptoKey buildPartial()| Returns | |
|---|---|
| Type | Description |
KmsWrappedCryptoKey |
|
clear()
public KmsWrappedCryptoKey.Builder clear()| Returns | |
|---|---|
| Type | Description |
KmsWrappedCryptoKey.Builder |
|
clearCryptoKeyName()
public KmsWrappedCryptoKey.Builder clearCryptoKeyName()Required. The resource name of the KMS CryptoKey to use for unwrapping.
string crypto_key_name = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
KmsWrappedCryptoKey.Builder |
This builder for chaining. |
clearWrappedKey()
public KmsWrappedCryptoKey.Builder clearWrappedKey()Required. The wrapped data crypto key.
bytes wrapped_key = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
KmsWrappedCryptoKey.Builder |
This builder for chaining. |
getCryptoKeyName()
public String getCryptoKeyName()Required. The resource name of the KMS CryptoKey to use for unwrapping.
string crypto_key_name = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
String |
The cryptoKeyName. |
getCryptoKeyNameBytes()
public ByteString getCryptoKeyNameBytes()Required. The resource name of the KMS CryptoKey to use for unwrapping.
string crypto_key_name = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for cryptoKeyName. |
getDefaultInstanceForType()
public KmsWrappedCryptoKey getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
KmsWrappedCryptoKey |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getWrappedKey()
public ByteString getWrappedKey()Required. The wrapped data crypto key.
bytes wrapped_key = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The wrappedKey. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(KmsWrappedCryptoKey other)
public KmsWrappedCryptoKey.Builder mergeFrom(KmsWrappedCryptoKey other)| Parameter | |
|---|---|
| Name | Description |
other |
KmsWrappedCryptoKey |
| Returns | |
|---|---|
| Type | Description |
KmsWrappedCryptoKey.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public KmsWrappedCryptoKey.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
KmsWrappedCryptoKey.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public KmsWrappedCryptoKey.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
KmsWrappedCryptoKey.Builder |
|
setCryptoKeyName(String value)
public KmsWrappedCryptoKey.Builder setCryptoKeyName(String value)Required. The resource name of the KMS CryptoKey to use for unwrapping.
string crypto_key_name = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe cryptoKeyName to set. |
| Returns | |
|---|---|
| Type | Description |
KmsWrappedCryptoKey.Builder |
This builder for chaining. |
setCryptoKeyNameBytes(ByteString value)
public KmsWrappedCryptoKey.Builder setCryptoKeyNameBytes(ByteString value)Required. The resource name of the KMS CryptoKey to use for unwrapping.
string crypto_key_name = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for cryptoKeyName to set. |
| Returns | |
|---|---|
| Type | Description |
KmsWrappedCryptoKey.Builder |
This builder for chaining. |
setWrappedKey(ByteString value)
public KmsWrappedCryptoKey.Builder setWrappedKey(ByteString value)Required. The wrapped data crypto key.
bytes wrapped_key = 1 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe wrappedKey to set. |
| Returns | |
|---|---|
| Type | Description |
KmsWrappedCryptoKey.Builder |
This builder for chaining. |