Class Database.CmekConfig.Builder (3.30.0)

public static final class Database.CmekConfig.Builder extends GeneratedMessageV3.Builder<Database.CmekConfig.Builder> implements Database.CmekConfigOrBuilder

The CMEK (Customer Managed Encryption Key) configuration for a Firestore database. If not present, the database is secured by the default Google encryption key.

Protobuf type google.firestore.admin.v1.Database.CmekConfig

Static Methods

getDescriptor()

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

Methods

addActiveKeyVersion(String value)

public Database.CmekConfig.Builder addActiveKeyVersion(String value)

Output only. Currently in-use KMS key versions. During key rotation, there can be multiple in-use key versions.

The expected format is projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}.

repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The activeKeyVersion to add.

Returns
Type Description
Database.CmekConfig.Builder

This builder for chaining.

addActiveKeyVersionBytes(ByteString value)

public Database.CmekConfig.Builder addActiveKeyVersionBytes(ByteString value)

Output only. Currently in-use KMS key versions. During key rotation, there can be multiple in-use key versions.

The expected format is projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}.

repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes of the activeKeyVersion to add.

Returns
Type Description
Database.CmekConfig.Builder

This builder for chaining.

addAllActiveKeyVersion(Iterable<String> values)

public Database.CmekConfig.Builder addAllActiveKeyVersion(Iterable<String> values)

Output only. Currently in-use KMS key versions. During key rotation, there can be multiple in-use key versions.

The expected format is projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}.

repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
values Iterable<String>

The activeKeyVersion to add.

Returns
Type Description
Database.CmekConfig.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Database.CmekConfig build()
Returns
Type Description
Database.CmekConfig

buildPartial()

public Database.CmekConfig buildPartial()
Returns
Type Description
Database.CmekConfig

clear()

public Database.CmekConfig.Builder clear()
Returns
Type Description
Database.CmekConfig.Builder
Overrides

clearActiveKeyVersion()

public Database.CmekConfig.Builder clearActiveKeyVersion()

Output only. Currently in-use KMS key versions. During key rotation, there can be multiple in-use key versions.

The expected format is projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}.

repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Database.CmekConfig.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearKmsKeyName()

public Database.CmekConfig.Builder clearKmsKeyName()

Required. Only keys in the same location as this database are allowed to be used for encryption.

For Firestore's nam5 multi-region, this corresponds to Cloud KMS multi-region us. For Firestore's eur3 multi-region, this corresponds to Cloud KMS multi-region europe. See https://cloud.google.com/kms/docs/locations.

The expected format is projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}.

string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Database.CmekConfig.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

public Database.CmekConfig.Builder clone()
Returns
Type Description
Database.CmekConfig.Builder
Overrides

getActiveKeyVersion(int index)

public String getActiveKeyVersion(int index)

Output only. Currently in-use KMS key versions. During key rotation, there can be multiple in-use key versions.

The expected format is projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}.

repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The activeKeyVersion at the given index.

getActiveKeyVersionBytes(int index)

public ByteString getActiveKeyVersionBytes(int index)

Output only. Currently in-use KMS key versions. During key rotation, there can be multiple in-use key versions.

The expected format is projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}.

repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the activeKeyVersion at the given index.

getActiveKeyVersionCount()

public int getActiveKeyVersionCount()

Output only. Currently in-use KMS key versions. During key rotation, there can be multiple in-use key versions.

The expected format is projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}.

repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The count of activeKeyVersion.

getActiveKeyVersionList()

public ProtocolStringList getActiveKeyVersionList()

Output only. Currently in-use KMS key versions. During key rotation, there can be multiple in-use key versions.

The expected format is projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}.

repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ProtocolStringList

A list containing the activeKeyVersion.

getDefaultInstanceForType()

public Database.CmekConfig getDefaultInstanceForType()
Returns
Type Description
Database.CmekConfig

getDescriptorForType()

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

getKmsKeyName()

public String getKmsKeyName()

Required. Only keys in the same location as this database are allowed to be used for encryption.

For Firestore's nam5 multi-region, this corresponds to Cloud KMS multi-region us. For Firestore's eur3 multi-region, this corresponds to Cloud KMS multi-region europe. See https://cloud.google.com/kms/docs/locations.

The expected format is projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}.

string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The kmsKeyName.

getKmsKeyNameBytes()

public ByteString getKmsKeyNameBytes()

Required. Only keys in the same location as this database are allowed to be used for encryption.

For Firestore's nam5 multi-region, this corresponds to Cloud KMS multi-region us. For Firestore's eur3 multi-region, this corresponds to Cloud KMS multi-region europe. See https://cloud.google.com/kms/docs/locations.

The expected format is projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}.

string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for kmsKeyName.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Database.CmekConfig other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setActiveKeyVersion(int index, String value)

public Database.CmekConfig.Builder setActiveKeyVersion(int index, String value)

Output only. Currently in-use KMS key versions. During key rotation, there can be multiple in-use key versions.

The expected format is projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}.

repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int

The index to set the value at.

value String

The activeKeyVersion to set.

Returns
Type Description
Database.CmekConfig.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setKmsKeyName(String value)

public Database.CmekConfig.Builder setKmsKeyName(String value)

Required. Only keys in the same location as this database are allowed to be used for encryption.

For Firestore's nam5 multi-region, this corresponds to Cloud KMS multi-region us. For Firestore's eur3 multi-region, this corresponds to Cloud KMS multi-region europe. See https://cloud.google.com/kms/docs/locations.

The expected format is projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}.

string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The kmsKeyName to set.

Returns
Type Description
Database.CmekConfig.Builder

This builder for chaining.

setKmsKeyNameBytes(ByteString value)

public Database.CmekConfig.Builder setKmsKeyNameBytes(ByteString value)

Required. Only keys in the same location as this database are allowed to be used for encryption.

For Firestore's nam5 multi-region, this corresponds to Cloud KMS multi-region us. For Firestore's eur3 multi-region, this corresponds to Cloud KMS multi-region europe. See https://cloud.google.com/kms/docs/locations.

The expected format is projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}.

string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for kmsKeyName to set.

Returns
Type Description
Database.CmekConfig.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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