Class ImportJob.Builder (2.30.0)

public static final class ImportJob.Builder extends GeneratedMessageV3.Builder<ImportJob.Builder> implements ImportJobOrBuilder

An ImportJob can be used to create CryptoKeys and CryptoKeyVersions using pre-existing key material, generated outside of Cloud KMS.

When an ImportJob is created, Cloud KMS will generate a "wrapping key", which is a public/private key pair. You use the wrapping key to encrypt (also known as wrap) the pre-existing key material to protect it during the import process. The nature of the wrapping key depends on the choice of import_method. When the wrapping key generation is complete, the state will be set to ACTIVE and the public_key can be fetched. The fetched public key can then be used to wrap your pre-existing key material.

Once the key material is wrapped, it can be imported into a new CryptoKeyVersion in an existing CryptoKey by calling ImportCryptoKeyVersion. Multiple CryptoKeyVersions can be imported with a single ImportJob. Cloud KMS uses the private key portion of the wrapping key to unwrap the key material. Only Cloud KMS has access to the private key.

An ImportJob expires 3 days after it is created. Once expired, Cloud KMS will no longer be able to import or unwrap any key material that was wrapped with the ImportJob's public key.

For more information, see Importing a key.

Protobuf type google.cloud.kms.v1.ImportJob

Implements

ImportJobOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ImportJob build()
Returns
TypeDescription
ImportJob

buildPartial()

public ImportJob buildPartial()
Returns
TypeDescription
ImportJob

clear()

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

clearAttestation()

public ImportJob.Builder clearAttestation()

Output only. Statement that was generated and signed by the key creator (for example, an HSM) at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only present if the chosen ImportMethod is one with a protection level of HSM.

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

Returns
TypeDescription
ImportJob.Builder

clearCreateTime()

public ImportJob.Builder clearCreateTime()

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

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

Returns
TypeDescription
ImportJob.Builder

clearExpireEventTime()

public ImportJob.Builder clearExpireEventTime()

Output only. The time this ImportJob expired. Only present if state is EXPIRED.

.google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ImportJob.Builder

clearExpireTime()

public ImportJob.Builder clearExpireTime()

Output only. The time at which this ImportJob is scheduled for expiration and can no longer be used to import key material.

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

Returns
TypeDescription
ImportJob.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearGenerateTime()

public ImportJob.Builder clearGenerateTime()

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

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

Returns
TypeDescription
ImportJob.Builder

clearImportMethod()

public ImportJob.Builder clearImportMethod()

Required. Immutable. The wrapping method to be used for incoming key material.

.google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
ImportJob.Builder

This builder for chaining.

clearName()

public ImportJob.Builder clearName()

Output only. The resource name for this ImportJob in the format projects/*/locations/*/keyRings/*/importJobs/*.

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

Returns
TypeDescription
ImportJob.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearProtectionLevel()

public ImportJob.Builder clearProtectionLevel()

Required. Immutable. The protection level of the ImportJob. This must match the protection_level of the version_template on the CryptoKey you attempt to import into.

.google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
ImportJob.Builder

This builder for chaining.

clearPublicKey()

public ImportJob.Builder clearPublicKey()

Output only. The public key with which to wrap key material prior to import. Only returned if state is ACTIVE.

.google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ImportJob.Builder

clearState()

public ImportJob.Builder clearState()

Output only. The current state of the ImportJob, indicating if it can be used.

.google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ImportJob.Builder

This builder for chaining.

clone()

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

getAttestation()

public KeyOperationAttestation getAttestation()

Output only. Statement that was generated and signed by the key creator (for example, an HSM) at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only present if the chosen ImportMethod is one with a protection level of 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 key creator (for example, an HSM) at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only present if the chosen ImportMethod is one with a protection level of 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 key creator (for example, an HSM) at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only present if the chosen ImportMethod is one with a protection level of 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 ImportJob was created.

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

Returns
TypeDescription
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

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

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

Returns
TypeDescription
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

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

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

Returns
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public ImportJob getDefaultInstanceForType()
Returns
TypeDescription
ImportJob

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getExpireEventTime()

public Timestamp getExpireEventTime()

Output only. The time this ImportJob expired. Only present if state is EXPIRED.

.google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The expireEventTime.

getExpireEventTimeBuilder()

public Timestamp.Builder getExpireEventTimeBuilder()

Output only. The time this ImportJob expired. Only present if state is EXPIRED.

.google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Builder

getExpireEventTimeOrBuilder()

public TimestampOrBuilder getExpireEventTimeOrBuilder()

Output only. The time this ImportJob expired. Only present if state is EXPIRED.

.google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

getExpireTime()

public Timestamp getExpireTime()

Output only. The time at which this ImportJob is scheduled for expiration and can no longer be used to import key material.

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

Returns
TypeDescription
Timestamp

The expireTime.

getExpireTimeBuilder()

public Timestamp.Builder getExpireTimeBuilder()

Output only. The time at which this ImportJob is scheduled for expiration and can no longer be used to import key material.

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

Returns
TypeDescription
Builder

getExpireTimeOrBuilder()

public TimestampOrBuilder getExpireTimeOrBuilder()

Output only. The time at which this ImportJob is scheduled for expiration and can no longer be used to import key material.

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

Returns
TypeDescription
TimestampOrBuilder

getGenerateTime()

public Timestamp getGenerateTime()

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

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

Returns
TypeDescription
Timestamp

The generateTime.

getGenerateTimeBuilder()

public Timestamp.Builder getGenerateTimeBuilder()

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

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

Returns
TypeDescription
Builder

getGenerateTimeOrBuilder()

public TimestampOrBuilder getGenerateTimeOrBuilder()

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

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

Returns
TypeDescription
TimestampOrBuilder

getImportMethod()

public ImportJob.ImportMethod getImportMethod()

Required. Immutable. The wrapping method to be used for incoming key material.

.google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
ImportJob.ImportMethod

The importMethod.

getImportMethodValue()

public int getImportMethodValue()

Required. Immutable. The wrapping method to be used for incoming key material.

.google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
int

The enum numeric value on the wire for importMethod.

getName()

public String getName()

Output only. The resource name for this ImportJob in the format projects/*/locations/*/keyRings/*/importJobs/*.

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 ImportJob in the format projects/*/locations/*/keyRings/*/importJobs/*.

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

Returns
TypeDescription
ByteString

The bytes for name.

getProtectionLevel()

public ProtectionLevel getProtectionLevel()

Required. Immutable. The protection level of the ImportJob. This must match the protection_level of the version_template on the CryptoKey you attempt to import into.

.google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
ProtectionLevel

The protectionLevel.

getProtectionLevelValue()

public int getProtectionLevelValue()

Required. Immutable. The protection level of the ImportJob. This must match the protection_level of the version_template on the CryptoKey you attempt to import into.

.google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
int

The enum numeric value on the wire for protectionLevel.

getPublicKey()

public ImportJob.WrappingPublicKey getPublicKey()

Output only. The public key with which to wrap key material prior to import. Only returned if state is ACTIVE.

.google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ImportJob.WrappingPublicKey

The publicKey.

getPublicKeyBuilder()

public ImportJob.WrappingPublicKey.Builder getPublicKeyBuilder()

Output only. The public key with which to wrap key material prior to import. Only returned if state is ACTIVE.

.google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ImportJob.WrappingPublicKey.Builder

getPublicKeyOrBuilder()

public ImportJob.WrappingPublicKeyOrBuilder getPublicKeyOrBuilder()

Output only. The public key with which to wrap key material prior to import. Only returned if state is ACTIVE.

.google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ImportJob.WrappingPublicKeyOrBuilder

getState()

public ImportJob.ImportJobState getState()

Output only. The current state of the ImportJob, indicating if it can be used.

.google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ImportJob.ImportJobState

The state.

getStateValue()

public int getStateValue()

Output only. The current state of the ImportJob, indicating if it can be used.

.google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

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 key creator (for example, an HSM) at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only present if the chosen ImportMethod is one with a protection level of 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 ImportJob was created.

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

Returns
TypeDescription
boolean

Whether the createTime field is set.

hasExpireEventTime()

public boolean hasExpireEventTime()

Output only. The time this ImportJob expired. Only present if state is EXPIRED.

.google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the expireEventTime field is set.

hasExpireTime()

public boolean hasExpireTime()

Output only. The time at which this ImportJob is scheduled for expiration and can no longer be used to import key material.

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

Returns
TypeDescription
boolean

Whether the expireTime field is set.

hasGenerateTime()

public boolean hasGenerateTime()

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

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

Returns
TypeDescription
boolean

Whether the generateTime field is set.

hasPublicKey()

public boolean hasPublicKey()

Output only. The public key with which to wrap key material prior to import. Only returned if state is ACTIVE.

.google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the publicKey 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 ImportJob.Builder mergeAttestation(KeyOperationAttestation value)

Output only. Statement that was generated and signed by the key creator (for example, an HSM) at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only present if the chosen ImportMethod is one with a protection level of HSM.

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

Parameter
NameDescription
valueKeyOperationAttestation
Returns
TypeDescription
ImportJob.Builder

mergeCreateTime(Timestamp value)

public ImportJob.Builder mergeCreateTime(Timestamp value)

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

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
ImportJob.Builder

mergeExpireEventTime(Timestamp value)

public ImportJob.Builder mergeExpireEventTime(Timestamp value)

Output only. The time this ImportJob expired. Only present if state is EXPIRED.

.google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
ImportJob.Builder

mergeExpireTime(Timestamp value)

public ImportJob.Builder mergeExpireTime(Timestamp value)

Output only. The time at which this ImportJob is scheduled for expiration and can no longer be used to import key material.

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
ImportJob.Builder

mergeFrom(ImportJob other)

public ImportJob.Builder mergeFrom(ImportJob other)
Parameter
NameDescription
otherImportJob
Returns
TypeDescription
ImportJob.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public ImportJob.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
ImportJob.Builder
Overrides

mergeGenerateTime(Timestamp value)

public ImportJob.Builder mergeGenerateTime(Timestamp value)

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

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
ImportJob.Builder

mergePublicKey(ImportJob.WrappingPublicKey value)

public ImportJob.Builder mergePublicKey(ImportJob.WrappingPublicKey value)

Output only. The public key with which to wrap key material prior to import. Only returned if state is ACTIVE.

.google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueImportJob.WrappingPublicKey
Returns
TypeDescription
ImportJob.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAttestation(KeyOperationAttestation value)

public ImportJob.Builder setAttestation(KeyOperationAttestation value)

Output only. Statement that was generated and signed by the key creator (for example, an HSM) at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only present if the chosen ImportMethod is one with a protection level of HSM.

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

Parameter
NameDescription
valueKeyOperationAttestation
Returns
TypeDescription
ImportJob.Builder

setAttestation(KeyOperationAttestation.Builder builderForValue)

public ImportJob.Builder setAttestation(KeyOperationAttestation.Builder builderForValue)

Output only. Statement that was generated and signed by the key creator (for example, an HSM) at key creation time. Use this statement to verify attributes of the key as stored on the HSM, independently of Google. Only present if the chosen ImportMethod is one with a protection level of HSM.

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

Parameter
NameDescription
builderForValueKeyOperationAttestation.Builder
Returns
TypeDescription
ImportJob.Builder

setCreateTime(Timestamp value)

public ImportJob.Builder setCreateTime(Timestamp value)

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

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
ImportJob.Builder

setCreateTime(Timestamp.Builder builderForValue)

public ImportJob.Builder setCreateTime(Timestamp.Builder builderForValue)

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

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

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
ImportJob.Builder

setExpireEventTime(Timestamp value)

public ImportJob.Builder setExpireEventTime(Timestamp value)

Output only. The time this ImportJob expired. Only present if state is EXPIRED.

.google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
ImportJob.Builder

setExpireEventTime(Timestamp.Builder builderForValue)

public ImportJob.Builder setExpireEventTime(Timestamp.Builder builderForValue)

Output only. The time this ImportJob expired. Only present if state is EXPIRED.

.google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
ImportJob.Builder

setExpireTime(Timestamp value)

public ImportJob.Builder setExpireTime(Timestamp value)

Output only. The time at which this ImportJob is scheduled for expiration and can no longer be used to import key material.

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
ImportJob.Builder

setExpireTime(Timestamp.Builder builderForValue)

public ImportJob.Builder setExpireTime(Timestamp.Builder builderForValue)

Output only. The time at which this ImportJob is scheduled for expiration and can no longer be used to import key material.

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

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
ImportJob.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setGenerateTime(Timestamp value)

public ImportJob.Builder setGenerateTime(Timestamp value)

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

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

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
ImportJob.Builder

setGenerateTime(Timestamp.Builder builderForValue)

public ImportJob.Builder setGenerateTime(Timestamp.Builder builderForValue)

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

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

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
ImportJob.Builder

setImportMethod(ImportJob.ImportMethod value)

public ImportJob.Builder setImportMethod(ImportJob.ImportMethod value)

Required. Immutable. The wrapping method to be used for incoming key material.

.google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
NameDescription
valueImportJob.ImportMethod

The importMethod to set.

Returns
TypeDescription
ImportJob.Builder

This builder for chaining.

setImportMethodValue(int value)

public ImportJob.Builder setImportMethodValue(int value)

Required. Immutable. The wrapping method to be used for incoming key material.

.google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
NameDescription
valueint

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

Returns
TypeDescription
ImportJob.Builder

This builder for chaining.

setName(String value)

public ImportJob.Builder setName(String value)

Output only. The resource name for this ImportJob in the format projects/*/locations/*/keyRings/*/importJobs/*.

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

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
ImportJob.Builder

This builder for chaining.

setNameBytes(ByteString value)

public ImportJob.Builder setNameBytes(ByteString value)

Output only. The resource name for this ImportJob in the format projects/*/locations/*/keyRings/*/importJobs/*.

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

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
ImportJob.Builder

This builder for chaining.

setProtectionLevel(ProtectionLevel value)

public ImportJob.Builder setProtectionLevel(ProtectionLevel value)

Required. Immutable. The protection level of the ImportJob. This must match the protection_level of the version_template on the CryptoKey you attempt to import into.

.google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
NameDescription
valueProtectionLevel

The protectionLevel to set.

Returns
TypeDescription
ImportJob.Builder

This builder for chaining.

setProtectionLevelValue(int value)

public ImportJob.Builder setProtectionLevelValue(int value)

Required. Immutable. The protection level of the ImportJob. This must match the protection_level of the version_template on the CryptoKey you attempt to import into.

.google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
NameDescription
valueint

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

Returns
TypeDescription
ImportJob.Builder

This builder for chaining.

setPublicKey(ImportJob.WrappingPublicKey value)

public ImportJob.Builder setPublicKey(ImportJob.WrappingPublicKey value)

Output only. The public key with which to wrap key material prior to import. Only returned if state is ACTIVE.

.google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueImportJob.WrappingPublicKey
Returns
TypeDescription
ImportJob.Builder

setPublicKey(ImportJob.WrappingPublicKey.Builder builderForValue)

public ImportJob.Builder setPublicKey(ImportJob.WrappingPublicKey.Builder builderForValue)

Output only. The public key with which to wrap key material prior to import. Only returned if state is ACTIVE.

.google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueImportJob.WrappingPublicKey.Builder
Returns
TypeDescription
ImportJob.Builder

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

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

setState(ImportJob.ImportJobState value)

public ImportJob.Builder setState(ImportJob.ImportJobState value)

Output only. The current state of the ImportJob, indicating if it can be used.

.google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueImportJob.ImportJobState

The state to set.

Returns
TypeDescription
ImportJob.Builder

This builder for chaining.

setStateValue(int value)

public ImportJob.Builder setStateValue(int value)

Output only. The current state of the ImportJob, indicating if it can be used.

.google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueint

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

Returns
TypeDescription
ImportJob.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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