Class CryptoKey.Builder (3.59.0)

public static final class CryptoKey.Builder extends GeneratedMessageV3.Builder<CryptoKey.Builder> implements CryptoKeyOrBuilder

This is a data encryption key (DEK) (as opposed to a key encryption key (KEK) stored by Cloud Key Management Service (Cloud KMS). When using Cloud KMS to wrap or unwrap a DEK, be sure to set an appropriate IAM policy on the KEK to ensure an attacker cannot unwrap the DEK.

Protobuf type google.privacy.dlp.v2.CryptoKey

Implements

CryptoKeyOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public CryptoKey.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CryptoKey.Builder
Overrides

build()

public CryptoKey build()
Returns
Type Description
CryptoKey

buildPartial()

public CryptoKey buildPartial()
Returns
Type Description
CryptoKey

clear()

public CryptoKey.Builder clear()
Returns
Type Description
CryptoKey.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public CryptoKey.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
CryptoKey.Builder
Overrides

clearKmsWrapped()

public CryptoKey.Builder clearKmsWrapped()

Key wrapped using Cloud KMS

.google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3;

Returns
Type Description
CryptoKey.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public CryptoKey.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
CryptoKey.Builder
Overrides

clearSource()

public CryptoKey.Builder clearSource()
Returns
Type Description
CryptoKey.Builder

clearTransient()

public CryptoKey.Builder clearTransient()

Transient crypto key

.google.privacy.dlp.v2.TransientCryptoKey transient = 1;

Returns
Type Description
CryptoKey.Builder

clearUnwrapped()

public CryptoKey.Builder clearUnwrapped()

Unwrapped crypto key

.google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2;

Returns
Type Description
CryptoKey.Builder

clone()

public CryptoKey.Builder clone()
Returns
Type Description
CryptoKey.Builder
Overrides

getDefaultInstanceForType()

public CryptoKey getDefaultInstanceForType()
Returns
Type Description
CryptoKey

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getKmsWrapped()

public KmsWrappedCryptoKey getKmsWrapped()

Key wrapped using Cloud KMS

.google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3;

Returns
Type Description
KmsWrappedCryptoKey

The kmsWrapped.

getKmsWrappedBuilder()

public KmsWrappedCryptoKey.Builder getKmsWrappedBuilder()

Key wrapped using Cloud KMS

.google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3;

Returns
Type Description
KmsWrappedCryptoKey.Builder

getKmsWrappedOrBuilder()

public KmsWrappedCryptoKeyOrBuilder getKmsWrappedOrBuilder()

Key wrapped using Cloud KMS

.google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3;

Returns
Type Description
KmsWrappedCryptoKeyOrBuilder

getSourceCase()

public CryptoKey.SourceCase getSourceCase()
Returns
Type Description
CryptoKey.SourceCase

getTransient()

public TransientCryptoKey getTransient()

Transient crypto key

.google.privacy.dlp.v2.TransientCryptoKey transient = 1;

Returns
Type Description
TransientCryptoKey

The transient.

getTransientBuilder()

public TransientCryptoKey.Builder getTransientBuilder()

Transient crypto key

.google.privacy.dlp.v2.TransientCryptoKey transient = 1;

Returns
Type Description
TransientCryptoKey.Builder

getTransientOrBuilder()

public TransientCryptoKeyOrBuilder getTransientOrBuilder()

Transient crypto key

.google.privacy.dlp.v2.TransientCryptoKey transient = 1;

Returns
Type Description
TransientCryptoKeyOrBuilder

getUnwrapped()

public UnwrappedCryptoKey getUnwrapped()

Unwrapped crypto key

.google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2;

Returns
Type Description
UnwrappedCryptoKey

The unwrapped.

getUnwrappedBuilder()

public UnwrappedCryptoKey.Builder getUnwrappedBuilder()

Unwrapped crypto key

.google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2;

Returns
Type Description
UnwrappedCryptoKey.Builder

getUnwrappedOrBuilder()

public UnwrappedCryptoKeyOrBuilder getUnwrappedOrBuilder()

Unwrapped crypto key

.google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2;

Returns
Type Description
UnwrappedCryptoKeyOrBuilder

hasKmsWrapped()

public boolean hasKmsWrapped()

Key wrapped using Cloud KMS

.google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3;

Returns
Type Description
boolean

Whether the kmsWrapped field is set.

hasTransient()

public boolean hasTransient()

Transient crypto key

.google.privacy.dlp.v2.TransientCryptoKey transient = 1;

Returns
Type Description
boolean

Whether the transient field is set.

hasUnwrapped()

public boolean hasUnwrapped()

Unwrapped crypto key

.google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2;

Returns
Type Description
boolean

Whether the unwrapped field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CryptoKey other)

public CryptoKey.Builder mergeFrom(CryptoKey other)
Parameter
Name Description
other CryptoKey
Returns
Type Description
CryptoKey.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CryptoKey.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CryptoKey.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public CryptoKey.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
CryptoKey.Builder
Overrides

mergeKmsWrapped(KmsWrappedCryptoKey value)

public CryptoKey.Builder mergeKmsWrapped(KmsWrappedCryptoKey value)

Key wrapped using Cloud KMS

.google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3;

Parameter
Name Description
value KmsWrappedCryptoKey
Returns
Type Description
CryptoKey.Builder

mergeTransient(TransientCryptoKey value)

public CryptoKey.Builder mergeTransient(TransientCryptoKey value)

Transient crypto key

.google.privacy.dlp.v2.TransientCryptoKey transient = 1;

Parameter
Name Description
value TransientCryptoKey
Returns
Type Description
CryptoKey.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CryptoKey.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CryptoKey.Builder
Overrides

mergeUnwrapped(UnwrappedCryptoKey value)

public CryptoKey.Builder mergeUnwrapped(UnwrappedCryptoKey value)

Unwrapped crypto key

.google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2;

Parameter
Name Description
value UnwrappedCryptoKey
Returns
Type Description
CryptoKey.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public CryptoKey.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CryptoKey.Builder
Overrides

setKmsWrapped(KmsWrappedCryptoKey value)

public CryptoKey.Builder setKmsWrapped(KmsWrappedCryptoKey value)

Key wrapped using Cloud KMS

.google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3;

Parameter
Name Description
value KmsWrappedCryptoKey
Returns
Type Description
CryptoKey.Builder

setKmsWrapped(KmsWrappedCryptoKey.Builder builderForValue)

public CryptoKey.Builder setKmsWrapped(KmsWrappedCryptoKey.Builder builderForValue)

Key wrapped using Cloud KMS

.google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3;

Parameter
Name Description
builderForValue KmsWrappedCryptoKey.Builder
Returns
Type Description
CryptoKey.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public CryptoKey.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
CryptoKey.Builder
Overrides

setTransient(TransientCryptoKey value)

public CryptoKey.Builder setTransient(TransientCryptoKey value)

Transient crypto key

.google.privacy.dlp.v2.TransientCryptoKey transient = 1;

Parameter
Name Description
value TransientCryptoKey
Returns
Type Description
CryptoKey.Builder

setTransient(TransientCryptoKey.Builder builderForValue)

public CryptoKey.Builder setTransient(TransientCryptoKey.Builder builderForValue)

Transient crypto key

.google.privacy.dlp.v2.TransientCryptoKey transient = 1;

Parameter
Name Description
builderForValue TransientCryptoKey.Builder
Returns
Type Description
CryptoKey.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final CryptoKey.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CryptoKey.Builder
Overrides

setUnwrapped(UnwrappedCryptoKey value)

public CryptoKey.Builder setUnwrapped(UnwrappedCryptoKey value)

Unwrapped crypto key

.google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2;

Parameter
Name Description
value UnwrappedCryptoKey
Returns
Type Description
CryptoKey.Builder

setUnwrapped(UnwrappedCryptoKey.Builder builderForValue)

public CryptoKey.Builder setUnwrapped(UnwrappedCryptoKey.Builder builderForValue)

Unwrapped crypto key

.google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2;

Parameter
Name Description
builderForValue UnwrappedCryptoKey.Builder
Returns
Type Description
CryptoKey.Builder