Class EncryptionConfig.Builder (6.89.0)

publicstaticfinalclassEncryptionConfig.BuilderextendsGeneratedMessageV3.Builder<EncryptionConfig.Builder>implementsEncryptionConfigOrBuilder

Encryption configuration for a Cloud Spanner database.

Protobuf type google.spanner.admin.database.v1.EncryptionConfig

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllKmsKeyNames(Iterable<String> values)

publicEncryptionConfig.BuilderaddAllKmsKeyNames(Iterable<String>values)

Specifies the KMS configuration for the one or more keys used to encrypt the database. Values are of the form projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>.

The keys referenced by kms_key_names must fully cover all regions of the database instance configuration. Some examples:

  • For single region database instance configs, specify a single regional location KMS key.
  • For multi-regional database instance configs of type GOOGLE_MANAGED, either specify a multi-regional location KMS key or multiple regional location KMS keys that cover all regions in the instance config.
  • For a database instance config of type USER_MANAGED, please specify only regional location KMS keys to cover each region in the instance config. Multi-regional location KMS keys are not supported for USER_MANAGED instance configs.

repeated string kms_key_names = 3 [(.google.api.resource_reference) = { ... }

Parameter
NameDescription
valuesIterable<String>

The kmsKeyNames to add.

Returns
TypeDescription
EncryptionConfig.Builder

This builder for chaining.

addKmsKeyNames(String value)

publicEncryptionConfig.BuilderaddKmsKeyNames(Stringvalue)

Specifies the KMS configuration for the one or more keys used to encrypt the database. Values are of the form projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>.

The keys referenced by kms_key_names must fully cover all regions of the database instance configuration. Some examples:

  • For single region database instance configs, specify a single regional location KMS key.
  • For multi-regional database instance configs of type GOOGLE_MANAGED, either specify a multi-regional location KMS key or multiple regional location KMS keys that cover all regions in the instance config.
  • For a database instance config of type USER_MANAGED, please specify only regional location KMS keys to cover each region in the instance config. Multi-regional location KMS keys are not supported for USER_MANAGED instance configs.

repeated string kms_key_names = 3 [(.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueString

The kmsKeyNames to add.

Returns
TypeDescription
EncryptionConfig.Builder

This builder for chaining.

addKmsKeyNamesBytes(ByteString value)

publicEncryptionConfig.BuilderaddKmsKeyNamesBytes(ByteStringvalue)

Specifies the KMS configuration for the one or more keys used to encrypt the database. Values are of the form projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>.

The keys referenced by kms_key_names must fully cover all regions of the database instance configuration. Some examples:

  • For single region database instance configs, specify a single regional location KMS key.
  • For multi-regional database instance configs of type GOOGLE_MANAGED, either specify a multi-regional location KMS key or multiple regional location KMS keys that cover all regions in the instance config.
  • For a database instance config of type USER_MANAGED, please specify only regional location KMS keys to cover each region in the instance config. Multi-regional location KMS keys are not supported for USER_MANAGED instance configs.

repeated string kms_key_names = 3 [(.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueByteString

The bytes of the kmsKeyNames to add.

Returns
TypeDescription
EncryptionConfig.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicEncryptionConfig.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
EncryptionConfig.Builder
Overrides

build()

publicEncryptionConfigbuild()
Returns
TypeDescription
EncryptionConfig

buildPartial()

publicEncryptionConfigbuildPartial()
Returns
TypeDescription
EncryptionConfig

clear()

publicEncryptionConfig.Builderclear()
Returns
TypeDescription
EncryptionConfig.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

publicEncryptionConfig.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
EncryptionConfig.Builder
Overrides

clearKmsKeyName()

publicEncryptionConfig.BuilderclearKmsKeyName()

The Cloud KMS key to be used for encrypting and decrypting the database. Values are of the form projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>.

string kms_key_name = 2 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
EncryptionConfig.Builder

This builder for chaining.

clearKmsKeyNames()

publicEncryptionConfig.BuilderclearKmsKeyNames()

Specifies the KMS configuration for the one or more keys used to encrypt the database. Values are of the form projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>.

The keys referenced by kms_key_names must fully cover all regions of the database instance configuration. Some examples:

  • For single region database instance configs, specify a single regional location KMS key.
  • For multi-regional database instance configs of type GOOGLE_MANAGED, either specify a multi-regional location KMS key or multiple regional location KMS keys that cover all regions in the instance config.
  • For a database instance config of type USER_MANAGED, please specify only regional location KMS keys to cover each region in the instance config. Multi-regional location KMS keys are not supported for USER_MANAGED instance configs.

repeated string kms_key_names = 3 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
EncryptionConfig.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

publicEncryptionConfig.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
EncryptionConfig.Builder
Overrides

clone()

publicEncryptionConfig.Builderclone()
Returns
TypeDescription
EncryptionConfig.Builder
Overrides

getDefaultInstanceForType()

publicEncryptionConfiggetDefaultInstanceForType()
Returns
TypeDescription
EncryptionConfig

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getKmsKeyName()

publicStringgetKmsKeyName()

The Cloud KMS key to be used for encrypting and decrypting the database. Values are of the form projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>.

string kms_key_name = 2 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
String

The kmsKeyName.

getKmsKeyNameBytes()

publicByteStringgetKmsKeyNameBytes()

The Cloud KMS key to be used for encrypting and decrypting the database. Values are of the form projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>.

string kms_key_name = 2 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
ByteString

The bytes for kmsKeyName.

getKmsKeyNames(int index)

publicStringgetKmsKeyNames(intindex)

Specifies the KMS configuration for the one or more keys used to encrypt the database. Values are of the form projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>.

The keys referenced by kms_key_names must fully cover all regions of the database instance configuration. Some examples:

  • For single region database instance configs, specify a single regional location KMS key.
  • For multi-regional database instance configs of type GOOGLE_MANAGED, either specify a multi-regional location KMS key or multiple regional location KMS keys that cover all regions in the instance config.
  • For a database instance config of type USER_MANAGED, please specify only regional location KMS keys to cover each region in the instance config. Multi-regional location KMS keys are not supported for USER_MANAGED instance configs.

repeated string kms_key_names = 3 [(.google.api.resource_reference) = { ... }

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The kmsKeyNames at the given index.

getKmsKeyNamesBytes(int index)

publicByteStringgetKmsKeyNamesBytes(intindex)

Specifies the KMS configuration for the one or more keys used to encrypt the database. Values are of the form projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>.

The keys referenced by kms_key_names must fully cover all regions of the database instance configuration. Some examples:

  • For single region database instance configs, specify a single regional location KMS key.
  • For multi-regional database instance configs of type GOOGLE_MANAGED, either specify a multi-regional location KMS key or multiple regional location KMS keys that cover all regions in the instance config.
  • For a database instance config of type USER_MANAGED, please specify only regional location KMS keys to cover each region in the instance config. Multi-regional location KMS keys are not supported for USER_MANAGED instance configs.

repeated string kms_key_names = 3 [(.google.api.resource_reference) = { ... }

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the kmsKeyNames at the given index.

getKmsKeyNamesCount()

publicintgetKmsKeyNamesCount()

Specifies the KMS configuration for the one or more keys used to encrypt the database. Values are of the form projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>.

The keys referenced by kms_key_names must fully cover all regions of the database instance configuration. Some examples:

  • For single region database instance configs, specify a single regional location KMS key.
  • For multi-regional database instance configs of type GOOGLE_MANAGED, either specify a multi-regional location KMS key or multiple regional location KMS keys that cover all regions in the instance config.
  • For a database instance config of type USER_MANAGED, please specify only regional location KMS keys to cover each region in the instance config. Multi-regional location KMS keys are not supported for USER_MANAGED instance configs.

repeated string kms_key_names = 3 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
int

The count of kmsKeyNames.

getKmsKeyNamesList()

publicProtocolStringListgetKmsKeyNamesList()

Specifies the KMS configuration for the one or more keys used to encrypt the database. Values are of the form projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>.

The keys referenced by kms_key_names must fully cover all regions of the database instance configuration. Some examples:

  • For single region database instance configs, specify a single regional location KMS key.
  • For multi-regional database instance configs of type GOOGLE_MANAGED, either specify a multi-regional location KMS key or multiple regional location KMS keys that cover all regions in the instance config.
  • For a database instance config of type USER_MANAGED, please specify only regional location KMS keys to cover each region in the instance config. Multi-regional location KMS keys are not supported for USER_MANAGED instance configs.

repeated string kms_key_names = 3 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
ProtocolStringList

A list containing the kmsKeyNames.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicEncryptionConfig.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
EncryptionConfig.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

publicEncryptionConfig.BuildermergeFrom(Messageother)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
EncryptionConfig.Builder
Overrides

mergeFrom(EncryptionConfig other)

publicEncryptionConfig.BuildermergeFrom(EncryptionConfigother)
Parameter
NameDescription
otherEncryptionConfig
Returns
TypeDescription
EncryptionConfig.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalEncryptionConfig.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
EncryptionConfig.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

publicEncryptionConfig.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
EncryptionConfig.Builder
Overrides

setKmsKeyName(String value)

publicEncryptionConfig.BuildersetKmsKeyName(Stringvalue)

The Cloud KMS key to be used for encrypting and decrypting the database. Values are of the form projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>.

string kms_key_name = 2 [(.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueString

The kmsKeyName to set.

Returns
TypeDescription
EncryptionConfig.Builder

This builder for chaining.

setKmsKeyNameBytes(ByteString value)

publicEncryptionConfig.BuildersetKmsKeyNameBytes(ByteStringvalue)

The Cloud KMS key to be used for encrypting and decrypting the database. Values are of the form projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>.

string kms_key_name = 2 [(.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueByteString

The bytes for kmsKeyName to set.

Returns
TypeDescription
EncryptionConfig.Builder

This builder for chaining.

setKmsKeyNames(int index, String value)

publicEncryptionConfig.BuildersetKmsKeyNames(intindex,Stringvalue)

Specifies the KMS configuration for the one or more keys used to encrypt the database. Values are of the form projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>.

The keys referenced by kms_key_names must fully cover all regions of the database instance configuration. Some examples:

  • For single region database instance configs, specify a single regional location KMS key.
  • For multi-regional database instance configs of type GOOGLE_MANAGED, either specify a multi-regional location KMS key or multiple regional location KMS keys that cover all regions in the instance config.
  • For a database instance config of type USER_MANAGED, please specify only regional location KMS keys to cover each region in the instance config. Multi-regional location KMS keys are not supported for USER_MANAGED instance configs.

repeated string kms_key_names = 3 [(.google.api.resource_reference) = { ... }

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The kmsKeyNames to set.

Returns
TypeDescription
EncryptionConfig.Builder

This builder for chaining.

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

publicEncryptionConfig.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
EncryptionConfig.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalEncryptionConfig.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
EncryptionConfig.Builder
Overrides