• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2020 Google LLC
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     https://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 // Generated by the protocol buffer compiler.  DO NOT EDIT!
17 // source: google/privacy/dlp/v2/storage.proto
18 
19 package com.google.privacy.dlp.v2;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Options defining a file or a set of files within a Cloud Storage
26  * bucket.
27  * </pre>
28  *
29  * Protobuf type {@code google.privacy.dlp.v2.CloudStorageOptions}
30  */
31 public final class CloudStorageOptions extends com.google.protobuf.GeneratedMessageV3
32     implements
33     // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CloudStorageOptions)
34     CloudStorageOptionsOrBuilder {
35   private static final long serialVersionUID = 0L;
36   // Use CloudStorageOptions.newBuilder() to construct.
CloudStorageOptions(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37   private CloudStorageOptions(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
38     super(builder);
39   }
40 
CloudStorageOptions()41   private CloudStorageOptions() {
42     fileTypes_ = java.util.Collections.emptyList();
43     sampleMethod_ = 0;
44   }
45 
46   @java.lang.Override
47   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)48   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
49     return new CloudStorageOptions();
50   }
51 
52   @java.lang.Override
getUnknownFields()53   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
54     return this.unknownFields;
55   }
56 
getDescriptor()57   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
58     return com.google.privacy.dlp.v2.DlpStorage
59         .internal_static_google_privacy_dlp_v2_CloudStorageOptions_descriptor;
60   }
61 
62   @java.lang.Override
63   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()64       internalGetFieldAccessorTable() {
65     return com.google.privacy.dlp.v2.DlpStorage
66         .internal_static_google_privacy_dlp_v2_CloudStorageOptions_fieldAccessorTable
67         .ensureFieldAccessorsInitialized(
68             com.google.privacy.dlp.v2.CloudStorageOptions.class,
69             com.google.privacy.dlp.v2.CloudStorageOptions.Builder.class);
70   }
71 
72   /**
73    *
74    *
75    * <pre>
76    * How to sample bytes if not all bytes are scanned. Meaningful only when used
77    * in conjunction with bytes_limit_per_file. If not specified, scanning would
78    * start from the top.
79    * </pre>
80    *
81    * Protobuf enum {@code google.privacy.dlp.v2.CloudStorageOptions.SampleMethod}
82    */
83   public enum SampleMethod implements com.google.protobuf.ProtocolMessageEnum {
84     /** <code>SAMPLE_METHOD_UNSPECIFIED = 0;</code> */
85     SAMPLE_METHOD_UNSPECIFIED(0),
86     /**
87      *
88      *
89      * <pre>
90      * Scan from the top (default).
91      * </pre>
92      *
93      * <code>TOP = 1;</code>
94      */
95     TOP(1),
96     /**
97      *
98      *
99      * <pre>
100      * For each file larger than bytes_limit_per_file, randomly pick the offset
101      * to start scanning. The scanned bytes are contiguous.
102      * </pre>
103      *
104      * <code>RANDOM_START = 2;</code>
105      */
106     RANDOM_START(2),
107     UNRECOGNIZED(-1),
108     ;
109 
110     /** <code>SAMPLE_METHOD_UNSPECIFIED = 0;</code> */
111     public static final int SAMPLE_METHOD_UNSPECIFIED_VALUE = 0;
112     /**
113      *
114      *
115      * <pre>
116      * Scan from the top (default).
117      * </pre>
118      *
119      * <code>TOP = 1;</code>
120      */
121     public static final int TOP_VALUE = 1;
122     /**
123      *
124      *
125      * <pre>
126      * For each file larger than bytes_limit_per_file, randomly pick the offset
127      * to start scanning. The scanned bytes are contiguous.
128      * </pre>
129      *
130      * <code>RANDOM_START = 2;</code>
131      */
132     public static final int RANDOM_START_VALUE = 2;
133 
getNumber()134     public final int getNumber() {
135       if (this == UNRECOGNIZED) {
136         throw new java.lang.IllegalArgumentException(
137             "Can't get the number of an unknown enum value.");
138       }
139       return value;
140     }
141 
142     /**
143      * @param value The numeric wire value of the corresponding enum entry.
144      * @return The enum associated with the given numeric wire value.
145      * @deprecated Use {@link #forNumber(int)} instead.
146      */
147     @java.lang.Deprecated
valueOf(int value)148     public static SampleMethod valueOf(int value) {
149       return forNumber(value);
150     }
151 
152     /**
153      * @param value The numeric wire value of the corresponding enum entry.
154      * @return The enum associated with the given numeric wire value.
155      */
forNumber(int value)156     public static SampleMethod forNumber(int value) {
157       switch (value) {
158         case 0:
159           return SAMPLE_METHOD_UNSPECIFIED;
160         case 1:
161           return TOP;
162         case 2:
163           return RANDOM_START;
164         default:
165           return null;
166       }
167     }
168 
internalGetValueMap()169     public static com.google.protobuf.Internal.EnumLiteMap<SampleMethod> internalGetValueMap() {
170       return internalValueMap;
171     }
172 
173     private static final com.google.protobuf.Internal.EnumLiteMap<SampleMethod> internalValueMap =
174         new com.google.protobuf.Internal.EnumLiteMap<SampleMethod>() {
175           public SampleMethod findValueByNumber(int number) {
176             return SampleMethod.forNumber(number);
177           }
178         };
179 
getValueDescriptor()180     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
181       if (this == UNRECOGNIZED) {
182         throw new java.lang.IllegalStateException(
183             "Can't get the descriptor of an unrecognized enum value.");
184       }
185       return getDescriptor().getValues().get(ordinal());
186     }
187 
getDescriptorForType()188     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
189       return getDescriptor();
190     }
191 
getDescriptor()192     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
193       return com.google.privacy.dlp.v2.CloudStorageOptions.getDescriptor().getEnumTypes().get(0);
194     }
195 
196     private static final SampleMethod[] VALUES = values();
197 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)198     public static SampleMethod valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
199       if (desc.getType() != getDescriptor()) {
200         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
201       }
202       if (desc.getIndex() == -1) {
203         return UNRECOGNIZED;
204       }
205       return VALUES[desc.getIndex()];
206     }
207 
208     private final int value;
209 
SampleMethod(int value)210     private SampleMethod(int value) {
211       this.value = value;
212     }
213 
214     // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.CloudStorageOptions.SampleMethod)
215   }
216 
217   public interface FileSetOrBuilder
218       extends
219       // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CloudStorageOptions.FileSet)
220       com.google.protobuf.MessageOrBuilder {
221 
222     /**
223      *
224      *
225      * <pre>
226      * The Cloud Storage url of the file(s) to scan, in the format
227      * `gs://&lt;bucket&gt;/&lt;path&gt;`. Trailing wildcard in the path is allowed.
228      * If the url ends in a trailing slash, the bucket or directory represented
229      * by the url will be scanned non-recursively (content in sub-directories
230      * will not be scanned). This means that `gs://mybucket/` is equivalent to
231      * `gs://mybucket/&#42;`, and `gs://mybucket/directory/` is equivalent to
232      * `gs://mybucket/directory/&#42;`.
233      * Exactly one of `url` or `regex_file_set` must be set.
234      * </pre>
235      *
236      * <code>string url = 1;</code>
237      *
238      * @return The url.
239      */
getUrl()240     java.lang.String getUrl();
241     /**
242      *
243      *
244      * <pre>
245      * The Cloud Storage url of the file(s) to scan, in the format
246      * `gs://&lt;bucket&gt;/&lt;path&gt;`. Trailing wildcard in the path is allowed.
247      * If the url ends in a trailing slash, the bucket or directory represented
248      * by the url will be scanned non-recursively (content in sub-directories
249      * will not be scanned). This means that `gs://mybucket/` is equivalent to
250      * `gs://mybucket/&#42;`, and `gs://mybucket/directory/` is equivalent to
251      * `gs://mybucket/directory/&#42;`.
252      * Exactly one of `url` or `regex_file_set` must be set.
253      * </pre>
254      *
255      * <code>string url = 1;</code>
256      *
257      * @return The bytes for url.
258      */
getUrlBytes()259     com.google.protobuf.ByteString getUrlBytes();
260 
261     /**
262      *
263      *
264      * <pre>
265      * The regex-filtered set of files to scan. Exactly one of `url` or
266      * `regex_file_set` must be set.
267      * </pre>
268      *
269      * <code>.google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2;</code>
270      *
271      * @return Whether the regexFileSet field is set.
272      */
hasRegexFileSet()273     boolean hasRegexFileSet();
274     /**
275      *
276      *
277      * <pre>
278      * The regex-filtered set of files to scan. Exactly one of `url` or
279      * `regex_file_set` must be set.
280      * </pre>
281      *
282      * <code>.google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2;</code>
283      *
284      * @return The regexFileSet.
285      */
getRegexFileSet()286     com.google.privacy.dlp.v2.CloudStorageRegexFileSet getRegexFileSet();
287     /**
288      *
289      *
290      * <pre>
291      * The regex-filtered set of files to scan. Exactly one of `url` or
292      * `regex_file_set` must be set.
293      * </pre>
294      *
295      * <code>.google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2;</code>
296      */
getRegexFileSetOrBuilder()297     com.google.privacy.dlp.v2.CloudStorageRegexFileSetOrBuilder getRegexFileSetOrBuilder();
298   }
299   /**
300    *
301    *
302    * <pre>
303    * Set of files to scan.
304    * </pre>
305    *
306    * Protobuf type {@code google.privacy.dlp.v2.CloudStorageOptions.FileSet}
307    */
308   public static final class FileSet extends com.google.protobuf.GeneratedMessageV3
309       implements
310       // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CloudStorageOptions.FileSet)
311       FileSetOrBuilder {
312     private static final long serialVersionUID = 0L;
313     // Use FileSet.newBuilder() to construct.
FileSet(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)314     private FileSet(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
315       super(builder);
316     }
317 
FileSet()318     private FileSet() {
319       url_ = "";
320     }
321 
322     @java.lang.Override
323     @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)324     protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
325       return new FileSet();
326     }
327 
328     @java.lang.Override
getUnknownFields()329     public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
330       return this.unknownFields;
331     }
332 
getDescriptor()333     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
334       return com.google.privacy.dlp.v2.DlpStorage
335           .internal_static_google_privacy_dlp_v2_CloudStorageOptions_FileSet_descriptor;
336     }
337 
338     @java.lang.Override
339     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()340         internalGetFieldAccessorTable() {
341       return com.google.privacy.dlp.v2.DlpStorage
342           .internal_static_google_privacy_dlp_v2_CloudStorageOptions_FileSet_fieldAccessorTable
343           .ensureFieldAccessorsInitialized(
344               com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.class,
345               com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.Builder.class);
346     }
347 
348     public static final int URL_FIELD_NUMBER = 1;
349 
350     @SuppressWarnings("serial")
351     private volatile java.lang.Object url_ = "";
352     /**
353      *
354      *
355      * <pre>
356      * The Cloud Storage url of the file(s) to scan, in the format
357      * `gs://&lt;bucket&gt;/&lt;path&gt;`. Trailing wildcard in the path is allowed.
358      * If the url ends in a trailing slash, the bucket or directory represented
359      * by the url will be scanned non-recursively (content in sub-directories
360      * will not be scanned). This means that `gs://mybucket/` is equivalent to
361      * `gs://mybucket/&#42;`, and `gs://mybucket/directory/` is equivalent to
362      * `gs://mybucket/directory/&#42;`.
363      * Exactly one of `url` or `regex_file_set` must be set.
364      * </pre>
365      *
366      * <code>string url = 1;</code>
367      *
368      * @return The url.
369      */
370     @java.lang.Override
getUrl()371     public java.lang.String getUrl() {
372       java.lang.Object ref = url_;
373       if (ref instanceof java.lang.String) {
374         return (java.lang.String) ref;
375       } else {
376         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
377         java.lang.String s = bs.toStringUtf8();
378         url_ = s;
379         return s;
380       }
381     }
382     /**
383      *
384      *
385      * <pre>
386      * The Cloud Storage url of the file(s) to scan, in the format
387      * `gs://&lt;bucket&gt;/&lt;path&gt;`. Trailing wildcard in the path is allowed.
388      * If the url ends in a trailing slash, the bucket or directory represented
389      * by the url will be scanned non-recursively (content in sub-directories
390      * will not be scanned). This means that `gs://mybucket/` is equivalent to
391      * `gs://mybucket/&#42;`, and `gs://mybucket/directory/` is equivalent to
392      * `gs://mybucket/directory/&#42;`.
393      * Exactly one of `url` or `regex_file_set` must be set.
394      * </pre>
395      *
396      * <code>string url = 1;</code>
397      *
398      * @return The bytes for url.
399      */
400     @java.lang.Override
getUrlBytes()401     public com.google.protobuf.ByteString getUrlBytes() {
402       java.lang.Object ref = url_;
403       if (ref instanceof java.lang.String) {
404         com.google.protobuf.ByteString b =
405             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
406         url_ = b;
407         return b;
408       } else {
409         return (com.google.protobuf.ByteString) ref;
410       }
411     }
412 
413     public static final int REGEX_FILE_SET_FIELD_NUMBER = 2;
414     private com.google.privacy.dlp.v2.CloudStorageRegexFileSet regexFileSet_;
415     /**
416      *
417      *
418      * <pre>
419      * The regex-filtered set of files to scan. Exactly one of `url` or
420      * `regex_file_set` must be set.
421      * </pre>
422      *
423      * <code>.google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2;</code>
424      *
425      * @return Whether the regexFileSet field is set.
426      */
427     @java.lang.Override
hasRegexFileSet()428     public boolean hasRegexFileSet() {
429       return regexFileSet_ != null;
430     }
431     /**
432      *
433      *
434      * <pre>
435      * The regex-filtered set of files to scan. Exactly one of `url` or
436      * `regex_file_set` must be set.
437      * </pre>
438      *
439      * <code>.google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2;</code>
440      *
441      * @return The regexFileSet.
442      */
443     @java.lang.Override
getRegexFileSet()444     public com.google.privacy.dlp.v2.CloudStorageRegexFileSet getRegexFileSet() {
445       return regexFileSet_ == null
446           ? com.google.privacy.dlp.v2.CloudStorageRegexFileSet.getDefaultInstance()
447           : regexFileSet_;
448     }
449     /**
450      *
451      *
452      * <pre>
453      * The regex-filtered set of files to scan. Exactly one of `url` or
454      * `regex_file_set` must be set.
455      * </pre>
456      *
457      * <code>.google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2;</code>
458      */
459     @java.lang.Override
getRegexFileSetOrBuilder()460     public com.google.privacy.dlp.v2.CloudStorageRegexFileSetOrBuilder getRegexFileSetOrBuilder() {
461       return regexFileSet_ == null
462           ? com.google.privacy.dlp.v2.CloudStorageRegexFileSet.getDefaultInstance()
463           : regexFileSet_;
464     }
465 
466     private byte memoizedIsInitialized = -1;
467 
468     @java.lang.Override
isInitialized()469     public final boolean isInitialized() {
470       byte isInitialized = memoizedIsInitialized;
471       if (isInitialized == 1) return true;
472       if (isInitialized == 0) return false;
473 
474       memoizedIsInitialized = 1;
475       return true;
476     }
477 
478     @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)479     public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
480       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) {
481         com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_);
482       }
483       if (regexFileSet_ != null) {
484         output.writeMessage(2, getRegexFileSet());
485       }
486       getUnknownFields().writeTo(output);
487     }
488 
489     @java.lang.Override
getSerializedSize()490     public int getSerializedSize() {
491       int size = memoizedSize;
492       if (size != -1) return size;
493 
494       size = 0;
495       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) {
496         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_);
497       }
498       if (regexFileSet_ != null) {
499         size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRegexFileSet());
500       }
501       size += getUnknownFields().getSerializedSize();
502       memoizedSize = size;
503       return size;
504     }
505 
506     @java.lang.Override
equals(final java.lang.Object obj)507     public boolean equals(final java.lang.Object obj) {
508       if (obj == this) {
509         return true;
510       }
511       if (!(obj instanceof com.google.privacy.dlp.v2.CloudStorageOptions.FileSet)) {
512         return super.equals(obj);
513       }
514       com.google.privacy.dlp.v2.CloudStorageOptions.FileSet other =
515           (com.google.privacy.dlp.v2.CloudStorageOptions.FileSet) obj;
516 
517       if (!getUrl().equals(other.getUrl())) return false;
518       if (hasRegexFileSet() != other.hasRegexFileSet()) return false;
519       if (hasRegexFileSet()) {
520         if (!getRegexFileSet().equals(other.getRegexFileSet())) return false;
521       }
522       if (!getUnknownFields().equals(other.getUnknownFields())) return false;
523       return true;
524     }
525 
526     @java.lang.Override
hashCode()527     public int hashCode() {
528       if (memoizedHashCode != 0) {
529         return memoizedHashCode;
530       }
531       int hash = 41;
532       hash = (19 * hash) + getDescriptor().hashCode();
533       hash = (37 * hash) + URL_FIELD_NUMBER;
534       hash = (53 * hash) + getUrl().hashCode();
535       if (hasRegexFileSet()) {
536         hash = (37 * hash) + REGEX_FILE_SET_FIELD_NUMBER;
537         hash = (53 * hash) + getRegexFileSet().hashCode();
538       }
539       hash = (29 * hash) + getUnknownFields().hashCode();
540       memoizedHashCode = hash;
541       return hash;
542     }
543 
parseFrom( java.nio.ByteBuffer data)544     public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseFrom(
545         java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
546       return PARSER.parseFrom(data);
547     }
548 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)549     public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseFrom(
550         java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
551         throws com.google.protobuf.InvalidProtocolBufferException {
552       return PARSER.parseFrom(data, extensionRegistry);
553     }
554 
parseFrom( com.google.protobuf.ByteString data)555     public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseFrom(
556         com.google.protobuf.ByteString data)
557         throws com.google.protobuf.InvalidProtocolBufferException {
558       return PARSER.parseFrom(data);
559     }
560 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)561     public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseFrom(
562         com.google.protobuf.ByteString data,
563         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
564         throws com.google.protobuf.InvalidProtocolBufferException {
565       return PARSER.parseFrom(data, extensionRegistry);
566     }
567 
parseFrom(byte[] data)568     public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseFrom(byte[] data)
569         throws com.google.protobuf.InvalidProtocolBufferException {
570       return PARSER.parseFrom(data);
571     }
572 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)573     public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseFrom(
574         byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
575         throws com.google.protobuf.InvalidProtocolBufferException {
576       return PARSER.parseFrom(data, extensionRegistry);
577     }
578 
parseFrom( java.io.InputStream input)579     public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseFrom(
580         java.io.InputStream input) throws java.io.IOException {
581       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
582     }
583 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)584     public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseFrom(
585         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
586         throws java.io.IOException {
587       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
588           PARSER, input, extensionRegistry);
589     }
590 
parseDelimitedFrom( java.io.InputStream input)591     public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseDelimitedFrom(
592         java.io.InputStream input) throws java.io.IOException {
593       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
594     }
595 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)596     public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseDelimitedFrom(
597         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
598         throws java.io.IOException {
599       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
600           PARSER, input, extensionRegistry);
601     }
602 
parseFrom( com.google.protobuf.CodedInputStream input)603     public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseFrom(
604         com.google.protobuf.CodedInputStream input) throws java.io.IOException {
605       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
606     }
607 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)608     public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseFrom(
609         com.google.protobuf.CodedInputStream input,
610         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
611         throws java.io.IOException {
612       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
613           PARSER, input, extensionRegistry);
614     }
615 
616     @java.lang.Override
newBuilderForType()617     public Builder newBuilderForType() {
618       return newBuilder();
619     }
620 
newBuilder()621     public static Builder newBuilder() {
622       return DEFAULT_INSTANCE.toBuilder();
623     }
624 
newBuilder( com.google.privacy.dlp.v2.CloudStorageOptions.FileSet prototype)625     public static Builder newBuilder(
626         com.google.privacy.dlp.v2.CloudStorageOptions.FileSet prototype) {
627       return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
628     }
629 
630     @java.lang.Override
toBuilder()631     public Builder toBuilder() {
632       return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
633     }
634 
635     @java.lang.Override
newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)636     protected Builder newBuilderForType(
637         com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
638       Builder builder = new Builder(parent);
639       return builder;
640     }
641     /**
642      *
643      *
644      * <pre>
645      * Set of files to scan.
646      * </pre>
647      *
648      * Protobuf type {@code google.privacy.dlp.v2.CloudStorageOptions.FileSet}
649      */
650     public static final class Builder
651         extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
652         implements
653         // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CloudStorageOptions.FileSet)
654         com.google.privacy.dlp.v2.CloudStorageOptions.FileSetOrBuilder {
getDescriptor()655       public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
656         return com.google.privacy.dlp.v2.DlpStorage
657             .internal_static_google_privacy_dlp_v2_CloudStorageOptions_FileSet_descriptor;
658       }
659 
660       @java.lang.Override
661       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()662           internalGetFieldAccessorTable() {
663         return com.google.privacy.dlp.v2.DlpStorage
664             .internal_static_google_privacy_dlp_v2_CloudStorageOptions_FileSet_fieldAccessorTable
665             .ensureFieldAccessorsInitialized(
666                 com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.class,
667                 com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.Builder.class);
668       }
669 
670       // Construct using com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.newBuilder()
Builder()671       private Builder() {}
672 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)673       private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
674         super(parent);
675       }
676 
677       @java.lang.Override
clear()678       public Builder clear() {
679         super.clear();
680         bitField0_ = 0;
681         url_ = "";
682         regexFileSet_ = null;
683         if (regexFileSetBuilder_ != null) {
684           regexFileSetBuilder_.dispose();
685           regexFileSetBuilder_ = null;
686         }
687         return this;
688       }
689 
690       @java.lang.Override
getDescriptorForType()691       public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
692         return com.google.privacy.dlp.v2.DlpStorage
693             .internal_static_google_privacy_dlp_v2_CloudStorageOptions_FileSet_descriptor;
694       }
695 
696       @java.lang.Override
getDefaultInstanceForType()697       public com.google.privacy.dlp.v2.CloudStorageOptions.FileSet getDefaultInstanceForType() {
698         return com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.getDefaultInstance();
699       }
700 
701       @java.lang.Override
build()702       public com.google.privacy.dlp.v2.CloudStorageOptions.FileSet build() {
703         com.google.privacy.dlp.v2.CloudStorageOptions.FileSet result = buildPartial();
704         if (!result.isInitialized()) {
705           throw newUninitializedMessageException(result);
706         }
707         return result;
708       }
709 
710       @java.lang.Override
buildPartial()711       public com.google.privacy.dlp.v2.CloudStorageOptions.FileSet buildPartial() {
712         com.google.privacy.dlp.v2.CloudStorageOptions.FileSet result =
713             new com.google.privacy.dlp.v2.CloudStorageOptions.FileSet(this);
714         if (bitField0_ != 0) {
715           buildPartial0(result);
716         }
717         onBuilt();
718         return result;
719       }
720 
buildPartial0(com.google.privacy.dlp.v2.CloudStorageOptions.FileSet result)721       private void buildPartial0(com.google.privacy.dlp.v2.CloudStorageOptions.FileSet result) {
722         int from_bitField0_ = bitField0_;
723         if (((from_bitField0_ & 0x00000001) != 0)) {
724           result.url_ = url_;
725         }
726         if (((from_bitField0_ & 0x00000002) != 0)) {
727           result.regexFileSet_ =
728               regexFileSetBuilder_ == null ? regexFileSet_ : regexFileSetBuilder_.build();
729         }
730       }
731 
732       @java.lang.Override
clone()733       public Builder clone() {
734         return super.clone();
735       }
736 
737       @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)738       public Builder setField(
739           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
740         return super.setField(field, value);
741       }
742 
743       @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)744       public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
745         return super.clearField(field);
746       }
747 
748       @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)749       public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
750         return super.clearOneof(oneof);
751       }
752 
753       @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)754       public Builder setRepeatedField(
755           com.google.protobuf.Descriptors.FieldDescriptor field,
756           int index,
757           java.lang.Object value) {
758         return super.setRepeatedField(field, index, value);
759       }
760 
761       @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)762       public Builder addRepeatedField(
763           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
764         return super.addRepeatedField(field, value);
765       }
766 
767       @java.lang.Override
mergeFrom(com.google.protobuf.Message other)768       public Builder mergeFrom(com.google.protobuf.Message other) {
769         if (other instanceof com.google.privacy.dlp.v2.CloudStorageOptions.FileSet) {
770           return mergeFrom((com.google.privacy.dlp.v2.CloudStorageOptions.FileSet) other);
771         } else {
772           super.mergeFrom(other);
773           return this;
774         }
775       }
776 
mergeFrom(com.google.privacy.dlp.v2.CloudStorageOptions.FileSet other)777       public Builder mergeFrom(com.google.privacy.dlp.v2.CloudStorageOptions.FileSet other) {
778         if (other == com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.getDefaultInstance())
779           return this;
780         if (!other.getUrl().isEmpty()) {
781           url_ = other.url_;
782           bitField0_ |= 0x00000001;
783           onChanged();
784         }
785         if (other.hasRegexFileSet()) {
786           mergeRegexFileSet(other.getRegexFileSet());
787         }
788         this.mergeUnknownFields(other.getUnknownFields());
789         onChanged();
790         return this;
791       }
792 
793       @java.lang.Override
isInitialized()794       public final boolean isInitialized() {
795         return true;
796       }
797 
798       @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)799       public Builder mergeFrom(
800           com.google.protobuf.CodedInputStream input,
801           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
802           throws java.io.IOException {
803         if (extensionRegistry == null) {
804           throw new java.lang.NullPointerException();
805         }
806         try {
807           boolean done = false;
808           while (!done) {
809             int tag = input.readTag();
810             switch (tag) {
811               case 0:
812                 done = true;
813                 break;
814               case 10:
815                 {
816                   url_ = input.readStringRequireUtf8();
817                   bitField0_ |= 0x00000001;
818                   break;
819                 } // case 10
820               case 18:
821                 {
822                   input.readMessage(getRegexFileSetFieldBuilder().getBuilder(), extensionRegistry);
823                   bitField0_ |= 0x00000002;
824                   break;
825                 } // case 18
826               default:
827                 {
828                   if (!super.parseUnknownField(input, extensionRegistry, tag)) {
829                     done = true; // was an endgroup tag
830                   }
831                   break;
832                 } // default:
833             } // switch (tag)
834           } // while (!done)
835         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
836           throw e.unwrapIOException();
837         } finally {
838           onChanged();
839         } // finally
840         return this;
841       }
842 
843       private int bitField0_;
844 
845       private java.lang.Object url_ = "";
846       /**
847        *
848        *
849        * <pre>
850        * The Cloud Storage url of the file(s) to scan, in the format
851        * `gs://&lt;bucket&gt;/&lt;path&gt;`. Trailing wildcard in the path is allowed.
852        * If the url ends in a trailing slash, the bucket or directory represented
853        * by the url will be scanned non-recursively (content in sub-directories
854        * will not be scanned). This means that `gs://mybucket/` is equivalent to
855        * `gs://mybucket/&#42;`, and `gs://mybucket/directory/` is equivalent to
856        * `gs://mybucket/directory/&#42;`.
857        * Exactly one of `url` or `regex_file_set` must be set.
858        * </pre>
859        *
860        * <code>string url = 1;</code>
861        *
862        * @return The url.
863        */
getUrl()864       public java.lang.String getUrl() {
865         java.lang.Object ref = url_;
866         if (!(ref instanceof java.lang.String)) {
867           com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
868           java.lang.String s = bs.toStringUtf8();
869           url_ = s;
870           return s;
871         } else {
872           return (java.lang.String) ref;
873         }
874       }
875       /**
876        *
877        *
878        * <pre>
879        * The Cloud Storage url of the file(s) to scan, in the format
880        * `gs://&lt;bucket&gt;/&lt;path&gt;`. Trailing wildcard in the path is allowed.
881        * If the url ends in a trailing slash, the bucket or directory represented
882        * by the url will be scanned non-recursively (content in sub-directories
883        * will not be scanned). This means that `gs://mybucket/` is equivalent to
884        * `gs://mybucket/&#42;`, and `gs://mybucket/directory/` is equivalent to
885        * `gs://mybucket/directory/&#42;`.
886        * Exactly one of `url` or `regex_file_set` must be set.
887        * </pre>
888        *
889        * <code>string url = 1;</code>
890        *
891        * @return The bytes for url.
892        */
getUrlBytes()893       public com.google.protobuf.ByteString getUrlBytes() {
894         java.lang.Object ref = url_;
895         if (ref instanceof String) {
896           com.google.protobuf.ByteString b =
897               com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
898           url_ = b;
899           return b;
900         } else {
901           return (com.google.protobuf.ByteString) ref;
902         }
903       }
904       /**
905        *
906        *
907        * <pre>
908        * The Cloud Storage url of the file(s) to scan, in the format
909        * `gs://&lt;bucket&gt;/&lt;path&gt;`. Trailing wildcard in the path is allowed.
910        * If the url ends in a trailing slash, the bucket or directory represented
911        * by the url will be scanned non-recursively (content in sub-directories
912        * will not be scanned). This means that `gs://mybucket/` is equivalent to
913        * `gs://mybucket/&#42;`, and `gs://mybucket/directory/` is equivalent to
914        * `gs://mybucket/directory/&#42;`.
915        * Exactly one of `url` or `regex_file_set` must be set.
916        * </pre>
917        *
918        * <code>string url = 1;</code>
919        *
920        * @param value The url to set.
921        * @return This builder for chaining.
922        */
setUrl(java.lang.String value)923       public Builder setUrl(java.lang.String value) {
924         if (value == null) {
925           throw new NullPointerException();
926         }
927         url_ = value;
928         bitField0_ |= 0x00000001;
929         onChanged();
930         return this;
931       }
932       /**
933        *
934        *
935        * <pre>
936        * The Cloud Storage url of the file(s) to scan, in the format
937        * `gs://&lt;bucket&gt;/&lt;path&gt;`. Trailing wildcard in the path is allowed.
938        * If the url ends in a trailing slash, the bucket or directory represented
939        * by the url will be scanned non-recursively (content in sub-directories
940        * will not be scanned). This means that `gs://mybucket/` is equivalent to
941        * `gs://mybucket/&#42;`, and `gs://mybucket/directory/` is equivalent to
942        * `gs://mybucket/directory/&#42;`.
943        * Exactly one of `url` or `regex_file_set` must be set.
944        * </pre>
945        *
946        * <code>string url = 1;</code>
947        *
948        * @return This builder for chaining.
949        */
clearUrl()950       public Builder clearUrl() {
951         url_ = getDefaultInstance().getUrl();
952         bitField0_ = (bitField0_ & ~0x00000001);
953         onChanged();
954         return this;
955       }
956       /**
957        *
958        *
959        * <pre>
960        * The Cloud Storage url of the file(s) to scan, in the format
961        * `gs://&lt;bucket&gt;/&lt;path&gt;`. Trailing wildcard in the path is allowed.
962        * If the url ends in a trailing slash, the bucket or directory represented
963        * by the url will be scanned non-recursively (content in sub-directories
964        * will not be scanned). This means that `gs://mybucket/` is equivalent to
965        * `gs://mybucket/&#42;`, and `gs://mybucket/directory/` is equivalent to
966        * `gs://mybucket/directory/&#42;`.
967        * Exactly one of `url` or `regex_file_set` must be set.
968        * </pre>
969        *
970        * <code>string url = 1;</code>
971        *
972        * @param value The bytes for url to set.
973        * @return This builder for chaining.
974        */
setUrlBytes(com.google.protobuf.ByteString value)975       public Builder setUrlBytes(com.google.protobuf.ByteString value) {
976         if (value == null) {
977           throw new NullPointerException();
978         }
979         checkByteStringIsUtf8(value);
980         url_ = value;
981         bitField0_ |= 0x00000001;
982         onChanged();
983         return this;
984       }
985 
986       private com.google.privacy.dlp.v2.CloudStorageRegexFileSet regexFileSet_;
987       private com.google.protobuf.SingleFieldBuilderV3<
988               com.google.privacy.dlp.v2.CloudStorageRegexFileSet,
989               com.google.privacy.dlp.v2.CloudStorageRegexFileSet.Builder,
990               com.google.privacy.dlp.v2.CloudStorageRegexFileSetOrBuilder>
991           regexFileSetBuilder_;
992       /**
993        *
994        *
995        * <pre>
996        * The regex-filtered set of files to scan. Exactly one of `url` or
997        * `regex_file_set` must be set.
998        * </pre>
999        *
1000        * <code>.google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2;</code>
1001        *
1002        * @return Whether the regexFileSet field is set.
1003        */
hasRegexFileSet()1004       public boolean hasRegexFileSet() {
1005         return ((bitField0_ & 0x00000002) != 0);
1006       }
1007       /**
1008        *
1009        *
1010        * <pre>
1011        * The regex-filtered set of files to scan. Exactly one of `url` or
1012        * `regex_file_set` must be set.
1013        * </pre>
1014        *
1015        * <code>.google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2;</code>
1016        *
1017        * @return The regexFileSet.
1018        */
getRegexFileSet()1019       public com.google.privacy.dlp.v2.CloudStorageRegexFileSet getRegexFileSet() {
1020         if (regexFileSetBuilder_ == null) {
1021           return regexFileSet_ == null
1022               ? com.google.privacy.dlp.v2.CloudStorageRegexFileSet.getDefaultInstance()
1023               : regexFileSet_;
1024         } else {
1025           return regexFileSetBuilder_.getMessage();
1026         }
1027       }
1028       /**
1029        *
1030        *
1031        * <pre>
1032        * The regex-filtered set of files to scan. Exactly one of `url` or
1033        * `regex_file_set` must be set.
1034        * </pre>
1035        *
1036        * <code>.google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2;</code>
1037        */
setRegexFileSet(com.google.privacy.dlp.v2.CloudStorageRegexFileSet value)1038       public Builder setRegexFileSet(com.google.privacy.dlp.v2.CloudStorageRegexFileSet value) {
1039         if (regexFileSetBuilder_ == null) {
1040           if (value == null) {
1041             throw new NullPointerException();
1042           }
1043           regexFileSet_ = value;
1044         } else {
1045           regexFileSetBuilder_.setMessage(value);
1046         }
1047         bitField0_ |= 0x00000002;
1048         onChanged();
1049         return this;
1050       }
1051       /**
1052        *
1053        *
1054        * <pre>
1055        * The regex-filtered set of files to scan. Exactly one of `url` or
1056        * `regex_file_set` must be set.
1057        * </pre>
1058        *
1059        * <code>.google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2;</code>
1060        */
setRegexFileSet( com.google.privacy.dlp.v2.CloudStorageRegexFileSet.Builder builderForValue)1061       public Builder setRegexFileSet(
1062           com.google.privacy.dlp.v2.CloudStorageRegexFileSet.Builder builderForValue) {
1063         if (regexFileSetBuilder_ == null) {
1064           regexFileSet_ = builderForValue.build();
1065         } else {
1066           regexFileSetBuilder_.setMessage(builderForValue.build());
1067         }
1068         bitField0_ |= 0x00000002;
1069         onChanged();
1070         return this;
1071       }
1072       /**
1073        *
1074        *
1075        * <pre>
1076        * The regex-filtered set of files to scan. Exactly one of `url` or
1077        * `regex_file_set` must be set.
1078        * </pre>
1079        *
1080        * <code>.google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2;</code>
1081        */
mergeRegexFileSet(com.google.privacy.dlp.v2.CloudStorageRegexFileSet value)1082       public Builder mergeRegexFileSet(com.google.privacy.dlp.v2.CloudStorageRegexFileSet value) {
1083         if (regexFileSetBuilder_ == null) {
1084           if (((bitField0_ & 0x00000002) != 0)
1085               && regexFileSet_ != null
1086               && regexFileSet_
1087                   != com.google.privacy.dlp.v2.CloudStorageRegexFileSet.getDefaultInstance()) {
1088             getRegexFileSetBuilder().mergeFrom(value);
1089           } else {
1090             regexFileSet_ = value;
1091           }
1092         } else {
1093           regexFileSetBuilder_.mergeFrom(value);
1094         }
1095         bitField0_ |= 0x00000002;
1096         onChanged();
1097         return this;
1098       }
1099       /**
1100        *
1101        *
1102        * <pre>
1103        * The regex-filtered set of files to scan. Exactly one of `url` or
1104        * `regex_file_set` must be set.
1105        * </pre>
1106        *
1107        * <code>.google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2;</code>
1108        */
clearRegexFileSet()1109       public Builder clearRegexFileSet() {
1110         bitField0_ = (bitField0_ & ~0x00000002);
1111         regexFileSet_ = null;
1112         if (regexFileSetBuilder_ != null) {
1113           regexFileSetBuilder_.dispose();
1114           regexFileSetBuilder_ = null;
1115         }
1116         onChanged();
1117         return this;
1118       }
1119       /**
1120        *
1121        *
1122        * <pre>
1123        * The regex-filtered set of files to scan. Exactly one of `url` or
1124        * `regex_file_set` must be set.
1125        * </pre>
1126        *
1127        * <code>.google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2;</code>
1128        */
getRegexFileSetBuilder()1129       public com.google.privacy.dlp.v2.CloudStorageRegexFileSet.Builder getRegexFileSetBuilder() {
1130         bitField0_ |= 0x00000002;
1131         onChanged();
1132         return getRegexFileSetFieldBuilder().getBuilder();
1133       }
1134       /**
1135        *
1136        *
1137        * <pre>
1138        * The regex-filtered set of files to scan. Exactly one of `url` or
1139        * `regex_file_set` must be set.
1140        * </pre>
1141        *
1142        * <code>.google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2;</code>
1143        */
1144       public com.google.privacy.dlp.v2.CloudStorageRegexFileSetOrBuilder
getRegexFileSetOrBuilder()1145           getRegexFileSetOrBuilder() {
1146         if (regexFileSetBuilder_ != null) {
1147           return regexFileSetBuilder_.getMessageOrBuilder();
1148         } else {
1149           return regexFileSet_ == null
1150               ? com.google.privacy.dlp.v2.CloudStorageRegexFileSet.getDefaultInstance()
1151               : regexFileSet_;
1152         }
1153       }
1154       /**
1155        *
1156        *
1157        * <pre>
1158        * The regex-filtered set of files to scan. Exactly one of `url` or
1159        * `regex_file_set` must be set.
1160        * </pre>
1161        *
1162        * <code>.google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2;</code>
1163        */
1164       private com.google.protobuf.SingleFieldBuilderV3<
1165               com.google.privacy.dlp.v2.CloudStorageRegexFileSet,
1166               com.google.privacy.dlp.v2.CloudStorageRegexFileSet.Builder,
1167               com.google.privacy.dlp.v2.CloudStorageRegexFileSetOrBuilder>
getRegexFileSetFieldBuilder()1168           getRegexFileSetFieldBuilder() {
1169         if (regexFileSetBuilder_ == null) {
1170           regexFileSetBuilder_ =
1171               new com.google.protobuf.SingleFieldBuilderV3<
1172                   com.google.privacy.dlp.v2.CloudStorageRegexFileSet,
1173                   com.google.privacy.dlp.v2.CloudStorageRegexFileSet.Builder,
1174                   com.google.privacy.dlp.v2.CloudStorageRegexFileSetOrBuilder>(
1175                   getRegexFileSet(), getParentForChildren(), isClean());
1176           regexFileSet_ = null;
1177         }
1178         return regexFileSetBuilder_;
1179       }
1180 
1181       @java.lang.Override
setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1182       public final Builder setUnknownFields(
1183           final com.google.protobuf.UnknownFieldSet unknownFields) {
1184         return super.setUnknownFields(unknownFields);
1185       }
1186 
1187       @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1188       public final Builder mergeUnknownFields(
1189           final com.google.protobuf.UnknownFieldSet unknownFields) {
1190         return super.mergeUnknownFields(unknownFields);
1191       }
1192 
1193       // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CloudStorageOptions.FileSet)
1194     }
1195 
1196     // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CloudStorageOptions.FileSet)
1197     private static final com.google.privacy.dlp.v2.CloudStorageOptions.FileSet DEFAULT_INSTANCE;
1198 
1199     static {
1200       DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CloudStorageOptions.FileSet();
1201     }
1202 
getDefaultInstance()1203     public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet getDefaultInstance() {
1204       return DEFAULT_INSTANCE;
1205     }
1206 
1207     private static final com.google.protobuf.Parser<FileSet> PARSER =
1208         new com.google.protobuf.AbstractParser<FileSet>() {
1209           @java.lang.Override
1210           public FileSet parsePartialFrom(
1211               com.google.protobuf.CodedInputStream input,
1212               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1213               throws com.google.protobuf.InvalidProtocolBufferException {
1214             Builder builder = newBuilder();
1215             try {
1216               builder.mergeFrom(input, extensionRegistry);
1217             } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1218               throw e.setUnfinishedMessage(builder.buildPartial());
1219             } catch (com.google.protobuf.UninitializedMessageException e) {
1220               throw e.asInvalidProtocolBufferException()
1221                   .setUnfinishedMessage(builder.buildPartial());
1222             } catch (java.io.IOException e) {
1223               throw new com.google.protobuf.InvalidProtocolBufferException(e)
1224                   .setUnfinishedMessage(builder.buildPartial());
1225             }
1226             return builder.buildPartial();
1227           }
1228         };
1229 
parser()1230     public static com.google.protobuf.Parser<FileSet> parser() {
1231       return PARSER;
1232     }
1233 
1234     @java.lang.Override
getParserForType()1235     public com.google.protobuf.Parser<FileSet> getParserForType() {
1236       return PARSER;
1237     }
1238 
1239     @java.lang.Override
getDefaultInstanceForType()1240     public com.google.privacy.dlp.v2.CloudStorageOptions.FileSet getDefaultInstanceForType() {
1241       return DEFAULT_INSTANCE;
1242     }
1243   }
1244 
1245   public static final int FILE_SET_FIELD_NUMBER = 1;
1246   private com.google.privacy.dlp.v2.CloudStorageOptions.FileSet fileSet_;
1247   /**
1248    *
1249    *
1250    * <pre>
1251    * The set of one or more files to scan.
1252    * </pre>
1253    *
1254    * <code>.google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1;</code>
1255    *
1256    * @return Whether the fileSet field is set.
1257    */
1258   @java.lang.Override
hasFileSet()1259   public boolean hasFileSet() {
1260     return fileSet_ != null;
1261   }
1262   /**
1263    *
1264    *
1265    * <pre>
1266    * The set of one or more files to scan.
1267    * </pre>
1268    *
1269    * <code>.google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1;</code>
1270    *
1271    * @return The fileSet.
1272    */
1273   @java.lang.Override
getFileSet()1274   public com.google.privacy.dlp.v2.CloudStorageOptions.FileSet getFileSet() {
1275     return fileSet_ == null
1276         ? com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.getDefaultInstance()
1277         : fileSet_;
1278   }
1279   /**
1280    *
1281    *
1282    * <pre>
1283    * The set of one or more files to scan.
1284    * </pre>
1285    *
1286    * <code>.google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1;</code>
1287    */
1288   @java.lang.Override
getFileSetOrBuilder()1289   public com.google.privacy.dlp.v2.CloudStorageOptions.FileSetOrBuilder getFileSetOrBuilder() {
1290     return fileSet_ == null
1291         ? com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.getDefaultInstance()
1292         : fileSet_;
1293   }
1294 
1295   public static final int BYTES_LIMIT_PER_FILE_FIELD_NUMBER = 4;
1296   private long bytesLimitPerFile_ = 0L;
1297   /**
1298    *
1299    *
1300    * <pre>
1301    * Max number of bytes to scan from a file. If a scanned file's size is bigger
1302    * than this value then the rest of the bytes are omitted. Only one
1303    * of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
1304    * Cannot be set if de-identification is requested.
1305    * </pre>
1306    *
1307    * <code>int64 bytes_limit_per_file = 4;</code>
1308    *
1309    * @return The bytesLimitPerFile.
1310    */
1311   @java.lang.Override
getBytesLimitPerFile()1312   public long getBytesLimitPerFile() {
1313     return bytesLimitPerFile_;
1314   }
1315 
1316   public static final int BYTES_LIMIT_PER_FILE_PERCENT_FIELD_NUMBER = 8;
1317   private int bytesLimitPerFilePercent_ = 0;
1318   /**
1319    *
1320    *
1321    * <pre>
1322    * Max percentage of bytes to scan from a file. The rest are omitted. The
1323    * number of bytes scanned is rounded down. Must be between 0 and 100,
1324    * inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one
1325    * of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
1326    * Cannot be set if de-identification is requested.
1327    * </pre>
1328    *
1329    * <code>int32 bytes_limit_per_file_percent = 8;</code>
1330    *
1331    * @return The bytesLimitPerFilePercent.
1332    */
1333   @java.lang.Override
getBytesLimitPerFilePercent()1334   public int getBytesLimitPerFilePercent() {
1335     return bytesLimitPerFilePercent_;
1336   }
1337 
1338   public static final int FILE_TYPES_FIELD_NUMBER = 5;
1339 
1340   @SuppressWarnings("serial")
1341   private java.util.List<java.lang.Integer> fileTypes_;
1342 
1343   private static final com.google.protobuf.Internal.ListAdapter.Converter<
1344           java.lang.Integer, com.google.privacy.dlp.v2.FileType>
1345       fileTypes_converter_ =
1346           new com.google.protobuf.Internal.ListAdapter.Converter<
1347               java.lang.Integer, com.google.privacy.dlp.v2.FileType>() {
1348             public com.google.privacy.dlp.v2.FileType convert(java.lang.Integer from) {
1349               com.google.privacy.dlp.v2.FileType result =
1350                   com.google.privacy.dlp.v2.FileType.forNumber(from);
1351               return result == null ? com.google.privacy.dlp.v2.FileType.UNRECOGNIZED : result;
1352             }
1353           };
1354   /**
1355    *
1356    *
1357    * <pre>
1358    * List of file type groups to include in the scan.
1359    * If empty, all files are scanned and available data format processors
1360    * are applied. In addition, the binary content of the selected files
1361    * is always scanned as well.
1362    * Images are scanned only as binary if the specified region
1363    * does not support image inspection and no file_types were specified.
1364    * Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
1365    * </pre>
1366    *
1367    * <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
1368    *
1369    * @return A list containing the fileTypes.
1370    */
1371   @java.lang.Override
getFileTypesList()1372   public java.util.List<com.google.privacy.dlp.v2.FileType> getFileTypesList() {
1373     return new com.google.protobuf.Internal.ListAdapter<
1374         java.lang.Integer, com.google.privacy.dlp.v2.FileType>(fileTypes_, fileTypes_converter_);
1375   }
1376   /**
1377    *
1378    *
1379    * <pre>
1380    * List of file type groups to include in the scan.
1381    * If empty, all files are scanned and available data format processors
1382    * are applied. In addition, the binary content of the selected files
1383    * is always scanned as well.
1384    * Images are scanned only as binary if the specified region
1385    * does not support image inspection and no file_types were specified.
1386    * Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
1387    * </pre>
1388    *
1389    * <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
1390    *
1391    * @return The count of fileTypes.
1392    */
1393   @java.lang.Override
getFileTypesCount()1394   public int getFileTypesCount() {
1395     return fileTypes_.size();
1396   }
1397   /**
1398    *
1399    *
1400    * <pre>
1401    * List of file type groups to include in the scan.
1402    * If empty, all files are scanned and available data format processors
1403    * are applied. In addition, the binary content of the selected files
1404    * is always scanned as well.
1405    * Images are scanned only as binary if the specified region
1406    * does not support image inspection and no file_types were specified.
1407    * Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
1408    * </pre>
1409    *
1410    * <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
1411    *
1412    * @param index The index of the element to return.
1413    * @return The fileTypes at the given index.
1414    */
1415   @java.lang.Override
getFileTypes(int index)1416   public com.google.privacy.dlp.v2.FileType getFileTypes(int index) {
1417     return fileTypes_converter_.convert(fileTypes_.get(index));
1418   }
1419   /**
1420    *
1421    *
1422    * <pre>
1423    * List of file type groups to include in the scan.
1424    * If empty, all files are scanned and available data format processors
1425    * are applied. In addition, the binary content of the selected files
1426    * is always scanned as well.
1427    * Images are scanned only as binary if the specified region
1428    * does not support image inspection and no file_types were specified.
1429    * Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
1430    * </pre>
1431    *
1432    * <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
1433    *
1434    * @return A list containing the enum numeric values on the wire for fileTypes.
1435    */
1436   @java.lang.Override
getFileTypesValueList()1437   public java.util.List<java.lang.Integer> getFileTypesValueList() {
1438     return fileTypes_;
1439   }
1440   /**
1441    *
1442    *
1443    * <pre>
1444    * List of file type groups to include in the scan.
1445    * If empty, all files are scanned and available data format processors
1446    * are applied. In addition, the binary content of the selected files
1447    * is always scanned as well.
1448    * Images are scanned only as binary if the specified region
1449    * does not support image inspection and no file_types were specified.
1450    * Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
1451    * </pre>
1452    *
1453    * <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
1454    *
1455    * @param index The index of the value to return.
1456    * @return The enum numeric value on the wire of fileTypes at the given index.
1457    */
1458   @java.lang.Override
getFileTypesValue(int index)1459   public int getFileTypesValue(int index) {
1460     return fileTypes_.get(index);
1461   }
1462 
1463   private int fileTypesMemoizedSerializedSize;
1464 
1465   public static final int SAMPLE_METHOD_FIELD_NUMBER = 6;
1466   private int sampleMethod_ = 0;
1467   /**
1468    * <code>.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod sample_method = 6;</code>
1469    *
1470    * @return The enum numeric value on the wire for sampleMethod.
1471    */
1472   @java.lang.Override
getSampleMethodValue()1473   public int getSampleMethodValue() {
1474     return sampleMethod_;
1475   }
1476   /**
1477    * <code>.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod sample_method = 6;</code>
1478    *
1479    * @return The sampleMethod.
1480    */
1481   @java.lang.Override
getSampleMethod()1482   public com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod getSampleMethod() {
1483     com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod result =
1484         com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod.forNumber(sampleMethod_);
1485     return result == null
1486         ? com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod.UNRECOGNIZED
1487         : result;
1488   }
1489 
1490   public static final int FILES_LIMIT_PERCENT_FIELD_NUMBER = 7;
1491   private int filesLimitPercent_ = 0;
1492   /**
1493    *
1494    *
1495    * <pre>
1496    * Limits the number of files to scan to this percentage of the input FileSet.
1497    * Number of files scanned is rounded down. Must be between 0 and 100,
1498    * inclusively. Both 0 and 100 means no limit. Defaults to 0.
1499    * </pre>
1500    *
1501    * <code>int32 files_limit_percent = 7;</code>
1502    *
1503    * @return The filesLimitPercent.
1504    */
1505   @java.lang.Override
getFilesLimitPercent()1506   public int getFilesLimitPercent() {
1507     return filesLimitPercent_;
1508   }
1509 
1510   private byte memoizedIsInitialized = -1;
1511 
1512   @java.lang.Override
isInitialized()1513   public final boolean isInitialized() {
1514     byte isInitialized = memoizedIsInitialized;
1515     if (isInitialized == 1) return true;
1516     if (isInitialized == 0) return false;
1517 
1518     memoizedIsInitialized = 1;
1519     return true;
1520   }
1521 
1522   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)1523   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
1524     getSerializedSize();
1525     if (fileSet_ != null) {
1526       output.writeMessage(1, getFileSet());
1527     }
1528     if (bytesLimitPerFile_ != 0L) {
1529       output.writeInt64(4, bytesLimitPerFile_);
1530     }
1531     if (getFileTypesList().size() > 0) {
1532       output.writeUInt32NoTag(42);
1533       output.writeUInt32NoTag(fileTypesMemoizedSerializedSize);
1534     }
1535     for (int i = 0; i < fileTypes_.size(); i++) {
1536       output.writeEnumNoTag(fileTypes_.get(i));
1537     }
1538     if (sampleMethod_
1539         != com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod.SAMPLE_METHOD_UNSPECIFIED
1540             .getNumber()) {
1541       output.writeEnum(6, sampleMethod_);
1542     }
1543     if (filesLimitPercent_ != 0) {
1544       output.writeInt32(7, filesLimitPercent_);
1545     }
1546     if (bytesLimitPerFilePercent_ != 0) {
1547       output.writeInt32(8, bytesLimitPerFilePercent_);
1548     }
1549     getUnknownFields().writeTo(output);
1550   }
1551 
1552   @java.lang.Override
getSerializedSize()1553   public int getSerializedSize() {
1554     int size = memoizedSize;
1555     if (size != -1) return size;
1556 
1557     size = 0;
1558     if (fileSet_ != null) {
1559       size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getFileSet());
1560     }
1561     if (bytesLimitPerFile_ != 0L) {
1562       size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, bytesLimitPerFile_);
1563     }
1564     {
1565       int dataSize = 0;
1566       for (int i = 0; i < fileTypes_.size(); i++) {
1567         dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(fileTypes_.get(i));
1568       }
1569       size += dataSize;
1570       if (!getFileTypesList().isEmpty()) {
1571         size += 1;
1572         size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize);
1573       }
1574       fileTypesMemoizedSerializedSize = dataSize;
1575     }
1576     if (sampleMethod_
1577         != com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod.SAMPLE_METHOD_UNSPECIFIED
1578             .getNumber()) {
1579       size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, sampleMethod_);
1580     }
1581     if (filesLimitPercent_ != 0) {
1582       size += com.google.protobuf.CodedOutputStream.computeInt32Size(7, filesLimitPercent_);
1583     }
1584     if (bytesLimitPerFilePercent_ != 0) {
1585       size += com.google.protobuf.CodedOutputStream.computeInt32Size(8, bytesLimitPerFilePercent_);
1586     }
1587     size += getUnknownFields().getSerializedSize();
1588     memoizedSize = size;
1589     return size;
1590   }
1591 
1592   @java.lang.Override
equals(final java.lang.Object obj)1593   public boolean equals(final java.lang.Object obj) {
1594     if (obj == this) {
1595       return true;
1596     }
1597     if (!(obj instanceof com.google.privacy.dlp.v2.CloudStorageOptions)) {
1598       return super.equals(obj);
1599     }
1600     com.google.privacy.dlp.v2.CloudStorageOptions other =
1601         (com.google.privacy.dlp.v2.CloudStorageOptions) obj;
1602 
1603     if (hasFileSet() != other.hasFileSet()) return false;
1604     if (hasFileSet()) {
1605       if (!getFileSet().equals(other.getFileSet())) return false;
1606     }
1607     if (getBytesLimitPerFile() != other.getBytesLimitPerFile()) return false;
1608     if (getBytesLimitPerFilePercent() != other.getBytesLimitPerFilePercent()) return false;
1609     if (!fileTypes_.equals(other.fileTypes_)) return false;
1610     if (sampleMethod_ != other.sampleMethod_) return false;
1611     if (getFilesLimitPercent() != other.getFilesLimitPercent()) return false;
1612     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
1613     return true;
1614   }
1615 
1616   @java.lang.Override
hashCode()1617   public int hashCode() {
1618     if (memoizedHashCode != 0) {
1619       return memoizedHashCode;
1620     }
1621     int hash = 41;
1622     hash = (19 * hash) + getDescriptor().hashCode();
1623     if (hasFileSet()) {
1624       hash = (37 * hash) + FILE_SET_FIELD_NUMBER;
1625       hash = (53 * hash) + getFileSet().hashCode();
1626     }
1627     hash = (37 * hash) + BYTES_LIMIT_PER_FILE_FIELD_NUMBER;
1628     hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getBytesLimitPerFile());
1629     hash = (37 * hash) + BYTES_LIMIT_PER_FILE_PERCENT_FIELD_NUMBER;
1630     hash = (53 * hash) + getBytesLimitPerFilePercent();
1631     if (getFileTypesCount() > 0) {
1632       hash = (37 * hash) + FILE_TYPES_FIELD_NUMBER;
1633       hash = (53 * hash) + fileTypes_.hashCode();
1634     }
1635     hash = (37 * hash) + SAMPLE_METHOD_FIELD_NUMBER;
1636     hash = (53 * hash) + sampleMethod_;
1637     hash = (37 * hash) + FILES_LIMIT_PERCENT_FIELD_NUMBER;
1638     hash = (53 * hash) + getFilesLimitPercent();
1639     hash = (29 * hash) + getUnknownFields().hashCode();
1640     memoizedHashCode = hash;
1641     return hash;
1642   }
1643 
parseFrom(java.nio.ByteBuffer data)1644   public static com.google.privacy.dlp.v2.CloudStorageOptions parseFrom(java.nio.ByteBuffer data)
1645       throws com.google.protobuf.InvalidProtocolBufferException {
1646     return PARSER.parseFrom(data);
1647   }
1648 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1649   public static com.google.privacy.dlp.v2.CloudStorageOptions parseFrom(
1650       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1651       throws com.google.protobuf.InvalidProtocolBufferException {
1652     return PARSER.parseFrom(data, extensionRegistry);
1653   }
1654 
parseFrom( com.google.protobuf.ByteString data)1655   public static com.google.privacy.dlp.v2.CloudStorageOptions parseFrom(
1656       com.google.protobuf.ByteString data)
1657       throws com.google.protobuf.InvalidProtocolBufferException {
1658     return PARSER.parseFrom(data);
1659   }
1660 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1661   public static com.google.privacy.dlp.v2.CloudStorageOptions parseFrom(
1662       com.google.protobuf.ByteString data,
1663       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1664       throws com.google.protobuf.InvalidProtocolBufferException {
1665     return PARSER.parseFrom(data, extensionRegistry);
1666   }
1667 
parseFrom(byte[] data)1668   public static com.google.privacy.dlp.v2.CloudStorageOptions parseFrom(byte[] data)
1669       throws com.google.protobuf.InvalidProtocolBufferException {
1670     return PARSER.parseFrom(data);
1671   }
1672 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1673   public static com.google.privacy.dlp.v2.CloudStorageOptions parseFrom(
1674       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1675       throws com.google.protobuf.InvalidProtocolBufferException {
1676     return PARSER.parseFrom(data, extensionRegistry);
1677   }
1678 
parseFrom(java.io.InputStream input)1679   public static com.google.privacy.dlp.v2.CloudStorageOptions parseFrom(java.io.InputStream input)
1680       throws java.io.IOException {
1681     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1682   }
1683 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1684   public static com.google.privacy.dlp.v2.CloudStorageOptions parseFrom(
1685       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1686       throws java.io.IOException {
1687     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1688         PARSER, input, extensionRegistry);
1689   }
1690 
parseDelimitedFrom( java.io.InputStream input)1691   public static com.google.privacy.dlp.v2.CloudStorageOptions parseDelimitedFrom(
1692       java.io.InputStream input) throws java.io.IOException {
1693     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
1694   }
1695 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1696   public static com.google.privacy.dlp.v2.CloudStorageOptions parseDelimitedFrom(
1697       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1698       throws java.io.IOException {
1699     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
1700         PARSER, input, extensionRegistry);
1701   }
1702 
parseFrom( com.google.protobuf.CodedInputStream input)1703   public static com.google.privacy.dlp.v2.CloudStorageOptions parseFrom(
1704       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
1705     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1706   }
1707 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1708   public static com.google.privacy.dlp.v2.CloudStorageOptions parseFrom(
1709       com.google.protobuf.CodedInputStream input,
1710       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1711       throws java.io.IOException {
1712     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1713         PARSER, input, extensionRegistry);
1714   }
1715 
1716   @java.lang.Override
newBuilderForType()1717   public Builder newBuilderForType() {
1718     return newBuilder();
1719   }
1720 
newBuilder()1721   public static Builder newBuilder() {
1722     return DEFAULT_INSTANCE.toBuilder();
1723   }
1724 
newBuilder(com.google.privacy.dlp.v2.CloudStorageOptions prototype)1725   public static Builder newBuilder(com.google.privacy.dlp.v2.CloudStorageOptions prototype) {
1726     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
1727   }
1728 
1729   @java.lang.Override
toBuilder()1730   public Builder toBuilder() {
1731     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
1732   }
1733 
1734   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1735   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1736     Builder builder = new Builder(parent);
1737     return builder;
1738   }
1739   /**
1740    *
1741    *
1742    * <pre>
1743    * Options defining a file or a set of files within a Cloud Storage
1744    * bucket.
1745    * </pre>
1746    *
1747    * Protobuf type {@code google.privacy.dlp.v2.CloudStorageOptions}
1748    */
1749   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
1750       implements
1751       // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CloudStorageOptions)
1752       com.google.privacy.dlp.v2.CloudStorageOptionsOrBuilder {
getDescriptor()1753     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
1754       return com.google.privacy.dlp.v2.DlpStorage
1755           .internal_static_google_privacy_dlp_v2_CloudStorageOptions_descriptor;
1756     }
1757 
1758     @java.lang.Override
1759     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()1760         internalGetFieldAccessorTable() {
1761       return com.google.privacy.dlp.v2.DlpStorage
1762           .internal_static_google_privacy_dlp_v2_CloudStorageOptions_fieldAccessorTable
1763           .ensureFieldAccessorsInitialized(
1764               com.google.privacy.dlp.v2.CloudStorageOptions.class,
1765               com.google.privacy.dlp.v2.CloudStorageOptions.Builder.class);
1766     }
1767 
1768     // Construct using com.google.privacy.dlp.v2.CloudStorageOptions.newBuilder()
Builder()1769     private Builder() {}
1770 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1771     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1772       super(parent);
1773     }
1774 
1775     @java.lang.Override
clear()1776     public Builder clear() {
1777       super.clear();
1778       bitField0_ = 0;
1779       fileSet_ = null;
1780       if (fileSetBuilder_ != null) {
1781         fileSetBuilder_.dispose();
1782         fileSetBuilder_ = null;
1783       }
1784       bytesLimitPerFile_ = 0L;
1785       bytesLimitPerFilePercent_ = 0;
1786       fileTypes_ = java.util.Collections.emptyList();
1787       bitField0_ = (bitField0_ & ~0x00000008);
1788       sampleMethod_ = 0;
1789       filesLimitPercent_ = 0;
1790       return this;
1791     }
1792 
1793     @java.lang.Override
getDescriptorForType()1794     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
1795       return com.google.privacy.dlp.v2.DlpStorage
1796           .internal_static_google_privacy_dlp_v2_CloudStorageOptions_descriptor;
1797     }
1798 
1799     @java.lang.Override
getDefaultInstanceForType()1800     public com.google.privacy.dlp.v2.CloudStorageOptions getDefaultInstanceForType() {
1801       return com.google.privacy.dlp.v2.CloudStorageOptions.getDefaultInstance();
1802     }
1803 
1804     @java.lang.Override
build()1805     public com.google.privacy.dlp.v2.CloudStorageOptions build() {
1806       com.google.privacy.dlp.v2.CloudStorageOptions result = buildPartial();
1807       if (!result.isInitialized()) {
1808         throw newUninitializedMessageException(result);
1809       }
1810       return result;
1811     }
1812 
1813     @java.lang.Override
buildPartial()1814     public com.google.privacy.dlp.v2.CloudStorageOptions buildPartial() {
1815       com.google.privacy.dlp.v2.CloudStorageOptions result =
1816           new com.google.privacy.dlp.v2.CloudStorageOptions(this);
1817       buildPartialRepeatedFields(result);
1818       if (bitField0_ != 0) {
1819         buildPartial0(result);
1820       }
1821       onBuilt();
1822       return result;
1823     }
1824 
buildPartialRepeatedFields(com.google.privacy.dlp.v2.CloudStorageOptions result)1825     private void buildPartialRepeatedFields(com.google.privacy.dlp.v2.CloudStorageOptions result) {
1826       if (((bitField0_ & 0x00000008) != 0)) {
1827         fileTypes_ = java.util.Collections.unmodifiableList(fileTypes_);
1828         bitField0_ = (bitField0_ & ~0x00000008);
1829       }
1830       result.fileTypes_ = fileTypes_;
1831     }
1832 
buildPartial0(com.google.privacy.dlp.v2.CloudStorageOptions result)1833     private void buildPartial0(com.google.privacy.dlp.v2.CloudStorageOptions result) {
1834       int from_bitField0_ = bitField0_;
1835       if (((from_bitField0_ & 0x00000001) != 0)) {
1836         result.fileSet_ = fileSetBuilder_ == null ? fileSet_ : fileSetBuilder_.build();
1837       }
1838       if (((from_bitField0_ & 0x00000002) != 0)) {
1839         result.bytesLimitPerFile_ = bytesLimitPerFile_;
1840       }
1841       if (((from_bitField0_ & 0x00000004) != 0)) {
1842         result.bytesLimitPerFilePercent_ = bytesLimitPerFilePercent_;
1843       }
1844       if (((from_bitField0_ & 0x00000010) != 0)) {
1845         result.sampleMethod_ = sampleMethod_;
1846       }
1847       if (((from_bitField0_ & 0x00000020) != 0)) {
1848         result.filesLimitPercent_ = filesLimitPercent_;
1849       }
1850     }
1851 
1852     @java.lang.Override
clone()1853     public Builder clone() {
1854       return super.clone();
1855     }
1856 
1857     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1858     public Builder setField(
1859         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1860       return super.setField(field, value);
1861     }
1862 
1863     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1864     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
1865       return super.clearField(field);
1866     }
1867 
1868     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1869     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1870       return super.clearOneof(oneof);
1871     }
1872 
1873     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1874     public Builder setRepeatedField(
1875         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
1876       return super.setRepeatedField(field, index, value);
1877     }
1878 
1879     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1880     public Builder addRepeatedField(
1881         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1882       return super.addRepeatedField(field, value);
1883     }
1884 
1885     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)1886     public Builder mergeFrom(com.google.protobuf.Message other) {
1887       if (other instanceof com.google.privacy.dlp.v2.CloudStorageOptions) {
1888         return mergeFrom((com.google.privacy.dlp.v2.CloudStorageOptions) other);
1889       } else {
1890         super.mergeFrom(other);
1891         return this;
1892       }
1893     }
1894 
mergeFrom(com.google.privacy.dlp.v2.CloudStorageOptions other)1895     public Builder mergeFrom(com.google.privacy.dlp.v2.CloudStorageOptions other) {
1896       if (other == com.google.privacy.dlp.v2.CloudStorageOptions.getDefaultInstance()) return this;
1897       if (other.hasFileSet()) {
1898         mergeFileSet(other.getFileSet());
1899       }
1900       if (other.getBytesLimitPerFile() != 0L) {
1901         setBytesLimitPerFile(other.getBytesLimitPerFile());
1902       }
1903       if (other.getBytesLimitPerFilePercent() != 0) {
1904         setBytesLimitPerFilePercent(other.getBytesLimitPerFilePercent());
1905       }
1906       if (!other.fileTypes_.isEmpty()) {
1907         if (fileTypes_.isEmpty()) {
1908           fileTypes_ = other.fileTypes_;
1909           bitField0_ = (bitField0_ & ~0x00000008);
1910         } else {
1911           ensureFileTypesIsMutable();
1912           fileTypes_.addAll(other.fileTypes_);
1913         }
1914         onChanged();
1915       }
1916       if (other.sampleMethod_ != 0) {
1917         setSampleMethodValue(other.getSampleMethodValue());
1918       }
1919       if (other.getFilesLimitPercent() != 0) {
1920         setFilesLimitPercent(other.getFilesLimitPercent());
1921       }
1922       this.mergeUnknownFields(other.getUnknownFields());
1923       onChanged();
1924       return this;
1925     }
1926 
1927     @java.lang.Override
isInitialized()1928     public final boolean isInitialized() {
1929       return true;
1930     }
1931 
1932     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1933     public Builder mergeFrom(
1934         com.google.protobuf.CodedInputStream input,
1935         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1936         throws java.io.IOException {
1937       if (extensionRegistry == null) {
1938         throw new java.lang.NullPointerException();
1939       }
1940       try {
1941         boolean done = false;
1942         while (!done) {
1943           int tag = input.readTag();
1944           switch (tag) {
1945             case 0:
1946               done = true;
1947               break;
1948             case 10:
1949               {
1950                 input.readMessage(getFileSetFieldBuilder().getBuilder(), extensionRegistry);
1951                 bitField0_ |= 0x00000001;
1952                 break;
1953               } // case 10
1954             case 32:
1955               {
1956                 bytesLimitPerFile_ = input.readInt64();
1957                 bitField0_ |= 0x00000002;
1958                 break;
1959               } // case 32
1960             case 40:
1961               {
1962                 int tmpRaw = input.readEnum();
1963                 ensureFileTypesIsMutable();
1964                 fileTypes_.add(tmpRaw);
1965                 break;
1966               } // case 40
1967             case 42:
1968               {
1969                 int length = input.readRawVarint32();
1970                 int oldLimit = input.pushLimit(length);
1971                 while (input.getBytesUntilLimit() > 0) {
1972                   int tmpRaw = input.readEnum();
1973                   ensureFileTypesIsMutable();
1974                   fileTypes_.add(tmpRaw);
1975                 }
1976                 input.popLimit(oldLimit);
1977                 break;
1978               } // case 42
1979             case 48:
1980               {
1981                 sampleMethod_ = input.readEnum();
1982                 bitField0_ |= 0x00000010;
1983                 break;
1984               } // case 48
1985             case 56:
1986               {
1987                 filesLimitPercent_ = input.readInt32();
1988                 bitField0_ |= 0x00000020;
1989                 break;
1990               } // case 56
1991             case 64:
1992               {
1993                 bytesLimitPerFilePercent_ = input.readInt32();
1994                 bitField0_ |= 0x00000004;
1995                 break;
1996               } // case 64
1997             default:
1998               {
1999                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
2000                   done = true; // was an endgroup tag
2001                 }
2002                 break;
2003               } // default:
2004           } // switch (tag)
2005         } // while (!done)
2006       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2007         throw e.unwrapIOException();
2008       } finally {
2009         onChanged();
2010       } // finally
2011       return this;
2012     }
2013 
2014     private int bitField0_;
2015 
2016     private com.google.privacy.dlp.v2.CloudStorageOptions.FileSet fileSet_;
2017     private com.google.protobuf.SingleFieldBuilderV3<
2018             com.google.privacy.dlp.v2.CloudStorageOptions.FileSet,
2019             com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.Builder,
2020             com.google.privacy.dlp.v2.CloudStorageOptions.FileSetOrBuilder>
2021         fileSetBuilder_;
2022     /**
2023      *
2024      *
2025      * <pre>
2026      * The set of one or more files to scan.
2027      * </pre>
2028      *
2029      * <code>.google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1;</code>
2030      *
2031      * @return Whether the fileSet field is set.
2032      */
hasFileSet()2033     public boolean hasFileSet() {
2034       return ((bitField0_ & 0x00000001) != 0);
2035     }
2036     /**
2037      *
2038      *
2039      * <pre>
2040      * The set of one or more files to scan.
2041      * </pre>
2042      *
2043      * <code>.google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1;</code>
2044      *
2045      * @return The fileSet.
2046      */
getFileSet()2047     public com.google.privacy.dlp.v2.CloudStorageOptions.FileSet getFileSet() {
2048       if (fileSetBuilder_ == null) {
2049         return fileSet_ == null
2050             ? com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.getDefaultInstance()
2051             : fileSet_;
2052       } else {
2053         return fileSetBuilder_.getMessage();
2054       }
2055     }
2056     /**
2057      *
2058      *
2059      * <pre>
2060      * The set of one or more files to scan.
2061      * </pre>
2062      *
2063      * <code>.google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1;</code>
2064      */
setFileSet(com.google.privacy.dlp.v2.CloudStorageOptions.FileSet value)2065     public Builder setFileSet(com.google.privacy.dlp.v2.CloudStorageOptions.FileSet value) {
2066       if (fileSetBuilder_ == null) {
2067         if (value == null) {
2068           throw new NullPointerException();
2069         }
2070         fileSet_ = value;
2071       } else {
2072         fileSetBuilder_.setMessage(value);
2073       }
2074       bitField0_ |= 0x00000001;
2075       onChanged();
2076       return this;
2077     }
2078     /**
2079      *
2080      *
2081      * <pre>
2082      * The set of one or more files to scan.
2083      * </pre>
2084      *
2085      * <code>.google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1;</code>
2086      */
setFileSet( com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.Builder builderForValue)2087     public Builder setFileSet(
2088         com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.Builder builderForValue) {
2089       if (fileSetBuilder_ == null) {
2090         fileSet_ = builderForValue.build();
2091       } else {
2092         fileSetBuilder_.setMessage(builderForValue.build());
2093       }
2094       bitField0_ |= 0x00000001;
2095       onChanged();
2096       return this;
2097     }
2098     /**
2099      *
2100      *
2101      * <pre>
2102      * The set of one or more files to scan.
2103      * </pre>
2104      *
2105      * <code>.google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1;</code>
2106      */
mergeFileSet(com.google.privacy.dlp.v2.CloudStorageOptions.FileSet value)2107     public Builder mergeFileSet(com.google.privacy.dlp.v2.CloudStorageOptions.FileSet value) {
2108       if (fileSetBuilder_ == null) {
2109         if (((bitField0_ & 0x00000001) != 0)
2110             && fileSet_ != null
2111             && fileSet_
2112                 != com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.getDefaultInstance()) {
2113           getFileSetBuilder().mergeFrom(value);
2114         } else {
2115           fileSet_ = value;
2116         }
2117       } else {
2118         fileSetBuilder_.mergeFrom(value);
2119       }
2120       bitField0_ |= 0x00000001;
2121       onChanged();
2122       return this;
2123     }
2124     /**
2125      *
2126      *
2127      * <pre>
2128      * The set of one or more files to scan.
2129      * </pre>
2130      *
2131      * <code>.google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1;</code>
2132      */
clearFileSet()2133     public Builder clearFileSet() {
2134       bitField0_ = (bitField0_ & ~0x00000001);
2135       fileSet_ = null;
2136       if (fileSetBuilder_ != null) {
2137         fileSetBuilder_.dispose();
2138         fileSetBuilder_ = null;
2139       }
2140       onChanged();
2141       return this;
2142     }
2143     /**
2144      *
2145      *
2146      * <pre>
2147      * The set of one or more files to scan.
2148      * </pre>
2149      *
2150      * <code>.google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1;</code>
2151      */
getFileSetBuilder()2152     public com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.Builder getFileSetBuilder() {
2153       bitField0_ |= 0x00000001;
2154       onChanged();
2155       return getFileSetFieldBuilder().getBuilder();
2156     }
2157     /**
2158      *
2159      *
2160      * <pre>
2161      * The set of one or more files to scan.
2162      * </pre>
2163      *
2164      * <code>.google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1;</code>
2165      */
getFileSetOrBuilder()2166     public com.google.privacy.dlp.v2.CloudStorageOptions.FileSetOrBuilder getFileSetOrBuilder() {
2167       if (fileSetBuilder_ != null) {
2168         return fileSetBuilder_.getMessageOrBuilder();
2169       } else {
2170         return fileSet_ == null
2171             ? com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.getDefaultInstance()
2172             : fileSet_;
2173       }
2174     }
2175     /**
2176      *
2177      *
2178      * <pre>
2179      * The set of one or more files to scan.
2180      * </pre>
2181      *
2182      * <code>.google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1;</code>
2183      */
2184     private com.google.protobuf.SingleFieldBuilderV3<
2185             com.google.privacy.dlp.v2.CloudStorageOptions.FileSet,
2186             com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.Builder,
2187             com.google.privacy.dlp.v2.CloudStorageOptions.FileSetOrBuilder>
getFileSetFieldBuilder()2188         getFileSetFieldBuilder() {
2189       if (fileSetBuilder_ == null) {
2190         fileSetBuilder_ =
2191             new com.google.protobuf.SingleFieldBuilderV3<
2192                 com.google.privacy.dlp.v2.CloudStorageOptions.FileSet,
2193                 com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.Builder,
2194                 com.google.privacy.dlp.v2.CloudStorageOptions.FileSetOrBuilder>(
2195                 getFileSet(), getParentForChildren(), isClean());
2196         fileSet_ = null;
2197       }
2198       return fileSetBuilder_;
2199     }
2200 
2201     private long bytesLimitPerFile_;
2202     /**
2203      *
2204      *
2205      * <pre>
2206      * Max number of bytes to scan from a file. If a scanned file's size is bigger
2207      * than this value then the rest of the bytes are omitted. Only one
2208      * of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
2209      * Cannot be set if de-identification is requested.
2210      * </pre>
2211      *
2212      * <code>int64 bytes_limit_per_file = 4;</code>
2213      *
2214      * @return The bytesLimitPerFile.
2215      */
2216     @java.lang.Override
getBytesLimitPerFile()2217     public long getBytesLimitPerFile() {
2218       return bytesLimitPerFile_;
2219     }
2220     /**
2221      *
2222      *
2223      * <pre>
2224      * Max number of bytes to scan from a file. If a scanned file's size is bigger
2225      * than this value then the rest of the bytes are omitted. Only one
2226      * of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
2227      * Cannot be set if de-identification is requested.
2228      * </pre>
2229      *
2230      * <code>int64 bytes_limit_per_file = 4;</code>
2231      *
2232      * @param value The bytesLimitPerFile to set.
2233      * @return This builder for chaining.
2234      */
setBytesLimitPerFile(long value)2235     public Builder setBytesLimitPerFile(long value) {
2236 
2237       bytesLimitPerFile_ = value;
2238       bitField0_ |= 0x00000002;
2239       onChanged();
2240       return this;
2241     }
2242     /**
2243      *
2244      *
2245      * <pre>
2246      * Max number of bytes to scan from a file. If a scanned file's size is bigger
2247      * than this value then the rest of the bytes are omitted. Only one
2248      * of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
2249      * Cannot be set if de-identification is requested.
2250      * </pre>
2251      *
2252      * <code>int64 bytes_limit_per_file = 4;</code>
2253      *
2254      * @return This builder for chaining.
2255      */
clearBytesLimitPerFile()2256     public Builder clearBytesLimitPerFile() {
2257       bitField0_ = (bitField0_ & ~0x00000002);
2258       bytesLimitPerFile_ = 0L;
2259       onChanged();
2260       return this;
2261     }
2262 
2263     private int bytesLimitPerFilePercent_;
2264     /**
2265      *
2266      *
2267      * <pre>
2268      * Max percentage of bytes to scan from a file. The rest are omitted. The
2269      * number of bytes scanned is rounded down. Must be between 0 and 100,
2270      * inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one
2271      * of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
2272      * Cannot be set if de-identification is requested.
2273      * </pre>
2274      *
2275      * <code>int32 bytes_limit_per_file_percent = 8;</code>
2276      *
2277      * @return The bytesLimitPerFilePercent.
2278      */
2279     @java.lang.Override
getBytesLimitPerFilePercent()2280     public int getBytesLimitPerFilePercent() {
2281       return bytesLimitPerFilePercent_;
2282     }
2283     /**
2284      *
2285      *
2286      * <pre>
2287      * Max percentage of bytes to scan from a file. The rest are omitted. The
2288      * number of bytes scanned is rounded down. Must be between 0 and 100,
2289      * inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one
2290      * of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
2291      * Cannot be set if de-identification is requested.
2292      * </pre>
2293      *
2294      * <code>int32 bytes_limit_per_file_percent = 8;</code>
2295      *
2296      * @param value The bytesLimitPerFilePercent to set.
2297      * @return This builder for chaining.
2298      */
setBytesLimitPerFilePercent(int value)2299     public Builder setBytesLimitPerFilePercent(int value) {
2300 
2301       bytesLimitPerFilePercent_ = value;
2302       bitField0_ |= 0x00000004;
2303       onChanged();
2304       return this;
2305     }
2306     /**
2307      *
2308      *
2309      * <pre>
2310      * Max percentage of bytes to scan from a file. The rest are omitted. The
2311      * number of bytes scanned is rounded down. Must be between 0 and 100,
2312      * inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one
2313      * of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
2314      * Cannot be set if de-identification is requested.
2315      * </pre>
2316      *
2317      * <code>int32 bytes_limit_per_file_percent = 8;</code>
2318      *
2319      * @return This builder for chaining.
2320      */
clearBytesLimitPerFilePercent()2321     public Builder clearBytesLimitPerFilePercent() {
2322       bitField0_ = (bitField0_ & ~0x00000004);
2323       bytesLimitPerFilePercent_ = 0;
2324       onChanged();
2325       return this;
2326     }
2327 
2328     private java.util.List<java.lang.Integer> fileTypes_ = java.util.Collections.emptyList();
2329 
ensureFileTypesIsMutable()2330     private void ensureFileTypesIsMutable() {
2331       if (!((bitField0_ & 0x00000008) != 0)) {
2332         fileTypes_ = new java.util.ArrayList<java.lang.Integer>(fileTypes_);
2333         bitField0_ |= 0x00000008;
2334       }
2335     }
2336     /**
2337      *
2338      *
2339      * <pre>
2340      * List of file type groups to include in the scan.
2341      * If empty, all files are scanned and available data format processors
2342      * are applied. In addition, the binary content of the selected files
2343      * is always scanned as well.
2344      * Images are scanned only as binary if the specified region
2345      * does not support image inspection and no file_types were specified.
2346      * Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
2347      * </pre>
2348      *
2349      * <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
2350      *
2351      * @return A list containing the fileTypes.
2352      */
getFileTypesList()2353     public java.util.List<com.google.privacy.dlp.v2.FileType> getFileTypesList() {
2354       return new com.google.protobuf.Internal.ListAdapter<
2355           java.lang.Integer, com.google.privacy.dlp.v2.FileType>(fileTypes_, fileTypes_converter_);
2356     }
2357     /**
2358      *
2359      *
2360      * <pre>
2361      * List of file type groups to include in the scan.
2362      * If empty, all files are scanned and available data format processors
2363      * are applied. In addition, the binary content of the selected files
2364      * is always scanned as well.
2365      * Images are scanned only as binary if the specified region
2366      * does not support image inspection and no file_types were specified.
2367      * Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
2368      * </pre>
2369      *
2370      * <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
2371      *
2372      * @return The count of fileTypes.
2373      */
getFileTypesCount()2374     public int getFileTypesCount() {
2375       return fileTypes_.size();
2376     }
2377     /**
2378      *
2379      *
2380      * <pre>
2381      * List of file type groups to include in the scan.
2382      * If empty, all files are scanned and available data format processors
2383      * are applied. In addition, the binary content of the selected files
2384      * is always scanned as well.
2385      * Images are scanned only as binary if the specified region
2386      * does not support image inspection and no file_types were specified.
2387      * Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
2388      * </pre>
2389      *
2390      * <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
2391      *
2392      * @param index The index of the element to return.
2393      * @return The fileTypes at the given index.
2394      */
getFileTypes(int index)2395     public com.google.privacy.dlp.v2.FileType getFileTypes(int index) {
2396       return fileTypes_converter_.convert(fileTypes_.get(index));
2397     }
2398     /**
2399      *
2400      *
2401      * <pre>
2402      * List of file type groups to include in the scan.
2403      * If empty, all files are scanned and available data format processors
2404      * are applied. In addition, the binary content of the selected files
2405      * is always scanned as well.
2406      * Images are scanned only as binary if the specified region
2407      * does not support image inspection and no file_types were specified.
2408      * Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
2409      * </pre>
2410      *
2411      * <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
2412      *
2413      * @param index The index to set the value at.
2414      * @param value The fileTypes to set.
2415      * @return This builder for chaining.
2416      */
setFileTypes(int index, com.google.privacy.dlp.v2.FileType value)2417     public Builder setFileTypes(int index, com.google.privacy.dlp.v2.FileType value) {
2418       if (value == null) {
2419         throw new NullPointerException();
2420       }
2421       ensureFileTypesIsMutable();
2422       fileTypes_.set(index, value.getNumber());
2423       onChanged();
2424       return this;
2425     }
2426     /**
2427      *
2428      *
2429      * <pre>
2430      * List of file type groups to include in the scan.
2431      * If empty, all files are scanned and available data format processors
2432      * are applied. In addition, the binary content of the selected files
2433      * is always scanned as well.
2434      * Images are scanned only as binary if the specified region
2435      * does not support image inspection and no file_types were specified.
2436      * Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
2437      * </pre>
2438      *
2439      * <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
2440      *
2441      * @param value The fileTypes to add.
2442      * @return This builder for chaining.
2443      */
addFileTypes(com.google.privacy.dlp.v2.FileType value)2444     public Builder addFileTypes(com.google.privacy.dlp.v2.FileType value) {
2445       if (value == null) {
2446         throw new NullPointerException();
2447       }
2448       ensureFileTypesIsMutable();
2449       fileTypes_.add(value.getNumber());
2450       onChanged();
2451       return this;
2452     }
2453     /**
2454      *
2455      *
2456      * <pre>
2457      * List of file type groups to include in the scan.
2458      * If empty, all files are scanned and available data format processors
2459      * are applied. In addition, the binary content of the selected files
2460      * is always scanned as well.
2461      * Images are scanned only as binary if the specified region
2462      * does not support image inspection and no file_types were specified.
2463      * Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
2464      * </pre>
2465      *
2466      * <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
2467      *
2468      * @param values The fileTypes to add.
2469      * @return This builder for chaining.
2470      */
addAllFileTypes( java.lang.Iterable<? extends com.google.privacy.dlp.v2.FileType> values)2471     public Builder addAllFileTypes(
2472         java.lang.Iterable<? extends com.google.privacy.dlp.v2.FileType> values) {
2473       ensureFileTypesIsMutable();
2474       for (com.google.privacy.dlp.v2.FileType value : values) {
2475         fileTypes_.add(value.getNumber());
2476       }
2477       onChanged();
2478       return this;
2479     }
2480     /**
2481      *
2482      *
2483      * <pre>
2484      * List of file type groups to include in the scan.
2485      * If empty, all files are scanned and available data format processors
2486      * are applied. In addition, the binary content of the selected files
2487      * is always scanned as well.
2488      * Images are scanned only as binary if the specified region
2489      * does not support image inspection and no file_types were specified.
2490      * Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
2491      * </pre>
2492      *
2493      * <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
2494      *
2495      * @return This builder for chaining.
2496      */
clearFileTypes()2497     public Builder clearFileTypes() {
2498       fileTypes_ = java.util.Collections.emptyList();
2499       bitField0_ = (bitField0_ & ~0x00000008);
2500       onChanged();
2501       return this;
2502     }
2503     /**
2504      *
2505      *
2506      * <pre>
2507      * List of file type groups to include in the scan.
2508      * If empty, all files are scanned and available data format processors
2509      * are applied. In addition, the binary content of the selected files
2510      * is always scanned as well.
2511      * Images are scanned only as binary if the specified region
2512      * does not support image inspection and no file_types were specified.
2513      * Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
2514      * </pre>
2515      *
2516      * <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
2517      *
2518      * @return A list containing the enum numeric values on the wire for fileTypes.
2519      */
getFileTypesValueList()2520     public java.util.List<java.lang.Integer> getFileTypesValueList() {
2521       return java.util.Collections.unmodifiableList(fileTypes_);
2522     }
2523     /**
2524      *
2525      *
2526      * <pre>
2527      * List of file type groups to include in the scan.
2528      * If empty, all files are scanned and available data format processors
2529      * are applied. In addition, the binary content of the selected files
2530      * is always scanned as well.
2531      * Images are scanned only as binary if the specified region
2532      * does not support image inspection and no file_types were specified.
2533      * Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
2534      * </pre>
2535      *
2536      * <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
2537      *
2538      * @param index The index of the value to return.
2539      * @return The enum numeric value on the wire of fileTypes at the given index.
2540      */
getFileTypesValue(int index)2541     public int getFileTypesValue(int index) {
2542       return fileTypes_.get(index);
2543     }
2544     /**
2545      *
2546      *
2547      * <pre>
2548      * List of file type groups to include in the scan.
2549      * If empty, all files are scanned and available data format processors
2550      * are applied. In addition, the binary content of the selected files
2551      * is always scanned as well.
2552      * Images are scanned only as binary if the specified region
2553      * does not support image inspection and no file_types were specified.
2554      * Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
2555      * </pre>
2556      *
2557      * <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
2558      *
2559      * @param index The index to set the value at.
2560      * @param value The enum numeric value on the wire for fileTypes to set.
2561      * @return This builder for chaining.
2562      */
setFileTypesValue(int index, int value)2563     public Builder setFileTypesValue(int index, int value) {
2564       ensureFileTypesIsMutable();
2565       fileTypes_.set(index, value);
2566       onChanged();
2567       return this;
2568     }
2569     /**
2570      *
2571      *
2572      * <pre>
2573      * List of file type groups to include in the scan.
2574      * If empty, all files are scanned and available data format processors
2575      * are applied. In addition, the binary content of the selected files
2576      * is always scanned as well.
2577      * Images are scanned only as binary if the specified region
2578      * does not support image inspection and no file_types were specified.
2579      * Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
2580      * </pre>
2581      *
2582      * <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
2583      *
2584      * @param value The enum numeric value on the wire for fileTypes to add.
2585      * @return This builder for chaining.
2586      */
addFileTypesValue(int value)2587     public Builder addFileTypesValue(int value) {
2588       ensureFileTypesIsMutable();
2589       fileTypes_.add(value);
2590       onChanged();
2591       return this;
2592     }
2593     /**
2594      *
2595      *
2596      * <pre>
2597      * List of file type groups to include in the scan.
2598      * If empty, all files are scanned and available data format processors
2599      * are applied. In addition, the binary content of the selected files
2600      * is always scanned as well.
2601      * Images are scanned only as binary if the specified region
2602      * does not support image inspection and no file_types were specified.
2603      * Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
2604      * </pre>
2605      *
2606      * <code>repeated .google.privacy.dlp.v2.FileType file_types = 5;</code>
2607      *
2608      * @param values The enum numeric values on the wire for fileTypes to add.
2609      * @return This builder for chaining.
2610      */
addAllFileTypesValue(java.lang.Iterable<java.lang.Integer> values)2611     public Builder addAllFileTypesValue(java.lang.Iterable<java.lang.Integer> values) {
2612       ensureFileTypesIsMutable();
2613       for (int value : values) {
2614         fileTypes_.add(value);
2615       }
2616       onChanged();
2617       return this;
2618     }
2619 
2620     private int sampleMethod_ = 0;
2621     /**
2622      * <code>.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod sample_method = 6;</code>
2623      *
2624      * @return The enum numeric value on the wire for sampleMethod.
2625      */
2626     @java.lang.Override
getSampleMethodValue()2627     public int getSampleMethodValue() {
2628       return sampleMethod_;
2629     }
2630     /**
2631      * <code>.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod sample_method = 6;</code>
2632      *
2633      * @param value The enum numeric value on the wire for sampleMethod to set.
2634      * @return This builder for chaining.
2635      */
setSampleMethodValue(int value)2636     public Builder setSampleMethodValue(int value) {
2637       sampleMethod_ = value;
2638       bitField0_ |= 0x00000010;
2639       onChanged();
2640       return this;
2641     }
2642     /**
2643      * <code>.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod sample_method = 6;</code>
2644      *
2645      * @return The sampleMethod.
2646      */
2647     @java.lang.Override
getSampleMethod()2648     public com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod getSampleMethod() {
2649       com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod result =
2650           com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod.forNumber(sampleMethod_);
2651       return result == null
2652           ? com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod.UNRECOGNIZED
2653           : result;
2654     }
2655     /**
2656      * <code>.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod sample_method = 6;</code>
2657      *
2658      * @param value The sampleMethod to set.
2659      * @return This builder for chaining.
2660      */
setSampleMethod( com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod value)2661     public Builder setSampleMethod(
2662         com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod value) {
2663       if (value == null) {
2664         throw new NullPointerException();
2665       }
2666       bitField0_ |= 0x00000010;
2667       sampleMethod_ = value.getNumber();
2668       onChanged();
2669       return this;
2670     }
2671     /**
2672      * <code>.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod sample_method = 6;</code>
2673      *
2674      * @return This builder for chaining.
2675      */
clearSampleMethod()2676     public Builder clearSampleMethod() {
2677       bitField0_ = (bitField0_ & ~0x00000010);
2678       sampleMethod_ = 0;
2679       onChanged();
2680       return this;
2681     }
2682 
2683     private int filesLimitPercent_;
2684     /**
2685      *
2686      *
2687      * <pre>
2688      * Limits the number of files to scan to this percentage of the input FileSet.
2689      * Number of files scanned is rounded down. Must be between 0 and 100,
2690      * inclusively. Both 0 and 100 means no limit. Defaults to 0.
2691      * </pre>
2692      *
2693      * <code>int32 files_limit_percent = 7;</code>
2694      *
2695      * @return The filesLimitPercent.
2696      */
2697     @java.lang.Override
getFilesLimitPercent()2698     public int getFilesLimitPercent() {
2699       return filesLimitPercent_;
2700     }
2701     /**
2702      *
2703      *
2704      * <pre>
2705      * Limits the number of files to scan to this percentage of the input FileSet.
2706      * Number of files scanned is rounded down. Must be between 0 and 100,
2707      * inclusively. Both 0 and 100 means no limit. Defaults to 0.
2708      * </pre>
2709      *
2710      * <code>int32 files_limit_percent = 7;</code>
2711      *
2712      * @param value The filesLimitPercent to set.
2713      * @return This builder for chaining.
2714      */
setFilesLimitPercent(int value)2715     public Builder setFilesLimitPercent(int value) {
2716 
2717       filesLimitPercent_ = value;
2718       bitField0_ |= 0x00000020;
2719       onChanged();
2720       return this;
2721     }
2722     /**
2723      *
2724      *
2725      * <pre>
2726      * Limits the number of files to scan to this percentage of the input FileSet.
2727      * Number of files scanned is rounded down. Must be between 0 and 100,
2728      * inclusively. Both 0 and 100 means no limit. Defaults to 0.
2729      * </pre>
2730      *
2731      * <code>int32 files_limit_percent = 7;</code>
2732      *
2733      * @return This builder for chaining.
2734      */
clearFilesLimitPercent()2735     public Builder clearFilesLimitPercent() {
2736       bitField0_ = (bitField0_ & ~0x00000020);
2737       filesLimitPercent_ = 0;
2738       onChanged();
2739       return this;
2740     }
2741 
2742     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)2743     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
2744       return super.setUnknownFields(unknownFields);
2745     }
2746 
2747     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2748     public final Builder mergeUnknownFields(
2749         final com.google.protobuf.UnknownFieldSet unknownFields) {
2750       return super.mergeUnknownFields(unknownFields);
2751     }
2752 
2753     // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CloudStorageOptions)
2754   }
2755 
2756   // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CloudStorageOptions)
2757   private static final com.google.privacy.dlp.v2.CloudStorageOptions DEFAULT_INSTANCE;
2758 
2759   static {
2760     DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CloudStorageOptions();
2761   }
2762 
getDefaultInstance()2763   public static com.google.privacy.dlp.v2.CloudStorageOptions getDefaultInstance() {
2764     return DEFAULT_INSTANCE;
2765   }
2766 
2767   private static final com.google.protobuf.Parser<CloudStorageOptions> PARSER =
2768       new com.google.protobuf.AbstractParser<CloudStorageOptions>() {
2769         @java.lang.Override
2770         public CloudStorageOptions parsePartialFrom(
2771             com.google.protobuf.CodedInputStream input,
2772             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2773             throws com.google.protobuf.InvalidProtocolBufferException {
2774           Builder builder = newBuilder();
2775           try {
2776             builder.mergeFrom(input, extensionRegistry);
2777           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2778             throw e.setUnfinishedMessage(builder.buildPartial());
2779           } catch (com.google.protobuf.UninitializedMessageException e) {
2780             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
2781           } catch (java.io.IOException e) {
2782             throw new com.google.protobuf.InvalidProtocolBufferException(e)
2783                 .setUnfinishedMessage(builder.buildPartial());
2784           }
2785           return builder.buildPartial();
2786         }
2787       };
2788 
parser()2789   public static com.google.protobuf.Parser<CloudStorageOptions> parser() {
2790     return PARSER;
2791   }
2792 
2793   @java.lang.Override
getParserForType()2794   public com.google.protobuf.Parser<CloudStorageOptions> getParserForType() {
2795     return PARSER;
2796   }
2797 
2798   @java.lang.Override
getDefaultInstanceForType()2799   public com.google.privacy.dlp.v2.CloudStorageOptions getDefaultInstanceForType() {
2800     return DEFAULT_INSTANCE;
2801   }
2802 }
2803