Class ImportJob.Builder (2.57.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
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ImportJob build()
Returns
Type Description
ImportJob

buildPartial()

public ImportJob buildPartial()
Returns
Type Description
ImportJob

clear()

public ImportJob.Builder clear()
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
ImportJob.Builder

clearField(Descriptors.FieldDescriptor field)

public ImportJob.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
ImportJob.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public ImportJob.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
ImportJob.Builder

This builder for chaining.

clone()

public ImportJob.Builder clone()
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public ImportJob getDefaultInstanceForType()
Returns
Type Description
ImportJob

getDescriptorForType()

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

Whether the publicKey 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 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
Name Description
value KeyOperationAttestation
Returns
Type Description
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
Name Description
value Timestamp
Returns
Type Description
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
Name Description
value Timestamp
Returns
Type Description
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
Name Description
value Timestamp
Returns
Type Description
ImportJob.Builder

mergeFrom(ImportJob other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public ImportJob.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
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
Name Description
value Timestamp
Returns
Type Description
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
Name Description
value ImportJob.WrappingPublicKey
Returns
Type Description
ImportJob.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ImportJob.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
value KeyOperationAttestation
Returns
Type Description
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
Name Description
builderForValue KeyOperationAttestation.Builder
Returns
Type Description
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
Name Description
value Timestamp
Returns
Type Description
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
Name Description
builderForValue Builder
Returns
Type Description
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
Name Description
value Timestamp
Returns
Type Description
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
Name Description
builderForValue Builder
Returns
Type Description
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
Name Description
value Timestamp
Returns
Type Description
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
Name Description
builderForValue Builder
Returns
Type Description
ImportJob.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public ImportJob.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
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
Name Description
value Timestamp
Returns
Type Description
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
Name Description
builderForValue Builder
Returns
Type Description
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
Name Description
value ImportJob.ImportMethod

The importMethod to set.

Returns
Type Description
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
Name Description
value int

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

Returns
Type Description
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
Name Description
value String

The name to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
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
Name Description
value ProtectionLevel

The protectionLevel to set.

Returns
Type Description
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
Name Description
value int

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

Returns
Type Description
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
Name Description
value ImportJob.WrappingPublicKey
Returns
Type Description
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
Name Description
builderForValue ImportJob.WrappingPublicKey.Builder
Returns
Type Description
ImportJob.Builder

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

public ImportJob.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
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
Name Description
value ImportJob.ImportJobState

The state to set.

Returns
Type Description
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
Name Description
value int

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

Returns
Type Description
ImportJob.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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