Class TransformationConfig.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<TransformationConfig.Builder>
com.google.privacy.dlp.v2.TransformationConfig.Builder
All Implemented Interfaces:
TransformationConfigOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
TransformationConfig

public static final class TransformationConfig.Builder extends com.google.protobuf.GeneratedMessage.Builder<TransformationConfig.Builder> implements TransformationConfigOrBuilder
 User specified templates and configs for how to deidentify structured,
 unstructures, and image files. User must provide either a unstructured
 deidentify template or at least one redact image config.
 
Protobuf type google.privacy.dlp.v2.TransformationConfig
  • 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<TransformationConfig.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<TransformationConfig.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<TransformationConfig.Builder>
    • getDefaultInstanceForType

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

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

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

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

    • isInitialized

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

      public TransformationConfig.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<TransformationConfig.Builder>
      Throws:
      IOException
    • getDeidentifyTemplate

      public String getDeidentifyTemplate()
       De-identify template.
       If this template is specified, it will serve as the default de-identify
       template. This template cannot contain `record_transformations` since it
       can be used for unstructured content such as free-form text files. If this
       template is not set, a default `ReplaceWithInfoTypeConfig` will be used to
       de-identify unstructured content.
       
      string deidentify_template = 1;
      Specified by:
      getDeidentifyTemplate in interface TransformationConfigOrBuilder
      Returns:
      The deidentifyTemplate.
    • getDeidentifyTemplateBytes

      public com.google.protobuf.ByteString getDeidentifyTemplateBytes()
       De-identify template.
       If this template is specified, it will serve as the default de-identify
       template. This template cannot contain `record_transformations` since it
       can be used for unstructured content such as free-form text files. If this
       template is not set, a default `ReplaceWithInfoTypeConfig` will be used to
       de-identify unstructured content.
       
      string deidentify_template = 1;
      Specified by:
      getDeidentifyTemplateBytes in interface TransformationConfigOrBuilder
      Returns:
      The bytes for deidentifyTemplate.
    • setDeidentifyTemplate

      public TransformationConfig.Builder setDeidentifyTemplate(String value)
       De-identify template.
       If this template is specified, it will serve as the default de-identify
       template. This template cannot contain `record_transformations` since it
       can be used for unstructured content such as free-form text files. If this
       template is not set, a default `ReplaceWithInfoTypeConfig` will be used to
       de-identify unstructured content.
       
      string deidentify_template = 1;
      Parameters:
      value - The deidentifyTemplate to set.
      Returns:
      This builder for chaining.
    • clearDeidentifyTemplate

      public TransformationConfig.Builder clearDeidentifyTemplate()
       De-identify template.
       If this template is specified, it will serve as the default de-identify
       template. This template cannot contain `record_transformations` since it
       can be used for unstructured content such as free-form text files. If this
       template is not set, a default `ReplaceWithInfoTypeConfig` will be used to
       de-identify unstructured content.
       
      string deidentify_template = 1;
      Returns:
      This builder for chaining.
    • setDeidentifyTemplateBytes

      public TransformationConfig.Builder setDeidentifyTemplateBytes(com.google.protobuf.ByteString value)
       De-identify template.
       If this template is specified, it will serve as the default de-identify
       template. This template cannot contain `record_transformations` since it
       can be used for unstructured content such as free-form text files. If this
       template is not set, a default `ReplaceWithInfoTypeConfig` will be used to
       de-identify unstructured content.
       
      string deidentify_template = 1;
      Parameters:
      value - The bytes for deidentifyTemplate to set.
      Returns:
      This builder for chaining.
    • getStructuredDeidentifyTemplate

      public String getStructuredDeidentifyTemplate()
       Structured de-identify template.
       If this template is specified, it will serve as the de-identify template
       for structured content such as delimited files and tables. If this template
       is not set but the `deidentify_template` is set, then `deidentify_template`
       will also apply to the structured content. If neither template is set, a
       default `ReplaceWithInfoTypeConfig` will be used to de-identify structured
       content.
       
      string structured_deidentify_template = 2;
      Specified by:
      getStructuredDeidentifyTemplate in interface TransformationConfigOrBuilder
      Returns:
      The structuredDeidentifyTemplate.
    • getStructuredDeidentifyTemplateBytes

      public com.google.protobuf.ByteString getStructuredDeidentifyTemplateBytes()
       Structured de-identify template.
       If this template is specified, it will serve as the de-identify template
       for structured content such as delimited files and tables. If this template
       is not set but the `deidentify_template` is set, then `deidentify_template`
       will also apply to the structured content. If neither template is set, a
       default `ReplaceWithInfoTypeConfig` will be used to de-identify structured
       content.
       
      string structured_deidentify_template = 2;
      Specified by:
      getStructuredDeidentifyTemplateBytes in interface TransformationConfigOrBuilder
      Returns:
      The bytes for structuredDeidentifyTemplate.
    • setStructuredDeidentifyTemplate

      public TransformationConfig.Builder setStructuredDeidentifyTemplate(String value)
       Structured de-identify template.
       If this template is specified, it will serve as the de-identify template
       for structured content such as delimited files and tables. If this template
       is not set but the `deidentify_template` is set, then `deidentify_template`
       will also apply to the structured content. If neither template is set, a
       default `ReplaceWithInfoTypeConfig` will be used to de-identify structured
       content.
       
      string structured_deidentify_template = 2;
      Parameters:
      value - The structuredDeidentifyTemplate to set.
      Returns:
      This builder for chaining.
    • clearStructuredDeidentifyTemplate

      public TransformationConfig.Builder clearStructuredDeidentifyTemplate()
       Structured de-identify template.
       If this template is specified, it will serve as the de-identify template
       for structured content such as delimited files and tables. If this template
       is not set but the `deidentify_template` is set, then `deidentify_template`
       will also apply to the structured content. If neither template is set, a
       default `ReplaceWithInfoTypeConfig` will be used to de-identify structured
       content.
       
      string structured_deidentify_template = 2;
      Returns:
      This builder for chaining.
    • setStructuredDeidentifyTemplateBytes

      public TransformationConfig.Builder setStructuredDeidentifyTemplateBytes(com.google.protobuf.ByteString value)
       Structured de-identify template.
       If this template is specified, it will serve as the de-identify template
       for structured content such as delimited files and tables. If this template
       is not set but the `deidentify_template` is set, then `deidentify_template`
       will also apply to the structured content. If neither template is set, a
       default `ReplaceWithInfoTypeConfig` will be used to de-identify structured
       content.
       
      string structured_deidentify_template = 2;
      Parameters:
      value - The bytes for structuredDeidentifyTemplate to set.
      Returns:
      This builder for chaining.
    • getImageRedactTemplate

      public String getImageRedactTemplate()
       Image redact template.
       If this template is specified, it will serve as the de-identify template
       for images. If this template is not set, all findings in the image will be
       redacted with a black box.
       
      string image_redact_template = 4;
      Specified by:
      getImageRedactTemplate in interface TransformationConfigOrBuilder
      Returns:
      The imageRedactTemplate.
    • getImageRedactTemplateBytes

      public com.google.protobuf.ByteString getImageRedactTemplateBytes()
       Image redact template.
       If this template is specified, it will serve as the de-identify template
       for images. If this template is not set, all findings in the image will be
       redacted with a black box.
       
      string image_redact_template = 4;
      Specified by:
      getImageRedactTemplateBytes in interface TransformationConfigOrBuilder
      Returns:
      The bytes for imageRedactTemplate.
    • setImageRedactTemplate

      public TransformationConfig.Builder setImageRedactTemplate(String value)
       Image redact template.
       If this template is specified, it will serve as the de-identify template
       for images. If this template is not set, all findings in the image will be
       redacted with a black box.
       
      string image_redact_template = 4;
      Parameters:
      value - The imageRedactTemplate to set.
      Returns:
      This builder for chaining.
    • clearImageRedactTemplate

      public TransformationConfig.Builder clearImageRedactTemplate()
       Image redact template.
       If this template is specified, it will serve as the de-identify template
       for images. If this template is not set, all findings in the image will be
       redacted with a black box.
       
      string image_redact_template = 4;
      Returns:
      This builder for chaining.
    • setImageRedactTemplateBytes

      public TransformationConfig.Builder setImageRedactTemplateBytes(com.google.protobuf.ByteString value)
       Image redact template.
       If this template is specified, it will serve as the de-identify template
       for images. If this template is not set, all findings in the image will be
       redacted with a black box.
       
      string image_redact_template = 4;
      Parameters:
      value - The bytes for imageRedactTemplate to set.
      Returns:
      This builder for chaining.