Class CreateBackupEncryptionConfig.Builder

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

public static final class CreateBackupEncryptionConfig.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<CreateBackupEncryptionConfig.Builder> implements CreateBackupEncryptionConfigOrBuilder
 Encryption configuration for the backup to create.
 
Protobuf type google.spanner.admin.database.v1.CreateBackupEncryptionConfig
  • 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<CreateBackupEncryptionConfig.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<CreateBackupEncryptionConfig.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<CreateBackupEncryptionConfig.Builder>
    • getDefaultInstanceForType

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

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public CreateBackupEncryptionConfig buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.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<CreateBackupEncryptionConfig.Builder>
    • setField

      public CreateBackupEncryptionConfig.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<CreateBackupEncryptionConfig.Builder>
    • clearField

      public CreateBackupEncryptionConfig.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<CreateBackupEncryptionConfig.Builder>
    • clearOneof

      public CreateBackupEncryptionConfig.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<CreateBackupEncryptionConfig.Builder>
    • setRepeatedField

      public CreateBackupEncryptionConfig.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<CreateBackupEncryptionConfig.Builder>
    • addRepeatedField

      public CreateBackupEncryptionConfig.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<CreateBackupEncryptionConfig.Builder>
    • mergeFrom

      public CreateBackupEncryptionConfig.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<CreateBackupEncryptionConfig.Builder>
    • mergeFrom

    • isInitialized

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

      public CreateBackupEncryptionConfig.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<CreateBackupEncryptionConfig.Builder>
      Throws:
      IOException
    • getEncryptionTypeValue

      public int getEncryptionTypeValue()
       Required. The encryption type of the backup.
       
      .google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType encryption_type = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getEncryptionTypeValue in interface CreateBackupEncryptionConfigOrBuilder
      Returns:
      The enum numeric value on the wire for encryptionType.
    • setEncryptionTypeValue

      public CreateBackupEncryptionConfig.Builder setEncryptionTypeValue(int value)
       Required. The encryption type of the backup.
       
      .google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType encryption_type = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The enum numeric value on the wire for encryptionType to set.
      Returns:
      This builder for chaining.
    • getEncryptionType

      public CreateBackupEncryptionConfig.EncryptionType getEncryptionType()
       Required. The encryption type of the backup.
       
      .google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType encryption_type = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getEncryptionType in interface CreateBackupEncryptionConfigOrBuilder
      Returns:
      The encryptionType.
    • setEncryptionType

       Required. The encryption type of the backup.
       
      .google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType encryption_type = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The encryptionType to set.
      Returns:
      This builder for chaining.
    • clearEncryptionType

      public CreateBackupEncryptionConfig.Builder clearEncryptionType()
       Required. The encryption type of the backup.
       
      .google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType encryption_type = 1 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • getKmsKeyName

      public String getKmsKeyName()
       Optional. The Cloud KMS key that will be used to protect the backup.
       This field should be set only when
       [encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type]
       is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
       `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
       
      string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Specified by:
      getKmsKeyName in interface CreateBackupEncryptionConfigOrBuilder
      Returns:
      The kmsKeyName.
    • getKmsKeyNameBytes

      public com.google.protobuf.ByteString getKmsKeyNameBytes()
       Optional. The Cloud KMS key that will be used to protect the backup.
       This field should be set only when
       [encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type]
       is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
       `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
       
      string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Specified by:
      getKmsKeyNameBytes in interface CreateBackupEncryptionConfigOrBuilder
      Returns:
      The bytes for kmsKeyName.
    • setKmsKeyName

      public CreateBackupEncryptionConfig.Builder setKmsKeyName(String value)
       Optional. The Cloud KMS key that will be used to protect the backup.
       This field should be set only when
       [encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type]
       is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
       `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
       
      string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The kmsKeyName to set.
      Returns:
      This builder for chaining.
    • clearKmsKeyName

      public CreateBackupEncryptionConfig.Builder clearKmsKeyName()
       Optional. The Cloud KMS key that will be used to protect the backup.
       This field should be set only when
       [encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type]
       is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
       `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
       
      string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setKmsKeyNameBytes

      public CreateBackupEncryptionConfig.Builder setKmsKeyNameBytes(com.google.protobuf.ByteString value)
       Optional. The Cloud KMS key that will be used to protect the backup.
       This field should be set only when
       [encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type]
       is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
       `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
       
      string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for kmsKeyName to set.
      Returns:
      This builder for chaining.
    • getKmsKeyNamesList

      public com.google.protobuf.ProtocolStringList getKmsKeyNamesList()
       Optional. Specifies the KMS configuration for the one or more keys used to
       protect the backup. 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 backup's instance configuration. Some examples:
       * For single region instance configs, specify a single regional
       location KMS key.
       * For multi-regional 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 an 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.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Specified by:
      getKmsKeyNamesList in interface CreateBackupEncryptionConfigOrBuilder
      Returns:
      A list containing the kmsKeyNames.
    • getKmsKeyNamesCount

      public int getKmsKeyNamesCount()
       Optional. Specifies the KMS configuration for the one or more keys used to
       protect the backup. 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 backup's instance configuration. Some examples:
       * For single region instance configs, specify a single regional
       location KMS key.
       * For multi-regional 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 an 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.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Specified by:
      getKmsKeyNamesCount in interface CreateBackupEncryptionConfigOrBuilder
      Returns:
      The count of kmsKeyNames.
    • getKmsKeyNames

      public String getKmsKeyNames(int index)
       Optional. Specifies the KMS configuration for the one or more keys used to
       protect the backup. 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 backup's instance configuration. Some examples:
       * For single region instance configs, specify a single regional
       location KMS key.
       * For multi-regional 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 an 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.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Specified by:
      getKmsKeyNames in interface CreateBackupEncryptionConfigOrBuilder
      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)
       Optional. Specifies the KMS configuration for the one or more keys used to
       protect the backup. 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 backup's instance configuration. Some examples:
       * For single region instance configs, specify a single regional
       location KMS key.
       * For multi-regional 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 an 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.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Specified by:
      getKmsKeyNamesBytes in interface CreateBackupEncryptionConfigOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the kmsKeyNames at the given index.
    • setKmsKeyNames

      public CreateBackupEncryptionConfig.Builder setKmsKeyNames(int index, String value)
       Optional. Specifies the KMS configuration for the one or more keys used to
       protect the backup. 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 backup's instance configuration. Some examples:
       * For single region instance configs, specify a single regional
       location KMS key.
       * For multi-regional 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 an 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.field_behavior) = OPTIONAL, (.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 CreateBackupEncryptionConfig.Builder addKmsKeyNames(String value)
       Optional. Specifies the KMS configuration for the one or more keys used to
       protect the backup. 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 backup's instance configuration. Some examples:
       * For single region instance configs, specify a single regional
       location KMS key.
       * For multi-regional 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 an 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.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The kmsKeyNames to add.
      Returns:
      This builder for chaining.
    • addAllKmsKeyNames

      public CreateBackupEncryptionConfig.Builder addAllKmsKeyNames(Iterable<String> values)
       Optional. Specifies the KMS configuration for the one or more keys used to
       protect the backup. 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 backup's instance configuration. Some examples:
       * For single region instance configs, specify a single regional
       location KMS key.
       * For multi-regional 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 an 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.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Parameters:
      values - The kmsKeyNames to add.
      Returns:
      This builder for chaining.
    • clearKmsKeyNames

      public CreateBackupEncryptionConfig.Builder clearKmsKeyNames()
       Optional. Specifies the KMS configuration for the one or more keys used to
       protect the backup. 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 backup's instance configuration. Some examples:
       * For single region instance configs, specify a single regional
       location KMS key.
       * For multi-regional 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 an 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.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • addKmsKeyNamesBytes

      public CreateBackupEncryptionConfig.Builder addKmsKeyNamesBytes(com.google.protobuf.ByteString value)
       Optional. Specifies the KMS configuration for the one or more keys used to
       protect the backup. 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 backup's instance configuration. Some examples:
       * For single region instance configs, specify a single regional
       location KMS key.
       * For multi-regional 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 an 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.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes of the kmsKeyNames to add.
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final CreateBackupEncryptionConfig.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<CreateBackupEncryptionConfig.Builder>
    • mergeUnknownFields

      public final CreateBackupEncryptionConfig.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<CreateBackupEncryptionConfig.Builder>