Class CustomerEncryptionKey.Builder (0.11.0)

public static final class CustomerEncryptionKey.Builder extends GeneratedMessageV3.Builder<CustomerEncryptionKey.Builder> implements CustomerEncryptionKeyOrBuilder

A customer-supplied encryption key.

Protobuf type google.cloud.backupdr.v1.CustomerEncryptionKey

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public CustomerEncryptionKey build()
Returns
Type Description
CustomerEncryptionKey

buildPartial()

public CustomerEncryptionKey buildPartial()
Returns
Type Description
CustomerEncryptionKey

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearKey()

public CustomerEncryptionKey.Builder clearKey()
Returns
Type Description
CustomerEncryptionKey.Builder

clearKmsKeyName()

public CustomerEncryptionKey.Builder clearKmsKeyName()

Optional. The name of the encryption key that is stored in Google Cloud KMS.

string kms_key_name = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CustomerEncryptionKey.Builder

This builder for chaining.

clearKmsKeyServiceAccount()

public CustomerEncryptionKey.Builder clearKmsKeyServiceAccount()

Optional. The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.

optional string kms_key_service_account = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CustomerEncryptionKey.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearRawKey()

public CustomerEncryptionKey.Builder clearRawKey()

Optional. Specifies a 256-bit customer-supplied encryption key.

string raw_key = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CustomerEncryptionKey.Builder

This builder for chaining.

clearRsaEncryptedKey()

public CustomerEncryptionKey.Builder clearRsaEncryptedKey()

Optional. RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.

string rsa_encrypted_key = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CustomerEncryptionKey.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public CustomerEncryptionKey getDefaultInstanceForType()
Returns
Type Description
CustomerEncryptionKey

getDescriptorForType()

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

getKeyCase()

public CustomerEncryptionKey.KeyCase getKeyCase()
Returns
Type Description
CustomerEncryptionKey.KeyCase

getKmsKeyName()

public String getKmsKeyName()

Optional. The name of the encryption key that is stored in Google Cloud KMS.

string kms_key_name = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The kmsKeyName.

getKmsKeyNameBytes()

public ByteString getKmsKeyNameBytes()

Optional. The name of the encryption key that is stored in Google Cloud KMS.

string kms_key_name = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for kmsKeyName.

getKmsKeyServiceAccount()

public String getKmsKeyServiceAccount()

Optional. The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.

optional string kms_key_service_account = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The kmsKeyServiceAccount.

getKmsKeyServiceAccountBytes()

public ByteString getKmsKeyServiceAccountBytes()

Optional. The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.

optional string kms_key_service_account = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for kmsKeyServiceAccount.

getRawKey()

public String getRawKey()

Optional. Specifies a 256-bit customer-supplied encryption key.

string raw_key = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The rawKey.

getRawKeyBytes()

public ByteString getRawKeyBytes()

Optional. Specifies a 256-bit customer-supplied encryption key.

string raw_key = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for rawKey.

getRsaEncryptedKey()

public String getRsaEncryptedKey()

Optional. RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.

string rsa_encrypted_key = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The rsaEncryptedKey.

getRsaEncryptedKeyBytes()

public ByteString getRsaEncryptedKeyBytes()

Optional. RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.

string rsa_encrypted_key = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for rsaEncryptedKey.

hasKmsKeyName()

public boolean hasKmsKeyName()

Optional. The name of the encryption key that is stored in Google Cloud KMS.

string kms_key_name = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the kmsKeyName field is set.

hasKmsKeyServiceAccount()

public boolean hasKmsKeyServiceAccount()

Optional. The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.

optional string kms_key_service_account = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the kmsKeyServiceAccount field is set.

hasRawKey()

public boolean hasRawKey()

Optional. Specifies a 256-bit customer-supplied encryption key.

string raw_key = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the rawKey field is set.

hasRsaEncryptedKey()

public boolean hasRsaEncryptedKey()

Optional. RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.

string rsa_encrypted_key = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the rsaEncryptedKey field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CustomerEncryptionKey other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setKmsKeyName(String value)

public CustomerEncryptionKey.Builder setKmsKeyName(String value)

Optional. The name of the encryption key that is stored in Google Cloud KMS.

string kms_key_name = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The kmsKeyName to set.

Returns
Type Description
CustomerEncryptionKey.Builder

This builder for chaining.

setKmsKeyNameBytes(ByteString value)

public CustomerEncryptionKey.Builder setKmsKeyNameBytes(ByteString value)

Optional. The name of the encryption key that is stored in Google Cloud KMS.

string kms_key_name = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for kmsKeyName to set.

Returns
Type Description
CustomerEncryptionKey.Builder

This builder for chaining.

setKmsKeyServiceAccount(String value)

public CustomerEncryptionKey.Builder setKmsKeyServiceAccount(String value)

Optional. The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.

optional string kms_key_service_account = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The kmsKeyServiceAccount to set.

Returns
Type Description
CustomerEncryptionKey.Builder

This builder for chaining.

setKmsKeyServiceAccountBytes(ByteString value)

public CustomerEncryptionKey.Builder setKmsKeyServiceAccountBytes(ByteString value)

Optional. The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.

optional string kms_key_service_account = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for kmsKeyServiceAccount to set.

Returns
Type Description
CustomerEncryptionKey.Builder

This builder for chaining.

setRawKey(String value)

public CustomerEncryptionKey.Builder setRawKey(String value)

Optional. Specifies a 256-bit customer-supplied encryption key.

string raw_key = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The rawKey to set.

Returns
Type Description
CustomerEncryptionKey.Builder

This builder for chaining.

setRawKeyBytes(ByteString value)

public CustomerEncryptionKey.Builder setRawKeyBytes(ByteString value)

Optional. Specifies a 256-bit customer-supplied encryption key.

string raw_key = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for rawKey to set.

Returns
Type Description
CustomerEncryptionKey.Builder

This builder for chaining.

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

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

setRsaEncryptedKey(String value)

public CustomerEncryptionKey.Builder setRsaEncryptedKey(String value)

Optional. RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.

string rsa_encrypted_key = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The rsaEncryptedKey to set.

Returns
Type Description
CustomerEncryptionKey.Builder

This builder for chaining.

setRsaEncryptedKeyBytes(ByteString value)

public CustomerEncryptionKey.Builder setRsaEncryptedKeyBytes(ByteString value)

Optional. RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.

string rsa_encrypted_key = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for rsaEncryptedKey to set.

Returns
Type Description
CustomerEncryptionKey.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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