Class CryptoKeyVersion.Builder (2.34.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public CryptoKeyVersion build()
Returns
TypeDescription
CryptoKeyVersion

buildPartial()

public CryptoKeyVersion buildPartial()
Returns
TypeDescription
CryptoKeyVersion

clear()

public CryptoKeyVersion.Builder clear()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
CryptoKeyVersion.Builder

clearField(Descriptors.FieldDescriptor field)

public CryptoKeyVersion.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
CryptoKeyVersion.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public CryptoKeyVersion.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
CryptoKeyVersion.Builder

This builder for chaining.

clone()

public CryptoKeyVersion.Builder clone()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public CryptoKeyVersion getDefaultInstanceForType()
Returns
TypeDescription
CryptoKeyVersion

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

The reimportEligible.

getState()

public CryptoKeyVersion.CryptoKeyVersionState getState()

The current state of the CryptoKeyVersion.

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

Returns
TypeDescription
CryptoKeyVersion.CryptoKeyVersionState

The state.

getStateValue()

public int getStateValue()

The current state of the CryptoKeyVersion.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the importTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valueKeyOperationAttestation
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
valueExternalProtectionLevelOptions
Returns
TypeDescription
CryptoKeyVersion.Builder

mergeFrom(CryptoKeyVersion other)

public CryptoKeyVersion.Builder mergeFrom(CryptoKeyVersion other)
Parameter
NameDescription
otherCryptoKeyVersion
Returns
TypeDescription
CryptoKeyVersion.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CryptoKeyVersion.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueCryptoKeyVersion.CryptoKeyVersionAlgorithm

The algorithm to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
valueKeyOperationAttestation
Returns
TypeDescription
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
NameDescription
builderForValueKeyOperationAttestation.Builder
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
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
NameDescription
valueString

The externalDestructionFailureReason to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for externalDestructionFailureReason to set.

Returns
TypeDescription
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
NameDescription
valueExternalProtectionLevelOptions
Returns
TypeDescription
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
NameDescription
builderForValueExternalProtectionLevelOptions.Builder
Returns
TypeDescription
CryptoKeyVersion.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public CryptoKeyVersion.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
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
NameDescription
valueString

The generationFailureReason to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for generationFailureReason to set.

Returns
TypeDescription
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
NameDescription
valueString

The importFailureReason to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for importFailureReason to set.

Returns
TypeDescription
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
NameDescription
valueString

The importJob to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for importJob to set.

Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
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
NameDescription
valueString

The name to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
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
NameDescription
valueProtectionLevel

The protectionLevel to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
valueboolean

The reimportEligible to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueCryptoKeyVersion.CryptoKeyVersionState

The state to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
CryptoKeyVersion.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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