Package com.google.privacy.dlp.v2
Class CloudStorageRegexFileSet.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<CloudStorageRegexFileSet.Builder>
com.google.privacy.dlp.v2.CloudStorageRegexFileSet.Builder
- All Implemented Interfaces:
CloudStorageRegexFileSetOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- CloudStorageRegexFileSet
public static final class CloudStorageRegexFileSet.Builder
extends com.google.protobuf.GeneratedMessage.Builder<CloudStorageRegexFileSet.Builder>
implements CloudStorageRegexFileSetOrBuilder
Message representing a set of files in a Cloud Storage bucket. Regular
expressions are used to allow fine-grained control over which files in the
bucket to include.
Included files are those that match at least one item in `include_regex` and
do not match any items in `exclude_regex`. Note that a file that matches
items from both lists will _not_ be included. For a match to occur, the
entire file path (i.e., everything in the url after the bucket name) must
match the regular expression.
For example, given the input `{bucket_name: "mybucket", include_regex:
["directory1/.*"], exclude_regex:
["directory1/excluded.*"]}`:
* `gs://mybucket/directory1/myfile` will be included
* `gs://mybucket/directory1/directory2/myfile` will be included (`.*` matches
across `/`)
* `gs://mybucket/directory0/directory1/myfile` will _not_ be included (the
full path doesn't match any items in `include_regex`)
* `gs://mybucket/directory1/excludedfile` will _not_ be included (the path
matches an item in `exclude_regex`)
If `include_regex` is left empty, it will match all files by default
(this is equivalent to setting `include_regex: [".*"]`).
Some other common use cases:
* `{bucket_name: "mybucket", exclude_regex: [".*\.pdf"]}` will include all
files in `mybucket` except for .pdf files
* `{bucket_name: "mybucket", include_regex: ["directory/[^/]+"]}` will
include all files directly under `gs://mybucket/directory/`, without matching
across `/`
Protobuf type google.privacy.dlp.v2.CloudStorageRegexFileSet-
Method Summary
Modifier and TypeMethodDescriptionaddAllExcludeRegex(Iterable<String> values) A list of regular expressions matching file paths to exclude.addAllIncludeRegex(Iterable<String> values) A list of regular expressions matching file paths to include.addExcludeRegex(String value) A list of regular expressions matching file paths to exclude.addExcludeRegexBytes(com.google.protobuf.ByteString value) A list of regular expressions matching file paths to exclude.addIncludeRegex(String value) A list of regular expressions matching file paths to include.addIncludeRegexBytes(com.google.protobuf.ByteString value) A list of regular expressions matching file paths to include.build()clear()The name of a Cloud Storage bucket.A list of regular expressions matching file paths to exclude.A list of regular expressions matching file paths to include.The name of a Cloud Storage bucket.com.google.protobuf.ByteStringThe name of a Cloud Storage bucket.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetExcludeRegex(int index) A list of regular expressions matching file paths to exclude.com.google.protobuf.ByteStringgetExcludeRegexBytes(int index) A list of regular expressions matching file paths to exclude.intA list of regular expressions matching file paths to exclude.com.google.protobuf.ProtocolStringListA list of regular expressions matching file paths to exclude.getIncludeRegex(int index) A list of regular expressions matching file paths to include.com.google.protobuf.ByteStringgetIncludeRegexBytes(int index) A list of regular expressions matching file paths to include.intA list of regular expressions matching file paths to include.com.google.protobuf.ProtocolStringListA list of regular expressions matching file paths to include.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setBucketName(String value) The name of a Cloud Storage bucket.setBucketNameBytes(com.google.protobuf.ByteString value) The name of a Cloud Storage bucket.setExcludeRegex(int index, String value) A list of regular expressions matching file paths to exclude.setIncludeRegex(int index, String value) A list of regular expressions matching file paths to include.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<CloudStorageRegexFileSet.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<CloudStorageRegexFileSet.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<CloudStorageRegexFileSet.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<CloudStorageRegexFileSet.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<CloudStorageRegexFileSet.Builder>
-
mergeFrom
public CloudStorageRegexFileSet.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<CloudStorageRegexFileSet.Builder>- Throws:
IOException
-
getBucketName
The name of a Cloud Storage bucket. Required.
string bucket_name = 1;- Specified by:
getBucketNamein interfaceCloudStorageRegexFileSetOrBuilder- Returns:
- The bucketName.
-
getBucketNameBytes
public com.google.protobuf.ByteString getBucketNameBytes()The name of a Cloud Storage bucket. Required.
string bucket_name = 1;- Specified by:
getBucketNameBytesin interfaceCloudStorageRegexFileSetOrBuilder- Returns:
- The bytes for bucketName.
-
setBucketName
The name of a Cloud Storage bucket. Required.
string bucket_name = 1;- Parameters:
value- The bucketName to set.- Returns:
- This builder for chaining.
-
clearBucketName
The name of a Cloud Storage bucket. Required.
string bucket_name = 1;- Returns:
- This builder for chaining.
-
setBucketNameBytes
The name of a Cloud Storage bucket. Required.
string bucket_name = 1;- Parameters:
value- The bytes for bucketName to set.- Returns:
- This builder for chaining.
-
getIncludeRegexList
public com.google.protobuf.ProtocolStringList getIncludeRegexList()A list of regular expressions matching file paths to include. All files in the bucket that match at least one of these regular expressions will be included in the set of files, except for those that also match an item in `exclude_regex`. Leaving this field empty will match all files by default (this is equivalent to including `.*` in the list). Regular expressions use RE2 [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found under the google/re2 repository on GitHub.
repeated string include_regex = 2;- Specified by:
getIncludeRegexListin interfaceCloudStorageRegexFileSetOrBuilder- Returns:
- A list containing the includeRegex.
-
getIncludeRegexCount
public int getIncludeRegexCount()A list of regular expressions matching file paths to include. All files in the bucket that match at least one of these regular expressions will be included in the set of files, except for those that also match an item in `exclude_regex`. Leaving this field empty will match all files by default (this is equivalent to including `.*` in the list). Regular expressions use RE2 [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found under the google/re2 repository on GitHub.
repeated string include_regex = 2;- Specified by:
getIncludeRegexCountin interfaceCloudStorageRegexFileSetOrBuilder- Returns:
- The count of includeRegex.
-
getIncludeRegex
A list of regular expressions matching file paths to include. All files in the bucket that match at least one of these regular expressions will be included in the set of files, except for those that also match an item in `exclude_regex`. Leaving this field empty will match all files by default (this is equivalent to including `.*` in the list). Regular expressions use RE2 [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found under the google/re2 repository on GitHub.
repeated string include_regex = 2;- Specified by:
getIncludeRegexin interfaceCloudStorageRegexFileSetOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The includeRegex at the given index.
-
getIncludeRegexBytes
public com.google.protobuf.ByteString getIncludeRegexBytes(int index) A list of regular expressions matching file paths to include. All files in the bucket that match at least one of these regular expressions will be included in the set of files, except for those that also match an item in `exclude_regex`. Leaving this field empty will match all files by default (this is equivalent to including `.*` in the list). Regular expressions use RE2 [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found under the google/re2 repository on GitHub.
repeated string include_regex = 2;- Specified by:
getIncludeRegexBytesin interfaceCloudStorageRegexFileSetOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the includeRegex at the given index.
-
setIncludeRegex
A list of regular expressions matching file paths to include. All files in the bucket that match at least one of these regular expressions will be included in the set of files, except for those that also match an item in `exclude_regex`. Leaving this field empty will match all files by default (this is equivalent to including `.*` in the list). Regular expressions use RE2 [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found under the google/re2 repository on GitHub.
repeated string include_regex = 2;- Parameters:
index- The index to set the value at.value- The includeRegex to set.- Returns:
- This builder for chaining.
-
addIncludeRegex
A list of regular expressions matching file paths to include. All files in the bucket that match at least one of these regular expressions will be included in the set of files, except for those that also match an item in `exclude_regex`. Leaving this field empty will match all files by default (this is equivalent to including `.*` in the list). Regular expressions use RE2 [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found under the google/re2 repository on GitHub.
repeated string include_regex = 2;- Parameters:
value- The includeRegex to add.- Returns:
- This builder for chaining.
-
addAllIncludeRegex
A list of regular expressions matching file paths to include. All files in the bucket that match at least one of these regular expressions will be included in the set of files, except for those that also match an item in `exclude_regex`. Leaving this field empty will match all files by default (this is equivalent to including `.*` in the list). Regular expressions use RE2 [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found under the google/re2 repository on GitHub.
repeated string include_regex = 2;- Parameters:
values- The includeRegex to add.- Returns:
- This builder for chaining.
-
clearIncludeRegex
A list of regular expressions matching file paths to include. All files in the bucket that match at least one of these regular expressions will be included in the set of files, except for those that also match an item in `exclude_regex`. Leaving this field empty will match all files by default (this is equivalent to including `.*` in the list). Regular expressions use RE2 [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found under the google/re2 repository on GitHub.
repeated string include_regex = 2;- Returns:
- This builder for chaining.
-
addIncludeRegexBytes
A list of regular expressions matching file paths to include. All files in the bucket that match at least one of these regular expressions will be included in the set of files, except for those that also match an item in `exclude_regex`. Leaving this field empty will match all files by default (this is equivalent to including `.*` in the list). Regular expressions use RE2 [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found under the google/re2 repository on GitHub.
repeated string include_regex = 2;- Parameters:
value- The bytes of the includeRegex to add.- Returns:
- This builder for chaining.
-
getExcludeRegexList
public com.google.protobuf.ProtocolStringList getExcludeRegexList()A list of regular expressions matching file paths to exclude. All files in the bucket that match at least one of these regular expressions will be excluded from the scan. Regular expressions use RE2 [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found under the google/re2 repository on GitHub.
repeated string exclude_regex = 3;- Specified by:
getExcludeRegexListin interfaceCloudStorageRegexFileSetOrBuilder- Returns:
- A list containing the excludeRegex.
-
getExcludeRegexCount
public int getExcludeRegexCount()A list of regular expressions matching file paths to exclude. All files in the bucket that match at least one of these regular expressions will be excluded from the scan. Regular expressions use RE2 [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found under the google/re2 repository on GitHub.
repeated string exclude_regex = 3;- Specified by:
getExcludeRegexCountin interfaceCloudStorageRegexFileSetOrBuilder- Returns:
- The count of excludeRegex.
-
getExcludeRegex
A list of regular expressions matching file paths to exclude. All files in the bucket that match at least one of these regular expressions will be excluded from the scan. Regular expressions use RE2 [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found under the google/re2 repository on GitHub.
repeated string exclude_regex = 3;- Specified by:
getExcludeRegexin interfaceCloudStorageRegexFileSetOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The excludeRegex at the given index.
-
getExcludeRegexBytes
public com.google.protobuf.ByteString getExcludeRegexBytes(int index) A list of regular expressions matching file paths to exclude. All files in the bucket that match at least one of these regular expressions will be excluded from the scan. Regular expressions use RE2 [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found under the google/re2 repository on GitHub.
repeated string exclude_regex = 3;- Specified by:
getExcludeRegexBytesin interfaceCloudStorageRegexFileSetOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the excludeRegex at the given index.
-
setExcludeRegex
A list of regular expressions matching file paths to exclude. All files in the bucket that match at least one of these regular expressions will be excluded from the scan. Regular expressions use RE2 [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found under the google/re2 repository on GitHub.
repeated string exclude_regex = 3;- Parameters:
index- The index to set the value at.value- The excludeRegex to set.- Returns:
- This builder for chaining.
-
addExcludeRegex
A list of regular expressions matching file paths to exclude. All files in the bucket that match at least one of these regular expressions will be excluded from the scan. Regular expressions use RE2 [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found under the google/re2 repository on GitHub.
repeated string exclude_regex = 3;- Parameters:
value- The excludeRegex to add.- Returns:
- This builder for chaining.
-
addAllExcludeRegex
A list of regular expressions matching file paths to exclude. All files in the bucket that match at least one of these regular expressions will be excluded from the scan. Regular expressions use RE2 [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found under the google/re2 repository on GitHub.
repeated string exclude_regex = 3;- Parameters:
values- The excludeRegex to add.- Returns:
- This builder for chaining.
-
clearExcludeRegex
A list of regular expressions matching file paths to exclude. All files in the bucket that match at least one of these regular expressions will be excluded from the scan. Regular expressions use RE2 [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found under the google/re2 repository on GitHub.
repeated string exclude_regex = 3;- Returns:
- This builder for chaining.
-
addExcludeRegexBytes
A list of regular expressions matching file paths to exclude. All files in the bucket that match at least one of these regular expressions will be excluded from the scan. Regular expressions use RE2 [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found under the google/re2 repository on GitHub.
repeated string exclude_regex = 3;- Parameters:
value- The bytes of the excludeRegex to add.- Returns:
- This builder for chaining.
-