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

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

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

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

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

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

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

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

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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.
      • 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;
      • 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.
         Cannot be set if de-identification is requested.
         
        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.
         Cannot be set if de-identification is requested.
         
        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.
         Cannot be set if de-identification is requested.
         
        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.
         Cannot be set if de-identification is requested.
         
        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.
         Cannot be set if de-identification is requested.
         
        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.
         Cannot be set if de-identification is requested.
         
        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()
        .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)
        .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.
      • clearSampleMethod

        public CloudStorageOptions.Builder clearSampleMethod()
        .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.
      • setUnknownFields

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

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