Class WorkstationConfig.CustomerEncryptionKey.Builder

  • All Implemented Interfaces:
    WorkstationConfig.CustomerEncryptionKeyOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    WorkstationConfig.CustomerEncryptionKey

    public static final class WorkstationConfig.CustomerEncryptionKey.Builder
    extends com.google.protobuf.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](https://cloud.google.com/kms/docs/separation-of-duties).
     
    Protobuf type google.cloud.workstations.v1beta.WorkstationConfig.CustomerEncryptionKey
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<WorkstationConfig.CustomerEncryptionKey.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<WorkstationConfig.CustomerEncryptionKey.Builder>
      • getDefaultInstanceForType

        public WorkstationConfig.CustomerEncryptionKey getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public WorkstationConfig.CustomerEncryptionKey build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public WorkstationConfig.CustomerEncryptionKey buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<WorkstationConfig.CustomerEncryptionKey.Builder>
      • 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];
        Specified by:
        getKmsKey in interface WorkstationConfig.CustomerEncryptionKeyOrBuilder
        Returns:
        The kmsKey.
      • getKmsKeyBytes

        public com.google.protobuf.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];
        Specified by:
        getKmsKeyBytes in interface WorkstationConfig.CustomerEncryptionKeyOrBuilder
        Returns:
        The bytes for kmsKey.
      • setKmsKey

        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];
        Parameters:
        value - The kmsKey to set.
        Returns:
        This builder for chaining.
      • 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:
        This builder for chaining.
      • setKmsKeyBytes

        public WorkstationConfig.CustomerEncryptionKey.Builder setKmsKeyBytes​(com.google.protobuf.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];
        Parameters:
        value - The bytes for kmsKey to set.
        Returns:
        This builder for chaining.
      • 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](https://cloud.google.com/kms/docs/separation-of-duties) and
         `gcloud kms keys add-iam-policy-binding`
         [`--member`](https://cloud.google.com/sdk/gcloud/reference/kms/keys/add-iam-policy-binding#--member).
         
        string kms_key_service_account = 2 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getKmsKeyServiceAccount in interface WorkstationConfig.CustomerEncryptionKeyOrBuilder
        Returns:
        The kmsKeyServiceAccount.
      • getKmsKeyServiceAccountBytes

        public com.google.protobuf.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](https://cloud.google.com/kms/docs/separation-of-duties) and
         `gcloud kms keys add-iam-policy-binding`
         [`--member`](https://cloud.google.com/sdk/gcloud/reference/kms/keys/add-iam-policy-binding#--member).
         
        string kms_key_service_account = 2 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getKmsKeyServiceAccountBytes in interface WorkstationConfig.CustomerEncryptionKeyOrBuilder
        Returns:
        The bytes for kmsKeyServiceAccount.
      • setKmsKeyServiceAccount

        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](https://cloud.google.com/kms/docs/separation-of-duties) and
         `gcloud kms keys add-iam-policy-binding`
         [`--member`](https://cloud.google.com/sdk/gcloud/reference/kms/keys/add-iam-policy-binding#--member).
         
        string kms_key_service_account = 2 [(.google.api.field_behavior) = IMMUTABLE];
        Parameters:
        value - The kmsKeyServiceAccount to set.
        Returns:
        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](https://cloud.google.com/kms/docs/separation-of-duties) and
         `gcloud kms keys add-iam-policy-binding`
         [`--member`](https://cloud.google.com/sdk/gcloud/reference/kms/keys/add-iam-policy-binding#--member).
         
        string kms_key_service_account = 2 [(.google.api.field_behavior) = IMMUTABLE];
        Returns:
        This builder for chaining.
      • setKmsKeyServiceAccountBytes

        public WorkstationConfig.CustomerEncryptionKey.Builder setKmsKeyServiceAccountBytes​(com.google.protobuf.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](https://cloud.google.com/kms/docs/separation-of-duties) and
         `gcloud kms keys add-iam-policy-binding`
         [`--member`](https://cloud.google.com/sdk/gcloud/reference/kms/keys/add-iam-policy-binding#--member).
         
        string kms_key_service_account = 2 [(.google.api.field_behavior) = IMMUTABLE];
        Parameters:
        value - The bytes for kmsKeyServiceAccount to set.
        Returns:
        This builder for chaining.