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