Class WorkstationConfig.CustomerEncryptionKey.Builder (0.21.0)

public static final class WorkstationConfig.CustomerEncryptionKey.Builder extends GeneratedMessageV3.Builder<WorkstationConfig.CustomerEncryptionKey.Builder> implements WorkstationConfig.CustomerEncryptionKeyOrBuilder

A customer-managed encryption key (CMEK) for the Compute Engine resources of the associated workstation configuration. Specify the name of your Cloud KMS encryption key and the default service account. We recommend that you use a separate service account and follow Cloud KMS best practices.

Protobuf type google.cloud.workstations.v1.WorkstationConfig.CustomerEncryptionKey

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public WorkstationConfig.CustomerEncryptionKey.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
WorkstationConfig.CustomerEncryptionKey.Builder
Overrides

build()

public WorkstationConfig.CustomerEncryptionKey build()
Returns
TypeDescription
WorkstationConfig.CustomerEncryptionKey

buildPartial()

public WorkstationConfig.CustomerEncryptionKey buildPartial()
Returns
TypeDescription
WorkstationConfig.CustomerEncryptionKey

clear()

public WorkstationConfig.CustomerEncryptionKey.Builder clear()
Returns
TypeDescription
WorkstationConfig.CustomerEncryptionKey.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public WorkstationConfig.CustomerEncryptionKey.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
WorkstationConfig.CustomerEncryptionKey.Builder
Overrides

clearKmsKey()

public WorkstationConfig.CustomerEncryptionKey.Builder clearKmsKey()

Immutable. The name of the Google Cloud KMS encryption key. For example, "projects/PROJECT_ID/locations/REGION/keyRings/KEY_RING/cryptoKeys/KEY_NAME". The key must be in the same region as the workstation configuration.

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

Returns
TypeDescription
WorkstationConfig.CustomerEncryptionKey.Builder

This builder for chaining.

clearKmsKeyServiceAccount()

public WorkstationConfig.CustomerEncryptionKey.Builder clearKmsKeyServiceAccount()

Immutable. The service account to use with the specified KMS key. We recommend that you use a separate service account and follow KMS best practices. For more information, see Separation of duties and gcloud kms keys add-iam-policy-binding --member.

string kms_key_service_account = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
WorkstationConfig.CustomerEncryptionKey.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public WorkstationConfig.CustomerEncryptionKey.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
WorkstationConfig.CustomerEncryptionKey.Builder
Overrides

clone()

public WorkstationConfig.CustomerEncryptionKey.Builder clone()
Returns
TypeDescription
WorkstationConfig.CustomerEncryptionKey.Builder
Overrides

getDefaultInstanceForType()

public WorkstationConfig.CustomerEncryptionKey getDefaultInstanceForType()
Returns
TypeDescription
WorkstationConfig.CustomerEncryptionKey

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getKmsKey()

public String getKmsKey()

Immutable. The name of the Google Cloud KMS encryption key. For example, "projects/PROJECT_ID/locations/REGION/keyRings/KEY_RING/cryptoKeys/KEY_NAME". The key must be in the same region as the workstation configuration.

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

Returns
TypeDescription
String

The kmsKey.

getKmsKeyBytes()

public ByteString getKmsKeyBytes()

Immutable. The name of the Google Cloud KMS encryption key. For example, "projects/PROJECT_ID/locations/REGION/keyRings/KEY_RING/cryptoKeys/KEY_NAME". The key must be in the same region as the workstation configuration.

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

Returns
TypeDescription
ByteString

The bytes for kmsKey.

getKmsKeyServiceAccount()

public String getKmsKeyServiceAccount()

Immutable. The service account to use with the specified KMS key. We recommend that you use a separate service account and follow KMS best practices. For more information, see Separation of duties and gcloud kms keys add-iam-policy-binding --member.

string kms_key_service_account = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
String

The kmsKeyServiceAccount.

getKmsKeyServiceAccountBytes()

public ByteString getKmsKeyServiceAccountBytes()

Immutable. The service account to use with the specified KMS key. We recommend that you use a separate service account and follow KMS best practices. For more information, see Separation of duties and gcloud kms keys add-iam-policy-binding --member.

string kms_key_service_account = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
ByteString

The bytes for kmsKeyServiceAccount.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(WorkstationConfig.CustomerEncryptionKey other)

public WorkstationConfig.CustomerEncryptionKey.Builder mergeFrom(WorkstationConfig.CustomerEncryptionKey other)
Parameter
NameDescription
otherWorkstationConfig.CustomerEncryptionKey
Returns
TypeDescription
WorkstationConfig.CustomerEncryptionKey.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public WorkstationConfig.CustomerEncryptionKey.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
WorkstationConfig.CustomerEncryptionKey.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public WorkstationConfig.CustomerEncryptionKey.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
WorkstationConfig.CustomerEncryptionKey.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final WorkstationConfig.CustomerEncryptionKey.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
WorkstationConfig.CustomerEncryptionKey.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public WorkstationConfig.CustomerEncryptionKey.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
WorkstationConfig.CustomerEncryptionKey.Builder
Overrides

setKmsKey(String value)

public WorkstationConfig.CustomerEncryptionKey.Builder setKmsKey(String value)

Immutable. The name of the Google Cloud KMS encryption key. For example, "projects/PROJECT_ID/locations/REGION/keyRings/KEY_RING/cryptoKeys/KEY_NAME". The key must be in the same region as the workstation configuration.

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

Parameter
NameDescription
valueString

The kmsKey to set.

Returns
TypeDescription
WorkstationConfig.CustomerEncryptionKey.Builder

This builder for chaining.

setKmsKeyBytes(ByteString value)

public WorkstationConfig.CustomerEncryptionKey.Builder setKmsKeyBytes(ByteString value)

Immutable. The name of the Google Cloud KMS encryption key. For example, "projects/PROJECT_ID/locations/REGION/keyRings/KEY_RING/cryptoKeys/KEY_NAME". The key must be in the same region as the workstation configuration.

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

Parameter
NameDescription
valueByteString

The bytes for kmsKey to set.

Returns
TypeDescription
WorkstationConfig.CustomerEncryptionKey.Builder

This builder for chaining.

setKmsKeyServiceAccount(String value)

public WorkstationConfig.CustomerEncryptionKey.Builder setKmsKeyServiceAccount(String value)

Immutable. The service account to use with the specified KMS key. We recommend that you use a separate service account and follow KMS best practices. For more information, see Separation of duties and gcloud kms keys add-iam-policy-binding --member.

string kms_key_service_account = 2 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
NameDescription
valueString

The kmsKeyServiceAccount to set.

Returns
TypeDescription
WorkstationConfig.CustomerEncryptionKey.Builder

This builder for chaining.

setKmsKeyServiceAccountBytes(ByteString value)

public WorkstationConfig.CustomerEncryptionKey.Builder setKmsKeyServiceAccountBytes(ByteString value)

Immutable. The service account to use with the specified KMS key. We recommend that you use a separate service account and follow KMS best practices. For more information, see Separation of duties and gcloud kms keys add-iam-policy-binding --member.

string kms_key_service_account = 2 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
NameDescription
valueByteString

The bytes for kmsKeyServiceAccount to set.

Returns
TypeDescription
WorkstationConfig.CustomerEncryptionKey.Builder

This builder for chaining.

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

public WorkstationConfig.CustomerEncryptionKey.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
WorkstationConfig.CustomerEncryptionKey.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final WorkstationConfig.CustomerEncryptionKey.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
WorkstationConfig.CustomerEncryptionKey.Builder
Overrides