Class CloudStorageOptions.Builder

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

public static final class CloudStorageOptions.Builder extends com.google.protobuf.GeneratedMessage.Builder<CloudStorageOptions.Builder> implements CloudStorageOptionsOrBuilder
 Options defining a file or a set of files within a Cloud Storage
 bucket.
 
Protobuf type google.privacy.dlp.v2.CloudStorageOptions
  • 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<CloudStorageOptions.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<CloudStorageOptions.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<CloudStorageOptions.Builder>
    • getDefaultInstanceForType

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

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

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

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

      public CloudStorageOptions.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<CloudStorageOptions.Builder>
      Throws:
      IOException
    • hasFileSet

      public boolean hasFileSet()
       The set of one or more files to scan.
       
      .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1;
      Specified by:
      hasFileSet in interface CloudStorageOptionsOrBuilder
      Returns:
      Whether the fileSet field is set.
    • getFileSet

      public CloudStorageOptions.FileSet getFileSet()
       The set of one or more files to scan.
       
      .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1;
      Specified by:
      getFileSet in interface CloudStorageOptionsOrBuilder
      Returns:
      The fileSet.
    • setFileSet

       The set of one or more files to scan.
       
      .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1;
    • setFileSet

       The set of one or more files to scan.
       
      .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1;
    • mergeFileSet

       The set of one or more files to scan.
       
      .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1;
    • clearFileSet

      public CloudStorageOptions.Builder clearFileSet()
       The set of one or more files to scan.
       
      .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1;
    • getFileSetBuilder

      public CloudStorageOptions.FileSet.Builder getFileSetBuilder()
       The set of one or more files to scan.
       
      .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1;
    • getFileSetOrBuilder

      public CloudStorageOptions.FileSetOrBuilder getFileSetOrBuilder()
       The set of one or more files to scan.
       
      .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1;
      Specified by:
      getFileSetOrBuilder in interface CloudStorageOptionsOrBuilder
    • getBytesLimitPerFile

      public long getBytesLimitPerFile()
       Max number of bytes to scan from a file. If a scanned file's size is bigger
       than this value then the rest of the bytes are omitted. Only one of
       `bytes_limit_per_file` and `bytes_limit_per_file_percent` can be specified.
       This field can't be set if de-identification is requested. For certain file
       types, setting this field has no effect. For more information, see [Limits
       on bytes scanned per
       file](https://cloud.google.com/sensitive-data-protection/docs/supported-file-types#max-byte-size-per-file).
       
      int64 bytes_limit_per_file = 4;
      Specified by:
      getBytesLimitPerFile in interface CloudStorageOptionsOrBuilder
      Returns:
      The bytesLimitPerFile.
    • setBytesLimitPerFile

      public CloudStorageOptions.Builder setBytesLimitPerFile(long value)
       Max number of bytes to scan from a file. If a scanned file's size is bigger
       than this value then the rest of the bytes are omitted. Only one of
       `bytes_limit_per_file` and `bytes_limit_per_file_percent` can be specified.
       This field can't be set if de-identification is requested. For certain file
       types, setting this field has no effect. For more information, see [Limits
       on bytes scanned per
       file](https://cloud.google.com/sensitive-data-protection/docs/supported-file-types#max-byte-size-per-file).
       
      int64 bytes_limit_per_file = 4;
      Parameters:
      value - The bytesLimitPerFile to set.
      Returns:
      This builder for chaining.
    • clearBytesLimitPerFile

      public CloudStorageOptions.Builder clearBytesLimitPerFile()
       Max number of bytes to scan from a file. If a scanned file's size is bigger
       than this value then the rest of the bytes are omitted. Only one of
       `bytes_limit_per_file` and `bytes_limit_per_file_percent` can be specified.
       This field can't be set if de-identification is requested. For certain file
       types, setting this field has no effect. For more information, see [Limits
       on bytes scanned per
       file](https://cloud.google.com/sensitive-data-protection/docs/supported-file-types#max-byte-size-per-file).
       
      int64 bytes_limit_per_file = 4;
      Returns:
      This builder for chaining.
    • getBytesLimitPerFilePercent

      public int getBytesLimitPerFilePercent()
       Max percentage of bytes to scan from a file. The rest are omitted. The
       number of bytes scanned is rounded down. Must be between 0 and 100,
       inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one of
       bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
       This field can't be set if de-identification is requested. For certain file
       types, setting this field has no effect. For more information, see [Limits
       on bytes scanned per
       file](https://cloud.google.com/sensitive-data-protection/docs/supported-file-types#max-byte-size-per-file).
       
      int32 bytes_limit_per_file_percent = 8;
      Specified by:
      getBytesLimitPerFilePercent in interface CloudStorageOptionsOrBuilder
      Returns:
      The bytesLimitPerFilePercent.
    • setBytesLimitPerFilePercent

      public CloudStorageOptions.Builder setBytesLimitPerFilePercent(int value)
       Max percentage of bytes to scan from a file. The rest are omitted. The
       number of bytes scanned is rounded down. Must be between 0 and 100,
       inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one of
       bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
       This field can't be set if de-identification is requested. For certain file
       types, setting this field has no effect. For more information, see [Limits
       on bytes scanned per
       file](https://cloud.google.com/sensitive-data-protection/docs/supported-file-types#max-byte-size-per-file).
       
      int32 bytes_limit_per_file_percent = 8;
      Parameters:
      value - The bytesLimitPerFilePercent to set.
      Returns:
      This builder for chaining.
    • clearBytesLimitPerFilePercent

      public CloudStorageOptions.Builder clearBytesLimitPerFilePercent()
       Max percentage of bytes to scan from a file. The rest are omitted. The
       number of bytes scanned is rounded down. Must be between 0 and 100,
       inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one of
       bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
       This field can't be set if de-identification is requested. For certain file
       types, setting this field has no effect. For more information, see [Limits
       on bytes scanned per
       file](https://cloud.google.com/sensitive-data-protection/docs/supported-file-types#max-byte-size-per-file).
       
      int32 bytes_limit_per_file_percent = 8;
      Returns:
      This builder for chaining.
    • getFileTypesList

      public List<FileType> getFileTypesList()
       List of file type groups to include in the scan.
       If empty, all files are scanned and available data format processors
       are applied. In addition, the binary content of the selected files
       is always scanned as well.
       Images are scanned only as binary if the specified region
       does not support image inspection and no file_types were specified.
       Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
       
      repeated .google.privacy.dlp.v2.FileType file_types = 5;
      Specified by:
      getFileTypesList in interface CloudStorageOptionsOrBuilder
      Returns:
      A list containing the fileTypes.
    • getFileTypesCount

      public int getFileTypesCount()
       List of file type groups to include in the scan.
       If empty, all files are scanned and available data format processors
       are applied. In addition, the binary content of the selected files
       is always scanned as well.
       Images are scanned only as binary if the specified region
       does not support image inspection and no file_types were specified.
       Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
       
      repeated .google.privacy.dlp.v2.FileType file_types = 5;
      Specified by:
      getFileTypesCount in interface CloudStorageOptionsOrBuilder
      Returns:
      The count of fileTypes.
    • getFileTypes

      public FileType getFileTypes(int index)
       List of file type groups to include in the scan.
       If empty, all files are scanned and available data format processors
       are applied. In addition, the binary content of the selected files
       is always scanned as well.
       Images are scanned only as binary if the specified region
       does not support image inspection and no file_types were specified.
       Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
       
      repeated .google.privacy.dlp.v2.FileType file_types = 5;
      Specified by:
      getFileTypes in interface CloudStorageOptionsOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The fileTypes at the given index.
    • setFileTypes

      public CloudStorageOptions.Builder setFileTypes(int index, FileType value)
       List of file type groups to include in the scan.
       If empty, all files are scanned and available data format processors
       are applied. In addition, the binary content of the selected files
       is always scanned as well.
       Images are scanned only as binary if the specified region
       does not support image inspection and no file_types were specified.
       Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
       
      repeated .google.privacy.dlp.v2.FileType file_types = 5;
      Parameters:
      index - The index to set the value at.
      value - The fileTypes to set.
      Returns:
      This builder for chaining.
    • addFileTypes

      public CloudStorageOptions.Builder addFileTypes(FileType value)
       List of file type groups to include in the scan.
       If empty, all files are scanned and available data format processors
       are applied. In addition, the binary content of the selected files
       is always scanned as well.
       Images are scanned only as binary if the specified region
       does not support image inspection and no file_types were specified.
       Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
       
      repeated .google.privacy.dlp.v2.FileType file_types = 5;
      Parameters:
      value - The fileTypes to add.
      Returns:
      This builder for chaining.
    • addAllFileTypes

      public CloudStorageOptions.Builder addAllFileTypes(Iterable<? extends FileType> values)
       List of file type groups to include in the scan.
       If empty, all files are scanned and available data format processors
       are applied. In addition, the binary content of the selected files
       is always scanned as well.
       Images are scanned only as binary if the specified region
       does not support image inspection and no file_types were specified.
       Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
       
      repeated .google.privacy.dlp.v2.FileType file_types = 5;
      Parameters:
      values - The fileTypes to add.
      Returns:
      This builder for chaining.
    • clearFileTypes

      public CloudStorageOptions.Builder clearFileTypes()
       List of file type groups to include in the scan.
       If empty, all files are scanned and available data format processors
       are applied. In addition, the binary content of the selected files
       is always scanned as well.
       Images are scanned only as binary if the specified region
       does not support image inspection and no file_types were specified.
       Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
       
      repeated .google.privacy.dlp.v2.FileType file_types = 5;
      Returns:
      This builder for chaining.
    • getFileTypesValueList

      public List<Integer> getFileTypesValueList()
       List of file type groups to include in the scan.
       If empty, all files are scanned and available data format processors
       are applied. In addition, the binary content of the selected files
       is always scanned as well.
       Images are scanned only as binary if the specified region
       does not support image inspection and no file_types were specified.
       Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
       
      repeated .google.privacy.dlp.v2.FileType file_types = 5;
      Specified by:
      getFileTypesValueList in interface CloudStorageOptionsOrBuilder
      Returns:
      A list containing the enum numeric values on the wire for fileTypes.
    • getFileTypesValue

      public int getFileTypesValue(int index)
       List of file type groups to include in the scan.
       If empty, all files are scanned and available data format processors
       are applied. In addition, the binary content of the selected files
       is always scanned as well.
       Images are scanned only as binary if the specified region
       does not support image inspection and no file_types were specified.
       Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
       
      repeated .google.privacy.dlp.v2.FileType file_types = 5;
      Specified by:
      getFileTypesValue in interface CloudStorageOptionsOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The enum numeric value on the wire of fileTypes at the given index.
    • setFileTypesValue

      public CloudStorageOptions.Builder setFileTypesValue(int index, int value)
       List of file type groups to include in the scan.
       If empty, all files are scanned and available data format processors
       are applied. In addition, the binary content of the selected files
       is always scanned as well.
       Images are scanned only as binary if the specified region
       does not support image inspection and no file_types were specified.
       Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
       
      repeated .google.privacy.dlp.v2.FileType file_types = 5;
      Parameters:
      index - The index to set the value at.
      value - The enum numeric value on the wire for fileTypes to set.
      Returns:
      This builder for chaining.
    • addFileTypesValue

      public CloudStorageOptions.Builder addFileTypesValue(int value)
       List of file type groups to include in the scan.
       If empty, all files are scanned and available data format processors
       are applied. In addition, the binary content of the selected files
       is always scanned as well.
       Images are scanned only as binary if the specified region
       does not support image inspection and no file_types were specified.
       Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
       
      repeated .google.privacy.dlp.v2.FileType file_types = 5;
      Parameters:
      value - The enum numeric value on the wire for fileTypes to add.
      Returns:
      This builder for chaining.
    • addAllFileTypesValue

      public CloudStorageOptions.Builder addAllFileTypesValue(Iterable<Integer> values)
       List of file type groups to include in the scan.
       If empty, all files are scanned and available data format processors
       are applied. In addition, the binary content of the selected files
       is always scanned as well.
       Images are scanned only as binary if the specified region
       does not support image inspection and no file_types were specified.
       Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
       
      repeated .google.privacy.dlp.v2.FileType file_types = 5;
      Parameters:
      values - The enum numeric values on the wire for fileTypes to add.
      Returns:
      This builder for chaining.
    • getSampleMethodValue

      public int getSampleMethodValue()
       How to sample the data.
       
      .google.privacy.dlp.v2.CloudStorageOptions.SampleMethod sample_method = 6;
      Specified by:
      getSampleMethodValue in interface CloudStorageOptionsOrBuilder
      Returns:
      The enum numeric value on the wire for sampleMethod.
    • setSampleMethodValue

      public CloudStorageOptions.Builder setSampleMethodValue(int value)
       How to sample the data.
       
      .google.privacy.dlp.v2.CloudStorageOptions.SampleMethod sample_method = 6;
      Parameters:
      value - The enum numeric value on the wire for sampleMethod to set.
      Returns:
      This builder for chaining.
    • getSampleMethod

      public CloudStorageOptions.SampleMethod getSampleMethod()
       How to sample the data.
       
      .google.privacy.dlp.v2.CloudStorageOptions.SampleMethod sample_method = 6;
      Specified by:
      getSampleMethod in interface CloudStorageOptionsOrBuilder
      Returns:
      The sampleMethod.
    • setSampleMethod

       How to sample the data.
       
      .google.privacy.dlp.v2.CloudStorageOptions.SampleMethod sample_method = 6;
      Parameters:
      value - The sampleMethod to set.
      Returns:
      This builder for chaining.
    • clearSampleMethod

      public CloudStorageOptions.Builder clearSampleMethod()
       How to sample the data.
       
      .google.privacy.dlp.v2.CloudStorageOptions.SampleMethod sample_method = 6;
      Returns:
      This builder for chaining.
    • getFilesLimitPercent

      public int getFilesLimitPercent()
       Limits the number of files to scan to this percentage of the input FileSet.
       Number of files scanned is rounded down. Must be between 0 and 100,
       inclusively. Both 0 and 100 means no limit. Defaults to 0.
       
      int32 files_limit_percent = 7;
      Specified by:
      getFilesLimitPercent in interface CloudStorageOptionsOrBuilder
      Returns:
      The filesLimitPercent.
    • setFilesLimitPercent

      public CloudStorageOptions.Builder setFilesLimitPercent(int value)
       Limits the number of files to scan to this percentage of the input FileSet.
       Number of files scanned is rounded down. Must be between 0 and 100,
       inclusively. Both 0 and 100 means no limit. Defaults to 0.
       
      int32 files_limit_percent = 7;
      Parameters:
      value - The filesLimitPercent to set.
      Returns:
      This builder for chaining.
    • clearFilesLimitPercent

      public CloudStorageOptions.Builder clearFilesLimitPercent()
       Limits the number of files to scan to this percentage of the input FileSet.
       Number of files scanned is rounded down. Must be between 0 and 100,
       inclusively. Both 0 and 100 means no limit. Defaults to 0.
       
      int32 files_limit_percent = 7;
      Returns:
      This builder for chaining.