Class Database.CmekConfig (3.28.0)

public static final class Database.CmekConfig extends GeneratedMessageV3 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 Fields

ACTIVE_KEY_VERSION_FIELD_NUMBER

public static final int ACTIVE_KEY_VERSION_FIELD_NUMBER
Field Value
Type Description
int

KMS_KEY_NAME_FIELD_NUMBER

public static final int KMS_KEY_NAME_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Database.CmekConfig getDefaultInstance()
Returns
Type Description
Database.CmekConfig

getDescriptor()

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

newBuilder()

public static Database.CmekConfig.Builder newBuilder()
Returns
Type Description
Database.CmekConfig.Builder

newBuilder(Database.CmekConfig prototype)

public static Database.CmekConfig.Builder newBuilder(Database.CmekConfig prototype)
Parameter
Name Description
prototype Database.CmekConfig
Returns
Type Description
Database.CmekConfig.Builder

parseDelimitedFrom(InputStream input)

public static Database.CmekConfig parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Database.CmekConfig
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Database.CmekConfig parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Database.CmekConfig
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Database.CmekConfig parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Database.CmekConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Database.CmekConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Database.CmekConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Database.CmekConfig parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Database.CmekConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Database.CmekConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Database.CmekConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Database.CmekConfig parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Database.CmekConfig
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Database.CmekConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Database.CmekConfig
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Database.CmekConfig parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Database.CmekConfig
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Database.CmekConfig parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Database.CmekConfig
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Database.CmekConfig parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Database.CmekConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Database.CmekConfig parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Database.CmekConfig
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Database.CmekConfig> parser()
Returns
Type Description
Parser<CmekConfig>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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

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.

getParserForType()

public Parser<Database.CmekConfig> getParserForType()
Returns
Type Description
Parser<CmekConfig>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Database.CmekConfig.Builder newBuilderForType()
Returns
Type Description
Database.CmekConfig.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Database.CmekConfig.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Database.CmekConfig.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public Database.CmekConfig.Builder toBuilder()
Returns
Type Description
Database.CmekConfig.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException