Class EncryptionConfig.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<EncryptionConfig.Builder>
com.google.spanner.admin.database.v1.EncryptionConfig.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, EncryptionConfigOrBuilder, Cloneable
Enclosing class:
EncryptionConfig

public static final class EncryptionConfig.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<EncryptionConfig.Builder> implements EncryptionConfigOrBuilder
 Encryption configuration for a Cloud Spanner database.
 
Protobuf type google.spanner.admin.database.v1.EncryptionConfig
  • Method Details

    • 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<EncryptionConfig.Builder>
    • clear

      public EncryptionConfig.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<EncryptionConfig.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<EncryptionConfig.Builder>
    • getDefaultInstanceForType

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

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

      public EncryptionConfig buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      public EncryptionConfig.Builder clone()
      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<EncryptionConfig.Builder>
    • setField

      public EncryptionConfig.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<EncryptionConfig.Builder>
    • clearField

      public EncryptionConfig.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<EncryptionConfig.Builder>
    • clearOneof

      public EncryptionConfig.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<EncryptionConfig.Builder>
    • setRepeatedField

      public EncryptionConfig.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<EncryptionConfig.Builder>
    • addRepeatedField

      public EncryptionConfig.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<EncryptionConfig.Builder>
    • mergeFrom

      public EncryptionConfig.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<EncryptionConfig.Builder>
    • mergeFrom

      public EncryptionConfig.Builder mergeFrom(EncryptionConfig other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<EncryptionConfig.Builder>
    • mergeFrom

      public EncryptionConfig.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<EncryptionConfig.Builder>
      Throws:
      IOException
    • getKmsKeyName

      public String getKmsKeyName()
       The Cloud KMS key to be used for encrypting and decrypting
       the database. Values are of the form
       `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
       
      string kms_key_name = 2 [(.google.api.resource_reference) = { ... }
      Specified by:
      getKmsKeyName in interface EncryptionConfigOrBuilder
      Returns:
      The kmsKeyName.
    • getKmsKeyNameBytes

      public com.google.protobuf.ByteString getKmsKeyNameBytes()
       The Cloud KMS key to be used for encrypting and decrypting
       the database. Values are of the form
       `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
       
      string kms_key_name = 2 [(.google.api.resource_reference) = { ... }
      Specified by:
      getKmsKeyNameBytes in interface EncryptionConfigOrBuilder
      Returns:
      The bytes for kmsKeyName.
    • setKmsKeyName

      public EncryptionConfig.Builder setKmsKeyName(String value)
       The Cloud KMS key to be used for encrypting and decrypting
       the database. Values are of the form
       `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
       
      string kms_key_name = 2 [(.google.api.resource_reference) = { ... }
      Parameters:
      value - The kmsKeyName to set.
      Returns:
      This builder for chaining.
    • clearKmsKeyName

      public EncryptionConfig.Builder clearKmsKeyName()
       The Cloud KMS key to be used for encrypting and decrypting
       the database. Values are of the form
       `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
       
      string kms_key_name = 2 [(.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setKmsKeyNameBytes

      public EncryptionConfig.Builder setKmsKeyNameBytes(com.google.protobuf.ByteString value)
       The Cloud KMS key to be used for encrypting and decrypting
       the database. Values are of the form
       `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
       
      string kms_key_name = 2 [(.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for kmsKeyName to set.
      Returns:
      This builder for chaining.
    • getKmsKeyNamesList

      public com.google.protobuf.ProtocolStringList getKmsKeyNamesList()
       Specifies the KMS configuration for the one or more keys used to encrypt
       the database. Values are of the form
       `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
      
       The keys referenced by kms_key_names must fully cover all
       regions of the database instance configuration. Some examples:
       * For single region database instance configs, specify a single regional
       location KMS key.
       * For multi-regional database instance configs of type GOOGLE_MANAGED,
       either specify a multi-regional location KMS key or multiple regional
       location KMS keys that cover all regions in the instance config.
       * For a database instance config of type USER_MANAGED, please specify only
       regional location KMS keys to cover each region in the instance config.
       Multi-regional location KMS keys are not supported for USER_MANAGED
       instance configs.
       
      repeated string kms_key_names = 3 [(.google.api.resource_reference) = { ... }
      Specified by:
      getKmsKeyNamesList in interface EncryptionConfigOrBuilder
      Returns:
      A list containing the kmsKeyNames.
    • getKmsKeyNamesCount

      public int getKmsKeyNamesCount()
       Specifies the KMS configuration for the one or more keys used to encrypt
       the database. Values are of the form
       `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
      
       The keys referenced by kms_key_names must fully cover all
       regions of the database instance configuration. Some examples:
       * For single region database instance configs, specify a single regional
       location KMS key.
       * For multi-regional database instance configs of type GOOGLE_MANAGED,
       either specify a multi-regional location KMS key or multiple regional
       location KMS keys that cover all regions in the instance config.
       * For a database instance config of type USER_MANAGED, please specify only
       regional location KMS keys to cover each region in the instance config.
       Multi-regional location KMS keys are not supported for USER_MANAGED
       instance configs.
       
      repeated string kms_key_names = 3 [(.google.api.resource_reference) = { ... }
      Specified by:
      getKmsKeyNamesCount in interface EncryptionConfigOrBuilder
      Returns:
      The count of kmsKeyNames.
    • getKmsKeyNames

      public String getKmsKeyNames(int index)
       Specifies the KMS configuration for the one or more keys used to encrypt
       the database. Values are of the form
       `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
      
       The keys referenced by kms_key_names must fully cover all
       regions of the database instance configuration. Some examples:
       * For single region database instance configs, specify a single regional
       location KMS key.
       * For multi-regional database instance configs of type GOOGLE_MANAGED,
       either specify a multi-regional location KMS key or multiple regional
       location KMS keys that cover all regions in the instance config.
       * For a database instance config of type USER_MANAGED, please specify only
       regional location KMS keys to cover each region in the instance config.
       Multi-regional location KMS keys are not supported for USER_MANAGED
       instance configs.
       
      repeated string kms_key_names = 3 [(.google.api.resource_reference) = { ... }
      Specified by:
      getKmsKeyNames in interface EncryptionConfigOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The kmsKeyNames at the given index.
    • getKmsKeyNamesBytes

      public com.google.protobuf.ByteString getKmsKeyNamesBytes(int index)
       Specifies the KMS configuration for the one or more keys used to encrypt
       the database. Values are of the form
       `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
      
       The keys referenced by kms_key_names must fully cover all
       regions of the database instance configuration. Some examples:
       * For single region database instance configs, specify a single regional
       location KMS key.
       * For multi-regional database instance configs of type GOOGLE_MANAGED,
       either specify a multi-regional location KMS key or multiple regional
       location KMS keys that cover all regions in the instance config.
       * For a database instance config of type USER_MANAGED, please specify only
       regional location KMS keys to cover each region in the instance config.
       Multi-regional location KMS keys are not supported for USER_MANAGED
       instance configs.
       
      repeated string kms_key_names = 3 [(.google.api.resource_reference) = { ... }
      Specified by:
      getKmsKeyNamesBytes in interface EncryptionConfigOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the kmsKeyNames at the given index.
    • setKmsKeyNames

      public EncryptionConfig.Builder setKmsKeyNames(int index, String value)
       Specifies the KMS configuration for the one or more keys used to encrypt
       the database. Values are of the form
       `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
      
       The keys referenced by kms_key_names must fully cover all
       regions of the database instance configuration. Some examples:
       * For single region database instance configs, specify a single regional
       location KMS key.
       * For multi-regional database instance configs of type GOOGLE_MANAGED,
       either specify a multi-regional location KMS key or multiple regional
       location KMS keys that cover all regions in the instance config.
       * For a database instance config of type USER_MANAGED, please specify only
       regional location KMS keys to cover each region in the instance config.
       Multi-regional location KMS keys are not supported for USER_MANAGED
       instance configs.
       
      repeated string kms_key_names = 3 [(.google.api.resource_reference) = { ... }
      Parameters:
      index - The index to set the value at.
      value - The kmsKeyNames to set.
      Returns:
      This builder for chaining.
    • addKmsKeyNames

      public EncryptionConfig.Builder addKmsKeyNames(String value)
       Specifies the KMS configuration for the one or more keys used to encrypt
       the database. Values are of the form
       `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
      
       The keys referenced by kms_key_names must fully cover all
       regions of the database instance configuration. Some examples:
       * For single region database instance configs, specify a single regional
       location KMS key.
       * For multi-regional database instance configs of type GOOGLE_MANAGED,
       either specify a multi-regional location KMS key or multiple regional
       location KMS keys that cover all regions in the instance config.
       * For a database instance config of type USER_MANAGED, please specify only
       regional location KMS keys to cover each region in the instance config.
       Multi-regional location KMS keys are not supported for USER_MANAGED
       instance configs.
       
      repeated string kms_key_names = 3 [(.google.api.resource_reference) = { ... }
      Parameters:
      value - The kmsKeyNames to add.
      Returns:
      This builder for chaining.
    • addAllKmsKeyNames

      public EncryptionConfig.Builder addAllKmsKeyNames(Iterable<String> values)
       Specifies the KMS configuration for the one or more keys used to encrypt
       the database. Values are of the form
       `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
      
       The keys referenced by kms_key_names must fully cover all
       regions of the database instance configuration. Some examples:
       * For single region database instance configs, specify a single regional
       location KMS key.
       * For multi-regional database instance configs of type GOOGLE_MANAGED,
       either specify a multi-regional location KMS key or multiple regional
       location KMS keys that cover all regions in the instance config.
       * For a database instance config of type USER_MANAGED, please specify only
       regional location KMS keys to cover each region in the instance config.
       Multi-regional location KMS keys are not supported for USER_MANAGED
       instance configs.
       
      repeated string kms_key_names = 3 [(.google.api.resource_reference) = { ... }
      Parameters:
      values - The kmsKeyNames to add.
      Returns:
      This builder for chaining.
    • clearKmsKeyNames

      public EncryptionConfig.Builder clearKmsKeyNames()
       Specifies the KMS configuration for the one or more keys used to encrypt
       the database. Values are of the form
       `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
      
       The keys referenced by kms_key_names must fully cover all
       regions of the database instance configuration. Some examples:
       * For single region database instance configs, specify a single regional
       location KMS key.
       * For multi-regional database instance configs of type GOOGLE_MANAGED,
       either specify a multi-regional location KMS key or multiple regional
       location KMS keys that cover all regions in the instance config.
       * For a database instance config of type USER_MANAGED, please specify only
       regional location KMS keys to cover each region in the instance config.
       Multi-regional location KMS keys are not supported for USER_MANAGED
       instance configs.
       
      repeated string kms_key_names = 3 [(.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • addKmsKeyNamesBytes

      public EncryptionConfig.Builder addKmsKeyNamesBytes(com.google.protobuf.ByteString value)
       Specifies the KMS configuration for the one or more keys used to encrypt
       the database. Values are of the form
       `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
      
       The keys referenced by kms_key_names must fully cover all
       regions of the database instance configuration. Some examples:
       * For single region database instance configs, specify a single regional
       location KMS key.
       * For multi-regional database instance configs of type GOOGLE_MANAGED,
       either specify a multi-regional location KMS key or multiple regional
       location KMS keys that cover all regions in the instance config.
       * For a database instance config of type USER_MANAGED, please specify only
       regional location KMS keys to cover each region in the instance config.
       Multi-regional location KMS keys are not supported for USER_MANAGED
       instance configs.
       
      repeated string kms_key_names = 3 [(.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes of the kmsKeyNames to add.
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final EncryptionConfig.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<EncryptionConfig.Builder>
    • mergeUnknownFields

      public final EncryptionConfig.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<EncryptionConfig.Builder>