Class CryptoKeyVersion.Builder (2.49.0)

public static final class CryptoKeyVersion.Builder extends GeneratedMessageV3.Builder<CryptoKeyVersion.Builder> implements CryptoKeyVersionOrBuilder

A CryptoKeyVersion represents an individual cryptographic key, and the associated key material.

An ENABLED version can be used for cryptographic operations.

For security reasons, the raw cryptographic key material represented by a CryptoKeyVersion can never be viewed or exported. It can only be used to encrypt, decrypt, or sign data when an authorized user or application invokes Cloud KMS.

Protobuf type google.cloud.kms.v1.CryptoKeyVersion

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public CryptoKeyVersion build()
Returns
Type Description
CryptoKeyVersion

buildPartial()

public CryptoKeyVersion buildPartial()
Returns
Type Description
CryptoKeyVersion

clear()

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

clearAlgorithm()

public CryptoKeyVersion.Builder clearAlgorithm()

Output only. The CryptoKeyVersionAlgorithm that this CryptoKeyVersion supports.

.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
CryptoKeyVersion.Builder

This builder for chaining.

clearAttestation()

public CryptoKeyVersion.Builder clearAttestation()

Output only. Statement that was generated and signed by the HSM at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only provided for key versions with protection_level HSM.

.google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
CryptoKeyVersion.Builder

clearCreateTime()

public CryptoKeyVersion.Builder clearCreateTime()

Output only. The time at which this CryptoKeyVersion was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
CryptoKeyVersion.Builder

clearDestroyEventTime()

public CryptoKeyVersion.Builder clearDestroyEventTime()

Output only. The time this CryptoKeyVersion's key material was destroyed. Only present if state is DESTROYED.

.google.protobuf.Timestamp destroy_event_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
CryptoKeyVersion.Builder

clearDestroyTime()

public CryptoKeyVersion.Builder clearDestroyTime()

Output only. The time this CryptoKeyVersion's key material is scheduled for destruction. Only present if state is DESTROY_SCHEDULED.

.google.protobuf.Timestamp destroy_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
CryptoKeyVersion.Builder

clearExternalDestructionFailureReason()

public CryptoKeyVersion.Builder clearExternalDestructionFailureReason()

Output only. The root cause of the most recent external destruction failure. Only present if state is EXTERNAL_DESTRUCTION_FAILED.

string external_destruction_failure_reason = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
CryptoKeyVersion.Builder

This builder for chaining.

clearExternalProtectionLevelOptions()

public CryptoKeyVersion.Builder clearExternalProtectionLevelOptions()

ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level and EXTERNAL_VPC protection levels.

.google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17;

Returns
Type Description
CryptoKeyVersion.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearGenerateTime()

public CryptoKeyVersion.Builder clearGenerateTime()

Output only. The time this CryptoKeyVersion's key material was generated.

.google.protobuf.Timestamp generate_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
CryptoKeyVersion.Builder

clearGenerationFailureReason()

public CryptoKeyVersion.Builder clearGenerationFailureReason()

Output only. The root cause of the most recent generation failure. Only present if state is GENERATION_FAILED.

string generation_failure_reason = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
CryptoKeyVersion.Builder

This builder for chaining.

clearImportFailureReason()

public CryptoKeyVersion.Builder clearImportFailureReason()

Output only. The root cause of the most recent import failure. Only present if state is IMPORT_FAILED.

string import_failure_reason = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
CryptoKeyVersion.Builder

This builder for chaining.

clearImportJob()

public CryptoKeyVersion.Builder clearImportJob()

Output only. The name of the ImportJob used in the most recent import of this CryptoKeyVersion. Only present if the underlying key material was imported.

string import_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
CryptoKeyVersion.Builder

This builder for chaining.

clearImportTime()

public CryptoKeyVersion.Builder clearImportTime()

Output only. The time at which this CryptoKeyVersion's key material was most recently imported.

.google.protobuf.Timestamp import_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
CryptoKeyVersion.Builder

clearName()

public CryptoKeyVersion.Builder clearName()

Output only. The resource name for this CryptoKeyVersion in the format projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
CryptoKeyVersion.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearProtectionLevel()

public CryptoKeyVersion.Builder clearProtectionLevel()

Output only. The ProtectionLevel describing how crypto operations are performed with this CryptoKeyVersion.

.google.cloud.kms.v1.ProtectionLevel protection_level = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
CryptoKeyVersion.Builder

This builder for chaining.

clearReimportEligible()

public CryptoKeyVersion.Builder clearReimportEligible()

Output only. Whether or not this key version is eligible for reimport, by being specified as a target in ImportCryptoKeyVersionRequest.crypto_key_version.

bool reimport_eligible = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
CryptoKeyVersion.Builder

This builder for chaining.

clearState()

public CryptoKeyVersion.Builder clearState()

The current state of the CryptoKeyVersion.

.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState state = 3;

Returns
Type Description
CryptoKeyVersion.Builder

This builder for chaining.

clone()

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

getAlgorithm()

public CryptoKeyVersion.CryptoKeyVersionAlgorithm getAlgorithm()

Output only. The CryptoKeyVersionAlgorithm that this CryptoKeyVersion supports.

.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
CryptoKeyVersion.CryptoKeyVersionAlgorithm

The algorithm.

getAlgorithmValue()

public int getAlgorithmValue()

Output only. The CryptoKeyVersionAlgorithm that this CryptoKeyVersion supports.

.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for algorithm.

getAttestation()

public KeyOperationAttestation getAttestation()

Output only. Statement that was generated and signed by the HSM at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only provided for key versions with protection_level HSM.

.google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
KeyOperationAttestation

The attestation.

getAttestationBuilder()

public KeyOperationAttestation.Builder getAttestationBuilder()

Output only. Statement that was generated and signed by the HSM at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only provided for key versions with protection_level HSM.

.google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
KeyOperationAttestation.Builder

getAttestationOrBuilder()

public KeyOperationAttestationOrBuilder getAttestationOrBuilder()

Output only. Statement that was generated and signed by the HSM at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only provided for key versions with protection_level HSM.

.google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
KeyOperationAttestationOrBuilder

getCreateTime()

public Timestamp getCreateTime()

Output only. The time at which this CryptoKeyVersion was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. The time at which this CryptoKeyVersion was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The time at which this CryptoKeyVersion was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public CryptoKeyVersion getDefaultInstanceForType()
Returns
Type Description
CryptoKeyVersion

getDescriptorForType()

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

getDestroyEventTime()

public Timestamp getDestroyEventTime()

Output only. The time this CryptoKeyVersion's key material was destroyed. Only present if state is DESTROYED.

.google.protobuf.Timestamp destroy_event_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The destroyEventTime.

getDestroyEventTimeBuilder()

public Timestamp.Builder getDestroyEventTimeBuilder()

Output only. The time this CryptoKeyVersion's key material was destroyed. Only present if state is DESTROYED.

.google.protobuf.Timestamp destroy_event_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getDestroyEventTimeOrBuilder()

public TimestampOrBuilder getDestroyEventTimeOrBuilder()

Output only. The time this CryptoKeyVersion's key material was destroyed. Only present if state is DESTROYED.

.google.protobuf.Timestamp destroy_event_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDestroyTime()

public Timestamp getDestroyTime()

Output only. The time this CryptoKeyVersion's key material is scheduled for destruction. Only present if state is DESTROY_SCHEDULED.

.google.protobuf.Timestamp destroy_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The destroyTime.

getDestroyTimeBuilder()

public Timestamp.Builder getDestroyTimeBuilder()

Output only. The time this CryptoKeyVersion's key material is scheduled for destruction. Only present if state is DESTROY_SCHEDULED.

.google.protobuf.Timestamp destroy_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getDestroyTimeOrBuilder()

public TimestampOrBuilder getDestroyTimeOrBuilder()

Output only. The time this CryptoKeyVersion's key material is scheduled for destruction. Only present if state is DESTROY_SCHEDULED.

.google.protobuf.Timestamp destroy_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getExternalDestructionFailureReason()

public String getExternalDestructionFailureReason()

Output only. The root cause of the most recent external destruction failure. Only present if state is EXTERNAL_DESTRUCTION_FAILED.

string external_destruction_failure_reason = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The externalDestructionFailureReason.

getExternalDestructionFailureReasonBytes()

public ByteString getExternalDestructionFailureReasonBytes()

Output only. The root cause of the most recent external destruction failure. Only present if state is EXTERNAL_DESTRUCTION_FAILED.

string external_destruction_failure_reason = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for externalDestructionFailureReason.

getExternalProtectionLevelOptions()

public ExternalProtectionLevelOptions getExternalProtectionLevelOptions()

ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level and EXTERNAL_VPC protection levels.

.google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17;

Returns
Type Description
ExternalProtectionLevelOptions

The externalProtectionLevelOptions.

getExternalProtectionLevelOptionsBuilder()

public ExternalProtectionLevelOptions.Builder getExternalProtectionLevelOptionsBuilder()

ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level and EXTERNAL_VPC protection levels.

.google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17;

Returns
Type Description
ExternalProtectionLevelOptions.Builder

getExternalProtectionLevelOptionsOrBuilder()

public ExternalProtectionLevelOptionsOrBuilder getExternalProtectionLevelOptionsOrBuilder()

ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level and EXTERNAL_VPC protection levels.

.google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17;

Returns
Type Description
ExternalProtectionLevelOptionsOrBuilder

getGenerateTime()

public Timestamp getGenerateTime()

Output only. The time this CryptoKeyVersion's key material was generated.

.google.protobuf.Timestamp generate_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The generateTime.

getGenerateTimeBuilder()

public Timestamp.Builder getGenerateTimeBuilder()

Output only. The time this CryptoKeyVersion's key material was generated.

.google.protobuf.Timestamp generate_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getGenerateTimeOrBuilder()

public TimestampOrBuilder getGenerateTimeOrBuilder()

Output only. The time this CryptoKeyVersion's key material was generated.

.google.protobuf.Timestamp generate_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getGenerationFailureReason()

public String getGenerationFailureReason()

Output only. The root cause of the most recent generation failure. Only present if state is GENERATION_FAILED.

string generation_failure_reason = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The generationFailureReason.

getGenerationFailureReasonBytes()

public ByteString getGenerationFailureReasonBytes()

Output only. The root cause of the most recent generation failure. Only present if state is GENERATION_FAILED.

string generation_failure_reason = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for generationFailureReason.

getImportFailureReason()

public String getImportFailureReason()

Output only. The root cause of the most recent import failure. Only present if state is IMPORT_FAILED.

string import_failure_reason = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The importFailureReason.

getImportFailureReasonBytes()

public ByteString getImportFailureReasonBytes()

Output only. The root cause of the most recent import failure. Only present if state is IMPORT_FAILED.

string import_failure_reason = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for importFailureReason.

getImportJob()

public String getImportJob()

Output only. The name of the ImportJob used in the most recent import of this CryptoKeyVersion. Only present if the underlying key material was imported.

string import_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The importJob.

getImportJobBytes()

public ByteString getImportJobBytes()

Output only. The name of the ImportJob used in the most recent import of this CryptoKeyVersion. Only present if the underlying key material was imported.

string import_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for importJob.

getImportTime()

public Timestamp getImportTime()

Output only. The time at which this CryptoKeyVersion's key material was most recently imported.

.google.protobuf.Timestamp import_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The importTime.

getImportTimeBuilder()

public Timestamp.Builder getImportTimeBuilder()

Output only. The time at which this CryptoKeyVersion's key material was most recently imported.

.google.protobuf.Timestamp import_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getImportTimeOrBuilder()

public TimestampOrBuilder getImportTimeOrBuilder()

Output only. The time at which this CryptoKeyVersion's key material was most recently imported.

.google.protobuf.Timestamp import_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getName()

public String getName()

Output only. The resource name for this CryptoKeyVersion in the format projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. The resource name for this CryptoKeyVersion in the format projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for name.

getProtectionLevel()

public ProtectionLevel getProtectionLevel()

Output only. The ProtectionLevel describing how crypto operations are performed with this CryptoKeyVersion.

.google.cloud.kms.v1.ProtectionLevel protection_level = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ProtectionLevel

The protectionLevel.

getProtectionLevelValue()

public int getProtectionLevelValue()

Output only. The ProtectionLevel describing how crypto operations are performed with this CryptoKeyVersion.

.google.cloud.kms.v1.ProtectionLevel protection_level = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for protectionLevel.

getReimportEligible()

public boolean getReimportEligible()

Output only. Whether or not this key version is eligible for reimport, by being specified as a target in ImportCryptoKeyVersionRequest.crypto_key_version.

bool reimport_eligible = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

The reimportEligible.

getState()

public CryptoKeyVersion.CryptoKeyVersionState getState()

The current state of the CryptoKeyVersion.

.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState state = 3;

Returns
Type Description
CryptoKeyVersion.CryptoKeyVersionState

The state.

getStateValue()

public int getStateValue()

The current state of the CryptoKeyVersion.

.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState state = 3;

Returns
Type Description
int

The enum numeric value on the wire for state.

hasAttestation()

public boolean hasAttestation()

Output only. Statement that was generated and signed by the HSM at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only provided for key versions with protection_level HSM.

.google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the attestation field is set.

hasCreateTime()

public boolean hasCreateTime()

Output only. The time at which this CryptoKeyVersion was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasDestroyEventTime()

public boolean hasDestroyEventTime()

Output only. The time this CryptoKeyVersion's key material was destroyed. Only present if state is DESTROYED.

.google.protobuf.Timestamp destroy_event_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the destroyEventTime field is set.

hasDestroyTime()

public boolean hasDestroyTime()

Output only. The time this CryptoKeyVersion's key material is scheduled for destruction. Only present if state is DESTROY_SCHEDULED.

.google.protobuf.Timestamp destroy_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the destroyTime field is set.

hasExternalProtectionLevelOptions()

public boolean hasExternalProtectionLevelOptions()

ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level and EXTERNAL_VPC protection levels.

.google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17;

Returns
Type Description
boolean

Whether the externalProtectionLevelOptions field is set.

hasGenerateTime()

public boolean hasGenerateTime()

Output only. The time this CryptoKeyVersion's key material was generated.

.google.protobuf.Timestamp generate_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the generateTime field is set.

hasImportTime()

public boolean hasImportTime()

Output only. The time at which this CryptoKeyVersion's key material was most recently imported.

.google.protobuf.Timestamp import_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the importTime field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeAttestation(KeyOperationAttestation value)

public CryptoKeyVersion.Builder mergeAttestation(KeyOperationAttestation value)

Output only. Statement that was generated and signed by the HSM at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only provided for key versions with protection_level HSM.

.google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value KeyOperationAttestation
Returns
Type Description
CryptoKeyVersion.Builder

mergeCreateTime(Timestamp value)

public CryptoKeyVersion.Builder mergeCreateTime(Timestamp value)

Output only. The time at which this CryptoKeyVersion was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
CryptoKeyVersion.Builder

mergeDestroyEventTime(Timestamp value)

public CryptoKeyVersion.Builder mergeDestroyEventTime(Timestamp value)

Output only. The time this CryptoKeyVersion's key material was destroyed. Only present if state is DESTROYED.

.google.protobuf.Timestamp destroy_event_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
CryptoKeyVersion.Builder

mergeDestroyTime(Timestamp value)

public CryptoKeyVersion.Builder mergeDestroyTime(Timestamp value)

Output only. The time this CryptoKeyVersion's key material is scheduled for destruction. Only present if state is DESTROY_SCHEDULED.

.google.protobuf.Timestamp destroy_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
CryptoKeyVersion.Builder

mergeExternalProtectionLevelOptions(ExternalProtectionLevelOptions value)

public CryptoKeyVersion.Builder mergeExternalProtectionLevelOptions(ExternalProtectionLevelOptions value)

ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level and EXTERNAL_VPC protection levels.

.google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17;

Parameter
Name Description
value ExternalProtectionLevelOptions
Returns
Type Description
CryptoKeyVersion.Builder

mergeFrom(CryptoKeyVersion other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeGenerateTime(Timestamp value)

public CryptoKeyVersion.Builder mergeGenerateTime(Timestamp value)

Output only. The time this CryptoKeyVersion's key material was generated.

.google.protobuf.Timestamp generate_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
CryptoKeyVersion.Builder

mergeImportTime(Timestamp value)

public CryptoKeyVersion.Builder mergeImportTime(Timestamp value)

Output only. The time at which this CryptoKeyVersion's key material was most recently imported.

.google.protobuf.Timestamp import_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
CryptoKeyVersion.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAlgorithm(CryptoKeyVersion.CryptoKeyVersionAlgorithm value)

public CryptoKeyVersion.Builder setAlgorithm(CryptoKeyVersion.CryptoKeyVersionAlgorithm value)

Output only. The CryptoKeyVersionAlgorithm that this CryptoKeyVersion supports.

.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value CryptoKeyVersion.CryptoKeyVersionAlgorithm

The algorithm to set.

Returns
Type Description
CryptoKeyVersion.Builder

This builder for chaining.

setAlgorithmValue(int value)

public CryptoKeyVersion.Builder setAlgorithmValue(int value)

Output only. The CryptoKeyVersionAlgorithm that this CryptoKeyVersion supports.

.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

The enum numeric value on the wire for algorithm to set.

Returns
Type Description
CryptoKeyVersion.Builder

This builder for chaining.

setAttestation(KeyOperationAttestation value)

public CryptoKeyVersion.Builder setAttestation(KeyOperationAttestation value)

Output only. Statement that was generated and signed by the HSM at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only provided for key versions with protection_level HSM.

.google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value KeyOperationAttestation
Returns
Type Description
CryptoKeyVersion.Builder

setAttestation(KeyOperationAttestation.Builder builderForValue)

public CryptoKeyVersion.Builder setAttestation(KeyOperationAttestation.Builder builderForValue)

Output only. Statement that was generated and signed by the HSM at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only provided for key versions with protection_level HSM.

.google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue KeyOperationAttestation.Builder
Returns
Type Description
CryptoKeyVersion.Builder

setCreateTime(Timestamp value)

public CryptoKeyVersion.Builder setCreateTime(Timestamp value)

Output only. The time at which this CryptoKeyVersion was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
CryptoKeyVersion.Builder

setCreateTime(Timestamp.Builder builderForValue)

public CryptoKeyVersion.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. The time at which this CryptoKeyVersion was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
CryptoKeyVersion.Builder

setDestroyEventTime(Timestamp value)

public CryptoKeyVersion.Builder setDestroyEventTime(Timestamp value)

Output only. The time this CryptoKeyVersion's key material was destroyed. Only present if state is DESTROYED.

.google.protobuf.Timestamp destroy_event_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
CryptoKeyVersion.Builder

setDestroyEventTime(Timestamp.Builder builderForValue)

public CryptoKeyVersion.Builder setDestroyEventTime(Timestamp.Builder builderForValue)

Output only. The time this CryptoKeyVersion's key material was destroyed. Only present if state is DESTROYED.

.google.protobuf.Timestamp destroy_event_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
CryptoKeyVersion.Builder

setDestroyTime(Timestamp value)

public CryptoKeyVersion.Builder setDestroyTime(Timestamp value)

Output only. The time this CryptoKeyVersion's key material is scheduled for destruction. Only present if state is DESTROY_SCHEDULED.

.google.protobuf.Timestamp destroy_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
CryptoKeyVersion.Builder

setDestroyTime(Timestamp.Builder builderForValue)

public CryptoKeyVersion.Builder setDestroyTime(Timestamp.Builder builderForValue)

Output only. The time this CryptoKeyVersion's key material is scheduled for destruction. Only present if state is DESTROY_SCHEDULED.

.google.protobuf.Timestamp destroy_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
CryptoKeyVersion.Builder

setExternalDestructionFailureReason(String value)

public CryptoKeyVersion.Builder setExternalDestructionFailureReason(String value)

Output only. The root cause of the most recent external destruction failure. Only present if state is EXTERNAL_DESTRUCTION_FAILED.

string external_destruction_failure_reason = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The externalDestructionFailureReason to set.

Returns
Type Description
CryptoKeyVersion.Builder

This builder for chaining.

setExternalDestructionFailureReasonBytes(ByteString value)

public CryptoKeyVersion.Builder setExternalDestructionFailureReasonBytes(ByteString value)

Output only. The root cause of the most recent external destruction failure. Only present if state is EXTERNAL_DESTRUCTION_FAILED.

string external_destruction_failure_reason = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for externalDestructionFailureReason to set.

Returns
Type Description
CryptoKeyVersion.Builder

This builder for chaining.

setExternalProtectionLevelOptions(ExternalProtectionLevelOptions value)

public CryptoKeyVersion.Builder setExternalProtectionLevelOptions(ExternalProtectionLevelOptions value)

ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level and EXTERNAL_VPC protection levels.

.google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17;

Parameter
Name Description
value ExternalProtectionLevelOptions
Returns
Type Description
CryptoKeyVersion.Builder

setExternalProtectionLevelOptions(ExternalProtectionLevelOptions.Builder builderForValue)

public CryptoKeyVersion.Builder setExternalProtectionLevelOptions(ExternalProtectionLevelOptions.Builder builderForValue)

ExternalProtectionLevelOptions stores a group of additional fields for configuring a CryptoKeyVersion that are specific to the EXTERNAL protection level and EXTERNAL_VPC protection levels.

.google.cloud.kms.v1.ExternalProtectionLevelOptions external_protection_level_options = 17;

Parameter
Name Description
builderForValue ExternalProtectionLevelOptions.Builder
Returns
Type Description
CryptoKeyVersion.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setGenerateTime(Timestamp value)

public CryptoKeyVersion.Builder setGenerateTime(Timestamp value)

Output only. The time this CryptoKeyVersion's key material was generated.

.google.protobuf.Timestamp generate_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
CryptoKeyVersion.Builder

setGenerateTime(Timestamp.Builder builderForValue)

public CryptoKeyVersion.Builder setGenerateTime(Timestamp.Builder builderForValue)

Output only. The time this CryptoKeyVersion's key material was generated.

.google.protobuf.Timestamp generate_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
CryptoKeyVersion.Builder

setGenerationFailureReason(String value)

public CryptoKeyVersion.Builder setGenerationFailureReason(String value)

Output only. The root cause of the most recent generation failure. Only present if state is GENERATION_FAILED.

string generation_failure_reason = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The generationFailureReason to set.

Returns
Type Description
CryptoKeyVersion.Builder

This builder for chaining.

setGenerationFailureReasonBytes(ByteString value)

public CryptoKeyVersion.Builder setGenerationFailureReasonBytes(ByteString value)

Output only. The root cause of the most recent generation failure. Only present if state is GENERATION_FAILED.

string generation_failure_reason = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for generationFailureReason to set.

Returns
Type Description
CryptoKeyVersion.Builder

This builder for chaining.

setImportFailureReason(String value)

public CryptoKeyVersion.Builder setImportFailureReason(String value)

Output only. The root cause of the most recent import failure. Only present if state is IMPORT_FAILED.

string import_failure_reason = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The importFailureReason to set.

Returns
Type Description
CryptoKeyVersion.Builder

This builder for chaining.

setImportFailureReasonBytes(ByteString value)

public CryptoKeyVersion.Builder setImportFailureReasonBytes(ByteString value)

Output only. The root cause of the most recent import failure. Only present if state is IMPORT_FAILED.

string import_failure_reason = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for importFailureReason to set.

Returns
Type Description
CryptoKeyVersion.Builder

This builder for chaining.

setImportJob(String value)

public CryptoKeyVersion.Builder setImportJob(String value)

Output only. The name of the ImportJob used in the most recent import of this CryptoKeyVersion. Only present if the underlying key material was imported.

string import_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The importJob to set.

Returns
Type Description
CryptoKeyVersion.Builder

This builder for chaining.

setImportJobBytes(ByteString value)

public CryptoKeyVersion.Builder setImportJobBytes(ByteString value)

Output only. The name of the ImportJob used in the most recent import of this CryptoKeyVersion. Only present if the underlying key material was imported.

string import_job = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for importJob to set.

Returns
Type Description
CryptoKeyVersion.Builder

This builder for chaining.

setImportTime(Timestamp value)

public CryptoKeyVersion.Builder setImportTime(Timestamp value)

Output only. The time at which this CryptoKeyVersion's key material was most recently imported.

.google.protobuf.Timestamp import_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
CryptoKeyVersion.Builder

setImportTime(Timestamp.Builder builderForValue)

public CryptoKeyVersion.Builder setImportTime(Timestamp.Builder builderForValue)

Output only. The time at which this CryptoKeyVersion's key material was most recently imported.

.google.protobuf.Timestamp import_time = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
CryptoKeyVersion.Builder

setName(String value)

public CryptoKeyVersion.Builder setName(String value)

Output only. The resource name for this CryptoKeyVersion in the format projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
CryptoKeyVersion.Builder

This builder for chaining.

setNameBytes(ByteString value)

public CryptoKeyVersion.Builder setNameBytes(ByteString value)

Output only. The resource name for this CryptoKeyVersion in the format projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
CryptoKeyVersion.Builder

This builder for chaining.

setProtectionLevel(ProtectionLevel value)

public CryptoKeyVersion.Builder setProtectionLevel(ProtectionLevel value)

Output only. The ProtectionLevel describing how crypto operations are performed with this CryptoKeyVersion.

.google.cloud.kms.v1.ProtectionLevel protection_level = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ProtectionLevel

The protectionLevel to set.

Returns
Type Description
CryptoKeyVersion.Builder

This builder for chaining.

setProtectionLevelValue(int value)

public CryptoKeyVersion.Builder setProtectionLevelValue(int value)

Output only. The ProtectionLevel describing how crypto operations are performed with this CryptoKeyVersion.

.google.cloud.kms.v1.ProtectionLevel protection_level = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

The enum numeric value on the wire for protectionLevel to set.

Returns
Type Description
CryptoKeyVersion.Builder

This builder for chaining.

setReimportEligible(boolean value)

public CryptoKeyVersion.Builder setReimportEligible(boolean value)

Output only. Whether or not this key version is eligible for reimport, by being specified as a target in ImportCryptoKeyVersionRequest.crypto_key_version.

bool reimport_eligible = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value boolean

The reimportEligible to set.

Returns
Type Description
CryptoKeyVersion.Builder

This builder for chaining.

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

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

setState(CryptoKeyVersion.CryptoKeyVersionState value)

public CryptoKeyVersion.Builder setState(CryptoKeyVersion.CryptoKeyVersionState value)

The current state of the CryptoKeyVersion.

.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState state = 3;

Parameter
Name Description
value CryptoKeyVersion.CryptoKeyVersionState

The state to set.

Returns
Type Description
CryptoKeyVersion.Builder

This builder for chaining.

setStateValue(int value)

public CryptoKeyVersion.Builder setStateValue(int value)

The current state of the CryptoKeyVersion.

.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState state = 3;

Parameter
Name Description
value int

The enum numeric value on the wire for state to set.

Returns
Type Description
CryptoKeyVersion.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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