public static final class CloudStorageRegexFileSet.Builder extends com.google.protobuf.GeneratedMessageV3.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| Modifier and Type | Method and Description |
|---|---|
CloudStorageRegexFileSet.Builder |
addAllExcludeRegex(Iterable<String> values)
A list of regular expressions matching file paths to exclude.
|
CloudStorageRegexFileSet.Builder |
addAllIncludeRegex(Iterable<String> values)
A list of regular expressions matching file paths to include.
|
CloudStorageRegexFileSet.Builder |
addExcludeRegex(String value)
A list of regular expressions matching file paths to exclude.
|
CloudStorageRegexFileSet.Builder |
addExcludeRegexBytes(com.google.protobuf.ByteString value)
A list of regular expressions matching file paths to exclude.
|
CloudStorageRegexFileSet.Builder |
addIncludeRegex(String value)
A list of regular expressions matching file paths to include.
|
CloudStorageRegexFileSet.Builder |
addIncludeRegexBytes(com.google.protobuf.ByteString value)
A list of regular expressions matching file paths to include.
|
CloudStorageRegexFileSet.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
CloudStorageRegexFileSet |
build() |
CloudStorageRegexFileSet |
buildPartial() |
CloudStorageRegexFileSet.Builder |
clear() |
CloudStorageRegexFileSet.Builder |
clearBucketName()
The name of a Cloud Storage bucket.
|
CloudStorageRegexFileSet.Builder |
clearExcludeRegex()
A list of regular expressions matching file paths to exclude.
|
CloudStorageRegexFileSet.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
CloudStorageRegexFileSet.Builder |
clearIncludeRegex()
A list of regular expressions matching file paths to include.
|
CloudStorageRegexFileSet.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
CloudStorageRegexFileSet.Builder |
clone() |
String |
getBucketName()
The name of a Cloud Storage bucket.
|
com.google.protobuf.ByteString |
getBucketNameBytes()
The name of a Cloud Storage bucket.
|
CloudStorageRegexFileSet |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
String |
getExcludeRegex(int index)
A list of regular expressions matching file paths to exclude.
|
com.google.protobuf.ByteString |
getExcludeRegexBytes(int index)
A list of regular expressions matching file paths to exclude.
|
int |
getExcludeRegexCount()
A list of regular expressions matching file paths to exclude.
|
com.google.protobuf.ProtocolStringList |
getExcludeRegexList()
A list of regular expressions matching file paths to exclude.
|
String |
getIncludeRegex(int index)
A list of regular expressions matching file paths to include.
|
com.google.protobuf.ByteString |
getIncludeRegexBytes(int index)
A list of regular expressions matching file paths to include.
|
int |
getIncludeRegexCount()
A list of regular expressions matching file paths to include.
|
com.google.protobuf.ProtocolStringList |
getIncludeRegexList()
A list of regular expressions matching file paths to include.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
CloudStorageRegexFileSet.Builder |
mergeFrom(CloudStorageRegexFileSet other) |
CloudStorageRegexFileSet.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
CloudStorageRegexFileSet.Builder |
mergeFrom(com.google.protobuf.Message other) |
CloudStorageRegexFileSet.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
CloudStorageRegexFileSet.Builder |
setBucketName(String value)
The name of a Cloud Storage bucket.
|
CloudStorageRegexFileSet.Builder |
setBucketNameBytes(com.google.protobuf.ByteString value)
The name of a Cloud Storage bucket.
|
CloudStorageRegexFileSet.Builder |
setExcludeRegex(int index,
String value)
A list of regular expressions matching file paths to exclude.
|
CloudStorageRegexFileSet.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
CloudStorageRegexFileSet.Builder |
setIncludeRegex(int index,
String value)
A list of regular expressions matching file paths to include.
|
CloudStorageRegexFileSet.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
CloudStorageRegexFileSet.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneofpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<CloudStorageRegexFileSet.Builder>public CloudStorageRegexFileSet.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<CloudStorageRegexFileSet.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<CloudStorageRegexFileSet.Builder>public CloudStorageRegexFileSet getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic CloudStorageRegexFileSet build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic CloudStorageRegexFileSet buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic CloudStorageRegexFileSet.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<CloudStorageRegexFileSet.Builder>public CloudStorageRegexFileSet.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<CloudStorageRegexFileSet.Builder>public CloudStorageRegexFileSet.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<CloudStorageRegexFileSet.Builder>public CloudStorageRegexFileSet.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<CloudStorageRegexFileSet.Builder>public CloudStorageRegexFileSet.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<CloudStorageRegexFileSet.Builder>public CloudStorageRegexFileSet.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<CloudStorageRegexFileSet.Builder>public CloudStorageRegexFileSet.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<CloudStorageRegexFileSet.Builder>public CloudStorageRegexFileSet.Builder mergeFrom(CloudStorageRegexFileSet other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<CloudStorageRegexFileSet.Builder>public CloudStorageRegexFileSet.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<CloudStorageRegexFileSet.Builder>IOExceptionpublic String getBucketName()
The name of a Cloud Storage bucket. Required.
string bucket_name = 1;getBucketName in interface CloudStorageRegexFileSetOrBuilderpublic com.google.protobuf.ByteString getBucketNameBytes()
The name of a Cloud Storage bucket. Required.
string bucket_name = 1;getBucketNameBytes in interface CloudStorageRegexFileSetOrBuilderpublic CloudStorageRegexFileSet.Builder setBucketName(String value)
The name of a Cloud Storage bucket. Required.
string bucket_name = 1;value - The bucketName to set.public CloudStorageRegexFileSet.Builder clearBucketName()
The name of a Cloud Storage bucket. Required.
string bucket_name = 1;public CloudStorageRegexFileSet.Builder setBucketNameBytes(com.google.protobuf.ByteString value)
The name of a Cloud Storage bucket. Required.
string bucket_name = 1;value - The bytes for bucketName to set.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;getIncludeRegexList in interface CloudStorageRegexFileSetOrBuilderpublic 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;getIncludeRegexCount in interface CloudStorageRegexFileSetOrBuilderpublic String getIncludeRegex(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;getIncludeRegex in interface CloudStorageRegexFileSetOrBuilderindex - The index of the element to return.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;getIncludeRegexBytes in interface CloudStorageRegexFileSetOrBuilderindex - The index of the value to return.public CloudStorageRegexFileSet.Builder setIncludeRegex(int index, String value)
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;index - The index to set the value at.value - The includeRegex to set.public CloudStorageRegexFileSet.Builder addIncludeRegex(String value)
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;value - The includeRegex to add.public CloudStorageRegexFileSet.Builder addAllIncludeRegex(Iterable<String> values)
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;values - The includeRegex to add.public CloudStorageRegexFileSet.Builder 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;public CloudStorageRegexFileSet.Builder addIncludeRegexBytes(com.google.protobuf.ByteString value)
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;value - The bytes of the includeRegex to add.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;getExcludeRegexList in interface CloudStorageRegexFileSetOrBuilderpublic 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;getExcludeRegexCount in interface CloudStorageRegexFileSetOrBuilderpublic String getExcludeRegex(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;getExcludeRegex in interface CloudStorageRegexFileSetOrBuilderindex - The index of the element to return.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;getExcludeRegexBytes in interface CloudStorageRegexFileSetOrBuilderindex - The index of the value to return.public CloudStorageRegexFileSet.Builder setExcludeRegex(int index, String value)
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;index - The index to set the value at.value - The excludeRegex to set.public CloudStorageRegexFileSet.Builder addExcludeRegex(String value)
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;value - The excludeRegex to add.public CloudStorageRegexFileSet.Builder addAllExcludeRegex(Iterable<String> values)
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;values - The excludeRegex to add.public CloudStorageRegexFileSet.Builder 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;public CloudStorageRegexFileSet.Builder addExcludeRegexBytes(com.google.protobuf.ByteString value)
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;value - The bytes of the excludeRegex to add.public final CloudStorageRegexFileSet.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<CloudStorageRegexFileSet.Builder>public final CloudStorageRegexFileSet.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<CloudStorageRegexFileSet.Builder>Copyright © 2022 Google LLC. All rights reserved.