Class CmekSettings.Builder (0.3.0)

public static final class CmekSettings.Builder extends GeneratedMessage.Builder<CmekSettings.Builder> implements CmekSettingsOrBuilder

Settings for configuring CMEK for a bucket.

Protobuf type google.cloud.observability.v1.CmekSettings

Static Methods

getDescriptor()

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

Methods

build()

public CmekSettings build()
Returns
Type Description
CmekSettings

buildPartial()

public CmekSettings buildPartial()
Returns
Type Description
CmekSettings

clear()

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

clearKmsKey()

public CmekSettings.Builder clearKmsKey()

Optional. The resource name for the configured Cloud KMS key. The format is:

projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]

For example:

projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key

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

Returns
Type Description
CmekSettings.Builder

This builder for chaining.

clearKmsKeyVersion()

public CmekSettings.Builder clearKmsKeyVersion()

Output only. The CryptoKeyVersion resource name for the configured Cloud KMS key. The format is:

projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]

For example:

projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1

This read-only field is used to convey the specific configured CryptoKeyVersion of the kms_key that has been configured. It is populated when the CMEK settings are bound to a single key version.

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

Returns
Type Description
CmekSettings.Builder

This builder for chaining.

clearServiceAccountId()

public CmekSettings.Builder clearServiceAccountId()

Output only. The service account used to access the key.

string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
CmekSettings.Builder

This builder for chaining.

getDefaultInstanceForType()

public CmekSettings getDefaultInstanceForType()
Returns
Type Description
CmekSettings

getDescriptorForType()

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

getKmsKey()

public String getKmsKey()

Optional. The resource name for the configured Cloud KMS key. The format is:

projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]

For example:

projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key

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

Returns
Type Description
String

The kmsKey.

getKmsKeyBytes()

public ByteString getKmsKeyBytes()

Optional. The resource name for the configured Cloud KMS key. The format is:

projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]

For example:

projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key

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

Returns
Type Description
ByteString

The bytes for kmsKey.

getKmsKeyVersion()

public String getKmsKeyVersion()

Output only. The CryptoKeyVersion resource name for the configured Cloud KMS key. The format is:

projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]

For example:

projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1

This read-only field is used to convey the specific configured CryptoKeyVersion of the kms_key that has been configured. It is populated when the CMEK settings are bound to a single key version.

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

Returns
Type Description
String

The kmsKeyVersion.

getKmsKeyVersionBytes()

public ByteString getKmsKeyVersionBytes()

Output only. The CryptoKeyVersion resource name for the configured Cloud KMS key. The format is:

projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]

For example:

projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1

This read-only field is used to convey the specific configured CryptoKeyVersion of the kms_key that has been configured. It is populated when the CMEK settings are bound to a single key version.

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

Returns
Type Description
ByteString

The bytes for kmsKeyVersion.

getServiceAccountId()

public String getServiceAccountId()

Output only. The service account used to access the key.

string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The serviceAccountId.

getServiceAccountIdBytes()

public ByteString getServiceAccountIdBytes()

Output only. The service account used to access the key.

string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for serviceAccountId.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CmekSettings other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setKmsKey(String value)

public CmekSettings.Builder setKmsKey(String value)

Optional. The resource name for the configured Cloud KMS key. The format is:

projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]

For example:

projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key

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

Parameter
Name Description
value String

The kmsKey to set.

Returns
Type Description
CmekSettings.Builder

This builder for chaining.

setKmsKeyBytes(ByteString value)

public CmekSettings.Builder setKmsKeyBytes(ByteString value)

Optional. The resource name for the configured Cloud KMS key. The format is:

projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]

For example:

projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key

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

Parameter
Name Description
value ByteString

The bytes for kmsKey to set.

Returns
Type Description
CmekSettings.Builder

This builder for chaining.

setKmsKeyVersion(String value)

public CmekSettings.Builder setKmsKeyVersion(String value)

Output only. The CryptoKeyVersion resource name for the configured Cloud KMS key. The format is:

projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]

For example:

projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1

This read-only field is used to convey the specific configured CryptoKeyVersion of the kms_key that has been configured. It is populated when the CMEK settings are bound to a single key version.

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

Parameter
Name Description
value String

The kmsKeyVersion to set.

Returns
Type Description
CmekSettings.Builder

This builder for chaining.

setKmsKeyVersionBytes(ByteString value)

public CmekSettings.Builder setKmsKeyVersionBytes(ByteString value)

Output only. The CryptoKeyVersion resource name for the configured Cloud KMS key. The format is:

projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]

For example:

projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1

This read-only field is used to convey the specific configured CryptoKeyVersion of the kms_key that has been configured. It is populated when the CMEK settings are bound to a single key version.

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

Parameter
Name Description
value ByteString

The bytes for kmsKeyVersion to set.

Returns
Type Description
CmekSettings.Builder

This builder for chaining.

setServiceAccountId(String value)

public CmekSettings.Builder setServiceAccountId(String value)

Output only. The service account used to access the key.

string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The serviceAccountId to set.

Returns
Type Description
CmekSettings.Builder

This builder for chaining.

setServiceAccountIdBytes(ByteString value)

public CmekSettings.Builder setServiceAccountIdBytes(ByteString value)

Output only. The service account used to access the key.

string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for serviceAccountId to set.

Returns
Type Description
CmekSettings.Builder

This builder for chaining.