Class 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.GeneratedMessageV3.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 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<TransformationConfig.Builder>
      • clear

        public 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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

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

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

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

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

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

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

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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.
      • setUnknownFields

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

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