Class EncryptionConfig.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.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.GeneratedMessage.Builder<EncryptionConfig.Builder> implements EncryptionConfigOrBuilder
 Encryption configuration for a Cloud Spanner database.
 
Protobuf type google.spanner.admin.database.v1.EncryptionConfig
  • Method Summary

    Modifier and Type
    Method
    Description
    Specifies the KMS configuration for the one or more keys used to encrypt the database.
    Specifies the KMS configuration for the one or more keys used to encrypt the database.
    addKmsKeyNamesBytes(com.google.protobuf.ByteString value)
    Specifies the KMS configuration for the one or more keys used to encrypt the database.
     
     
     
    The Cloud KMS key to be used for encrypting and decrypting the database.
    Specifies the KMS configuration for the one or more keys used to encrypt the database.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    The Cloud KMS key to be used for encrypting and decrypting the database.
    com.google.protobuf.ByteString
    The Cloud KMS key to be used for encrypting and decrypting the database.
    getKmsKeyNames(int index)
    Specifies the KMS configuration for the one or more keys used to encrypt the database.
    com.google.protobuf.ByteString
    Specifies the KMS configuration for the one or more keys used to encrypt the database.
    int
    Specifies the KMS configuration for the one or more keys used to encrypt the database.
    com.google.protobuf.ProtocolStringList
    Specifies the KMS configuration for the one or more keys used to encrypt the database.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
     
    The Cloud KMS key to be used for encrypting and decrypting the database.
    setKmsKeyNameBytes(com.google.protobuf.ByteString value)
    The Cloud KMS key to be used for encrypting and decrypting the database.
    setKmsKeyNames(int index, String value)
    Specifies the KMS configuration for the one or more keys used to encrypt the database.

    Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.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.GeneratedMessage.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.GeneratedMessage.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
    • 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.GeneratedMessage.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.