Class CryptoKey.Builder (3.28.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public CryptoKey.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
CryptoKey.Builder
Overrides

build()

public CryptoKey build()
Returns
TypeDescription
CryptoKey

buildPartial()

public CryptoKey buildPartial()
Returns
TypeDescription
CryptoKey

clear()

public CryptoKey.Builder clear()
Returns
TypeDescription
CryptoKey.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public CryptoKey.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
CryptoKey.Builder
Overrides

clearKmsWrapped()

public CryptoKey.Builder clearKmsWrapped()

Key wrapped using Cloud KMS

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

Returns
TypeDescription
CryptoKey.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public CryptoKey.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
CryptoKey.Builder
Overrides

clearSource()

public CryptoKey.Builder clearSource()
Returns
TypeDescription
CryptoKey.Builder

clearTransient()

public CryptoKey.Builder clearTransient()

Transient crypto key

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

Returns
TypeDescription
CryptoKey.Builder

clearUnwrapped()

public CryptoKey.Builder clearUnwrapped()

Unwrapped crypto key

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

Returns
TypeDescription
CryptoKey.Builder

clone()

public CryptoKey.Builder clone()
Returns
TypeDescription
CryptoKey.Builder
Overrides

getDefaultInstanceForType()

public CryptoKey getDefaultInstanceForType()
Returns
TypeDescription
CryptoKey

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getKmsWrapped()

public KmsWrappedCryptoKey getKmsWrapped()

Key wrapped using Cloud KMS

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

Returns
TypeDescription
KmsWrappedCryptoKey

The kmsWrapped.

getKmsWrappedBuilder()

public KmsWrappedCryptoKey.Builder getKmsWrappedBuilder()

Key wrapped using Cloud KMS

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

Returns
TypeDescription
KmsWrappedCryptoKey.Builder

getKmsWrappedOrBuilder()

public KmsWrappedCryptoKeyOrBuilder getKmsWrappedOrBuilder()

Key wrapped using Cloud KMS

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

Returns
TypeDescription
KmsWrappedCryptoKeyOrBuilder

getSourceCase()

public CryptoKey.SourceCase getSourceCase()
Returns
TypeDescription
CryptoKey.SourceCase

getTransient()

public TransientCryptoKey getTransient()

Transient crypto key

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

Returns
TypeDescription
TransientCryptoKey

The transient.

getTransientBuilder()

public TransientCryptoKey.Builder getTransientBuilder()

Transient crypto key

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

Returns
TypeDescription
TransientCryptoKey.Builder

getTransientOrBuilder()

public TransientCryptoKeyOrBuilder getTransientOrBuilder()

Transient crypto key

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

Returns
TypeDescription
TransientCryptoKeyOrBuilder

getUnwrapped()

public UnwrappedCryptoKey getUnwrapped()

Unwrapped crypto key

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

Returns
TypeDescription
UnwrappedCryptoKey

The unwrapped.

getUnwrappedBuilder()

public UnwrappedCryptoKey.Builder getUnwrappedBuilder()

Unwrapped crypto key

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

Returns
TypeDescription
UnwrappedCryptoKey.Builder

getUnwrappedOrBuilder()

public UnwrappedCryptoKeyOrBuilder getUnwrappedOrBuilder()

Unwrapped crypto key

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

Returns
TypeDescription
UnwrappedCryptoKeyOrBuilder

hasKmsWrapped()

public boolean hasKmsWrapped()

Key wrapped using Cloud KMS

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

Returns
TypeDescription
boolean

Whether the kmsWrapped field is set.

hasTransient()

public boolean hasTransient()

Transient crypto key

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

Returns
TypeDescription
boolean

Whether the transient field is set.

hasUnwrapped()

public boolean hasUnwrapped()

Unwrapped crypto key

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

Returns
TypeDescription
boolean

Whether the unwrapped field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CryptoKey other)

public CryptoKey.Builder mergeFrom(CryptoKey other)
Parameter
NameDescription
otherCryptoKey
Returns
TypeDescription
CryptoKey.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CryptoKey.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CryptoKey.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public CryptoKey.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueKmsWrappedCryptoKey
Returns
TypeDescription
CryptoKey.Builder

mergeTransient(TransientCryptoKey value)

public CryptoKey.Builder mergeTransient(TransientCryptoKey value)

Transient crypto key

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

Parameter
NameDescription
valueTransientCryptoKey
Returns
TypeDescription
CryptoKey.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CryptoKey.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
CryptoKey.Builder
Overrides

mergeUnwrapped(UnwrappedCryptoKey value)

public CryptoKey.Builder mergeUnwrapped(UnwrappedCryptoKey value)

Unwrapped crypto key

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

Parameter
NameDescription
valueUnwrappedCryptoKey
Returns
TypeDescription
CryptoKey.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public CryptoKey.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueKmsWrappedCryptoKey
Returns
TypeDescription
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
NameDescription
builderForValueKmsWrappedCryptoKey.Builder
Returns
TypeDescription
CryptoKey.Builder

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

public CryptoKey.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
CryptoKey.Builder
Overrides

setTransient(TransientCryptoKey value)

public CryptoKey.Builder setTransient(TransientCryptoKey value)

Transient crypto key

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

Parameter
NameDescription
valueTransientCryptoKey
Returns
TypeDescription
CryptoKey.Builder

setTransient(TransientCryptoKey.Builder builderForValue)

public CryptoKey.Builder setTransient(TransientCryptoKey.Builder builderForValue)

Transient crypto key

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

Parameter
NameDescription
builderForValueTransientCryptoKey.Builder
Returns
TypeDescription
CryptoKey.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final CryptoKey.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
CryptoKey.Builder
Overrides

setUnwrapped(UnwrappedCryptoKey value)

public CryptoKey.Builder setUnwrapped(UnwrappedCryptoKey value)

Unwrapped crypto key

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

Parameter
NameDescription
valueUnwrappedCryptoKey
Returns
TypeDescription
CryptoKey.Builder

setUnwrapped(UnwrappedCryptoKey.Builder builderForValue)

public CryptoKey.Builder setUnwrapped(UnwrappedCryptoKey.Builder builderForValue)

Unwrapped crypto key

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

Parameter
NameDescription
builderForValueUnwrappedCryptoKey.Builder
Returns
TypeDescription
CryptoKey.Builder