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 classCloudStorageRegexFileSet.BuilderMessage 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 intBUCKET_NAME_FIELD_NUMBERstatic intEXCLUDE_REGEX_FIELD_NUMBERstatic intINCLUDE_REGEX_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)StringgetBucketName()The name of a Cloud Storage bucket.com.google.protobuf.ByteStringgetBucketNameBytes()The name of a Cloud Storage bucket.static CloudStorageRegexFileSetgetDefaultInstance()CloudStorageRegexFileSetgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()StringgetExcludeRegex(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.intgetExcludeRegexCount()A list of regular expressions matching file paths to exclude.com.google.protobuf.ProtocolStringListgetExcludeRegexList()A list of regular expressions matching file paths to exclude.StringgetIncludeRegex(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.intgetIncludeRegexCount()A list of regular expressions matching file paths to include.com.google.protobuf.ProtocolStringListgetIncludeRegexList()A list of regular expressions matching file paths to include.com.google.protobuf.Parser<CloudStorageRegexFileSet>getParserForType()intgetSerializedSize()inthashCode()protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static CloudStorageRegexFileSet.BuildernewBuilder()static CloudStorageRegexFileSet.BuildernewBuilder(CloudStorageRegexFileSet prototype)CloudStorageRegexFileSet.BuildernewBuilderForType()protected CloudStorageRegexFileSet.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static CloudStorageRegexFileSetparseDelimitedFrom(InputStream input)static CloudStorageRegexFileSetparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static CloudStorageRegexFileSetparseFrom(byte[] data)static CloudStorageRegexFileSetparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static CloudStorageRegexFileSetparseFrom(com.google.protobuf.ByteString data)static CloudStorageRegexFileSetparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static CloudStorageRegexFileSetparseFrom(com.google.protobuf.CodedInputStream input)static CloudStorageRegexFileSetparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static CloudStorageRegexFileSetparseFrom(InputStream input)static CloudStorageRegexFileSetparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static CloudStorageRegexFileSetparseFrom(ByteBuffer data)static CloudStorageRegexFileSetparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<CloudStorageRegexFileSet>parser()CloudStorageRegexFileSet.BuildertoBuilder()voidwriteTo(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:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getBucketName
public String 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.
-
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
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:
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.
-
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
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:
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.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein 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:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein 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:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected CloudStorageRegexFileSet.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein 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:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public CloudStorageRegexFileSet getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-