Class SnapshotUpdateKmsKeyRequest.Builder (1.105.0)

public static final class SnapshotUpdateKmsKeyRequest.Builder extends GeneratedMessage.Builder<SnapshotUpdateKmsKeyRequest.Builder> implements SnapshotUpdateKmsKeyRequestOrBuilder

Protobuf type google.cloud.compute.v1.SnapshotUpdateKmsKeyRequest

Static Methods

getDescriptor()

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

Methods

build()

public SnapshotUpdateKmsKeyRequest build()
Returns
Type Description
SnapshotUpdateKmsKeyRequest

buildPartial()

public SnapshotUpdateKmsKeyRequest buildPartial()
Returns
Type Description
SnapshotUpdateKmsKeyRequest

clear()

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

clearKmsKeyName()

public SnapshotUpdateKmsKeyRequest.Builder clearKmsKeyName()

Optional. The new KMS key to replace the current one on the snapshot. If empty, the snapshot will be re-encrypted using the primary version of the snapshot's current KMS key.

The KMS key can be provided in the following formats:

  • projects/project_id/locations/region/keyRings/key_ring/cryptoKeys/key

optional string kms_key_name = 484373913;

Returns
Type Description
SnapshotUpdateKmsKeyRequest.Builder

This builder for chaining.

getDefaultInstanceForType()

public SnapshotUpdateKmsKeyRequest getDefaultInstanceForType()
Returns
Type Description
SnapshotUpdateKmsKeyRequest

getDescriptorForType()

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

getKmsKeyName()

public String getKmsKeyName()

Optional. The new KMS key to replace the current one on the snapshot. If empty, the snapshot will be re-encrypted using the primary version of the snapshot's current KMS key.

The KMS key can be provided in the following formats:

  • projects/project_id/locations/region/keyRings/key_ring/cryptoKeys/key

optional string kms_key_name = 484373913;

Returns
Type Description
String

The kmsKeyName.

getKmsKeyNameBytes()

public ByteString getKmsKeyNameBytes()

Optional. The new KMS key to replace the current one on the snapshot. If empty, the snapshot will be re-encrypted using the primary version of the snapshot's current KMS key.

The KMS key can be provided in the following formats:

  • projects/project_id/locations/region/keyRings/key_ring/cryptoKeys/key

optional string kms_key_name = 484373913;

Returns
Type Description
ByteString

The bytes for kmsKeyName.

hasKmsKeyName()

public boolean hasKmsKeyName()

Optional. The new KMS key to replace the current one on the snapshot. If empty, the snapshot will be re-encrypted using the primary version of the snapshot's current KMS key.

The KMS key can be provided in the following formats:

  • projects/project_id/locations/region/keyRings/key_ring/cryptoKeys/key

optional string kms_key_name = 484373913;

Returns
Type Description
boolean

Whether the kmsKeyName field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SnapshotUpdateKmsKeyRequest other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setKmsKeyName(String value)

public SnapshotUpdateKmsKeyRequest.Builder setKmsKeyName(String value)

Optional. The new KMS key to replace the current one on the snapshot. If empty, the snapshot will be re-encrypted using the primary version of the snapshot's current KMS key.

The KMS key can be provided in the following formats:

  • projects/project_id/locations/region/keyRings/key_ring/cryptoKeys/key

optional string kms_key_name = 484373913;

Parameter
Name Description
value String

The kmsKeyName to set.

Returns
Type Description
SnapshotUpdateKmsKeyRequest.Builder

This builder for chaining.

setKmsKeyNameBytes(ByteString value)

public SnapshotUpdateKmsKeyRequest.Builder setKmsKeyNameBytes(ByteString value)

Optional. The new KMS key to replace the current one on the snapshot. If empty, the snapshot will be re-encrypted using the primary version of the snapshot's current KMS key.

The KMS key can be provided in the following formats:

  • projects/project_id/locations/region/keyRings/key_ring/cryptoKeys/key

optional string kms_key_name = 484373913;

Parameter
Name Description
value ByteString

The bytes for kmsKeyName to set.

Returns
Type Description
SnapshotUpdateKmsKeyRequest.Builder

This builder for chaining.