• 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  * Configuration to control jobs where the content being inspected is outside
26  * of Google Cloud Platform.
27  * </pre>
28  *
29  * Protobuf type {@code google.privacy.dlp.v2.HybridOptions}
30  */
31 public final class HybridOptions extends com.google.protobuf.GeneratedMessageV3
32     implements
33     // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.HybridOptions)
34     HybridOptionsOrBuilder {
35   private static final long serialVersionUID = 0L;
36   // Use HybridOptions.newBuilder() to construct.
HybridOptions(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37   private HybridOptions(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
38     super(builder);
39   }
40 
HybridOptions()41   private HybridOptions() {
42     description_ = "";
43     requiredFindingLabelKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY;
44   }
45 
46   @java.lang.Override
47   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)48   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
49     return new HybridOptions();
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_HybridOptions_descriptor;
60   }
61 
62   @SuppressWarnings({"rawtypes"})
63   @java.lang.Override
internalGetMapField(int number)64   protected com.google.protobuf.MapField internalGetMapField(int number) {
65     switch (number) {
66       case 3:
67         return internalGetLabels();
68       default:
69         throw new RuntimeException("Invalid map field number: " + number);
70     }
71   }
72 
73   @java.lang.Override
74   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()75       internalGetFieldAccessorTable() {
76     return com.google.privacy.dlp.v2.DlpStorage
77         .internal_static_google_privacy_dlp_v2_HybridOptions_fieldAccessorTable
78         .ensureFieldAccessorsInitialized(
79             com.google.privacy.dlp.v2.HybridOptions.class,
80             com.google.privacy.dlp.v2.HybridOptions.Builder.class);
81   }
82 
83   public static final int DESCRIPTION_FIELD_NUMBER = 1;
84 
85   @SuppressWarnings("serial")
86   private volatile java.lang.Object description_ = "";
87   /**
88    *
89    *
90    * <pre>
91    * A short description of where the data is coming from. Will be stored once
92    * in the job. 256 max length.
93    * </pre>
94    *
95    * <code>string description = 1;</code>
96    *
97    * @return The description.
98    */
99   @java.lang.Override
getDescription()100   public java.lang.String getDescription() {
101     java.lang.Object ref = description_;
102     if (ref instanceof java.lang.String) {
103       return (java.lang.String) ref;
104     } else {
105       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
106       java.lang.String s = bs.toStringUtf8();
107       description_ = s;
108       return s;
109     }
110   }
111   /**
112    *
113    *
114    * <pre>
115    * A short description of where the data is coming from. Will be stored once
116    * in the job. 256 max length.
117    * </pre>
118    *
119    * <code>string description = 1;</code>
120    *
121    * @return The bytes for description.
122    */
123   @java.lang.Override
getDescriptionBytes()124   public com.google.protobuf.ByteString getDescriptionBytes() {
125     java.lang.Object ref = description_;
126     if (ref instanceof java.lang.String) {
127       com.google.protobuf.ByteString b =
128           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
129       description_ = b;
130       return b;
131     } else {
132       return (com.google.protobuf.ByteString) ref;
133     }
134   }
135 
136   public static final int REQUIRED_FINDING_LABEL_KEYS_FIELD_NUMBER = 2;
137 
138   @SuppressWarnings("serial")
139   private com.google.protobuf.LazyStringList requiredFindingLabelKeys_;
140   /**
141    *
142    *
143    * <pre>
144    * These are labels that each inspection request must include within their
145    * 'finding_labels' map. Request may contain others, but any missing one of
146    * these will be rejected.
147    * Label keys must be between 1 and 63 characters long and must conform
148    * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
149    * No more than 10 keys can be required.
150    * </pre>
151    *
152    * <code>repeated string required_finding_label_keys = 2;</code>
153    *
154    * @return A list containing the requiredFindingLabelKeys.
155    */
getRequiredFindingLabelKeysList()156   public com.google.protobuf.ProtocolStringList getRequiredFindingLabelKeysList() {
157     return requiredFindingLabelKeys_;
158   }
159   /**
160    *
161    *
162    * <pre>
163    * These are labels that each inspection request must include within their
164    * 'finding_labels' map. Request may contain others, but any missing one of
165    * these will be rejected.
166    * Label keys must be between 1 and 63 characters long and must conform
167    * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
168    * No more than 10 keys can be required.
169    * </pre>
170    *
171    * <code>repeated string required_finding_label_keys = 2;</code>
172    *
173    * @return The count of requiredFindingLabelKeys.
174    */
getRequiredFindingLabelKeysCount()175   public int getRequiredFindingLabelKeysCount() {
176     return requiredFindingLabelKeys_.size();
177   }
178   /**
179    *
180    *
181    * <pre>
182    * These are labels that each inspection request must include within their
183    * 'finding_labels' map. Request may contain others, but any missing one of
184    * these will be rejected.
185    * Label keys must be between 1 and 63 characters long and must conform
186    * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
187    * No more than 10 keys can be required.
188    * </pre>
189    *
190    * <code>repeated string required_finding_label_keys = 2;</code>
191    *
192    * @param index The index of the element to return.
193    * @return The requiredFindingLabelKeys at the given index.
194    */
getRequiredFindingLabelKeys(int index)195   public java.lang.String getRequiredFindingLabelKeys(int index) {
196     return requiredFindingLabelKeys_.get(index);
197   }
198   /**
199    *
200    *
201    * <pre>
202    * These are labels that each inspection request must include within their
203    * 'finding_labels' map. Request may contain others, but any missing one of
204    * these will be rejected.
205    * Label keys must be between 1 and 63 characters long and must conform
206    * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
207    * No more than 10 keys can be required.
208    * </pre>
209    *
210    * <code>repeated string required_finding_label_keys = 2;</code>
211    *
212    * @param index The index of the value to return.
213    * @return The bytes of the requiredFindingLabelKeys at the given index.
214    */
getRequiredFindingLabelKeysBytes(int index)215   public com.google.protobuf.ByteString getRequiredFindingLabelKeysBytes(int index) {
216     return requiredFindingLabelKeys_.getByteString(index);
217   }
218 
219   public static final int LABELS_FIELD_NUMBER = 3;
220 
221   private static final class LabelsDefaultEntryHolder {
222     static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry =
223         com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance(
224             com.google.privacy.dlp.v2.DlpStorage
225                 .internal_static_google_privacy_dlp_v2_HybridOptions_LabelsEntry_descriptor,
226             com.google.protobuf.WireFormat.FieldType.STRING,
227             "",
228             com.google.protobuf.WireFormat.FieldType.STRING,
229             "");
230   }
231 
232   @SuppressWarnings("serial")
233   private com.google.protobuf.MapField<java.lang.String, java.lang.String> labels_;
234 
internalGetLabels()235   private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() {
236     if (labels_ == null) {
237       return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry);
238     }
239     return labels_;
240   }
241 
getLabelsCount()242   public int getLabelsCount() {
243     return internalGetLabels().getMap().size();
244   }
245   /**
246    *
247    *
248    * <pre>
249    * To organize findings, these labels will be added to each finding.
250    * Label keys must be between 1 and 63 characters long and must conform
251    * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
252    * Label values must be between 0 and 63 characters long and must conform
253    * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
254    * No more than 10 labels can be associated with a given finding.
255    * Examples:
256    * * `"environment" : "production"`
257    * * `"pipeline" : "etl"`
258    * </pre>
259    *
260    * <code>map&lt;string, string&gt; labels = 3;</code>
261    */
262   @java.lang.Override
containsLabels(java.lang.String key)263   public boolean containsLabels(java.lang.String key) {
264     if (key == null) {
265       throw new NullPointerException("map key");
266     }
267     return internalGetLabels().getMap().containsKey(key);
268   }
269   /** Use {@link #getLabelsMap()} instead. */
270   @java.lang.Override
271   @java.lang.Deprecated
getLabels()272   public java.util.Map<java.lang.String, java.lang.String> getLabels() {
273     return getLabelsMap();
274   }
275   /**
276    *
277    *
278    * <pre>
279    * To organize findings, these labels will be added to each finding.
280    * Label keys must be between 1 and 63 characters long and must conform
281    * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
282    * Label values must be between 0 and 63 characters long and must conform
283    * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
284    * No more than 10 labels can be associated with a given finding.
285    * Examples:
286    * * `"environment" : "production"`
287    * * `"pipeline" : "etl"`
288    * </pre>
289    *
290    * <code>map&lt;string, string&gt; labels = 3;</code>
291    */
292   @java.lang.Override
getLabelsMap()293   public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() {
294     return internalGetLabels().getMap();
295   }
296   /**
297    *
298    *
299    * <pre>
300    * To organize findings, these labels will be added to each finding.
301    * Label keys must be between 1 and 63 characters long and must conform
302    * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
303    * Label values must be between 0 and 63 characters long and must conform
304    * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
305    * No more than 10 labels can be associated with a given finding.
306    * Examples:
307    * * `"environment" : "production"`
308    * * `"pipeline" : "etl"`
309    * </pre>
310    *
311    * <code>map&lt;string, string&gt; labels = 3;</code>
312    */
313   @java.lang.Override
getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue)314   public /* nullable */ java.lang.String getLabelsOrDefault(
315       java.lang.String key,
316       /* nullable */
317       java.lang.String defaultValue) {
318     if (key == null) {
319       throw new NullPointerException("map key");
320     }
321     java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
322     return map.containsKey(key) ? map.get(key) : defaultValue;
323   }
324   /**
325    *
326    *
327    * <pre>
328    * To organize findings, these labels will be added to each finding.
329    * Label keys must be between 1 and 63 characters long and must conform
330    * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
331    * Label values must be between 0 and 63 characters long and must conform
332    * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
333    * No more than 10 labels can be associated with a given finding.
334    * Examples:
335    * * `"environment" : "production"`
336    * * `"pipeline" : "etl"`
337    * </pre>
338    *
339    * <code>map&lt;string, string&gt; labels = 3;</code>
340    */
341   @java.lang.Override
getLabelsOrThrow(java.lang.String key)342   public java.lang.String getLabelsOrThrow(java.lang.String key) {
343     if (key == null) {
344       throw new NullPointerException("map key");
345     }
346     java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
347     if (!map.containsKey(key)) {
348       throw new java.lang.IllegalArgumentException();
349     }
350     return map.get(key);
351   }
352 
353   public static final int TABLE_OPTIONS_FIELD_NUMBER = 4;
354   private com.google.privacy.dlp.v2.TableOptions tableOptions_;
355   /**
356    *
357    *
358    * <pre>
359    * If the container is a table, additional information to make findings
360    * meaningful such as the columns that are primary keys.
361    * </pre>
362    *
363    * <code>.google.privacy.dlp.v2.TableOptions table_options = 4;</code>
364    *
365    * @return Whether the tableOptions field is set.
366    */
367   @java.lang.Override
hasTableOptions()368   public boolean hasTableOptions() {
369     return tableOptions_ != null;
370   }
371   /**
372    *
373    *
374    * <pre>
375    * If the container is a table, additional information to make findings
376    * meaningful such as the columns that are primary keys.
377    * </pre>
378    *
379    * <code>.google.privacy.dlp.v2.TableOptions table_options = 4;</code>
380    *
381    * @return The tableOptions.
382    */
383   @java.lang.Override
getTableOptions()384   public com.google.privacy.dlp.v2.TableOptions getTableOptions() {
385     return tableOptions_ == null
386         ? com.google.privacy.dlp.v2.TableOptions.getDefaultInstance()
387         : tableOptions_;
388   }
389   /**
390    *
391    *
392    * <pre>
393    * If the container is a table, additional information to make findings
394    * meaningful such as the columns that are primary keys.
395    * </pre>
396    *
397    * <code>.google.privacy.dlp.v2.TableOptions table_options = 4;</code>
398    */
399   @java.lang.Override
getTableOptionsOrBuilder()400   public com.google.privacy.dlp.v2.TableOptionsOrBuilder getTableOptionsOrBuilder() {
401     return tableOptions_ == null
402         ? com.google.privacy.dlp.v2.TableOptions.getDefaultInstance()
403         : tableOptions_;
404   }
405 
406   private byte memoizedIsInitialized = -1;
407 
408   @java.lang.Override
isInitialized()409   public final boolean isInitialized() {
410     byte isInitialized = memoizedIsInitialized;
411     if (isInitialized == 1) return true;
412     if (isInitialized == 0) return false;
413 
414     memoizedIsInitialized = 1;
415     return true;
416   }
417 
418   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)419   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
420     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
421       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, description_);
422     }
423     for (int i = 0; i < requiredFindingLabelKeys_.size(); i++) {
424       com.google.protobuf.GeneratedMessageV3.writeString(
425           output, 2, requiredFindingLabelKeys_.getRaw(i));
426     }
427     com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
428         output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 3);
429     if (tableOptions_ != null) {
430       output.writeMessage(4, getTableOptions());
431     }
432     getUnknownFields().writeTo(output);
433   }
434 
435   @java.lang.Override
getSerializedSize()436   public int getSerializedSize() {
437     int size = memoizedSize;
438     if (size != -1) return size;
439 
440     size = 0;
441     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
442       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, description_);
443     }
444     {
445       int dataSize = 0;
446       for (int i = 0; i < requiredFindingLabelKeys_.size(); i++) {
447         dataSize += computeStringSizeNoTag(requiredFindingLabelKeys_.getRaw(i));
448       }
449       size += dataSize;
450       size += 1 * getRequiredFindingLabelKeysList().size();
451     }
452     for (java.util.Map.Entry<java.lang.String, java.lang.String> entry :
453         internalGetLabels().getMap().entrySet()) {
454       com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ =
455           LabelsDefaultEntryHolder.defaultEntry
456               .newBuilderForType()
457               .setKey(entry.getKey())
458               .setValue(entry.getValue())
459               .build();
460       size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, labels__);
461     }
462     if (tableOptions_ != null) {
463       size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getTableOptions());
464     }
465     size += getUnknownFields().getSerializedSize();
466     memoizedSize = size;
467     return size;
468   }
469 
470   @java.lang.Override
equals(final java.lang.Object obj)471   public boolean equals(final java.lang.Object obj) {
472     if (obj == this) {
473       return true;
474     }
475     if (!(obj instanceof com.google.privacy.dlp.v2.HybridOptions)) {
476       return super.equals(obj);
477     }
478     com.google.privacy.dlp.v2.HybridOptions other = (com.google.privacy.dlp.v2.HybridOptions) obj;
479 
480     if (!getDescription().equals(other.getDescription())) return false;
481     if (!getRequiredFindingLabelKeysList().equals(other.getRequiredFindingLabelKeysList()))
482       return false;
483     if (!internalGetLabels().equals(other.internalGetLabels())) return false;
484     if (hasTableOptions() != other.hasTableOptions()) return false;
485     if (hasTableOptions()) {
486       if (!getTableOptions().equals(other.getTableOptions())) return false;
487     }
488     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
489     return true;
490   }
491 
492   @java.lang.Override
hashCode()493   public int hashCode() {
494     if (memoizedHashCode != 0) {
495       return memoizedHashCode;
496     }
497     int hash = 41;
498     hash = (19 * hash) + getDescriptor().hashCode();
499     hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
500     hash = (53 * hash) + getDescription().hashCode();
501     if (getRequiredFindingLabelKeysCount() > 0) {
502       hash = (37 * hash) + REQUIRED_FINDING_LABEL_KEYS_FIELD_NUMBER;
503       hash = (53 * hash) + getRequiredFindingLabelKeysList().hashCode();
504     }
505     if (!internalGetLabels().getMap().isEmpty()) {
506       hash = (37 * hash) + LABELS_FIELD_NUMBER;
507       hash = (53 * hash) + internalGetLabels().hashCode();
508     }
509     if (hasTableOptions()) {
510       hash = (37 * hash) + TABLE_OPTIONS_FIELD_NUMBER;
511       hash = (53 * hash) + getTableOptions().hashCode();
512     }
513     hash = (29 * hash) + getUnknownFields().hashCode();
514     memoizedHashCode = hash;
515     return hash;
516   }
517 
parseFrom(java.nio.ByteBuffer data)518   public static com.google.privacy.dlp.v2.HybridOptions parseFrom(java.nio.ByteBuffer data)
519       throws com.google.protobuf.InvalidProtocolBufferException {
520     return PARSER.parseFrom(data);
521   }
522 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)523   public static com.google.privacy.dlp.v2.HybridOptions parseFrom(
524       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
525       throws com.google.protobuf.InvalidProtocolBufferException {
526     return PARSER.parseFrom(data, extensionRegistry);
527   }
528 
parseFrom( com.google.protobuf.ByteString data)529   public static com.google.privacy.dlp.v2.HybridOptions parseFrom(
530       com.google.protobuf.ByteString data)
531       throws com.google.protobuf.InvalidProtocolBufferException {
532     return PARSER.parseFrom(data);
533   }
534 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)535   public static com.google.privacy.dlp.v2.HybridOptions parseFrom(
536       com.google.protobuf.ByteString data,
537       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
538       throws com.google.protobuf.InvalidProtocolBufferException {
539     return PARSER.parseFrom(data, extensionRegistry);
540   }
541 
parseFrom(byte[] data)542   public static com.google.privacy.dlp.v2.HybridOptions parseFrom(byte[] data)
543       throws com.google.protobuf.InvalidProtocolBufferException {
544     return PARSER.parseFrom(data);
545   }
546 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)547   public static com.google.privacy.dlp.v2.HybridOptions parseFrom(
548       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
549       throws com.google.protobuf.InvalidProtocolBufferException {
550     return PARSER.parseFrom(data, extensionRegistry);
551   }
552 
parseFrom(java.io.InputStream input)553   public static com.google.privacy.dlp.v2.HybridOptions parseFrom(java.io.InputStream input)
554       throws java.io.IOException {
555     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
556   }
557 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)558   public static com.google.privacy.dlp.v2.HybridOptions parseFrom(
559       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
560       throws java.io.IOException {
561     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
562         PARSER, input, extensionRegistry);
563   }
564 
parseDelimitedFrom( java.io.InputStream input)565   public static com.google.privacy.dlp.v2.HybridOptions parseDelimitedFrom(
566       java.io.InputStream input) throws java.io.IOException {
567     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
568   }
569 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)570   public static com.google.privacy.dlp.v2.HybridOptions parseDelimitedFrom(
571       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
572       throws java.io.IOException {
573     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
574         PARSER, input, extensionRegistry);
575   }
576 
parseFrom( com.google.protobuf.CodedInputStream input)577   public static com.google.privacy.dlp.v2.HybridOptions parseFrom(
578       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
579     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
580   }
581 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)582   public static com.google.privacy.dlp.v2.HybridOptions parseFrom(
583       com.google.protobuf.CodedInputStream input,
584       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
585       throws java.io.IOException {
586     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
587         PARSER, input, extensionRegistry);
588   }
589 
590   @java.lang.Override
newBuilderForType()591   public Builder newBuilderForType() {
592     return newBuilder();
593   }
594 
newBuilder()595   public static Builder newBuilder() {
596     return DEFAULT_INSTANCE.toBuilder();
597   }
598 
newBuilder(com.google.privacy.dlp.v2.HybridOptions prototype)599   public static Builder newBuilder(com.google.privacy.dlp.v2.HybridOptions prototype) {
600     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
601   }
602 
603   @java.lang.Override
toBuilder()604   public Builder toBuilder() {
605     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
606   }
607 
608   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)609   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
610     Builder builder = new Builder(parent);
611     return builder;
612   }
613   /**
614    *
615    *
616    * <pre>
617    * Configuration to control jobs where the content being inspected is outside
618    * of Google Cloud Platform.
619    * </pre>
620    *
621    * Protobuf type {@code google.privacy.dlp.v2.HybridOptions}
622    */
623   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
624       implements
625       // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.HybridOptions)
626       com.google.privacy.dlp.v2.HybridOptionsOrBuilder {
getDescriptor()627     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
628       return com.google.privacy.dlp.v2.DlpStorage
629           .internal_static_google_privacy_dlp_v2_HybridOptions_descriptor;
630     }
631 
632     @SuppressWarnings({"rawtypes"})
internalGetMapField(int number)633     protected com.google.protobuf.MapField internalGetMapField(int number) {
634       switch (number) {
635         case 3:
636           return internalGetLabels();
637         default:
638           throw new RuntimeException("Invalid map field number: " + number);
639       }
640     }
641 
642     @SuppressWarnings({"rawtypes"})
internalGetMutableMapField(int number)643     protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
644       switch (number) {
645         case 3:
646           return internalGetMutableLabels();
647         default:
648           throw new RuntimeException("Invalid map field number: " + number);
649       }
650     }
651 
652     @java.lang.Override
653     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()654         internalGetFieldAccessorTable() {
655       return com.google.privacy.dlp.v2.DlpStorage
656           .internal_static_google_privacy_dlp_v2_HybridOptions_fieldAccessorTable
657           .ensureFieldAccessorsInitialized(
658               com.google.privacy.dlp.v2.HybridOptions.class,
659               com.google.privacy.dlp.v2.HybridOptions.Builder.class);
660     }
661 
662     // Construct using com.google.privacy.dlp.v2.HybridOptions.newBuilder()
Builder()663     private Builder() {}
664 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)665     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
666       super(parent);
667     }
668 
669     @java.lang.Override
clear()670     public Builder clear() {
671       super.clear();
672       bitField0_ = 0;
673       description_ = "";
674       requiredFindingLabelKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY;
675       bitField0_ = (bitField0_ & ~0x00000002);
676       internalGetMutableLabels().clear();
677       tableOptions_ = null;
678       if (tableOptionsBuilder_ != null) {
679         tableOptionsBuilder_.dispose();
680         tableOptionsBuilder_ = null;
681       }
682       return this;
683     }
684 
685     @java.lang.Override
getDescriptorForType()686     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
687       return com.google.privacy.dlp.v2.DlpStorage
688           .internal_static_google_privacy_dlp_v2_HybridOptions_descriptor;
689     }
690 
691     @java.lang.Override
getDefaultInstanceForType()692     public com.google.privacy.dlp.v2.HybridOptions getDefaultInstanceForType() {
693       return com.google.privacy.dlp.v2.HybridOptions.getDefaultInstance();
694     }
695 
696     @java.lang.Override
build()697     public com.google.privacy.dlp.v2.HybridOptions build() {
698       com.google.privacy.dlp.v2.HybridOptions result = buildPartial();
699       if (!result.isInitialized()) {
700         throw newUninitializedMessageException(result);
701       }
702       return result;
703     }
704 
705     @java.lang.Override
buildPartial()706     public com.google.privacy.dlp.v2.HybridOptions buildPartial() {
707       com.google.privacy.dlp.v2.HybridOptions result =
708           new com.google.privacy.dlp.v2.HybridOptions(this);
709       buildPartialRepeatedFields(result);
710       if (bitField0_ != 0) {
711         buildPartial0(result);
712       }
713       onBuilt();
714       return result;
715     }
716 
buildPartialRepeatedFields(com.google.privacy.dlp.v2.HybridOptions result)717     private void buildPartialRepeatedFields(com.google.privacy.dlp.v2.HybridOptions result) {
718       if (((bitField0_ & 0x00000002) != 0)) {
719         requiredFindingLabelKeys_ = requiredFindingLabelKeys_.getUnmodifiableView();
720         bitField0_ = (bitField0_ & ~0x00000002);
721       }
722       result.requiredFindingLabelKeys_ = requiredFindingLabelKeys_;
723     }
724 
buildPartial0(com.google.privacy.dlp.v2.HybridOptions result)725     private void buildPartial0(com.google.privacy.dlp.v2.HybridOptions result) {
726       int from_bitField0_ = bitField0_;
727       if (((from_bitField0_ & 0x00000001) != 0)) {
728         result.description_ = description_;
729       }
730       if (((from_bitField0_ & 0x00000004) != 0)) {
731         result.labels_ = internalGetLabels();
732         result.labels_.makeImmutable();
733       }
734       if (((from_bitField0_ & 0x00000008) != 0)) {
735         result.tableOptions_ =
736             tableOptionsBuilder_ == null ? tableOptions_ : tableOptionsBuilder_.build();
737       }
738     }
739 
740     @java.lang.Override
clone()741     public Builder clone() {
742       return super.clone();
743     }
744 
745     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)746     public Builder setField(
747         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
748       return super.setField(field, value);
749     }
750 
751     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)752     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
753       return super.clearField(field);
754     }
755 
756     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)757     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
758       return super.clearOneof(oneof);
759     }
760 
761     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)762     public Builder setRepeatedField(
763         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
764       return super.setRepeatedField(field, index, value);
765     }
766 
767     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)768     public Builder addRepeatedField(
769         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
770       return super.addRepeatedField(field, value);
771     }
772 
773     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)774     public Builder mergeFrom(com.google.protobuf.Message other) {
775       if (other instanceof com.google.privacy.dlp.v2.HybridOptions) {
776         return mergeFrom((com.google.privacy.dlp.v2.HybridOptions) other);
777       } else {
778         super.mergeFrom(other);
779         return this;
780       }
781     }
782 
mergeFrom(com.google.privacy.dlp.v2.HybridOptions other)783     public Builder mergeFrom(com.google.privacy.dlp.v2.HybridOptions other) {
784       if (other == com.google.privacy.dlp.v2.HybridOptions.getDefaultInstance()) return this;
785       if (!other.getDescription().isEmpty()) {
786         description_ = other.description_;
787         bitField0_ |= 0x00000001;
788         onChanged();
789       }
790       if (!other.requiredFindingLabelKeys_.isEmpty()) {
791         if (requiredFindingLabelKeys_.isEmpty()) {
792           requiredFindingLabelKeys_ = other.requiredFindingLabelKeys_;
793           bitField0_ = (bitField0_ & ~0x00000002);
794         } else {
795           ensureRequiredFindingLabelKeysIsMutable();
796           requiredFindingLabelKeys_.addAll(other.requiredFindingLabelKeys_);
797         }
798         onChanged();
799       }
800       internalGetMutableLabels().mergeFrom(other.internalGetLabels());
801       bitField0_ |= 0x00000004;
802       if (other.hasTableOptions()) {
803         mergeTableOptions(other.getTableOptions());
804       }
805       this.mergeUnknownFields(other.getUnknownFields());
806       onChanged();
807       return this;
808     }
809 
810     @java.lang.Override
isInitialized()811     public final boolean isInitialized() {
812       return true;
813     }
814 
815     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)816     public Builder mergeFrom(
817         com.google.protobuf.CodedInputStream input,
818         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
819         throws java.io.IOException {
820       if (extensionRegistry == null) {
821         throw new java.lang.NullPointerException();
822       }
823       try {
824         boolean done = false;
825         while (!done) {
826           int tag = input.readTag();
827           switch (tag) {
828             case 0:
829               done = true;
830               break;
831             case 10:
832               {
833                 description_ = input.readStringRequireUtf8();
834                 bitField0_ |= 0x00000001;
835                 break;
836               } // case 10
837             case 18:
838               {
839                 java.lang.String s = input.readStringRequireUtf8();
840                 ensureRequiredFindingLabelKeysIsMutable();
841                 requiredFindingLabelKeys_.add(s);
842                 break;
843               } // case 18
844             case 26:
845               {
846                 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ =
847                     input.readMessage(
848                         LabelsDefaultEntryHolder.defaultEntry.getParserForType(),
849                         extensionRegistry);
850                 internalGetMutableLabels()
851                     .getMutableMap()
852                     .put(labels__.getKey(), labels__.getValue());
853                 bitField0_ |= 0x00000004;
854                 break;
855               } // case 26
856             case 34:
857               {
858                 input.readMessage(getTableOptionsFieldBuilder().getBuilder(), extensionRegistry);
859                 bitField0_ |= 0x00000008;
860                 break;
861               } // case 34
862             default:
863               {
864                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
865                   done = true; // was an endgroup tag
866                 }
867                 break;
868               } // default:
869           } // switch (tag)
870         } // while (!done)
871       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
872         throw e.unwrapIOException();
873       } finally {
874         onChanged();
875       } // finally
876       return this;
877     }
878 
879     private int bitField0_;
880 
881     private java.lang.Object description_ = "";
882     /**
883      *
884      *
885      * <pre>
886      * A short description of where the data is coming from. Will be stored once
887      * in the job. 256 max length.
888      * </pre>
889      *
890      * <code>string description = 1;</code>
891      *
892      * @return The description.
893      */
getDescription()894     public java.lang.String getDescription() {
895       java.lang.Object ref = description_;
896       if (!(ref instanceof java.lang.String)) {
897         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
898         java.lang.String s = bs.toStringUtf8();
899         description_ = s;
900         return s;
901       } else {
902         return (java.lang.String) ref;
903       }
904     }
905     /**
906      *
907      *
908      * <pre>
909      * A short description of where the data is coming from. Will be stored once
910      * in the job. 256 max length.
911      * </pre>
912      *
913      * <code>string description = 1;</code>
914      *
915      * @return The bytes for description.
916      */
getDescriptionBytes()917     public com.google.protobuf.ByteString getDescriptionBytes() {
918       java.lang.Object ref = description_;
919       if (ref instanceof String) {
920         com.google.protobuf.ByteString b =
921             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
922         description_ = b;
923         return b;
924       } else {
925         return (com.google.protobuf.ByteString) ref;
926       }
927     }
928     /**
929      *
930      *
931      * <pre>
932      * A short description of where the data is coming from. Will be stored once
933      * in the job. 256 max length.
934      * </pre>
935      *
936      * <code>string description = 1;</code>
937      *
938      * @param value The description to set.
939      * @return This builder for chaining.
940      */
setDescription(java.lang.String value)941     public Builder setDescription(java.lang.String value) {
942       if (value == null) {
943         throw new NullPointerException();
944       }
945       description_ = value;
946       bitField0_ |= 0x00000001;
947       onChanged();
948       return this;
949     }
950     /**
951      *
952      *
953      * <pre>
954      * A short description of where the data is coming from. Will be stored once
955      * in the job. 256 max length.
956      * </pre>
957      *
958      * <code>string description = 1;</code>
959      *
960      * @return This builder for chaining.
961      */
clearDescription()962     public Builder clearDescription() {
963       description_ = getDefaultInstance().getDescription();
964       bitField0_ = (bitField0_ & ~0x00000001);
965       onChanged();
966       return this;
967     }
968     /**
969      *
970      *
971      * <pre>
972      * A short description of where the data is coming from. Will be stored once
973      * in the job. 256 max length.
974      * </pre>
975      *
976      * <code>string description = 1;</code>
977      *
978      * @param value The bytes for description to set.
979      * @return This builder for chaining.
980      */
setDescriptionBytes(com.google.protobuf.ByteString value)981     public Builder setDescriptionBytes(com.google.protobuf.ByteString value) {
982       if (value == null) {
983         throw new NullPointerException();
984       }
985       checkByteStringIsUtf8(value);
986       description_ = value;
987       bitField0_ |= 0x00000001;
988       onChanged();
989       return this;
990     }
991 
992     private com.google.protobuf.LazyStringList requiredFindingLabelKeys_ =
993         com.google.protobuf.LazyStringArrayList.EMPTY;
994 
ensureRequiredFindingLabelKeysIsMutable()995     private void ensureRequiredFindingLabelKeysIsMutable() {
996       if (!((bitField0_ & 0x00000002) != 0)) {
997         requiredFindingLabelKeys_ =
998             new com.google.protobuf.LazyStringArrayList(requiredFindingLabelKeys_);
999         bitField0_ |= 0x00000002;
1000       }
1001     }
1002     /**
1003      *
1004      *
1005      * <pre>
1006      * These are labels that each inspection request must include within their
1007      * 'finding_labels' map. Request may contain others, but any missing one of
1008      * these will be rejected.
1009      * Label keys must be between 1 and 63 characters long and must conform
1010      * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
1011      * No more than 10 keys can be required.
1012      * </pre>
1013      *
1014      * <code>repeated string required_finding_label_keys = 2;</code>
1015      *
1016      * @return A list containing the requiredFindingLabelKeys.
1017      */
getRequiredFindingLabelKeysList()1018     public com.google.protobuf.ProtocolStringList getRequiredFindingLabelKeysList() {
1019       return requiredFindingLabelKeys_.getUnmodifiableView();
1020     }
1021     /**
1022      *
1023      *
1024      * <pre>
1025      * These are labels that each inspection request must include within their
1026      * 'finding_labels' map. Request may contain others, but any missing one of
1027      * these will be rejected.
1028      * Label keys must be between 1 and 63 characters long and must conform
1029      * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
1030      * No more than 10 keys can be required.
1031      * </pre>
1032      *
1033      * <code>repeated string required_finding_label_keys = 2;</code>
1034      *
1035      * @return The count of requiredFindingLabelKeys.
1036      */
getRequiredFindingLabelKeysCount()1037     public int getRequiredFindingLabelKeysCount() {
1038       return requiredFindingLabelKeys_.size();
1039     }
1040     /**
1041      *
1042      *
1043      * <pre>
1044      * These are labels that each inspection request must include within their
1045      * 'finding_labels' map. Request may contain others, but any missing one of
1046      * these will be rejected.
1047      * Label keys must be between 1 and 63 characters long and must conform
1048      * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
1049      * No more than 10 keys can be required.
1050      * </pre>
1051      *
1052      * <code>repeated string required_finding_label_keys = 2;</code>
1053      *
1054      * @param index The index of the element to return.
1055      * @return The requiredFindingLabelKeys at the given index.
1056      */
getRequiredFindingLabelKeys(int index)1057     public java.lang.String getRequiredFindingLabelKeys(int index) {
1058       return requiredFindingLabelKeys_.get(index);
1059     }
1060     /**
1061      *
1062      *
1063      * <pre>
1064      * These are labels that each inspection request must include within their
1065      * 'finding_labels' map. Request may contain others, but any missing one of
1066      * these will be rejected.
1067      * Label keys must be between 1 and 63 characters long and must conform
1068      * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
1069      * No more than 10 keys can be required.
1070      * </pre>
1071      *
1072      * <code>repeated string required_finding_label_keys = 2;</code>
1073      *
1074      * @param index The index of the value to return.
1075      * @return The bytes of the requiredFindingLabelKeys at the given index.
1076      */
getRequiredFindingLabelKeysBytes(int index)1077     public com.google.protobuf.ByteString getRequiredFindingLabelKeysBytes(int index) {
1078       return requiredFindingLabelKeys_.getByteString(index);
1079     }
1080     /**
1081      *
1082      *
1083      * <pre>
1084      * These are labels that each inspection request must include within their
1085      * 'finding_labels' map. Request may contain others, but any missing one of
1086      * these will be rejected.
1087      * Label keys must be between 1 and 63 characters long and must conform
1088      * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
1089      * No more than 10 keys can be required.
1090      * </pre>
1091      *
1092      * <code>repeated string required_finding_label_keys = 2;</code>
1093      *
1094      * @param index The index to set the value at.
1095      * @param value The requiredFindingLabelKeys to set.
1096      * @return This builder for chaining.
1097      */
setRequiredFindingLabelKeys(int index, java.lang.String value)1098     public Builder setRequiredFindingLabelKeys(int index, java.lang.String value) {
1099       if (value == null) {
1100         throw new NullPointerException();
1101       }
1102       ensureRequiredFindingLabelKeysIsMutable();
1103       requiredFindingLabelKeys_.set(index, value);
1104       onChanged();
1105       return this;
1106     }
1107     /**
1108      *
1109      *
1110      * <pre>
1111      * These are labels that each inspection request must include within their
1112      * 'finding_labels' map. Request may contain others, but any missing one of
1113      * these will be rejected.
1114      * Label keys must be between 1 and 63 characters long and must conform
1115      * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
1116      * No more than 10 keys can be required.
1117      * </pre>
1118      *
1119      * <code>repeated string required_finding_label_keys = 2;</code>
1120      *
1121      * @param value The requiredFindingLabelKeys to add.
1122      * @return This builder for chaining.
1123      */
addRequiredFindingLabelKeys(java.lang.String value)1124     public Builder addRequiredFindingLabelKeys(java.lang.String value) {
1125       if (value == null) {
1126         throw new NullPointerException();
1127       }
1128       ensureRequiredFindingLabelKeysIsMutable();
1129       requiredFindingLabelKeys_.add(value);
1130       onChanged();
1131       return this;
1132     }
1133     /**
1134      *
1135      *
1136      * <pre>
1137      * These are labels that each inspection request must include within their
1138      * 'finding_labels' map. Request may contain others, but any missing one of
1139      * these will be rejected.
1140      * Label keys must be between 1 and 63 characters long and must conform
1141      * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
1142      * No more than 10 keys can be required.
1143      * </pre>
1144      *
1145      * <code>repeated string required_finding_label_keys = 2;</code>
1146      *
1147      * @param values The requiredFindingLabelKeys to add.
1148      * @return This builder for chaining.
1149      */
addAllRequiredFindingLabelKeys(java.lang.Iterable<java.lang.String> values)1150     public Builder addAllRequiredFindingLabelKeys(java.lang.Iterable<java.lang.String> values) {
1151       ensureRequiredFindingLabelKeysIsMutable();
1152       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, requiredFindingLabelKeys_);
1153       onChanged();
1154       return this;
1155     }
1156     /**
1157      *
1158      *
1159      * <pre>
1160      * These are labels that each inspection request must include within their
1161      * 'finding_labels' map. Request may contain others, but any missing one of
1162      * these will be rejected.
1163      * Label keys must be between 1 and 63 characters long and must conform
1164      * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
1165      * No more than 10 keys can be required.
1166      * </pre>
1167      *
1168      * <code>repeated string required_finding_label_keys = 2;</code>
1169      *
1170      * @return This builder for chaining.
1171      */
clearRequiredFindingLabelKeys()1172     public Builder clearRequiredFindingLabelKeys() {
1173       requiredFindingLabelKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY;
1174       bitField0_ = (bitField0_ & ~0x00000002);
1175       onChanged();
1176       return this;
1177     }
1178     /**
1179      *
1180      *
1181      * <pre>
1182      * These are labels that each inspection request must include within their
1183      * 'finding_labels' map. Request may contain others, but any missing one of
1184      * these will be rejected.
1185      * Label keys must be between 1 and 63 characters long and must conform
1186      * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
1187      * No more than 10 keys can be required.
1188      * </pre>
1189      *
1190      * <code>repeated string required_finding_label_keys = 2;</code>
1191      *
1192      * @param value The bytes of the requiredFindingLabelKeys to add.
1193      * @return This builder for chaining.
1194      */
addRequiredFindingLabelKeysBytes(com.google.protobuf.ByteString value)1195     public Builder addRequiredFindingLabelKeysBytes(com.google.protobuf.ByteString value) {
1196       if (value == null) {
1197         throw new NullPointerException();
1198       }
1199       checkByteStringIsUtf8(value);
1200       ensureRequiredFindingLabelKeysIsMutable();
1201       requiredFindingLabelKeys_.add(value);
1202       onChanged();
1203       return this;
1204     }
1205 
1206     private com.google.protobuf.MapField<java.lang.String, java.lang.String> labels_;
1207 
internalGetLabels()1208     private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() {
1209       if (labels_ == null) {
1210         return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry);
1211       }
1212       return labels_;
1213     }
1214 
1215     private com.google.protobuf.MapField<java.lang.String, java.lang.String>
internalGetMutableLabels()1216         internalGetMutableLabels() {
1217       if (labels_ == null) {
1218         labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry);
1219       }
1220       if (!labels_.isMutable()) {
1221         labels_ = labels_.copy();
1222       }
1223       bitField0_ |= 0x00000004;
1224       onChanged();
1225       return labels_;
1226     }
1227 
getLabelsCount()1228     public int getLabelsCount() {
1229       return internalGetLabels().getMap().size();
1230     }
1231     /**
1232      *
1233      *
1234      * <pre>
1235      * To organize findings, these labels will be added to each finding.
1236      * Label keys must be between 1 and 63 characters long and must conform
1237      * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
1238      * Label values must be between 0 and 63 characters long and must conform
1239      * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
1240      * No more than 10 labels can be associated with a given finding.
1241      * Examples:
1242      * * `"environment" : "production"`
1243      * * `"pipeline" : "etl"`
1244      * </pre>
1245      *
1246      * <code>map&lt;string, string&gt; labels = 3;</code>
1247      */
1248     @java.lang.Override
containsLabels(java.lang.String key)1249     public boolean containsLabels(java.lang.String key) {
1250       if (key == null) {
1251         throw new NullPointerException("map key");
1252       }
1253       return internalGetLabels().getMap().containsKey(key);
1254     }
1255     /** Use {@link #getLabelsMap()} instead. */
1256     @java.lang.Override
1257     @java.lang.Deprecated
getLabels()1258     public java.util.Map<java.lang.String, java.lang.String> getLabels() {
1259       return getLabelsMap();
1260     }
1261     /**
1262      *
1263      *
1264      * <pre>
1265      * To organize findings, these labels will be added to each finding.
1266      * Label keys must be between 1 and 63 characters long and must conform
1267      * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
1268      * Label values must be between 0 and 63 characters long and must conform
1269      * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
1270      * No more than 10 labels can be associated with a given finding.
1271      * Examples:
1272      * * `"environment" : "production"`
1273      * * `"pipeline" : "etl"`
1274      * </pre>
1275      *
1276      * <code>map&lt;string, string&gt; labels = 3;</code>
1277      */
1278     @java.lang.Override
getLabelsMap()1279     public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() {
1280       return internalGetLabels().getMap();
1281     }
1282     /**
1283      *
1284      *
1285      * <pre>
1286      * To organize findings, these labels will be added to each finding.
1287      * Label keys must be between 1 and 63 characters long and must conform
1288      * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
1289      * Label values must be between 0 and 63 characters long and must conform
1290      * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
1291      * No more than 10 labels can be associated with a given finding.
1292      * Examples:
1293      * * `"environment" : "production"`
1294      * * `"pipeline" : "etl"`
1295      * </pre>
1296      *
1297      * <code>map&lt;string, string&gt; labels = 3;</code>
1298      */
1299     @java.lang.Override
getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue)1300     public /* nullable */ java.lang.String getLabelsOrDefault(
1301         java.lang.String key,
1302         /* nullable */
1303         java.lang.String defaultValue) {
1304       if (key == null) {
1305         throw new NullPointerException("map key");
1306       }
1307       java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
1308       return map.containsKey(key) ? map.get(key) : defaultValue;
1309     }
1310     /**
1311      *
1312      *
1313      * <pre>
1314      * To organize findings, these labels will be added to each finding.
1315      * Label keys must be between 1 and 63 characters long and must conform
1316      * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
1317      * Label values must be between 0 and 63 characters long and must conform
1318      * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
1319      * No more than 10 labels can be associated with a given finding.
1320      * Examples:
1321      * * `"environment" : "production"`
1322      * * `"pipeline" : "etl"`
1323      * </pre>
1324      *
1325      * <code>map&lt;string, string&gt; labels = 3;</code>
1326      */
1327     @java.lang.Override
getLabelsOrThrow(java.lang.String key)1328     public java.lang.String getLabelsOrThrow(java.lang.String key) {
1329       if (key == null) {
1330         throw new NullPointerException("map key");
1331       }
1332       java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
1333       if (!map.containsKey(key)) {
1334         throw new java.lang.IllegalArgumentException();
1335       }
1336       return map.get(key);
1337     }
1338 
clearLabels()1339     public Builder clearLabels() {
1340       bitField0_ = (bitField0_ & ~0x00000004);
1341       internalGetMutableLabels().getMutableMap().clear();
1342       return this;
1343     }
1344     /**
1345      *
1346      *
1347      * <pre>
1348      * To organize findings, these labels will be added to each finding.
1349      * Label keys must be between 1 and 63 characters long and must conform
1350      * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
1351      * Label values must be between 0 and 63 characters long and must conform
1352      * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
1353      * No more than 10 labels can be associated with a given finding.
1354      * Examples:
1355      * * `"environment" : "production"`
1356      * * `"pipeline" : "etl"`
1357      * </pre>
1358      *
1359      * <code>map&lt;string, string&gt; labels = 3;</code>
1360      */
removeLabels(java.lang.String key)1361     public Builder removeLabels(java.lang.String key) {
1362       if (key == null) {
1363         throw new NullPointerException("map key");
1364       }
1365       internalGetMutableLabels().getMutableMap().remove(key);
1366       return this;
1367     }
1368     /** Use alternate mutation accessors instead. */
1369     @java.lang.Deprecated
getMutableLabels()1370     public java.util.Map<java.lang.String, java.lang.String> getMutableLabels() {
1371       bitField0_ |= 0x00000004;
1372       return internalGetMutableLabels().getMutableMap();
1373     }
1374     /**
1375      *
1376      *
1377      * <pre>
1378      * To organize findings, these labels will be added to each finding.
1379      * Label keys must be between 1 and 63 characters long and must conform
1380      * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
1381      * Label values must be between 0 and 63 characters long and must conform
1382      * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
1383      * No more than 10 labels can be associated with a given finding.
1384      * Examples:
1385      * * `"environment" : "production"`
1386      * * `"pipeline" : "etl"`
1387      * </pre>
1388      *
1389      * <code>map&lt;string, string&gt; labels = 3;</code>
1390      */
putLabels(java.lang.String key, java.lang.String value)1391     public Builder putLabels(java.lang.String key, java.lang.String value) {
1392       if (key == null) {
1393         throw new NullPointerException("map key");
1394       }
1395       if (value == null) {
1396         throw new NullPointerException("map value");
1397       }
1398       internalGetMutableLabels().getMutableMap().put(key, value);
1399       bitField0_ |= 0x00000004;
1400       return this;
1401     }
1402     /**
1403      *
1404      *
1405      * <pre>
1406      * To organize findings, these labels will be added to each finding.
1407      * Label keys must be between 1 and 63 characters long and must conform
1408      * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
1409      * Label values must be between 0 and 63 characters long and must conform
1410      * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
1411      * No more than 10 labels can be associated with a given finding.
1412      * Examples:
1413      * * `"environment" : "production"`
1414      * * `"pipeline" : "etl"`
1415      * </pre>
1416      *
1417      * <code>map&lt;string, string&gt; labels = 3;</code>
1418      */
putAllLabels(java.util.Map<java.lang.String, java.lang.String> values)1419     public Builder putAllLabels(java.util.Map<java.lang.String, java.lang.String> values) {
1420       internalGetMutableLabels().getMutableMap().putAll(values);
1421       bitField0_ |= 0x00000004;
1422       return this;
1423     }
1424 
1425     private com.google.privacy.dlp.v2.TableOptions tableOptions_;
1426     private com.google.protobuf.SingleFieldBuilderV3<
1427             com.google.privacy.dlp.v2.TableOptions,
1428             com.google.privacy.dlp.v2.TableOptions.Builder,
1429             com.google.privacy.dlp.v2.TableOptionsOrBuilder>
1430         tableOptionsBuilder_;
1431     /**
1432      *
1433      *
1434      * <pre>
1435      * If the container is a table, additional information to make findings
1436      * meaningful such as the columns that are primary keys.
1437      * </pre>
1438      *
1439      * <code>.google.privacy.dlp.v2.TableOptions table_options = 4;</code>
1440      *
1441      * @return Whether the tableOptions field is set.
1442      */
hasTableOptions()1443     public boolean hasTableOptions() {
1444       return ((bitField0_ & 0x00000008) != 0);
1445     }
1446     /**
1447      *
1448      *
1449      * <pre>
1450      * If the container is a table, additional information to make findings
1451      * meaningful such as the columns that are primary keys.
1452      * </pre>
1453      *
1454      * <code>.google.privacy.dlp.v2.TableOptions table_options = 4;</code>
1455      *
1456      * @return The tableOptions.
1457      */
getTableOptions()1458     public com.google.privacy.dlp.v2.TableOptions getTableOptions() {
1459       if (tableOptionsBuilder_ == null) {
1460         return tableOptions_ == null
1461             ? com.google.privacy.dlp.v2.TableOptions.getDefaultInstance()
1462             : tableOptions_;
1463       } else {
1464         return tableOptionsBuilder_.getMessage();
1465       }
1466     }
1467     /**
1468      *
1469      *
1470      * <pre>
1471      * If the container is a table, additional information to make findings
1472      * meaningful such as the columns that are primary keys.
1473      * </pre>
1474      *
1475      * <code>.google.privacy.dlp.v2.TableOptions table_options = 4;</code>
1476      */
setTableOptions(com.google.privacy.dlp.v2.TableOptions value)1477     public Builder setTableOptions(com.google.privacy.dlp.v2.TableOptions value) {
1478       if (tableOptionsBuilder_ == null) {
1479         if (value == null) {
1480           throw new NullPointerException();
1481         }
1482         tableOptions_ = value;
1483       } else {
1484         tableOptionsBuilder_.setMessage(value);
1485       }
1486       bitField0_ |= 0x00000008;
1487       onChanged();
1488       return this;
1489     }
1490     /**
1491      *
1492      *
1493      * <pre>
1494      * If the container is a table, additional information to make findings
1495      * meaningful such as the columns that are primary keys.
1496      * </pre>
1497      *
1498      * <code>.google.privacy.dlp.v2.TableOptions table_options = 4;</code>
1499      */
setTableOptions(com.google.privacy.dlp.v2.TableOptions.Builder builderForValue)1500     public Builder setTableOptions(com.google.privacy.dlp.v2.TableOptions.Builder builderForValue) {
1501       if (tableOptionsBuilder_ == null) {
1502         tableOptions_ = builderForValue.build();
1503       } else {
1504         tableOptionsBuilder_.setMessage(builderForValue.build());
1505       }
1506       bitField0_ |= 0x00000008;
1507       onChanged();
1508       return this;
1509     }
1510     /**
1511      *
1512      *
1513      * <pre>
1514      * If the container is a table, additional information to make findings
1515      * meaningful such as the columns that are primary keys.
1516      * </pre>
1517      *
1518      * <code>.google.privacy.dlp.v2.TableOptions table_options = 4;</code>
1519      */
mergeTableOptions(com.google.privacy.dlp.v2.TableOptions value)1520     public Builder mergeTableOptions(com.google.privacy.dlp.v2.TableOptions value) {
1521       if (tableOptionsBuilder_ == null) {
1522         if (((bitField0_ & 0x00000008) != 0)
1523             && tableOptions_ != null
1524             && tableOptions_ != com.google.privacy.dlp.v2.TableOptions.getDefaultInstance()) {
1525           getTableOptionsBuilder().mergeFrom(value);
1526         } else {
1527           tableOptions_ = value;
1528         }
1529       } else {
1530         tableOptionsBuilder_.mergeFrom(value);
1531       }
1532       bitField0_ |= 0x00000008;
1533       onChanged();
1534       return this;
1535     }
1536     /**
1537      *
1538      *
1539      * <pre>
1540      * If the container is a table, additional information to make findings
1541      * meaningful such as the columns that are primary keys.
1542      * </pre>
1543      *
1544      * <code>.google.privacy.dlp.v2.TableOptions table_options = 4;</code>
1545      */
clearTableOptions()1546     public Builder clearTableOptions() {
1547       bitField0_ = (bitField0_ & ~0x00000008);
1548       tableOptions_ = null;
1549       if (tableOptionsBuilder_ != null) {
1550         tableOptionsBuilder_.dispose();
1551         tableOptionsBuilder_ = null;
1552       }
1553       onChanged();
1554       return this;
1555     }
1556     /**
1557      *
1558      *
1559      * <pre>
1560      * If the container is a table, additional information to make findings
1561      * meaningful such as the columns that are primary keys.
1562      * </pre>
1563      *
1564      * <code>.google.privacy.dlp.v2.TableOptions table_options = 4;</code>
1565      */
getTableOptionsBuilder()1566     public com.google.privacy.dlp.v2.TableOptions.Builder getTableOptionsBuilder() {
1567       bitField0_ |= 0x00000008;
1568       onChanged();
1569       return getTableOptionsFieldBuilder().getBuilder();
1570     }
1571     /**
1572      *
1573      *
1574      * <pre>
1575      * If the container is a table, additional information to make findings
1576      * meaningful such as the columns that are primary keys.
1577      * </pre>
1578      *
1579      * <code>.google.privacy.dlp.v2.TableOptions table_options = 4;</code>
1580      */
getTableOptionsOrBuilder()1581     public com.google.privacy.dlp.v2.TableOptionsOrBuilder getTableOptionsOrBuilder() {
1582       if (tableOptionsBuilder_ != null) {
1583         return tableOptionsBuilder_.getMessageOrBuilder();
1584       } else {
1585         return tableOptions_ == null
1586             ? com.google.privacy.dlp.v2.TableOptions.getDefaultInstance()
1587             : tableOptions_;
1588       }
1589     }
1590     /**
1591      *
1592      *
1593      * <pre>
1594      * If the container is a table, additional information to make findings
1595      * meaningful such as the columns that are primary keys.
1596      * </pre>
1597      *
1598      * <code>.google.privacy.dlp.v2.TableOptions table_options = 4;</code>
1599      */
1600     private com.google.protobuf.SingleFieldBuilderV3<
1601             com.google.privacy.dlp.v2.TableOptions,
1602             com.google.privacy.dlp.v2.TableOptions.Builder,
1603             com.google.privacy.dlp.v2.TableOptionsOrBuilder>
getTableOptionsFieldBuilder()1604         getTableOptionsFieldBuilder() {
1605       if (tableOptionsBuilder_ == null) {
1606         tableOptionsBuilder_ =
1607             new com.google.protobuf.SingleFieldBuilderV3<
1608                 com.google.privacy.dlp.v2.TableOptions,
1609                 com.google.privacy.dlp.v2.TableOptions.Builder,
1610                 com.google.privacy.dlp.v2.TableOptionsOrBuilder>(
1611                 getTableOptions(), getParentForChildren(), isClean());
1612         tableOptions_ = null;
1613       }
1614       return tableOptionsBuilder_;
1615     }
1616 
1617     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1618     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
1619       return super.setUnknownFields(unknownFields);
1620     }
1621 
1622     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1623     public final Builder mergeUnknownFields(
1624         final com.google.protobuf.UnknownFieldSet unknownFields) {
1625       return super.mergeUnknownFields(unknownFields);
1626     }
1627 
1628     // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.HybridOptions)
1629   }
1630 
1631   // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.HybridOptions)
1632   private static final com.google.privacy.dlp.v2.HybridOptions DEFAULT_INSTANCE;
1633 
1634   static {
1635     DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.HybridOptions();
1636   }
1637 
getDefaultInstance()1638   public static com.google.privacy.dlp.v2.HybridOptions getDefaultInstance() {
1639     return DEFAULT_INSTANCE;
1640   }
1641 
1642   private static final com.google.protobuf.Parser<HybridOptions> PARSER =
1643       new com.google.protobuf.AbstractParser<HybridOptions>() {
1644         @java.lang.Override
1645         public HybridOptions parsePartialFrom(
1646             com.google.protobuf.CodedInputStream input,
1647             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1648             throws com.google.protobuf.InvalidProtocolBufferException {
1649           Builder builder = newBuilder();
1650           try {
1651             builder.mergeFrom(input, extensionRegistry);
1652           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1653             throw e.setUnfinishedMessage(builder.buildPartial());
1654           } catch (com.google.protobuf.UninitializedMessageException e) {
1655             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1656           } catch (java.io.IOException e) {
1657             throw new com.google.protobuf.InvalidProtocolBufferException(e)
1658                 .setUnfinishedMessage(builder.buildPartial());
1659           }
1660           return builder.buildPartial();
1661         }
1662       };
1663 
parser()1664   public static com.google.protobuf.Parser<HybridOptions> parser() {
1665     return PARSER;
1666   }
1667 
1668   @java.lang.Override
getParserForType()1669   public com.google.protobuf.Parser<HybridOptions> getParserForType() {
1670     return PARSER;
1671   }
1672 
1673   @java.lang.Override
getDefaultInstanceForType()1674   public com.google.privacy.dlp.v2.HybridOptions getDefaultInstanceForType() {
1675     return DEFAULT_INSTANCE;
1676   }
1677 }
1678