public final class CloudStorageRegexFileSet extends GeneratedMessageV3 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
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
BUCKET_NAME_FIELD_NUMBER
public static final int BUCKET_NAME_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
EXCLUDE_REGEX_FIELD_NUMBER
public static final int EXCLUDE_REGEX_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
INCLUDE_REGEX_FIELD_NUMBER
public static final int INCLUDE_REGEX_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
Static Methods
getDefaultInstance()
public static CloudStorageRegexFileSet getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static CloudStorageRegexFileSet.Builder newBuilder()
newBuilder(CloudStorageRegexFileSet prototype)
public static CloudStorageRegexFileSet.Builder newBuilder(CloudStorageRegexFileSet prototype)
public static CloudStorageRegexFileSet parseDelimitedFrom(InputStream input)
public static CloudStorageRegexFileSet parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static CloudStorageRegexFileSet parseFrom(byte[] data)
Parameter |
---|
Name | Description |
data | byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static CloudStorageRegexFileSet parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static CloudStorageRegexFileSet parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static CloudStorageRegexFileSet parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static CloudStorageRegexFileSet parseFrom(CodedInputStream input)
public static CloudStorageRegexFileSet parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static CloudStorageRegexFileSet parseFrom(InputStream input)
public static CloudStorageRegexFileSet parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static CloudStorageRegexFileSet parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static CloudStorageRegexFileSet parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<CloudStorageRegexFileSet> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter |
---|
Name | Description |
obj | Object
|
Overrides
getBucketName()
public String getBucketName()
The name of a Cloud Storage bucket. Required.
string bucket_name = 1;
Returns |
---|
Type | Description |
String | The bucketName.
|
getBucketNameBytes()
public ByteString getBucketNameBytes()
The name of a Cloud Storage bucket. Required.
string bucket_name = 1;
Returns |
---|
Type | Description |
ByteString | The bytes for bucketName.
|
getDefaultInstanceForType()
public CloudStorageRegexFileSet getDefaultInstanceForType()
getExcludeRegex(int index)
public 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; a guide can be found
under the google/re2 repository on GitHub.
repeated string exclude_regex = 3;
Parameter |
---|
Name | Description |
index | int
The index of the element to return.
|
Returns |
---|
Type | Description |
String | The excludeRegex at the given index.
|
getExcludeRegexBytes(int index)
public 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; a guide can be found
under the google/re2 repository on GitHub.
repeated string exclude_regex = 3;
Parameter |
---|
Name | Description |
index | int
The index of the value to return.
|
Returns |
---|
Type | Description |
ByteString | The bytes of the excludeRegex at the given index.
|
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; a guide can be found
under the google/re2 repository on GitHub.
repeated string exclude_regex = 3;
Returns |
---|
Type | Description |
int | The count of excludeRegex.
|
getExcludeRegexList()
public 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; a guide can be found
under the google/re2 repository on GitHub.
repeated string exclude_regex = 3;
getIncludeRegex(int index)
public 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; a guide can be found
under the google/re2 repository on GitHub.
repeated string include_regex = 2;
Parameter |
---|
Name | Description |
index | int
The index of the element to return.
|
Returns |
---|
Type | Description |
String | The includeRegex at the given index.
|
getIncludeRegexBytes(int index)
public 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; a guide can be found
under the google/re2 repository on GitHub.
repeated string include_regex = 2;
Parameter |
---|
Name | Description |
index | int
The index of the value to return.
|
Returns |
---|
Type | Description |
ByteString | The bytes of the includeRegex at the given index.
|
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; a guide can be found
under the google/re2 repository on GitHub.
repeated string include_regex = 2;
Returns |
---|
Type | Description |
int | The count of includeRegex.
|
getIncludeRegexList()
public 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; a guide can be found
under the google/re2 repository on GitHub.
repeated string include_regex = 2;
getParserForType()
public Parser<CloudStorageRegexFileSet> getParserForType()
Overrides
getSerializedSize()
public int getSerializedSize()
Returns |
---|
Type | Description |
int | |
Overrides
hashCode()
Returns |
---|
Type | Description |
int | |
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public CloudStorageRegexFileSet.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected CloudStorageRegexFileSet.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Overrides
toBuilder()
public CloudStorageRegexFileSet.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides