public static final class CmekSettings.Builder extends GeneratedMessage.Builder<CmekSettings.Builder> implements CmekSettingsOrBuilderSettings for configuring CMEK for a bucket.
Protobuf type google.cloud.observability.v1.CmekSettings
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > CmekSettings.BuilderImplements
CmekSettingsOrBuilderStatic 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 |
|
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 |
|
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 |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
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 |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public CmekSettings.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
CmekSettings.Builder |
|
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 |
StringThe 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 |
ByteStringThe 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 |
StringThe 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 |
ByteStringThe 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 |
StringThe 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 |
ByteStringThe bytes for serviceAccountId to set. |
| Returns | |
|---|---|
| Type | Description |
CmekSettings.Builder |
This builder for chaining. |