Class CloudStorageRegexFileSet

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
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

@Generated public final class CloudStorageRegexFileSet extends com.google.protobuf.GeneratedMessage 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
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    Message representing a set of files in a Cloud Storage bucket.

    Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage

    com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message,T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage

    com.google.protobuf.AbstractMessage.BuilderParent

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     

    Fields inherited from class com.google.protobuf.GeneratedMessage

    alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessage

    memoizedSize

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    The name of a Cloud Storage bucket.
    com.google.protobuf.ByteString
    The name of a Cloud Storage bucket.
     
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    getExcludeRegex(int index)
    A list of regular expressions matching file paths to exclude.
    com.google.protobuf.ByteString
    A list of regular expressions matching file paths to exclude.
    int
    A list of regular expressions matching file paths to exclude.
    com.google.protobuf.ProtocolStringList
    A 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.ByteString
    A list of regular expressions matching file paths to include.
    int
    A list of regular expressions matching file paths to include.
    com.google.protobuf.ProtocolStringList
    A list of regular expressions matching file paths to include.
    com.google.protobuf.Parser<CloudStorageRegexFileSet>
     
    int
     
    int
     
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
     
     
    newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
     
     
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(byte[] data)
     
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.ByteString data)
     
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<CloudStorageRegexFileSet>
     
     
    void
    writeTo(com.google.protobuf.CodedOutputStream output)
     

    Methods inherited from class com.google.protobuf.GeneratedMessage

    canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, 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, hashFields, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite

    addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLite

    toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Field Details

    • BUCKET_NAME_FIELD_NUMBER

      public static final int BUCKET_NAME_FIELD_NUMBER
      See Also:
    • INCLUDE_REGEX_FIELD_NUMBER

      public static final int INCLUDE_REGEX_FIELD_NUMBER
      See Also:
    • EXCLUDE_REGEX_FIELD_NUMBER

      public static final int EXCLUDE_REGEX_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getBucketName

      public String getBucketName()
       The name of a Cloud Storage bucket. Required.
       
      string bucket_name = 1;
      Specified by:
      getBucketName in interface CloudStorageRegexFileSetOrBuilder
      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 interface CloudStorageRegexFileSetOrBuilder
      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 interface CloudStorageRegexFileSetOrBuilder
      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 interface CloudStorageRegexFileSetOrBuilder
      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 interface CloudStorageRegexFileSetOrBuilder
      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 interface CloudStorageRegexFileSetOrBuilder
      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 interface CloudStorageRegexFileSetOrBuilder
      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 interface CloudStorageRegexFileSetOrBuilder
      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 interface CloudStorageRegexFileSetOrBuilder
      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 interface CloudStorageRegexFileSetOrBuilder
      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 interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.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 interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static CloudStorageRegexFileSet.Builder newBuilder()
    • newBuilder

      public static CloudStorageRegexFileSet.Builder newBuilder(CloudStorageRegexFileSet prototype)
    • toBuilder

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected CloudStorageRegexFileSet.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • 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 interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public CloudStorageRegexFileSet getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder