public static final class Database.CmekConfig.Builder extends GeneratedMessageV3.Builder<Database.CmekConfig.Builder> implements Database.CmekConfigOrBuilderThe 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
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > Database.CmekConfig.BuilderImplements
Database.CmekConfigOrBuilderStatic 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 |
StringThe 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 |
ByteStringThe 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 |
|
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 |
|
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 |
|
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 |
|
clone()
public Database.CmekConfig.Builder clone()| Returns | |
|---|---|
| Type | Description |
Database.CmekConfig.Builder |
|
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 |
intThe 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 |
intThe 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 |
|
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 |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
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 |
|
| 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 |
|
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Database.CmekConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| Returns | |
|---|---|
| Type | Description |
Database.CmekConfig.Builder |
|
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 |
intThe index to set the value at. |
value |
StringThe 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 |
|
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 |
StringThe 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 |
ByteStringThe 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 |
|
setUnknownFields(UnknownFieldSet unknownFields)
public final Database.CmekConfig.Builder setUnknownFields(UnknownFieldSet unknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| Returns | |
|---|---|
| Type | Description |
Database.CmekConfig.Builder |
|