Package com.google.privacy.dlp.v2
Class CloudStorageRegexFileSet
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.privacy.dlp.v2.CloudStorageRegexFileSet
-
- All Implemented Interfaces:
CloudStorageRegexFileSetOrBuilder
,com.google.protobuf.Message
,com.google.protobuf.MessageLite
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Serializable
public final class CloudStorageRegexFileSet extends com.google.protobuf.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 typegoogle.privacy.dlp.v2.CloudStorageRegexFileSet
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CloudStorageRegexFileSet.Builder
Message representing a set of files in a Cloud Storage bucket.-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static int
BUCKET_NAME_FIELD_NUMBER
static int
EXCLUDE_REGEX_FIELD_NUMBER
static int
INCLUDE_REGEX_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getBucketName()
The name of a Cloud Storage bucket.com.google.protobuf.ByteString
getBucketNameBytes()
The name of a Cloud Storage bucket.static CloudStorageRegexFileSet
getDefaultInstance()
CloudStorageRegexFileSet
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
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.com.google.protobuf.Parser<CloudStorageRegexFileSet>
getParserForType()
int
getSerializedSize()
int
hashCode()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
static CloudStorageRegexFileSet.Builder
newBuilder()
static CloudStorageRegexFileSet.Builder
newBuilder(CloudStorageRegexFileSet prototype)
CloudStorageRegexFileSet.Builder
newBuilderForType()
protected CloudStorageRegexFileSet.Builder
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
protected Object
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
static CloudStorageRegexFileSet
parseDelimitedFrom(InputStream input)
static CloudStorageRegexFileSet
parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static CloudStorageRegexFileSet
parseFrom(byte[] data)
static CloudStorageRegexFileSet
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static CloudStorageRegexFileSet
parseFrom(com.google.protobuf.ByteString data)
static CloudStorageRegexFileSet
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static CloudStorageRegexFileSet
parseFrom(com.google.protobuf.CodedInputStream input)
static CloudStorageRegexFileSet
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static CloudStorageRegexFileSet
parseFrom(InputStream input)
static CloudStorageRegexFileSet
parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static CloudStorageRegexFileSet
parseFrom(ByteBuffer data)
static CloudStorageRegexFileSet
parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<CloudStorageRegexFileSet>
parser()
CloudStorageRegexFileSet.Builder
toBuilder()
void
writeTo(com.google.protobuf.CodedOutputStream output)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
BUCKET_NAME_FIELD_NUMBER
public static final int BUCKET_NAME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
INCLUDE_REGEX_FIELD_NUMBER
public static final int INCLUDE_REGEX_FIELD_NUMBER
- See Also:
- Constant Field Values
-
EXCLUDE_REGEX_FIELD_NUMBER
public static final int EXCLUDE_REGEX_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstance
in classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3
-
getBucketName
public String getBucketName()
The name of a Cloud Storage bucket. Required.
string bucket_name = 1;
- Specified by:
getBucketName
in 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:
getBucketNameBytes
in interfaceCloudStorageRegexFileSetOrBuilder
- Returns:
- The bytes for bucketName.
-
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:
getIncludeRegexList
in 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:
getIncludeRegexCount
in interfaceCloudStorageRegexFileSetOrBuilder
- Returns:
- The count of includeRegex.
-
getIncludeRegex
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](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:
getIncludeRegex
in 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:
getIncludeRegexBytes
in interfaceCloudStorageRegexFileSetOrBuilder
- Parameters:
index
- The index of the value to return.- Returns:
- The bytes of the includeRegex at the given index.
-
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:
getExcludeRegexList
in 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:
getExcludeRegexCount
in interfaceCloudStorageRegexFileSetOrBuilder
- Returns:
- The count of excludeRegex.
-
getExcludeRegex
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](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:
getExcludeRegex
in 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:
getExcludeRegexBytes
in interfaceCloudStorageRegexFileSetOrBuilder
- Parameters:
index
- The index of the value to return.- Returns:
- The bytes of the excludeRegex at the given index.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessageV3
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in classcom.google.protobuf.AbstractMessage
-
parseFrom
public static CloudStorageRegexFileSet parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CloudStorageRegexFileSet parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CloudStorageRegexFileSet parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CloudStorageRegexFileSet parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CloudStorageRegexFileSet parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CloudStorageRegexFileSet parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CloudStorageRegexFileSet parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static CloudStorageRegexFileSet parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static CloudStorageRegexFileSet parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static CloudStorageRegexFileSet parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static CloudStorageRegexFileSet parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static CloudStorageRegexFileSet parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public CloudStorageRegexFileSet.Builder newBuilderForType()
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.MessageLite
-
newBuilder
public static CloudStorageRegexFileSet.Builder newBuilder()
-
newBuilder
public static CloudStorageRegexFileSet.Builder newBuilder(CloudStorageRegexFileSet prototype)
-
toBuilder
public CloudStorageRegexFileSet.Builder toBuilder()
- Specified by:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected CloudStorageRegexFileSet.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static CloudStorageRegexFileSet getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<CloudStorageRegexFileSet> parser()
-
getParserForType
public com.google.protobuf.Parser<CloudStorageRegexFileSet> getParserForType()
- Specified by:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public CloudStorageRegexFileSet getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
-