• 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  * Custom information type provided by the user. Used to find domain-specific
26  * sensitive information configurable to the data in question.
27  * </pre>
28  *
29  * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType}
30  */
31 public final class CustomInfoType extends com.google.protobuf.GeneratedMessageV3
32     implements
33     // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType)
34     CustomInfoTypeOrBuilder {
35   private static final long serialVersionUID = 0L;
36   // Use CustomInfoType.newBuilder() to construct.
CustomInfoType(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37   private CustomInfoType(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
38     super(builder);
39   }
40 
CustomInfoType()41   private CustomInfoType() {
42     likelihood_ = 0;
43     detectionRules_ = java.util.Collections.emptyList();
44     exclusionType_ = 0;
45   }
46 
47   @java.lang.Override
48   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)49   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
50     return new CustomInfoType();
51   }
52 
53   @java.lang.Override
getUnknownFields()54   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
55     return this.unknownFields;
56   }
57 
getDescriptor()58   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
59     return com.google.privacy.dlp.v2.DlpStorage
60         .internal_static_google_privacy_dlp_v2_CustomInfoType_descriptor;
61   }
62 
63   @java.lang.Override
64   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()65       internalGetFieldAccessorTable() {
66     return com.google.privacy.dlp.v2.DlpStorage
67         .internal_static_google_privacy_dlp_v2_CustomInfoType_fieldAccessorTable
68         .ensureFieldAccessorsInitialized(
69             com.google.privacy.dlp.v2.CustomInfoType.class,
70             com.google.privacy.dlp.v2.CustomInfoType.Builder.class);
71   }
72 
73   /** Protobuf enum {@code google.privacy.dlp.v2.CustomInfoType.ExclusionType} */
74   public enum ExclusionType implements com.google.protobuf.ProtocolMessageEnum {
75     /**
76      *
77      *
78      * <pre>
79      * A finding of this custom info type will not be excluded from results.
80      * </pre>
81      *
82      * <code>EXCLUSION_TYPE_UNSPECIFIED = 0;</code>
83      */
84     EXCLUSION_TYPE_UNSPECIFIED(0),
85     /**
86      *
87      *
88      * <pre>
89      * A finding of this custom info type will be excluded from final results,
90      * but can still affect rule execution.
91      * </pre>
92      *
93      * <code>EXCLUSION_TYPE_EXCLUDE = 1;</code>
94      */
95     EXCLUSION_TYPE_EXCLUDE(1),
96     UNRECOGNIZED(-1),
97     ;
98 
99     /**
100      *
101      *
102      * <pre>
103      * A finding of this custom info type will not be excluded from results.
104      * </pre>
105      *
106      * <code>EXCLUSION_TYPE_UNSPECIFIED = 0;</code>
107      */
108     public static final int EXCLUSION_TYPE_UNSPECIFIED_VALUE = 0;
109     /**
110      *
111      *
112      * <pre>
113      * A finding of this custom info type will be excluded from final results,
114      * but can still affect rule execution.
115      * </pre>
116      *
117      * <code>EXCLUSION_TYPE_EXCLUDE = 1;</code>
118      */
119     public static final int EXCLUSION_TYPE_EXCLUDE_VALUE = 1;
120 
getNumber()121     public final int getNumber() {
122       if (this == UNRECOGNIZED) {
123         throw new java.lang.IllegalArgumentException(
124             "Can't get the number of an unknown enum value.");
125       }
126       return value;
127     }
128 
129     /**
130      * @param value The numeric wire value of the corresponding enum entry.
131      * @return The enum associated with the given numeric wire value.
132      * @deprecated Use {@link #forNumber(int)} instead.
133      */
134     @java.lang.Deprecated
valueOf(int value)135     public static ExclusionType valueOf(int value) {
136       return forNumber(value);
137     }
138 
139     /**
140      * @param value The numeric wire value of the corresponding enum entry.
141      * @return The enum associated with the given numeric wire value.
142      */
forNumber(int value)143     public static ExclusionType forNumber(int value) {
144       switch (value) {
145         case 0:
146           return EXCLUSION_TYPE_UNSPECIFIED;
147         case 1:
148           return EXCLUSION_TYPE_EXCLUDE;
149         default:
150           return null;
151       }
152     }
153 
internalGetValueMap()154     public static com.google.protobuf.Internal.EnumLiteMap<ExclusionType> internalGetValueMap() {
155       return internalValueMap;
156     }
157 
158     private static final com.google.protobuf.Internal.EnumLiteMap<ExclusionType> internalValueMap =
159         new com.google.protobuf.Internal.EnumLiteMap<ExclusionType>() {
160           public ExclusionType findValueByNumber(int number) {
161             return ExclusionType.forNumber(number);
162           }
163         };
164 
getValueDescriptor()165     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
166       if (this == UNRECOGNIZED) {
167         throw new java.lang.IllegalStateException(
168             "Can't get the descriptor of an unrecognized enum value.");
169       }
170       return getDescriptor().getValues().get(ordinal());
171     }
172 
getDescriptorForType()173     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
174       return getDescriptor();
175     }
176 
getDescriptor()177     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
178       return com.google.privacy.dlp.v2.CustomInfoType.getDescriptor().getEnumTypes().get(0);
179     }
180 
181     private static final ExclusionType[] VALUES = values();
182 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)183     public static ExclusionType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
184       if (desc.getType() != getDescriptor()) {
185         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
186       }
187       if (desc.getIndex() == -1) {
188         return UNRECOGNIZED;
189       }
190       return VALUES[desc.getIndex()];
191     }
192 
193     private final int value;
194 
ExclusionType(int value)195     private ExclusionType(int value) {
196       this.value = value;
197     }
198 
199     // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.CustomInfoType.ExclusionType)
200   }
201 
202   public interface DictionaryOrBuilder
203       extends
204       // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType.Dictionary)
205       com.google.protobuf.MessageOrBuilder {
206 
207     /**
208      *
209      *
210      * <pre>
211      * List of words or phrases to search for.
212      * </pre>
213      *
214      * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
215      *
216      * @return Whether the wordList field is set.
217      */
hasWordList()218     boolean hasWordList();
219     /**
220      *
221      *
222      * <pre>
223      * List of words or phrases to search for.
224      * </pre>
225      *
226      * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
227      *
228      * @return The wordList.
229      */
getWordList()230     com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList getWordList();
231     /**
232      *
233      *
234      * <pre>
235      * List of words or phrases to search for.
236      * </pre>
237      *
238      * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
239      */
getWordListOrBuilder()240     com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder getWordListOrBuilder();
241 
242     /**
243      *
244      *
245      * <pre>
246      * Newline-delimited file of words in Cloud Storage. Only a single file
247      * is accepted.
248      * </pre>
249      *
250      * <code>.google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3;</code>
251      *
252      * @return Whether the cloudStoragePath field is set.
253      */
hasCloudStoragePath()254     boolean hasCloudStoragePath();
255     /**
256      *
257      *
258      * <pre>
259      * Newline-delimited file of words in Cloud Storage. Only a single file
260      * is accepted.
261      * </pre>
262      *
263      * <code>.google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3;</code>
264      *
265      * @return The cloudStoragePath.
266      */
getCloudStoragePath()267     com.google.privacy.dlp.v2.CloudStoragePath getCloudStoragePath();
268     /**
269      *
270      *
271      * <pre>
272      * Newline-delimited file of words in Cloud Storage. Only a single file
273      * is accepted.
274      * </pre>
275      *
276      * <code>.google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3;</code>
277      */
getCloudStoragePathOrBuilder()278     com.google.privacy.dlp.v2.CloudStoragePathOrBuilder getCloudStoragePathOrBuilder();
279 
getSourceCase()280     public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.SourceCase getSourceCase();
281   }
282   /**
283    *
284    *
285    * <pre>
286    * Custom information type based on a dictionary of words or phrases. This can
287    * be used to match sensitive information specific to the data, such as a list
288    * of employee IDs or job titles.
289    * Dictionary words are case-insensitive and all characters other than letters
290    * and digits in the unicode [Basic Multilingual
291    * Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
292    * will be replaced with whitespace when scanning for matches, so the
293    * dictionary phrase "Sam Johnson" will match all three phrases "sam johnson",
294    * "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters
295    * surrounding any match must be of a different type than the adjacent
296    * characters within the word, so letters must be next to non-letters and
297    * digits next to non-digits. For example, the dictionary word "jen" will
298    * match the first three letters of the text "jen123" but will return no
299    * matches for "jennifer".
300    * Dictionary words containing a large number of characters that are not
301    * letters or digits may result in unexpected findings because such characters
302    * are treated as whitespace. The
303    * [limits](https://cloud.google.com/dlp/limits) page contains details about
304    * the size limits of dictionaries. For dictionaries that do not fit within
305    * these constraints, consider using `LargeCustomDictionaryConfig` in the
306    * `StoredInfoType` API.
307    * </pre>
308    *
309    * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.Dictionary}
310    */
311   public static final class Dictionary extends com.google.protobuf.GeneratedMessageV3
312       implements
313       // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType.Dictionary)
314       DictionaryOrBuilder {
315     private static final long serialVersionUID = 0L;
316     // Use Dictionary.newBuilder() to construct.
Dictionary(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)317     private Dictionary(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
318       super(builder);
319     }
320 
Dictionary()321     private Dictionary() {}
322 
323     @java.lang.Override
324     @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)325     protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
326       return new Dictionary();
327     }
328 
329     @java.lang.Override
getUnknownFields()330     public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
331       return this.unknownFields;
332     }
333 
getDescriptor()334     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
335       return com.google.privacy.dlp.v2.DlpStorage
336           .internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_descriptor;
337     }
338 
339     @java.lang.Override
340     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()341         internalGetFieldAccessorTable() {
342       return com.google.privacy.dlp.v2.DlpStorage
343           .internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_fieldAccessorTable
344           .ensureFieldAccessorsInitialized(
345               com.google.privacy.dlp.v2.CustomInfoType.Dictionary.class,
346               com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder.class);
347     }
348 
349     public interface WordListOrBuilder
350         extends
351         // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList)
352         com.google.protobuf.MessageOrBuilder {
353 
354       /**
355        *
356        *
357        * <pre>
358        * Words or phrases defining the dictionary. The dictionary must contain
359        * at least one phrase and every phrase must contain at least 2 characters
360        * that are letters or digits. [required]
361        * </pre>
362        *
363        * <code>repeated string words = 1;</code>
364        *
365        * @return A list containing the words.
366        */
getWordsList()367       java.util.List<java.lang.String> getWordsList();
368       /**
369        *
370        *
371        * <pre>
372        * Words or phrases defining the dictionary. The dictionary must contain
373        * at least one phrase and every phrase must contain at least 2 characters
374        * that are letters or digits. [required]
375        * </pre>
376        *
377        * <code>repeated string words = 1;</code>
378        *
379        * @return The count of words.
380        */
getWordsCount()381       int getWordsCount();
382       /**
383        *
384        *
385        * <pre>
386        * Words or phrases defining the dictionary. The dictionary must contain
387        * at least one phrase and every phrase must contain at least 2 characters
388        * that are letters or digits. [required]
389        * </pre>
390        *
391        * <code>repeated string words = 1;</code>
392        *
393        * @param index The index of the element to return.
394        * @return The words at the given index.
395        */
getWords(int index)396       java.lang.String getWords(int index);
397       /**
398        *
399        *
400        * <pre>
401        * Words or phrases defining the dictionary. The dictionary must contain
402        * at least one phrase and every phrase must contain at least 2 characters
403        * that are letters or digits. [required]
404        * </pre>
405        *
406        * <code>repeated string words = 1;</code>
407        *
408        * @param index The index of the value to return.
409        * @return The bytes of the words at the given index.
410        */
getWordsBytes(int index)411       com.google.protobuf.ByteString getWordsBytes(int index);
412     }
413     /**
414      *
415      *
416      * <pre>
417      * Message defining a list of words or phrases to search for in the data.
418      * </pre>
419      *
420      * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList}
421      */
422     public static final class WordList extends com.google.protobuf.GeneratedMessageV3
423         implements
424         // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList)
425         WordListOrBuilder {
426       private static final long serialVersionUID = 0L;
427       // Use WordList.newBuilder() to construct.
WordList(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)428       private WordList(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
429         super(builder);
430       }
431 
WordList()432       private WordList() {
433         words_ = com.google.protobuf.LazyStringArrayList.EMPTY;
434       }
435 
436       @java.lang.Override
437       @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)438       protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
439         return new WordList();
440       }
441 
442       @java.lang.Override
getUnknownFields()443       public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
444         return this.unknownFields;
445       }
446 
getDescriptor()447       public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
448         return com.google.privacy.dlp.v2.DlpStorage
449             .internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_WordList_descriptor;
450       }
451 
452       @java.lang.Override
453       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()454           internalGetFieldAccessorTable() {
455         return com.google.privacy.dlp.v2.DlpStorage
456             .internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_WordList_fieldAccessorTable
457             .ensureFieldAccessorsInitialized(
458                 com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.class,
459                 com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder.class);
460       }
461 
462       public static final int WORDS_FIELD_NUMBER = 1;
463 
464       @SuppressWarnings("serial")
465       private com.google.protobuf.LazyStringList words_;
466       /**
467        *
468        *
469        * <pre>
470        * Words or phrases defining the dictionary. The dictionary must contain
471        * at least one phrase and every phrase must contain at least 2 characters
472        * that are letters or digits. [required]
473        * </pre>
474        *
475        * <code>repeated string words = 1;</code>
476        *
477        * @return A list containing the words.
478        */
getWordsList()479       public com.google.protobuf.ProtocolStringList getWordsList() {
480         return words_;
481       }
482       /**
483        *
484        *
485        * <pre>
486        * Words or phrases defining the dictionary. The dictionary must contain
487        * at least one phrase and every phrase must contain at least 2 characters
488        * that are letters or digits. [required]
489        * </pre>
490        *
491        * <code>repeated string words = 1;</code>
492        *
493        * @return The count of words.
494        */
getWordsCount()495       public int getWordsCount() {
496         return words_.size();
497       }
498       /**
499        *
500        *
501        * <pre>
502        * Words or phrases defining the dictionary. The dictionary must contain
503        * at least one phrase and every phrase must contain at least 2 characters
504        * that are letters or digits. [required]
505        * </pre>
506        *
507        * <code>repeated string words = 1;</code>
508        *
509        * @param index The index of the element to return.
510        * @return The words at the given index.
511        */
getWords(int index)512       public java.lang.String getWords(int index) {
513         return words_.get(index);
514       }
515       /**
516        *
517        *
518        * <pre>
519        * Words or phrases defining the dictionary. The dictionary must contain
520        * at least one phrase and every phrase must contain at least 2 characters
521        * that are letters or digits. [required]
522        * </pre>
523        *
524        * <code>repeated string words = 1;</code>
525        *
526        * @param index The index of the value to return.
527        * @return The bytes of the words at the given index.
528        */
getWordsBytes(int index)529       public com.google.protobuf.ByteString getWordsBytes(int index) {
530         return words_.getByteString(index);
531       }
532 
533       private byte memoizedIsInitialized = -1;
534 
535       @java.lang.Override
isInitialized()536       public final boolean isInitialized() {
537         byte isInitialized = memoizedIsInitialized;
538         if (isInitialized == 1) return true;
539         if (isInitialized == 0) return false;
540 
541         memoizedIsInitialized = 1;
542         return true;
543       }
544 
545       @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)546       public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
547         for (int i = 0; i < words_.size(); i++) {
548           com.google.protobuf.GeneratedMessageV3.writeString(output, 1, words_.getRaw(i));
549         }
550         getUnknownFields().writeTo(output);
551       }
552 
553       @java.lang.Override
getSerializedSize()554       public int getSerializedSize() {
555         int size = memoizedSize;
556         if (size != -1) return size;
557 
558         size = 0;
559         {
560           int dataSize = 0;
561           for (int i = 0; i < words_.size(); i++) {
562             dataSize += computeStringSizeNoTag(words_.getRaw(i));
563           }
564           size += dataSize;
565           size += 1 * getWordsList().size();
566         }
567         size += getUnknownFields().getSerializedSize();
568         memoizedSize = size;
569         return size;
570       }
571 
572       @java.lang.Override
equals(final java.lang.Object obj)573       public boolean equals(final java.lang.Object obj) {
574         if (obj == this) {
575           return true;
576         }
577         if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList)) {
578           return super.equals(obj);
579         }
580         com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList other =
581             (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) obj;
582 
583         if (!getWordsList().equals(other.getWordsList())) return false;
584         if (!getUnknownFields().equals(other.getUnknownFields())) return false;
585         return true;
586       }
587 
588       @java.lang.Override
hashCode()589       public int hashCode() {
590         if (memoizedHashCode != 0) {
591           return memoizedHashCode;
592         }
593         int hash = 41;
594         hash = (19 * hash) + getDescriptor().hashCode();
595         if (getWordsCount() > 0) {
596           hash = (37 * hash) + WORDS_FIELD_NUMBER;
597           hash = (53 * hash) + getWordsList().hashCode();
598         }
599         hash = (29 * hash) + getUnknownFields().hashCode();
600         memoizedHashCode = hash;
601         return hash;
602       }
603 
parseFrom( java.nio.ByteBuffer data)604       public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom(
605           java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
606         return PARSER.parseFrom(data);
607       }
608 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)609       public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom(
610           java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
611           throws com.google.protobuf.InvalidProtocolBufferException {
612         return PARSER.parseFrom(data, extensionRegistry);
613       }
614 
parseFrom( com.google.protobuf.ByteString data)615       public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom(
616           com.google.protobuf.ByteString data)
617           throws com.google.protobuf.InvalidProtocolBufferException {
618         return PARSER.parseFrom(data);
619       }
620 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)621       public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom(
622           com.google.protobuf.ByteString data,
623           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
624           throws com.google.protobuf.InvalidProtocolBufferException {
625         return PARSER.parseFrom(data, extensionRegistry);
626       }
627 
parseFrom( byte[] data)628       public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom(
629           byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
630         return PARSER.parseFrom(data);
631       }
632 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)633       public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom(
634           byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
635           throws com.google.protobuf.InvalidProtocolBufferException {
636         return PARSER.parseFrom(data, extensionRegistry);
637       }
638 
parseFrom( java.io.InputStream input)639       public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom(
640           java.io.InputStream input) throws java.io.IOException {
641         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
642       }
643 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)644       public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom(
645           java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
646           throws java.io.IOException {
647         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
648             PARSER, input, extensionRegistry);
649       }
650 
parseDelimitedFrom( java.io.InputStream input)651       public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseDelimitedFrom(
652           java.io.InputStream input) throws java.io.IOException {
653         return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
654       }
655 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)656       public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseDelimitedFrom(
657           java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
658           throws java.io.IOException {
659         return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
660             PARSER, input, extensionRegistry);
661       }
662 
parseFrom( com.google.protobuf.CodedInputStream input)663       public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom(
664           com.google.protobuf.CodedInputStream input) throws java.io.IOException {
665         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
666       }
667 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)668       public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom(
669           com.google.protobuf.CodedInputStream input,
670           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
671           throws java.io.IOException {
672         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
673             PARSER, input, extensionRegistry);
674       }
675 
676       @java.lang.Override
newBuilderForType()677       public Builder newBuilderForType() {
678         return newBuilder();
679       }
680 
newBuilder()681       public static Builder newBuilder() {
682         return DEFAULT_INSTANCE.toBuilder();
683       }
684 
newBuilder( com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList prototype)685       public static Builder newBuilder(
686           com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList prototype) {
687         return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
688       }
689 
690       @java.lang.Override
toBuilder()691       public Builder toBuilder() {
692         return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
693       }
694 
695       @java.lang.Override
newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)696       protected Builder newBuilderForType(
697           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
698         Builder builder = new Builder(parent);
699         return builder;
700       }
701       /**
702        *
703        *
704        * <pre>
705        * Message defining a list of words or phrases to search for in the data.
706        * </pre>
707        *
708        * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList}
709        */
710       public static final class Builder
711           extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
712           implements
713           // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList)
714           com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder {
getDescriptor()715         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
716           return com.google.privacy.dlp.v2.DlpStorage
717               .internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_WordList_descriptor;
718         }
719 
720         @java.lang.Override
721         protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()722             internalGetFieldAccessorTable() {
723           return com.google.privacy.dlp.v2.DlpStorage
724               .internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_WordList_fieldAccessorTable
725               .ensureFieldAccessorsInitialized(
726                   com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.class,
727                   com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder.class);
728         }
729 
730         // Construct using com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.newBuilder()
Builder()731         private Builder() {}
732 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)733         private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
734           super(parent);
735         }
736 
737         @java.lang.Override
clear()738         public Builder clear() {
739           super.clear();
740           bitField0_ = 0;
741           words_ = com.google.protobuf.LazyStringArrayList.EMPTY;
742           bitField0_ = (bitField0_ & ~0x00000001);
743           return this;
744         }
745 
746         @java.lang.Override
getDescriptorForType()747         public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
748           return com.google.privacy.dlp.v2.DlpStorage
749               .internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_WordList_descriptor;
750         }
751 
752         @java.lang.Override
753         public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList
getDefaultInstanceForType()754             getDefaultInstanceForType() {
755           return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance();
756         }
757 
758         @java.lang.Override
build()759         public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList build() {
760           com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList result = buildPartial();
761           if (!result.isInitialized()) {
762             throw newUninitializedMessageException(result);
763           }
764           return result;
765         }
766 
767         @java.lang.Override
buildPartial()768         public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList buildPartial() {
769           com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList result =
770               new com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList(this);
771           buildPartialRepeatedFields(result);
772           if (bitField0_ != 0) {
773             buildPartial0(result);
774           }
775           onBuilt();
776           return result;
777         }
778 
buildPartialRepeatedFields( com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList result)779         private void buildPartialRepeatedFields(
780             com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList result) {
781           if (((bitField0_ & 0x00000001) != 0)) {
782             words_ = words_.getUnmodifiableView();
783             bitField0_ = (bitField0_ & ~0x00000001);
784           }
785           result.words_ = words_;
786         }
787 
buildPartial0( com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList result)788         private void buildPartial0(
789             com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList result) {
790           int from_bitField0_ = bitField0_;
791         }
792 
793         @java.lang.Override
clone()794         public Builder clone() {
795           return super.clone();
796         }
797 
798         @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)799         public Builder setField(
800             com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
801           return super.setField(field, value);
802         }
803 
804         @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)805         public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
806           return super.clearField(field);
807         }
808 
809         @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)810         public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
811           return super.clearOneof(oneof);
812         }
813 
814         @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)815         public Builder setRepeatedField(
816             com.google.protobuf.Descriptors.FieldDescriptor field,
817             int index,
818             java.lang.Object value) {
819           return super.setRepeatedField(field, index, value);
820         }
821 
822         @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)823         public Builder addRepeatedField(
824             com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
825           return super.addRepeatedField(field, value);
826         }
827 
828         @java.lang.Override
mergeFrom(com.google.protobuf.Message other)829         public Builder mergeFrom(com.google.protobuf.Message other) {
830           if (other instanceof com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) {
831             return mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) other);
832           } else {
833             super.mergeFrom(other);
834             return this;
835           }
836         }
837 
mergeFrom( com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList other)838         public Builder mergeFrom(
839             com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList other) {
840           if (other
841               == com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance())
842             return this;
843           if (!other.words_.isEmpty()) {
844             if (words_.isEmpty()) {
845               words_ = other.words_;
846               bitField0_ = (bitField0_ & ~0x00000001);
847             } else {
848               ensureWordsIsMutable();
849               words_.addAll(other.words_);
850             }
851             onChanged();
852           }
853           this.mergeUnknownFields(other.getUnknownFields());
854           onChanged();
855           return this;
856         }
857 
858         @java.lang.Override
isInitialized()859         public final boolean isInitialized() {
860           return true;
861         }
862 
863         @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)864         public Builder mergeFrom(
865             com.google.protobuf.CodedInputStream input,
866             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
867             throws java.io.IOException {
868           if (extensionRegistry == null) {
869             throw new java.lang.NullPointerException();
870           }
871           try {
872             boolean done = false;
873             while (!done) {
874               int tag = input.readTag();
875               switch (tag) {
876                 case 0:
877                   done = true;
878                   break;
879                 case 10:
880                   {
881                     java.lang.String s = input.readStringRequireUtf8();
882                     ensureWordsIsMutable();
883                     words_.add(s);
884                     break;
885                   } // case 10
886                 default:
887                   {
888                     if (!super.parseUnknownField(input, extensionRegistry, tag)) {
889                       done = true; // was an endgroup tag
890                     }
891                     break;
892                   } // default:
893               } // switch (tag)
894             } // while (!done)
895           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
896             throw e.unwrapIOException();
897           } finally {
898             onChanged();
899           } // finally
900           return this;
901         }
902 
903         private int bitField0_;
904 
905         private com.google.protobuf.LazyStringList words_ =
906             com.google.protobuf.LazyStringArrayList.EMPTY;
907 
ensureWordsIsMutable()908         private void ensureWordsIsMutable() {
909           if (!((bitField0_ & 0x00000001) != 0)) {
910             words_ = new com.google.protobuf.LazyStringArrayList(words_);
911             bitField0_ |= 0x00000001;
912           }
913         }
914         /**
915          *
916          *
917          * <pre>
918          * Words or phrases defining the dictionary. The dictionary must contain
919          * at least one phrase and every phrase must contain at least 2 characters
920          * that are letters or digits. [required]
921          * </pre>
922          *
923          * <code>repeated string words = 1;</code>
924          *
925          * @return A list containing the words.
926          */
getWordsList()927         public com.google.protobuf.ProtocolStringList getWordsList() {
928           return words_.getUnmodifiableView();
929         }
930         /**
931          *
932          *
933          * <pre>
934          * Words or phrases defining the dictionary. The dictionary must contain
935          * at least one phrase and every phrase must contain at least 2 characters
936          * that are letters or digits. [required]
937          * </pre>
938          *
939          * <code>repeated string words = 1;</code>
940          *
941          * @return The count of words.
942          */
getWordsCount()943         public int getWordsCount() {
944           return words_.size();
945         }
946         /**
947          *
948          *
949          * <pre>
950          * Words or phrases defining the dictionary. The dictionary must contain
951          * at least one phrase and every phrase must contain at least 2 characters
952          * that are letters or digits. [required]
953          * </pre>
954          *
955          * <code>repeated string words = 1;</code>
956          *
957          * @param index The index of the element to return.
958          * @return The words at the given index.
959          */
getWords(int index)960         public java.lang.String getWords(int index) {
961           return words_.get(index);
962         }
963         /**
964          *
965          *
966          * <pre>
967          * Words or phrases defining the dictionary. The dictionary must contain
968          * at least one phrase and every phrase must contain at least 2 characters
969          * that are letters or digits. [required]
970          * </pre>
971          *
972          * <code>repeated string words = 1;</code>
973          *
974          * @param index The index of the value to return.
975          * @return The bytes of the words at the given index.
976          */
getWordsBytes(int index)977         public com.google.protobuf.ByteString getWordsBytes(int index) {
978           return words_.getByteString(index);
979         }
980         /**
981          *
982          *
983          * <pre>
984          * Words or phrases defining the dictionary. The dictionary must contain
985          * at least one phrase and every phrase must contain at least 2 characters
986          * that are letters or digits. [required]
987          * </pre>
988          *
989          * <code>repeated string words = 1;</code>
990          *
991          * @param index The index to set the value at.
992          * @param value The words to set.
993          * @return This builder for chaining.
994          */
setWords(int index, java.lang.String value)995         public Builder setWords(int index, java.lang.String value) {
996           if (value == null) {
997             throw new NullPointerException();
998           }
999           ensureWordsIsMutable();
1000           words_.set(index, value);
1001           onChanged();
1002           return this;
1003         }
1004         /**
1005          *
1006          *
1007          * <pre>
1008          * Words or phrases defining the dictionary. The dictionary must contain
1009          * at least one phrase and every phrase must contain at least 2 characters
1010          * that are letters or digits. [required]
1011          * </pre>
1012          *
1013          * <code>repeated string words = 1;</code>
1014          *
1015          * @param value The words to add.
1016          * @return This builder for chaining.
1017          */
addWords(java.lang.String value)1018         public Builder addWords(java.lang.String value) {
1019           if (value == null) {
1020             throw new NullPointerException();
1021           }
1022           ensureWordsIsMutable();
1023           words_.add(value);
1024           onChanged();
1025           return this;
1026         }
1027         /**
1028          *
1029          *
1030          * <pre>
1031          * Words or phrases defining the dictionary. The dictionary must contain
1032          * at least one phrase and every phrase must contain at least 2 characters
1033          * that are letters or digits. [required]
1034          * </pre>
1035          *
1036          * <code>repeated string words = 1;</code>
1037          *
1038          * @param values The words to add.
1039          * @return This builder for chaining.
1040          */
addAllWords(java.lang.Iterable<java.lang.String> values)1041         public Builder addAllWords(java.lang.Iterable<java.lang.String> values) {
1042           ensureWordsIsMutable();
1043           com.google.protobuf.AbstractMessageLite.Builder.addAll(values, words_);
1044           onChanged();
1045           return this;
1046         }
1047         /**
1048          *
1049          *
1050          * <pre>
1051          * Words or phrases defining the dictionary. The dictionary must contain
1052          * at least one phrase and every phrase must contain at least 2 characters
1053          * that are letters or digits. [required]
1054          * </pre>
1055          *
1056          * <code>repeated string words = 1;</code>
1057          *
1058          * @return This builder for chaining.
1059          */
clearWords()1060         public Builder clearWords() {
1061           words_ = com.google.protobuf.LazyStringArrayList.EMPTY;
1062           bitField0_ = (bitField0_ & ~0x00000001);
1063           onChanged();
1064           return this;
1065         }
1066         /**
1067          *
1068          *
1069          * <pre>
1070          * Words or phrases defining the dictionary. The dictionary must contain
1071          * at least one phrase and every phrase must contain at least 2 characters
1072          * that are letters or digits. [required]
1073          * </pre>
1074          *
1075          * <code>repeated string words = 1;</code>
1076          *
1077          * @param value The bytes of the words to add.
1078          * @return This builder for chaining.
1079          */
addWordsBytes(com.google.protobuf.ByteString value)1080         public Builder addWordsBytes(com.google.protobuf.ByteString value) {
1081           if (value == null) {
1082             throw new NullPointerException();
1083           }
1084           checkByteStringIsUtf8(value);
1085           ensureWordsIsMutable();
1086           words_.add(value);
1087           onChanged();
1088           return this;
1089         }
1090 
1091         @java.lang.Override
setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1092         public final Builder setUnknownFields(
1093             final com.google.protobuf.UnknownFieldSet unknownFields) {
1094           return super.setUnknownFields(unknownFields);
1095         }
1096 
1097         @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1098         public final Builder mergeUnknownFields(
1099             final com.google.protobuf.UnknownFieldSet unknownFields) {
1100           return super.mergeUnknownFields(unknownFields);
1101         }
1102 
1103         // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList)
1104       }
1105 
1106       // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList)
1107       private static final com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList
1108           DEFAULT_INSTANCE;
1109 
1110       static {
1111         DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList();
1112       }
1113 
1114       public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList
getDefaultInstance()1115           getDefaultInstance() {
1116         return DEFAULT_INSTANCE;
1117       }
1118 
1119       private static final com.google.protobuf.Parser<WordList> PARSER =
1120           new com.google.protobuf.AbstractParser<WordList>() {
1121             @java.lang.Override
1122             public WordList parsePartialFrom(
1123                 com.google.protobuf.CodedInputStream input,
1124                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1125                 throws com.google.protobuf.InvalidProtocolBufferException {
1126               Builder builder = newBuilder();
1127               try {
1128                 builder.mergeFrom(input, extensionRegistry);
1129               } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1130                 throw e.setUnfinishedMessage(builder.buildPartial());
1131               } catch (com.google.protobuf.UninitializedMessageException e) {
1132                 throw e.asInvalidProtocolBufferException()
1133                     .setUnfinishedMessage(builder.buildPartial());
1134               } catch (java.io.IOException e) {
1135                 throw new com.google.protobuf.InvalidProtocolBufferException(e)
1136                     .setUnfinishedMessage(builder.buildPartial());
1137               }
1138               return builder.buildPartial();
1139             }
1140           };
1141 
parser()1142       public static com.google.protobuf.Parser<WordList> parser() {
1143         return PARSER;
1144       }
1145 
1146       @java.lang.Override
getParserForType()1147       public com.google.protobuf.Parser<WordList> getParserForType() {
1148         return PARSER;
1149       }
1150 
1151       @java.lang.Override
1152       public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList
getDefaultInstanceForType()1153           getDefaultInstanceForType() {
1154         return DEFAULT_INSTANCE;
1155       }
1156     }
1157 
1158     private int sourceCase_ = 0;
1159     private java.lang.Object source_;
1160 
1161     public enum SourceCase
1162         implements
1163             com.google.protobuf.Internal.EnumLite,
1164             com.google.protobuf.AbstractMessage.InternalOneOfEnum {
1165       WORD_LIST(1),
1166       CLOUD_STORAGE_PATH(3),
1167       SOURCE_NOT_SET(0);
1168       private final int value;
1169 
SourceCase(int value)1170       private SourceCase(int value) {
1171         this.value = value;
1172       }
1173       /**
1174        * @param value The number of the enum to look for.
1175        * @return The enum associated with the given number.
1176        * @deprecated Use {@link #forNumber(int)} instead.
1177        */
1178       @java.lang.Deprecated
valueOf(int value)1179       public static SourceCase valueOf(int value) {
1180         return forNumber(value);
1181       }
1182 
forNumber(int value)1183       public static SourceCase forNumber(int value) {
1184         switch (value) {
1185           case 1:
1186             return WORD_LIST;
1187           case 3:
1188             return CLOUD_STORAGE_PATH;
1189           case 0:
1190             return SOURCE_NOT_SET;
1191           default:
1192             return null;
1193         }
1194       }
1195 
getNumber()1196       public int getNumber() {
1197         return this.value;
1198       }
1199     };
1200 
getSourceCase()1201     public SourceCase getSourceCase() {
1202       return SourceCase.forNumber(sourceCase_);
1203     }
1204 
1205     public static final int WORD_LIST_FIELD_NUMBER = 1;
1206     /**
1207      *
1208      *
1209      * <pre>
1210      * List of words or phrases to search for.
1211      * </pre>
1212      *
1213      * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
1214      *
1215      * @return Whether the wordList field is set.
1216      */
1217     @java.lang.Override
hasWordList()1218     public boolean hasWordList() {
1219       return sourceCase_ == 1;
1220     }
1221     /**
1222      *
1223      *
1224      * <pre>
1225      * List of words or phrases to search for.
1226      * </pre>
1227      *
1228      * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
1229      *
1230      * @return The wordList.
1231      */
1232     @java.lang.Override
getWordList()1233     public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList getWordList() {
1234       if (sourceCase_ == 1) {
1235         return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_;
1236       }
1237       return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance();
1238     }
1239     /**
1240      *
1241      *
1242      * <pre>
1243      * List of words or phrases to search for.
1244      * </pre>
1245      *
1246      * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
1247      */
1248     @java.lang.Override
1249     public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder
getWordListOrBuilder()1250         getWordListOrBuilder() {
1251       if (sourceCase_ == 1) {
1252         return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_;
1253       }
1254       return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance();
1255     }
1256 
1257     public static final int CLOUD_STORAGE_PATH_FIELD_NUMBER = 3;
1258     /**
1259      *
1260      *
1261      * <pre>
1262      * Newline-delimited file of words in Cloud Storage. Only a single file
1263      * is accepted.
1264      * </pre>
1265      *
1266      * <code>.google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3;</code>
1267      *
1268      * @return Whether the cloudStoragePath field is set.
1269      */
1270     @java.lang.Override
hasCloudStoragePath()1271     public boolean hasCloudStoragePath() {
1272       return sourceCase_ == 3;
1273     }
1274     /**
1275      *
1276      *
1277      * <pre>
1278      * Newline-delimited file of words in Cloud Storage. Only a single file
1279      * is accepted.
1280      * </pre>
1281      *
1282      * <code>.google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3;</code>
1283      *
1284      * @return The cloudStoragePath.
1285      */
1286     @java.lang.Override
getCloudStoragePath()1287     public com.google.privacy.dlp.v2.CloudStoragePath getCloudStoragePath() {
1288       if (sourceCase_ == 3) {
1289         return (com.google.privacy.dlp.v2.CloudStoragePath) source_;
1290       }
1291       return com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance();
1292     }
1293     /**
1294      *
1295      *
1296      * <pre>
1297      * Newline-delimited file of words in Cloud Storage. Only a single file
1298      * is accepted.
1299      * </pre>
1300      *
1301      * <code>.google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3;</code>
1302      */
1303     @java.lang.Override
getCloudStoragePathOrBuilder()1304     public com.google.privacy.dlp.v2.CloudStoragePathOrBuilder getCloudStoragePathOrBuilder() {
1305       if (sourceCase_ == 3) {
1306         return (com.google.privacy.dlp.v2.CloudStoragePath) source_;
1307       }
1308       return com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance();
1309     }
1310 
1311     private byte memoizedIsInitialized = -1;
1312 
1313     @java.lang.Override
isInitialized()1314     public final boolean isInitialized() {
1315       byte isInitialized = memoizedIsInitialized;
1316       if (isInitialized == 1) return true;
1317       if (isInitialized == 0) return false;
1318 
1319       memoizedIsInitialized = 1;
1320       return true;
1321     }
1322 
1323     @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)1324     public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
1325       if (sourceCase_ == 1) {
1326         output.writeMessage(
1327             1, (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_);
1328       }
1329       if (sourceCase_ == 3) {
1330         output.writeMessage(3, (com.google.privacy.dlp.v2.CloudStoragePath) source_);
1331       }
1332       getUnknownFields().writeTo(output);
1333     }
1334 
1335     @java.lang.Override
getSerializedSize()1336     public int getSerializedSize() {
1337       int size = memoizedSize;
1338       if (size != -1) return size;
1339 
1340       size = 0;
1341       if (sourceCase_ == 1) {
1342         size +=
1343             com.google.protobuf.CodedOutputStream.computeMessageSize(
1344                 1, (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_);
1345       }
1346       if (sourceCase_ == 3) {
1347         size +=
1348             com.google.protobuf.CodedOutputStream.computeMessageSize(
1349                 3, (com.google.privacy.dlp.v2.CloudStoragePath) source_);
1350       }
1351       size += getUnknownFields().getSerializedSize();
1352       memoizedSize = size;
1353       return size;
1354     }
1355 
1356     @java.lang.Override
equals(final java.lang.Object obj)1357     public boolean equals(final java.lang.Object obj) {
1358       if (obj == this) {
1359         return true;
1360       }
1361       if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType.Dictionary)) {
1362         return super.equals(obj);
1363       }
1364       com.google.privacy.dlp.v2.CustomInfoType.Dictionary other =
1365           (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) obj;
1366 
1367       if (!getSourceCase().equals(other.getSourceCase())) return false;
1368       switch (sourceCase_) {
1369         case 1:
1370           if (!getWordList().equals(other.getWordList())) return false;
1371           break;
1372         case 3:
1373           if (!getCloudStoragePath().equals(other.getCloudStoragePath())) return false;
1374           break;
1375         case 0:
1376         default:
1377       }
1378       if (!getUnknownFields().equals(other.getUnknownFields())) return false;
1379       return true;
1380     }
1381 
1382     @java.lang.Override
hashCode()1383     public int hashCode() {
1384       if (memoizedHashCode != 0) {
1385         return memoizedHashCode;
1386       }
1387       int hash = 41;
1388       hash = (19 * hash) + getDescriptor().hashCode();
1389       switch (sourceCase_) {
1390         case 1:
1391           hash = (37 * hash) + WORD_LIST_FIELD_NUMBER;
1392           hash = (53 * hash) + getWordList().hashCode();
1393           break;
1394         case 3:
1395           hash = (37 * hash) + CLOUD_STORAGE_PATH_FIELD_NUMBER;
1396           hash = (53 * hash) + getCloudStoragePath().hashCode();
1397           break;
1398         case 0:
1399         default:
1400       }
1401       hash = (29 * hash) + getUnknownFields().hashCode();
1402       memoizedHashCode = hash;
1403       return hash;
1404     }
1405 
parseFrom( java.nio.ByteBuffer data)1406     public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom(
1407         java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
1408       return PARSER.parseFrom(data);
1409     }
1410 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1411     public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom(
1412         java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1413         throws com.google.protobuf.InvalidProtocolBufferException {
1414       return PARSER.parseFrom(data, extensionRegistry);
1415     }
1416 
parseFrom( com.google.protobuf.ByteString data)1417     public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom(
1418         com.google.protobuf.ByteString data)
1419         throws com.google.protobuf.InvalidProtocolBufferException {
1420       return PARSER.parseFrom(data);
1421     }
1422 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1423     public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom(
1424         com.google.protobuf.ByteString data,
1425         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1426         throws com.google.protobuf.InvalidProtocolBufferException {
1427       return PARSER.parseFrom(data, extensionRegistry);
1428     }
1429 
parseFrom(byte[] data)1430     public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom(byte[] data)
1431         throws com.google.protobuf.InvalidProtocolBufferException {
1432       return PARSER.parseFrom(data);
1433     }
1434 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1435     public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom(
1436         byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1437         throws com.google.protobuf.InvalidProtocolBufferException {
1438       return PARSER.parseFrom(data, extensionRegistry);
1439     }
1440 
parseFrom( java.io.InputStream input)1441     public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom(
1442         java.io.InputStream input) throws java.io.IOException {
1443       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1444     }
1445 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1446     public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom(
1447         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1448         throws java.io.IOException {
1449       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1450           PARSER, input, extensionRegistry);
1451     }
1452 
parseDelimitedFrom( java.io.InputStream input)1453     public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseDelimitedFrom(
1454         java.io.InputStream input) throws java.io.IOException {
1455       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
1456     }
1457 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1458     public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseDelimitedFrom(
1459         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1460         throws java.io.IOException {
1461       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
1462           PARSER, input, extensionRegistry);
1463     }
1464 
parseFrom( com.google.protobuf.CodedInputStream input)1465     public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom(
1466         com.google.protobuf.CodedInputStream input) throws java.io.IOException {
1467       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1468     }
1469 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1470     public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom(
1471         com.google.protobuf.CodedInputStream input,
1472         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1473         throws java.io.IOException {
1474       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1475           PARSER, input, extensionRegistry);
1476     }
1477 
1478     @java.lang.Override
newBuilderForType()1479     public Builder newBuilderForType() {
1480       return newBuilder();
1481     }
1482 
newBuilder()1483     public static Builder newBuilder() {
1484       return DEFAULT_INSTANCE.toBuilder();
1485     }
1486 
newBuilder( com.google.privacy.dlp.v2.CustomInfoType.Dictionary prototype)1487     public static Builder newBuilder(
1488         com.google.privacy.dlp.v2.CustomInfoType.Dictionary prototype) {
1489       return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
1490     }
1491 
1492     @java.lang.Override
toBuilder()1493     public Builder toBuilder() {
1494       return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
1495     }
1496 
1497     @java.lang.Override
newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1498     protected Builder newBuilderForType(
1499         com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1500       Builder builder = new Builder(parent);
1501       return builder;
1502     }
1503     /**
1504      *
1505      *
1506      * <pre>
1507      * Custom information type based on a dictionary of words or phrases. This can
1508      * be used to match sensitive information specific to the data, such as a list
1509      * of employee IDs or job titles.
1510      * Dictionary words are case-insensitive and all characters other than letters
1511      * and digits in the unicode [Basic Multilingual
1512      * Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
1513      * will be replaced with whitespace when scanning for matches, so the
1514      * dictionary phrase "Sam Johnson" will match all three phrases "sam johnson",
1515      * "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters
1516      * surrounding any match must be of a different type than the adjacent
1517      * characters within the word, so letters must be next to non-letters and
1518      * digits next to non-digits. For example, the dictionary word "jen" will
1519      * match the first three letters of the text "jen123" but will return no
1520      * matches for "jennifer".
1521      * Dictionary words containing a large number of characters that are not
1522      * letters or digits may result in unexpected findings because such characters
1523      * are treated as whitespace. The
1524      * [limits](https://cloud.google.com/dlp/limits) page contains details about
1525      * the size limits of dictionaries. For dictionaries that do not fit within
1526      * these constraints, consider using `LargeCustomDictionaryConfig` in the
1527      * `StoredInfoType` API.
1528      * </pre>
1529      *
1530      * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.Dictionary}
1531      */
1532     public static final class Builder
1533         extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
1534         implements
1535         // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType.Dictionary)
1536         com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder {
getDescriptor()1537       public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
1538         return com.google.privacy.dlp.v2.DlpStorage
1539             .internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_descriptor;
1540       }
1541 
1542       @java.lang.Override
1543       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()1544           internalGetFieldAccessorTable() {
1545         return com.google.privacy.dlp.v2.DlpStorage
1546             .internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_fieldAccessorTable
1547             .ensureFieldAccessorsInitialized(
1548                 com.google.privacy.dlp.v2.CustomInfoType.Dictionary.class,
1549                 com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder.class);
1550       }
1551 
1552       // Construct using com.google.privacy.dlp.v2.CustomInfoType.Dictionary.newBuilder()
Builder()1553       private Builder() {}
1554 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1555       private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1556         super(parent);
1557       }
1558 
1559       @java.lang.Override
clear()1560       public Builder clear() {
1561         super.clear();
1562         bitField0_ = 0;
1563         if (wordListBuilder_ != null) {
1564           wordListBuilder_.clear();
1565         }
1566         if (cloudStoragePathBuilder_ != null) {
1567           cloudStoragePathBuilder_.clear();
1568         }
1569         sourceCase_ = 0;
1570         source_ = null;
1571         return this;
1572       }
1573 
1574       @java.lang.Override
getDescriptorForType()1575       public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
1576         return com.google.privacy.dlp.v2.DlpStorage
1577             .internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_descriptor;
1578       }
1579 
1580       @java.lang.Override
getDefaultInstanceForType()1581       public com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDefaultInstanceForType() {
1582         return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance();
1583       }
1584 
1585       @java.lang.Override
build()1586       public com.google.privacy.dlp.v2.CustomInfoType.Dictionary build() {
1587         com.google.privacy.dlp.v2.CustomInfoType.Dictionary result = buildPartial();
1588         if (!result.isInitialized()) {
1589           throw newUninitializedMessageException(result);
1590         }
1591         return result;
1592       }
1593 
1594       @java.lang.Override
buildPartial()1595       public com.google.privacy.dlp.v2.CustomInfoType.Dictionary buildPartial() {
1596         com.google.privacy.dlp.v2.CustomInfoType.Dictionary result =
1597             new com.google.privacy.dlp.v2.CustomInfoType.Dictionary(this);
1598         if (bitField0_ != 0) {
1599           buildPartial0(result);
1600         }
1601         buildPartialOneofs(result);
1602         onBuilt();
1603         return result;
1604       }
1605 
buildPartial0(com.google.privacy.dlp.v2.CustomInfoType.Dictionary result)1606       private void buildPartial0(com.google.privacy.dlp.v2.CustomInfoType.Dictionary result) {
1607         int from_bitField0_ = bitField0_;
1608       }
1609 
buildPartialOneofs(com.google.privacy.dlp.v2.CustomInfoType.Dictionary result)1610       private void buildPartialOneofs(com.google.privacy.dlp.v2.CustomInfoType.Dictionary result) {
1611         result.sourceCase_ = sourceCase_;
1612         result.source_ = this.source_;
1613         if (sourceCase_ == 1 && wordListBuilder_ != null) {
1614           result.source_ = wordListBuilder_.build();
1615         }
1616         if (sourceCase_ == 3 && cloudStoragePathBuilder_ != null) {
1617           result.source_ = cloudStoragePathBuilder_.build();
1618         }
1619       }
1620 
1621       @java.lang.Override
clone()1622       public Builder clone() {
1623         return super.clone();
1624       }
1625 
1626       @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1627       public Builder setField(
1628           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1629         return super.setField(field, value);
1630       }
1631 
1632       @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1633       public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
1634         return super.clearField(field);
1635       }
1636 
1637       @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1638       public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1639         return super.clearOneof(oneof);
1640       }
1641 
1642       @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1643       public Builder setRepeatedField(
1644           com.google.protobuf.Descriptors.FieldDescriptor field,
1645           int index,
1646           java.lang.Object value) {
1647         return super.setRepeatedField(field, index, value);
1648       }
1649 
1650       @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1651       public Builder addRepeatedField(
1652           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1653         return super.addRepeatedField(field, value);
1654       }
1655 
1656       @java.lang.Override
mergeFrom(com.google.protobuf.Message other)1657       public Builder mergeFrom(com.google.protobuf.Message other) {
1658         if (other instanceof com.google.privacy.dlp.v2.CustomInfoType.Dictionary) {
1659           return mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.Dictionary) other);
1660         } else {
1661           super.mergeFrom(other);
1662           return this;
1663         }
1664       }
1665 
mergeFrom(com.google.privacy.dlp.v2.CustomInfoType.Dictionary other)1666       public Builder mergeFrom(com.google.privacy.dlp.v2.CustomInfoType.Dictionary other) {
1667         if (other == com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance())
1668           return this;
1669         switch (other.getSourceCase()) {
1670           case WORD_LIST:
1671             {
1672               mergeWordList(other.getWordList());
1673               break;
1674             }
1675           case CLOUD_STORAGE_PATH:
1676             {
1677               mergeCloudStoragePath(other.getCloudStoragePath());
1678               break;
1679             }
1680           case SOURCE_NOT_SET:
1681             {
1682               break;
1683             }
1684         }
1685         this.mergeUnknownFields(other.getUnknownFields());
1686         onChanged();
1687         return this;
1688       }
1689 
1690       @java.lang.Override
isInitialized()1691       public final boolean isInitialized() {
1692         return true;
1693       }
1694 
1695       @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1696       public Builder mergeFrom(
1697           com.google.protobuf.CodedInputStream input,
1698           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1699           throws java.io.IOException {
1700         if (extensionRegistry == null) {
1701           throw new java.lang.NullPointerException();
1702         }
1703         try {
1704           boolean done = false;
1705           while (!done) {
1706             int tag = input.readTag();
1707             switch (tag) {
1708               case 0:
1709                 done = true;
1710                 break;
1711               case 10:
1712                 {
1713                   input.readMessage(getWordListFieldBuilder().getBuilder(), extensionRegistry);
1714                   sourceCase_ = 1;
1715                   break;
1716                 } // case 10
1717               case 26:
1718                 {
1719                   input.readMessage(
1720                       getCloudStoragePathFieldBuilder().getBuilder(), extensionRegistry);
1721                   sourceCase_ = 3;
1722                   break;
1723                 } // case 26
1724               default:
1725                 {
1726                   if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1727                     done = true; // was an endgroup tag
1728                   }
1729                   break;
1730                 } // default:
1731             } // switch (tag)
1732           } // while (!done)
1733         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1734           throw e.unwrapIOException();
1735         } finally {
1736           onChanged();
1737         } // finally
1738         return this;
1739       }
1740 
1741       private int sourceCase_ = 0;
1742       private java.lang.Object source_;
1743 
getSourceCase()1744       public SourceCase getSourceCase() {
1745         return SourceCase.forNumber(sourceCase_);
1746       }
1747 
clearSource()1748       public Builder clearSource() {
1749         sourceCase_ = 0;
1750         source_ = null;
1751         onChanged();
1752         return this;
1753       }
1754 
1755       private int bitField0_;
1756 
1757       private com.google.protobuf.SingleFieldBuilderV3<
1758               com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList,
1759               com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder,
1760               com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder>
1761           wordListBuilder_;
1762       /**
1763        *
1764        *
1765        * <pre>
1766        * List of words or phrases to search for.
1767        * </pre>
1768        *
1769        * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
1770        *
1771        * @return Whether the wordList field is set.
1772        */
1773       @java.lang.Override
hasWordList()1774       public boolean hasWordList() {
1775         return sourceCase_ == 1;
1776       }
1777       /**
1778        *
1779        *
1780        * <pre>
1781        * List of words or phrases to search for.
1782        * </pre>
1783        *
1784        * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
1785        *
1786        * @return The wordList.
1787        */
1788       @java.lang.Override
getWordList()1789       public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList getWordList() {
1790         if (wordListBuilder_ == null) {
1791           if (sourceCase_ == 1) {
1792             return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_;
1793           }
1794           return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance();
1795         } else {
1796           if (sourceCase_ == 1) {
1797             return wordListBuilder_.getMessage();
1798           }
1799           return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance();
1800         }
1801       }
1802       /**
1803        *
1804        *
1805        * <pre>
1806        * List of words or phrases to search for.
1807        * </pre>
1808        *
1809        * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
1810        */
setWordList( com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList value)1811       public Builder setWordList(
1812           com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList value) {
1813         if (wordListBuilder_ == null) {
1814           if (value == null) {
1815             throw new NullPointerException();
1816           }
1817           source_ = value;
1818           onChanged();
1819         } else {
1820           wordListBuilder_.setMessage(value);
1821         }
1822         sourceCase_ = 1;
1823         return this;
1824       }
1825       /**
1826        *
1827        *
1828        * <pre>
1829        * List of words or phrases to search for.
1830        * </pre>
1831        *
1832        * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
1833        */
setWordList( com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder builderForValue)1834       public Builder setWordList(
1835           com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder builderForValue) {
1836         if (wordListBuilder_ == null) {
1837           source_ = builderForValue.build();
1838           onChanged();
1839         } else {
1840           wordListBuilder_.setMessage(builderForValue.build());
1841         }
1842         sourceCase_ = 1;
1843         return this;
1844       }
1845       /**
1846        *
1847        *
1848        * <pre>
1849        * List of words or phrases to search for.
1850        * </pre>
1851        *
1852        * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
1853        */
mergeWordList( com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList value)1854       public Builder mergeWordList(
1855           com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList value) {
1856         if (wordListBuilder_ == null) {
1857           if (sourceCase_ == 1
1858               && source_
1859                   != com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList
1860                       .getDefaultInstance()) {
1861             source_ =
1862                 com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.newBuilder(
1863                         (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_)
1864                     .mergeFrom(value)
1865                     .buildPartial();
1866           } else {
1867             source_ = value;
1868           }
1869           onChanged();
1870         } else {
1871           if (sourceCase_ == 1) {
1872             wordListBuilder_.mergeFrom(value);
1873           } else {
1874             wordListBuilder_.setMessage(value);
1875           }
1876         }
1877         sourceCase_ = 1;
1878         return this;
1879       }
1880       /**
1881        *
1882        *
1883        * <pre>
1884        * List of words or phrases to search for.
1885        * </pre>
1886        *
1887        * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
1888        */
clearWordList()1889       public Builder clearWordList() {
1890         if (wordListBuilder_ == null) {
1891           if (sourceCase_ == 1) {
1892             sourceCase_ = 0;
1893             source_ = null;
1894             onChanged();
1895           }
1896         } else {
1897           if (sourceCase_ == 1) {
1898             sourceCase_ = 0;
1899             source_ = null;
1900           }
1901           wordListBuilder_.clear();
1902         }
1903         return this;
1904       }
1905       /**
1906        *
1907        *
1908        * <pre>
1909        * List of words or phrases to search for.
1910        * </pre>
1911        *
1912        * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
1913        */
1914       public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder
getWordListBuilder()1915           getWordListBuilder() {
1916         return getWordListFieldBuilder().getBuilder();
1917       }
1918       /**
1919        *
1920        *
1921        * <pre>
1922        * List of words or phrases to search for.
1923        * </pre>
1924        *
1925        * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
1926        */
1927       @java.lang.Override
1928       public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder
getWordListOrBuilder()1929           getWordListOrBuilder() {
1930         if ((sourceCase_ == 1) && (wordListBuilder_ != null)) {
1931           return wordListBuilder_.getMessageOrBuilder();
1932         } else {
1933           if (sourceCase_ == 1) {
1934             return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_;
1935           }
1936           return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance();
1937         }
1938       }
1939       /**
1940        *
1941        *
1942        * <pre>
1943        * List of words or phrases to search for.
1944        * </pre>
1945        *
1946        * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1;</code>
1947        */
1948       private com.google.protobuf.SingleFieldBuilderV3<
1949               com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList,
1950               com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder,
1951               com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder>
getWordListFieldBuilder()1952           getWordListFieldBuilder() {
1953         if (wordListBuilder_ == null) {
1954           if (!(sourceCase_ == 1)) {
1955             source_ =
1956                 com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance();
1957           }
1958           wordListBuilder_ =
1959               new com.google.protobuf.SingleFieldBuilderV3<
1960                   com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList,
1961                   com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder,
1962                   com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder>(
1963                   (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_,
1964                   getParentForChildren(),
1965                   isClean());
1966           source_ = null;
1967         }
1968         sourceCase_ = 1;
1969         onChanged();
1970         return wordListBuilder_;
1971       }
1972 
1973       private com.google.protobuf.SingleFieldBuilderV3<
1974               com.google.privacy.dlp.v2.CloudStoragePath,
1975               com.google.privacy.dlp.v2.CloudStoragePath.Builder,
1976               com.google.privacy.dlp.v2.CloudStoragePathOrBuilder>
1977           cloudStoragePathBuilder_;
1978       /**
1979        *
1980        *
1981        * <pre>
1982        * Newline-delimited file of words in Cloud Storage. Only a single file
1983        * is accepted.
1984        * </pre>
1985        *
1986        * <code>.google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3;</code>
1987        *
1988        * @return Whether the cloudStoragePath field is set.
1989        */
1990       @java.lang.Override
hasCloudStoragePath()1991       public boolean hasCloudStoragePath() {
1992         return sourceCase_ == 3;
1993       }
1994       /**
1995        *
1996        *
1997        * <pre>
1998        * Newline-delimited file of words in Cloud Storage. Only a single file
1999        * is accepted.
2000        * </pre>
2001        *
2002        * <code>.google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3;</code>
2003        *
2004        * @return The cloudStoragePath.
2005        */
2006       @java.lang.Override
getCloudStoragePath()2007       public com.google.privacy.dlp.v2.CloudStoragePath getCloudStoragePath() {
2008         if (cloudStoragePathBuilder_ == null) {
2009           if (sourceCase_ == 3) {
2010             return (com.google.privacy.dlp.v2.CloudStoragePath) source_;
2011           }
2012           return com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance();
2013         } else {
2014           if (sourceCase_ == 3) {
2015             return cloudStoragePathBuilder_.getMessage();
2016           }
2017           return com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance();
2018         }
2019       }
2020       /**
2021        *
2022        *
2023        * <pre>
2024        * Newline-delimited file of words in Cloud Storage. Only a single file
2025        * is accepted.
2026        * </pre>
2027        *
2028        * <code>.google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3;</code>
2029        */
setCloudStoragePath(com.google.privacy.dlp.v2.CloudStoragePath value)2030       public Builder setCloudStoragePath(com.google.privacy.dlp.v2.CloudStoragePath value) {
2031         if (cloudStoragePathBuilder_ == null) {
2032           if (value == null) {
2033             throw new NullPointerException();
2034           }
2035           source_ = value;
2036           onChanged();
2037         } else {
2038           cloudStoragePathBuilder_.setMessage(value);
2039         }
2040         sourceCase_ = 3;
2041         return this;
2042       }
2043       /**
2044        *
2045        *
2046        * <pre>
2047        * Newline-delimited file of words in Cloud Storage. Only a single file
2048        * is accepted.
2049        * </pre>
2050        *
2051        * <code>.google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3;</code>
2052        */
setCloudStoragePath( com.google.privacy.dlp.v2.CloudStoragePath.Builder builderForValue)2053       public Builder setCloudStoragePath(
2054           com.google.privacy.dlp.v2.CloudStoragePath.Builder builderForValue) {
2055         if (cloudStoragePathBuilder_ == null) {
2056           source_ = builderForValue.build();
2057           onChanged();
2058         } else {
2059           cloudStoragePathBuilder_.setMessage(builderForValue.build());
2060         }
2061         sourceCase_ = 3;
2062         return this;
2063       }
2064       /**
2065        *
2066        *
2067        * <pre>
2068        * Newline-delimited file of words in Cloud Storage. Only a single file
2069        * is accepted.
2070        * </pre>
2071        *
2072        * <code>.google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3;</code>
2073        */
mergeCloudStoragePath(com.google.privacy.dlp.v2.CloudStoragePath value)2074       public Builder mergeCloudStoragePath(com.google.privacy.dlp.v2.CloudStoragePath value) {
2075         if (cloudStoragePathBuilder_ == null) {
2076           if (sourceCase_ == 3
2077               && source_ != com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance()) {
2078             source_ =
2079                 com.google.privacy.dlp.v2.CloudStoragePath.newBuilder(
2080                         (com.google.privacy.dlp.v2.CloudStoragePath) source_)
2081                     .mergeFrom(value)
2082                     .buildPartial();
2083           } else {
2084             source_ = value;
2085           }
2086           onChanged();
2087         } else {
2088           if (sourceCase_ == 3) {
2089             cloudStoragePathBuilder_.mergeFrom(value);
2090           } else {
2091             cloudStoragePathBuilder_.setMessage(value);
2092           }
2093         }
2094         sourceCase_ = 3;
2095         return this;
2096       }
2097       /**
2098        *
2099        *
2100        * <pre>
2101        * Newline-delimited file of words in Cloud Storage. Only a single file
2102        * is accepted.
2103        * </pre>
2104        *
2105        * <code>.google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3;</code>
2106        */
clearCloudStoragePath()2107       public Builder clearCloudStoragePath() {
2108         if (cloudStoragePathBuilder_ == null) {
2109           if (sourceCase_ == 3) {
2110             sourceCase_ = 0;
2111             source_ = null;
2112             onChanged();
2113           }
2114         } else {
2115           if (sourceCase_ == 3) {
2116             sourceCase_ = 0;
2117             source_ = null;
2118           }
2119           cloudStoragePathBuilder_.clear();
2120         }
2121         return this;
2122       }
2123       /**
2124        *
2125        *
2126        * <pre>
2127        * Newline-delimited file of words in Cloud Storage. Only a single file
2128        * is accepted.
2129        * </pre>
2130        *
2131        * <code>.google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3;</code>
2132        */
getCloudStoragePathBuilder()2133       public com.google.privacy.dlp.v2.CloudStoragePath.Builder getCloudStoragePathBuilder() {
2134         return getCloudStoragePathFieldBuilder().getBuilder();
2135       }
2136       /**
2137        *
2138        *
2139        * <pre>
2140        * Newline-delimited file of words in Cloud Storage. Only a single file
2141        * is accepted.
2142        * </pre>
2143        *
2144        * <code>.google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3;</code>
2145        */
2146       @java.lang.Override
getCloudStoragePathOrBuilder()2147       public com.google.privacy.dlp.v2.CloudStoragePathOrBuilder getCloudStoragePathOrBuilder() {
2148         if ((sourceCase_ == 3) && (cloudStoragePathBuilder_ != null)) {
2149           return cloudStoragePathBuilder_.getMessageOrBuilder();
2150         } else {
2151           if (sourceCase_ == 3) {
2152             return (com.google.privacy.dlp.v2.CloudStoragePath) source_;
2153           }
2154           return com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance();
2155         }
2156       }
2157       /**
2158        *
2159        *
2160        * <pre>
2161        * Newline-delimited file of words in Cloud Storage. Only a single file
2162        * is accepted.
2163        * </pre>
2164        *
2165        * <code>.google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3;</code>
2166        */
2167       private com.google.protobuf.SingleFieldBuilderV3<
2168               com.google.privacy.dlp.v2.CloudStoragePath,
2169               com.google.privacy.dlp.v2.CloudStoragePath.Builder,
2170               com.google.privacy.dlp.v2.CloudStoragePathOrBuilder>
getCloudStoragePathFieldBuilder()2171           getCloudStoragePathFieldBuilder() {
2172         if (cloudStoragePathBuilder_ == null) {
2173           if (!(sourceCase_ == 3)) {
2174             source_ = com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance();
2175           }
2176           cloudStoragePathBuilder_ =
2177               new com.google.protobuf.SingleFieldBuilderV3<
2178                   com.google.privacy.dlp.v2.CloudStoragePath,
2179                   com.google.privacy.dlp.v2.CloudStoragePath.Builder,
2180                   com.google.privacy.dlp.v2.CloudStoragePathOrBuilder>(
2181                   (com.google.privacy.dlp.v2.CloudStoragePath) source_,
2182                   getParentForChildren(),
2183                   isClean());
2184           source_ = null;
2185         }
2186         sourceCase_ = 3;
2187         onChanged();
2188         return cloudStoragePathBuilder_;
2189       }
2190 
2191       @java.lang.Override
setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2192       public final Builder setUnknownFields(
2193           final com.google.protobuf.UnknownFieldSet unknownFields) {
2194         return super.setUnknownFields(unknownFields);
2195       }
2196 
2197       @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2198       public final Builder mergeUnknownFields(
2199           final com.google.protobuf.UnknownFieldSet unknownFields) {
2200         return super.mergeUnknownFields(unknownFields);
2201       }
2202 
2203       // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType.Dictionary)
2204     }
2205 
2206     // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType.Dictionary)
2207     private static final com.google.privacy.dlp.v2.CustomInfoType.Dictionary DEFAULT_INSTANCE;
2208 
2209     static {
2210       DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType.Dictionary();
2211     }
2212 
getDefaultInstance()2213     public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDefaultInstance() {
2214       return DEFAULT_INSTANCE;
2215     }
2216 
2217     private static final com.google.protobuf.Parser<Dictionary> PARSER =
2218         new com.google.protobuf.AbstractParser<Dictionary>() {
2219           @java.lang.Override
2220           public Dictionary parsePartialFrom(
2221               com.google.protobuf.CodedInputStream input,
2222               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2223               throws com.google.protobuf.InvalidProtocolBufferException {
2224             Builder builder = newBuilder();
2225             try {
2226               builder.mergeFrom(input, extensionRegistry);
2227             } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2228               throw e.setUnfinishedMessage(builder.buildPartial());
2229             } catch (com.google.protobuf.UninitializedMessageException e) {
2230               throw e.asInvalidProtocolBufferException()
2231                   .setUnfinishedMessage(builder.buildPartial());
2232             } catch (java.io.IOException e) {
2233               throw new com.google.protobuf.InvalidProtocolBufferException(e)
2234                   .setUnfinishedMessage(builder.buildPartial());
2235             }
2236             return builder.buildPartial();
2237           }
2238         };
2239 
parser()2240     public static com.google.protobuf.Parser<Dictionary> parser() {
2241       return PARSER;
2242     }
2243 
2244     @java.lang.Override
getParserForType()2245     public com.google.protobuf.Parser<Dictionary> getParserForType() {
2246       return PARSER;
2247     }
2248 
2249     @java.lang.Override
getDefaultInstanceForType()2250     public com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDefaultInstanceForType() {
2251       return DEFAULT_INSTANCE;
2252     }
2253   }
2254 
2255   public interface RegexOrBuilder
2256       extends
2257       // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType.Regex)
2258       com.google.protobuf.MessageOrBuilder {
2259 
2260     /**
2261      *
2262      *
2263      * <pre>
2264      * Pattern defining the regular expression. Its syntax
2265      * (https://github.com/google/re2/wiki/Syntax) can be found under the
2266      * google/re2 repository on GitHub.
2267      * </pre>
2268      *
2269      * <code>string pattern = 1;</code>
2270      *
2271      * @return The pattern.
2272      */
getPattern()2273     java.lang.String getPattern();
2274     /**
2275      *
2276      *
2277      * <pre>
2278      * Pattern defining the regular expression. Its syntax
2279      * (https://github.com/google/re2/wiki/Syntax) can be found under the
2280      * google/re2 repository on GitHub.
2281      * </pre>
2282      *
2283      * <code>string pattern = 1;</code>
2284      *
2285      * @return The bytes for pattern.
2286      */
getPatternBytes()2287     com.google.protobuf.ByteString getPatternBytes();
2288 
2289     /**
2290      *
2291      *
2292      * <pre>
2293      * The index of the submatch to extract as findings. When not
2294      * specified, the entire match is returned. No more than 3 may be included.
2295      * </pre>
2296      *
2297      * <code>repeated int32 group_indexes = 2;</code>
2298      *
2299      * @return A list containing the groupIndexes.
2300      */
getGroupIndexesList()2301     java.util.List<java.lang.Integer> getGroupIndexesList();
2302     /**
2303      *
2304      *
2305      * <pre>
2306      * The index of the submatch to extract as findings. When not
2307      * specified, the entire match is returned. No more than 3 may be included.
2308      * </pre>
2309      *
2310      * <code>repeated int32 group_indexes = 2;</code>
2311      *
2312      * @return The count of groupIndexes.
2313      */
getGroupIndexesCount()2314     int getGroupIndexesCount();
2315     /**
2316      *
2317      *
2318      * <pre>
2319      * The index of the submatch to extract as findings. When not
2320      * specified, the entire match is returned. No more than 3 may be included.
2321      * </pre>
2322      *
2323      * <code>repeated int32 group_indexes = 2;</code>
2324      *
2325      * @param index The index of the element to return.
2326      * @return The groupIndexes at the given index.
2327      */
getGroupIndexes(int index)2328     int getGroupIndexes(int index);
2329   }
2330   /**
2331    *
2332    *
2333    * <pre>
2334    * Message defining a custom regular expression.
2335    * </pre>
2336    *
2337    * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.Regex}
2338    */
2339   public static final class Regex extends com.google.protobuf.GeneratedMessageV3
2340       implements
2341       // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType.Regex)
2342       RegexOrBuilder {
2343     private static final long serialVersionUID = 0L;
2344     // Use Regex.newBuilder() to construct.
Regex(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)2345     private Regex(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
2346       super(builder);
2347     }
2348 
Regex()2349     private Regex() {
2350       pattern_ = "";
2351       groupIndexes_ = emptyIntList();
2352     }
2353 
2354     @java.lang.Override
2355     @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)2356     protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
2357       return new Regex();
2358     }
2359 
2360     @java.lang.Override
getUnknownFields()2361     public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
2362       return this.unknownFields;
2363     }
2364 
getDescriptor()2365     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
2366       return com.google.privacy.dlp.v2.DlpStorage
2367           .internal_static_google_privacy_dlp_v2_CustomInfoType_Regex_descriptor;
2368     }
2369 
2370     @java.lang.Override
2371     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()2372         internalGetFieldAccessorTable() {
2373       return com.google.privacy.dlp.v2.DlpStorage
2374           .internal_static_google_privacy_dlp_v2_CustomInfoType_Regex_fieldAccessorTable
2375           .ensureFieldAccessorsInitialized(
2376               com.google.privacy.dlp.v2.CustomInfoType.Regex.class,
2377               com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder.class);
2378     }
2379 
2380     public static final int PATTERN_FIELD_NUMBER = 1;
2381 
2382     @SuppressWarnings("serial")
2383     private volatile java.lang.Object pattern_ = "";
2384     /**
2385      *
2386      *
2387      * <pre>
2388      * Pattern defining the regular expression. Its syntax
2389      * (https://github.com/google/re2/wiki/Syntax) can be found under the
2390      * google/re2 repository on GitHub.
2391      * </pre>
2392      *
2393      * <code>string pattern = 1;</code>
2394      *
2395      * @return The pattern.
2396      */
2397     @java.lang.Override
getPattern()2398     public java.lang.String getPattern() {
2399       java.lang.Object ref = pattern_;
2400       if (ref instanceof java.lang.String) {
2401         return (java.lang.String) ref;
2402       } else {
2403         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2404         java.lang.String s = bs.toStringUtf8();
2405         pattern_ = s;
2406         return s;
2407       }
2408     }
2409     /**
2410      *
2411      *
2412      * <pre>
2413      * Pattern defining the regular expression. Its syntax
2414      * (https://github.com/google/re2/wiki/Syntax) can be found under the
2415      * google/re2 repository on GitHub.
2416      * </pre>
2417      *
2418      * <code>string pattern = 1;</code>
2419      *
2420      * @return The bytes for pattern.
2421      */
2422     @java.lang.Override
getPatternBytes()2423     public com.google.protobuf.ByteString getPatternBytes() {
2424       java.lang.Object ref = pattern_;
2425       if (ref instanceof java.lang.String) {
2426         com.google.protobuf.ByteString b =
2427             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2428         pattern_ = b;
2429         return b;
2430       } else {
2431         return (com.google.protobuf.ByteString) ref;
2432       }
2433     }
2434 
2435     public static final int GROUP_INDEXES_FIELD_NUMBER = 2;
2436 
2437     @SuppressWarnings("serial")
2438     private com.google.protobuf.Internal.IntList groupIndexes_;
2439     /**
2440      *
2441      *
2442      * <pre>
2443      * The index of the submatch to extract as findings. When not
2444      * specified, the entire match is returned. No more than 3 may be included.
2445      * </pre>
2446      *
2447      * <code>repeated int32 group_indexes = 2;</code>
2448      *
2449      * @return A list containing the groupIndexes.
2450      */
2451     @java.lang.Override
getGroupIndexesList()2452     public java.util.List<java.lang.Integer> getGroupIndexesList() {
2453       return groupIndexes_;
2454     }
2455     /**
2456      *
2457      *
2458      * <pre>
2459      * The index of the submatch to extract as findings. When not
2460      * specified, the entire match is returned. No more than 3 may be included.
2461      * </pre>
2462      *
2463      * <code>repeated int32 group_indexes = 2;</code>
2464      *
2465      * @return The count of groupIndexes.
2466      */
getGroupIndexesCount()2467     public int getGroupIndexesCount() {
2468       return groupIndexes_.size();
2469     }
2470     /**
2471      *
2472      *
2473      * <pre>
2474      * The index of the submatch to extract as findings. When not
2475      * specified, the entire match is returned. No more than 3 may be included.
2476      * </pre>
2477      *
2478      * <code>repeated int32 group_indexes = 2;</code>
2479      *
2480      * @param index The index of the element to return.
2481      * @return The groupIndexes at the given index.
2482      */
getGroupIndexes(int index)2483     public int getGroupIndexes(int index) {
2484       return groupIndexes_.getInt(index);
2485     }
2486 
2487     private int groupIndexesMemoizedSerializedSize = -1;
2488 
2489     private byte memoizedIsInitialized = -1;
2490 
2491     @java.lang.Override
isInitialized()2492     public final boolean isInitialized() {
2493       byte isInitialized = memoizedIsInitialized;
2494       if (isInitialized == 1) return true;
2495       if (isInitialized == 0) return false;
2496 
2497       memoizedIsInitialized = 1;
2498       return true;
2499     }
2500 
2501     @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)2502     public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
2503       getSerializedSize();
2504       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pattern_)) {
2505         com.google.protobuf.GeneratedMessageV3.writeString(output, 1, pattern_);
2506       }
2507       if (getGroupIndexesList().size() > 0) {
2508         output.writeUInt32NoTag(18);
2509         output.writeUInt32NoTag(groupIndexesMemoizedSerializedSize);
2510       }
2511       for (int i = 0; i < groupIndexes_.size(); i++) {
2512         output.writeInt32NoTag(groupIndexes_.getInt(i));
2513       }
2514       getUnknownFields().writeTo(output);
2515     }
2516 
2517     @java.lang.Override
getSerializedSize()2518     public int getSerializedSize() {
2519       int size = memoizedSize;
2520       if (size != -1) return size;
2521 
2522       size = 0;
2523       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pattern_)) {
2524         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, pattern_);
2525       }
2526       {
2527         int dataSize = 0;
2528         for (int i = 0; i < groupIndexes_.size(); i++) {
2529           dataSize +=
2530               com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(groupIndexes_.getInt(i));
2531         }
2532         size += dataSize;
2533         if (!getGroupIndexesList().isEmpty()) {
2534           size += 1;
2535           size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
2536         }
2537         groupIndexesMemoizedSerializedSize = dataSize;
2538       }
2539       size += getUnknownFields().getSerializedSize();
2540       memoizedSize = size;
2541       return size;
2542     }
2543 
2544     @java.lang.Override
equals(final java.lang.Object obj)2545     public boolean equals(final java.lang.Object obj) {
2546       if (obj == this) {
2547         return true;
2548       }
2549       if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType.Regex)) {
2550         return super.equals(obj);
2551       }
2552       com.google.privacy.dlp.v2.CustomInfoType.Regex other =
2553           (com.google.privacy.dlp.v2.CustomInfoType.Regex) obj;
2554 
2555       if (!getPattern().equals(other.getPattern())) return false;
2556       if (!getGroupIndexesList().equals(other.getGroupIndexesList())) return false;
2557       if (!getUnknownFields().equals(other.getUnknownFields())) return false;
2558       return true;
2559     }
2560 
2561     @java.lang.Override
hashCode()2562     public int hashCode() {
2563       if (memoizedHashCode != 0) {
2564         return memoizedHashCode;
2565       }
2566       int hash = 41;
2567       hash = (19 * hash) + getDescriptor().hashCode();
2568       hash = (37 * hash) + PATTERN_FIELD_NUMBER;
2569       hash = (53 * hash) + getPattern().hashCode();
2570       if (getGroupIndexesCount() > 0) {
2571         hash = (37 * hash) + GROUP_INDEXES_FIELD_NUMBER;
2572         hash = (53 * hash) + getGroupIndexesList().hashCode();
2573       }
2574       hash = (29 * hash) + getUnknownFields().hashCode();
2575       memoizedHashCode = hash;
2576       return hash;
2577     }
2578 
parseFrom(java.nio.ByteBuffer data)2579     public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom(java.nio.ByteBuffer data)
2580         throws com.google.protobuf.InvalidProtocolBufferException {
2581       return PARSER.parseFrom(data);
2582     }
2583 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2584     public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom(
2585         java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2586         throws com.google.protobuf.InvalidProtocolBufferException {
2587       return PARSER.parseFrom(data, extensionRegistry);
2588     }
2589 
parseFrom( com.google.protobuf.ByteString data)2590     public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom(
2591         com.google.protobuf.ByteString data)
2592         throws com.google.protobuf.InvalidProtocolBufferException {
2593       return PARSER.parseFrom(data);
2594     }
2595 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2596     public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom(
2597         com.google.protobuf.ByteString data,
2598         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2599         throws com.google.protobuf.InvalidProtocolBufferException {
2600       return PARSER.parseFrom(data, extensionRegistry);
2601     }
2602 
parseFrom(byte[] data)2603     public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom(byte[] data)
2604         throws com.google.protobuf.InvalidProtocolBufferException {
2605       return PARSER.parseFrom(data);
2606     }
2607 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2608     public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom(
2609         byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2610         throws com.google.protobuf.InvalidProtocolBufferException {
2611       return PARSER.parseFrom(data, extensionRegistry);
2612     }
2613 
parseFrom( java.io.InputStream input)2614     public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom(
2615         java.io.InputStream input) throws java.io.IOException {
2616       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
2617     }
2618 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2619     public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom(
2620         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2621         throws java.io.IOException {
2622       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
2623           PARSER, input, extensionRegistry);
2624     }
2625 
parseDelimitedFrom( java.io.InputStream input)2626     public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseDelimitedFrom(
2627         java.io.InputStream input) throws java.io.IOException {
2628       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
2629     }
2630 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2631     public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseDelimitedFrom(
2632         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2633         throws java.io.IOException {
2634       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
2635           PARSER, input, extensionRegistry);
2636     }
2637 
parseFrom( com.google.protobuf.CodedInputStream input)2638     public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom(
2639         com.google.protobuf.CodedInputStream input) throws java.io.IOException {
2640       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
2641     }
2642 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2643     public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom(
2644         com.google.protobuf.CodedInputStream input,
2645         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2646         throws java.io.IOException {
2647       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
2648           PARSER, input, extensionRegistry);
2649     }
2650 
2651     @java.lang.Override
newBuilderForType()2652     public Builder newBuilderForType() {
2653       return newBuilder();
2654     }
2655 
newBuilder()2656     public static Builder newBuilder() {
2657       return DEFAULT_INSTANCE.toBuilder();
2658     }
2659 
newBuilder(com.google.privacy.dlp.v2.CustomInfoType.Regex prototype)2660     public static Builder newBuilder(com.google.privacy.dlp.v2.CustomInfoType.Regex prototype) {
2661       return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
2662     }
2663 
2664     @java.lang.Override
toBuilder()2665     public Builder toBuilder() {
2666       return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
2667     }
2668 
2669     @java.lang.Override
newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)2670     protected Builder newBuilderForType(
2671         com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
2672       Builder builder = new Builder(parent);
2673       return builder;
2674     }
2675     /**
2676      *
2677      *
2678      * <pre>
2679      * Message defining a custom regular expression.
2680      * </pre>
2681      *
2682      * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.Regex}
2683      */
2684     public static final class Builder
2685         extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
2686         implements
2687         // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType.Regex)
2688         com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder {
getDescriptor()2689       public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
2690         return com.google.privacy.dlp.v2.DlpStorage
2691             .internal_static_google_privacy_dlp_v2_CustomInfoType_Regex_descriptor;
2692       }
2693 
2694       @java.lang.Override
2695       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()2696           internalGetFieldAccessorTable() {
2697         return com.google.privacy.dlp.v2.DlpStorage
2698             .internal_static_google_privacy_dlp_v2_CustomInfoType_Regex_fieldAccessorTable
2699             .ensureFieldAccessorsInitialized(
2700                 com.google.privacy.dlp.v2.CustomInfoType.Regex.class,
2701                 com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder.class);
2702       }
2703 
2704       // Construct using com.google.privacy.dlp.v2.CustomInfoType.Regex.newBuilder()
Builder()2705       private Builder() {}
2706 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)2707       private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
2708         super(parent);
2709       }
2710 
2711       @java.lang.Override
clear()2712       public Builder clear() {
2713         super.clear();
2714         bitField0_ = 0;
2715         pattern_ = "";
2716         groupIndexes_ = emptyIntList();
2717         return this;
2718       }
2719 
2720       @java.lang.Override
getDescriptorForType()2721       public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
2722         return com.google.privacy.dlp.v2.DlpStorage
2723             .internal_static_google_privacy_dlp_v2_CustomInfoType_Regex_descriptor;
2724       }
2725 
2726       @java.lang.Override
getDefaultInstanceForType()2727       public com.google.privacy.dlp.v2.CustomInfoType.Regex getDefaultInstanceForType() {
2728         return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance();
2729       }
2730 
2731       @java.lang.Override
build()2732       public com.google.privacy.dlp.v2.CustomInfoType.Regex build() {
2733         com.google.privacy.dlp.v2.CustomInfoType.Regex result = buildPartial();
2734         if (!result.isInitialized()) {
2735           throw newUninitializedMessageException(result);
2736         }
2737         return result;
2738       }
2739 
2740       @java.lang.Override
buildPartial()2741       public com.google.privacy.dlp.v2.CustomInfoType.Regex buildPartial() {
2742         com.google.privacy.dlp.v2.CustomInfoType.Regex result =
2743             new com.google.privacy.dlp.v2.CustomInfoType.Regex(this);
2744         buildPartialRepeatedFields(result);
2745         if (bitField0_ != 0) {
2746           buildPartial0(result);
2747         }
2748         onBuilt();
2749         return result;
2750       }
2751 
buildPartialRepeatedFields( com.google.privacy.dlp.v2.CustomInfoType.Regex result)2752       private void buildPartialRepeatedFields(
2753           com.google.privacy.dlp.v2.CustomInfoType.Regex result) {
2754         if (((bitField0_ & 0x00000002) != 0)) {
2755           groupIndexes_.makeImmutable();
2756           bitField0_ = (bitField0_ & ~0x00000002);
2757         }
2758         result.groupIndexes_ = groupIndexes_;
2759       }
2760 
buildPartial0(com.google.privacy.dlp.v2.CustomInfoType.Regex result)2761       private void buildPartial0(com.google.privacy.dlp.v2.CustomInfoType.Regex result) {
2762         int from_bitField0_ = bitField0_;
2763         if (((from_bitField0_ & 0x00000001) != 0)) {
2764           result.pattern_ = pattern_;
2765         }
2766       }
2767 
2768       @java.lang.Override
clone()2769       public Builder clone() {
2770         return super.clone();
2771       }
2772 
2773       @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)2774       public Builder setField(
2775           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
2776         return super.setField(field, value);
2777       }
2778 
2779       @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)2780       public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
2781         return super.clearField(field);
2782       }
2783 
2784       @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)2785       public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
2786         return super.clearOneof(oneof);
2787       }
2788 
2789       @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)2790       public Builder setRepeatedField(
2791           com.google.protobuf.Descriptors.FieldDescriptor field,
2792           int index,
2793           java.lang.Object value) {
2794         return super.setRepeatedField(field, index, value);
2795       }
2796 
2797       @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)2798       public Builder addRepeatedField(
2799           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
2800         return super.addRepeatedField(field, value);
2801       }
2802 
2803       @java.lang.Override
mergeFrom(com.google.protobuf.Message other)2804       public Builder mergeFrom(com.google.protobuf.Message other) {
2805         if (other instanceof com.google.privacy.dlp.v2.CustomInfoType.Regex) {
2806           return mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.Regex) other);
2807         } else {
2808           super.mergeFrom(other);
2809           return this;
2810         }
2811       }
2812 
mergeFrom(com.google.privacy.dlp.v2.CustomInfoType.Regex other)2813       public Builder mergeFrom(com.google.privacy.dlp.v2.CustomInfoType.Regex other) {
2814         if (other == com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance())
2815           return this;
2816         if (!other.getPattern().isEmpty()) {
2817           pattern_ = other.pattern_;
2818           bitField0_ |= 0x00000001;
2819           onChanged();
2820         }
2821         if (!other.groupIndexes_.isEmpty()) {
2822           if (groupIndexes_.isEmpty()) {
2823             groupIndexes_ = other.groupIndexes_;
2824             bitField0_ = (bitField0_ & ~0x00000002);
2825           } else {
2826             ensureGroupIndexesIsMutable();
2827             groupIndexes_.addAll(other.groupIndexes_);
2828           }
2829           onChanged();
2830         }
2831         this.mergeUnknownFields(other.getUnknownFields());
2832         onChanged();
2833         return this;
2834       }
2835 
2836       @java.lang.Override
isInitialized()2837       public final boolean isInitialized() {
2838         return true;
2839       }
2840 
2841       @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2842       public Builder mergeFrom(
2843           com.google.protobuf.CodedInputStream input,
2844           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2845           throws java.io.IOException {
2846         if (extensionRegistry == null) {
2847           throw new java.lang.NullPointerException();
2848         }
2849         try {
2850           boolean done = false;
2851           while (!done) {
2852             int tag = input.readTag();
2853             switch (tag) {
2854               case 0:
2855                 done = true;
2856                 break;
2857               case 10:
2858                 {
2859                   pattern_ = input.readStringRequireUtf8();
2860                   bitField0_ |= 0x00000001;
2861                   break;
2862                 } // case 10
2863               case 16:
2864                 {
2865                   int v = input.readInt32();
2866                   ensureGroupIndexesIsMutable();
2867                   groupIndexes_.addInt(v);
2868                   break;
2869                 } // case 16
2870               case 18:
2871                 {
2872                   int length = input.readRawVarint32();
2873                   int limit = input.pushLimit(length);
2874                   ensureGroupIndexesIsMutable();
2875                   while (input.getBytesUntilLimit() > 0) {
2876                     groupIndexes_.addInt(input.readInt32());
2877                   }
2878                   input.popLimit(limit);
2879                   break;
2880                 } // case 18
2881               default:
2882                 {
2883                   if (!super.parseUnknownField(input, extensionRegistry, tag)) {
2884                     done = true; // was an endgroup tag
2885                   }
2886                   break;
2887                 } // default:
2888             } // switch (tag)
2889           } // while (!done)
2890         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2891           throw e.unwrapIOException();
2892         } finally {
2893           onChanged();
2894         } // finally
2895         return this;
2896       }
2897 
2898       private int bitField0_;
2899 
2900       private java.lang.Object pattern_ = "";
2901       /**
2902        *
2903        *
2904        * <pre>
2905        * Pattern defining the regular expression. Its syntax
2906        * (https://github.com/google/re2/wiki/Syntax) can be found under the
2907        * google/re2 repository on GitHub.
2908        * </pre>
2909        *
2910        * <code>string pattern = 1;</code>
2911        *
2912        * @return The pattern.
2913        */
getPattern()2914       public java.lang.String getPattern() {
2915         java.lang.Object ref = pattern_;
2916         if (!(ref instanceof java.lang.String)) {
2917           com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2918           java.lang.String s = bs.toStringUtf8();
2919           pattern_ = s;
2920           return s;
2921         } else {
2922           return (java.lang.String) ref;
2923         }
2924       }
2925       /**
2926        *
2927        *
2928        * <pre>
2929        * Pattern defining the regular expression. Its syntax
2930        * (https://github.com/google/re2/wiki/Syntax) can be found under the
2931        * google/re2 repository on GitHub.
2932        * </pre>
2933        *
2934        * <code>string pattern = 1;</code>
2935        *
2936        * @return The bytes for pattern.
2937        */
getPatternBytes()2938       public com.google.protobuf.ByteString getPatternBytes() {
2939         java.lang.Object ref = pattern_;
2940         if (ref instanceof String) {
2941           com.google.protobuf.ByteString b =
2942               com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2943           pattern_ = b;
2944           return b;
2945         } else {
2946           return (com.google.protobuf.ByteString) ref;
2947         }
2948       }
2949       /**
2950        *
2951        *
2952        * <pre>
2953        * Pattern defining the regular expression. Its syntax
2954        * (https://github.com/google/re2/wiki/Syntax) can be found under the
2955        * google/re2 repository on GitHub.
2956        * </pre>
2957        *
2958        * <code>string pattern = 1;</code>
2959        *
2960        * @param value The pattern to set.
2961        * @return This builder for chaining.
2962        */
setPattern(java.lang.String value)2963       public Builder setPattern(java.lang.String value) {
2964         if (value == null) {
2965           throw new NullPointerException();
2966         }
2967         pattern_ = value;
2968         bitField0_ |= 0x00000001;
2969         onChanged();
2970         return this;
2971       }
2972       /**
2973        *
2974        *
2975        * <pre>
2976        * Pattern defining the regular expression. Its syntax
2977        * (https://github.com/google/re2/wiki/Syntax) can be found under the
2978        * google/re2 repository on GitHub.
2979        * </pre>
2980        *
2981        * <code>string pattern = 1;</code>
2982        *
2983        * @return This builder for chaining.
2984        */
clearPattern()2985       public Builder clearPattern() {
2986         pattern_ = getDefaultInstance().getPattern();
2987         bitField0_ = (bitField0_ & ~0x00000001);
2988         onChanged();
2989         return this;
2990       }
2991       /**
2992        *
2993        *
2994        * <pre>
2995        * Pattern defining the regular expression. Its syntax
2996        * (https://github.com/google/re2/wiki/Syntax) can be found under the
2997        * google/re2 repository on GitHub.
2998        * </pre>
2999        *
3000        * <code>string pattern = 1;</code>
3001        *
3002        * @param value The bytes for pattern to set.
3003        * @return This builder for chaining.
3004        */
setPatternBytes(com.google.protobuf.ByteString value)3005       public Builder setPatternBytes(com.google.protobuf.ByteString value) {
3006         if (value == null) {
3007           throw new NullPointerException();
3008         }
3009         checkByteStringIsUtf8(value);
3010         pattern_ = value;
3011         bitField0_ |= 0x00000001;
3012         onChanged();
3013         return this;
3014       }
3015 
3016       private com.google.protobuf.Internal.IntList groupIndexes_ = emptyIntList();
3017 
ensureGroupIndexesIsMutable()3018       private void ensureGroupIndexesIsMutable() {
3019         if (!((bitField0_ & 0x00000002) != 0)) {
3020           groupIndexes_ = mutableCopy(groupIndexes_);
3021           bitField0_ |= 0x00000002;
3022         }
3023       }
3024       /**
3025        *
3026        *
3027        * <pre>
3028        * The index of the submatch to extract as findings. When not
3029        * specified, the entire match is returned. No more than 3 may be included.
3030        * </pre>
3031        *
3032        * <code>repeated int32 group_indexes = 2;</code>
3033        *
3034        * @return A list containing the groupIndexes.
3035        */
getGroupIndexesList()3036       public java.util.List<java.lang.Integer> getGroupIndexesList() {
3037         return ((bitField0_ & 0x00000002) != 0)
3038             ? java.util.Collections.unmodifiableList(groupIndexes_)
3039             : groupIndexes_;
3040       }
3041       /**
3042        *
3043        *
3044        * <pre>
3045        * The index of the submatch to extract as findings. When not
3046        * specified, the entire match is returned. No more than 3 may be included.
3047        * </pre>
3048        *
3049        * <code>repeated int32 group_indexes = 2;</code>
3050        *
3051        * @return The count of groupIndexes.
3052        */
getGroupIndexesCount()3053       public int getGroupIndexesCount() {
3054         return groupIndexes_.size();
3055       }
3056       /**
3057        *
3058        *
3059        * <pre>
3060        * The index of the submatch to extract as findings. When not
3061        * specified, the entire match is returned. No more than 3 may be included.
3062        * </pre>
3063        *
3064        * <code>repeated int32 group_indexes = 2;</code>
3065        *
3066        * @param index The index of the element to return.
3067        * @return The groupIndexes at the given index.
3068        */
getGroupIndexes(int index)3069       public int getGroupIndexes(int index) {
3070         return groupIndexes_.getInt(index);
3071       }
3072       /**
3073        *
3074        *
3075        * <pre>
3076        * The index of the submatch to extract as findings. When not
3077        * specified, the entire match is returned. No more than 3 may be included.
3078        * </pre>
3079        *
3080        * <code>repeated int32 group_indexes = 2;</code>
3081        *
3082        * @param index The index to set the value at.
3083        * @param value The groupIndexes to set.
3084        * @return This builder for chaining.
3085        */
setGroupIndexes(int index, int value)3086       public Builder setGroupIndexes(int index, int value) {
3087 
3088         ensureGroupIndexesIsMutable();
3089         groupIndexes_.setInt(index, value);
3090         onChanged();
3091         return this;
3092       }
3093       /**
3094        *
3095        *
3096        * <pre>
3097        * The index of the submatch to extract as findings. When not
3098        * specified, the entire match is returned. No more than 3 may be included.
3099        * </pre>
3100        *
3101        * <code>repeated int32 group_indexes = 2;</code>
3102        *
3103        * @param value The groupIndexes to add.
3104        * @return This builder for chaining.
3105        */
addGroupIndexes(int value)3106       public Builder addGroupIndexes(int value) {
3107 
3108         ensureGroupIndexesIsMutable();
3109         groupIndexes_.addInt(value);
3110         onChanged();
3111         return this;
3112       }
3113       /**
3114        *
3115        *
3116        * <pre>
3117        * The index of the submatch to extract as findings. When not
3118        * specified, the entire match is returned. No more than 3 may be included.
3119        * </pre>
3120        *
3121        * <code>repeated int32 group_indexes = 2;</code>
3122        *
3123        * @param values The groupIndexes to add.
3124        * @return This builder for chaining.
3125        */
addAllGroupIndexes(java.lang.Iterable<? extends java.lang.Integer> values)3126       public Builder addAllGroupIndexes(java.lang.Iterable<? extends java.lang.Integer> values) {
3127         ensureGroupIndexesIsMutable();
3128         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, groupIndexes_);
3129         onChanged();
3130         return this;
3131       }
3132       /**
3133        *
3134        *
3135        * <pre>
3136        * The index of the submatch to extract as findings. When not
3137        * specified, the entire match is returned. No more than 3 may be included.
3138        * </pre>
3139        *
3140        * <code>repeated int32 group_indexes = 2;</code>
3141        *
3142        * @return This builder for chaining.
3143        */
clearGroupIndexes()3144       public Builder clearGroupIndexes() {
3145         groupIndexes_ = emptyIntList();
3146         bitField0_ = (bitField0_ & ~0x00000002);
3147         onChanged();
3148         return this;
3149       }
3150 
3151       @java.lang.Override
setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)3152       public final Builder setUnknownFields(
3153           final com.google.protobuf.UnknownFieldSet unknownFields) {
3154         return super.setUnknownFields(unknownFields);
3155       }
3156 
3157       @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)3158       public final Builder mergeUnknownFields(
3159           final com.google.protobuf.UnknownFieldSet unknownFields) {
3160         return super.mergeUnknownFields(unknownFields);
3161       }
3162 
3163       // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType.Regex)
3164     }
3165 
3166     // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType.Regex)
3167     private static final com.google.privacy.dlp.v2.CustomInfoType.Regex DEFAULT_INSTANCE;
3168 
3169     static {
3170       DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType.Regex();
3171     }
3172 
getDefaultInstance()3173     public static com.google.privacy.dlp.v2.CustomInfoType.Regex getDefaultInstance() {
3174       return DEFAULT_INSTANCE;
3175     }
3176 
3177     private static final com.google.protobuf.Parser<Regex> PARSER =
3178         new com.google.protobuf.AbstractParser<Regex>() {
3179           @java.lang.Override
3180           public Regex parsePartialFrom(
3181               com.google.protobuf.CodedInputStream input,
3182               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3183               throws com.google.protobuf.InvalidProtocolBufferException {
3184             Builder builder = newBuilder();
3185             try {
3186               builder.mergeFrom(input, extensionRegistry);
3187             } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3188               throw e.setUnfinishedMessage(builder.buildPartial());
3189             } catch (com.google.protobuf.UninitializedMessageException e) {
3190               throw e.asInvalidProtocolBufferException()
3191                   .setUnfinishedMessage(builder.buildPartial());
3192             } catch (java.io.IOException e) {
3193               throw new com.google.protobuf.InvalidProtocolBufferException(e)
3194                   .setUnfinishedMessage(builder.buildPartial());
3195             }
3196             return builder.buildPartial();
3197           }
3198         };
3199 
parser()3200     public static com.google.protobuf.Parser<Regex> parser() {
3201       return PARSER;
3202     }
3203 
3204     @java.lang.Override
getParserForType()3205     public com.google.protobuf.Parser<Regex> getParserForType() {
3206       return PARSER;
3207     }
3208 
3209     @java.lang.Override
getDefaultInstanceForType()3210     public com.google.privacy.dlp.v2.CustomInfoType.Regex getDefaultInstanceForType() {
3211       return DEFAULT_INSTANCE;
3212     }
3213   }
3214 
3215   public interface SurrogateTypeOrBuilder
3216       extends
3217       // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType.SurrogateType)
3218       com.google.protobuf.MessageOrBuilder {}
3219   /**
3220    *
3221    *
3222    * <pre>
3223    * Message for detecting output from deidentification transformations
3224    * such as
3225    * [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
3226    * These types of transformations are
3227    * those that perform pseudonymization, thereby producing a "surrogate" as
3228    * output. This should be used in conjunction with a field on the
3229    * transformation such as `surrogate_info_type`. This CustomInfoType does
3230    * not support the use of `detection_rules`.
3231    * </pre>
3232    *
3233    * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.SurrogateType}
3234    */
3235   public static final class SurrogateType extends com.google.protobuf.GeneratedMessageV3
3236       implements
3237       // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType.SurrogateType)
3238       SurrogateTypeOrBuilder {
3239     private static final long serialVersionUID = 0L;
3240     // Use SurrogateType.newBuilder() to construct.
SurrogateType(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)3241     private SurrogateType(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
3242       super(builder);
3243     }
3244 
SurrogateType()3245     private SurrogateType() {}
3246 
3247     @java.lang.Override
3248     @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)3249     protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
3250       return new SurrogateType();
3251     }
3252 
3253     @java.lang.Override
getUnknownFields()3254     public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
3255       return this.unknownFields;
3256     }
3257 
getDescriptor()3258     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
3259       return com.google.privacy.dlp.v2.DlpStorage
3260           .internal_static_google_privacy_dlp_v2_CustomInfoType_SurrogateType_descriptor;
3261     }
3262 
3263     @java.lang.Override
3264     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()3265         internalGetFieldAccessorTable() {
3266       return com.google.privacy.dlp.v2.DlpStorage
3267           .internal_static_google_privacy_dlp_v2_CustomInfoType_SurrogateType_fieldAccessorTable
3268           .ensureFieldAccessorsInitialized(
3269               com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.class,
3270               com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder.class);
3271     }
3272 
3273     private byte memoizedIsInitialized = -1;
3274 
3275     @java.lang.Override
isInitialized()3276     public final boolean isInitialized() {
3277       byte isInitialized = memoizedIsInitialized;
3278       if (isInitialized == 1) return true;
3279       if (isInitialized == 0) return false;
3280 
3281       memoizedIsInitialized = 1;
3282       return true;
3283     }
3284 
3285     @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)3286     public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
3287       getUnknownFields().writeTo(output);
3288     }
3289 
3290     @java.lang.Override
getSerializedSize()3291     public int getSerializedSize() {
3292       int size = memoizedSize;
3293       if (size != -1) return size;
3294 
3295       size = 0;
3296       size += getUnknownFields().getSerializedSize();
3297       memoizedSize = size;
3298       return size;
3299     }
3300 
3301     @java.lang.Override
equals(final java.lang.Object obj)3302     public boolean equals(final java.lang.Object obj) {
3303       if (obj == this) {
3304         return true;
3305       }
3306       if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType.SurrogateType)) {
3307         return super.equals(obj);
3308       }
3309       com.google.privacy.dlp.v2.CustomInfoType.SurrogateType other =
3310           (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) obj;
3311 
3312       if (!getUnknownFields().equals(other.getUnknownFields())) return false;
3313       return true;
3314     }
3315 
3316     @java.lang.Override
hashCode()3317     public int hashCode() {
3318       if (memoizedHashCode != 0) {
3319         return memoizedHashCode;
3320       }
3321       int hash = 41;
3322       hash = (19 * hash) + getDescriptor().hashCode();
3323       hash = (29 * hash) + getUnknownFields().hashCode();
3324       memoizedHashCode = hash;
3325       return hash;
3326     }
3327 
parseFrom( java.nio.ByteBuffer data)3328     public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom(
3329         java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
3330       return PARSER.parseFrom(data);
3331     }
3332 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3333     public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom(
3334         java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3335         throws com.google.protobuf.InvalidProtocolBufferException {
3336       return PARSER.parseFrom(data, extensionRegistry);
3337     }
3338 
parseFrom( com.google.protobuf.ByteString data)3339     public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom(
3340         com.google.protobuf.ByteString data)
3341         throws com.google.protobuf.InvalidProtocolBufferException {
3342       return PARSER.parseFrom(data);
3343     }
3344 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3345     public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom(
3346         com.google.protobuf.ByteString data,
3347         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3348         throws com.google.protobuf.InvalidProtocolBufferException {
3349       return PARSER.parseFrom(data, extensionRegistry);
3350     }
3351 
parseFrom(byte[] data)3352     public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom(byte[] data)
3353         throws com.google.protobuf.InvalidProtocolBufferException {
3354       return PARSER.parseFrom(data);
3355     }
3356 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3357     public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom(
3358         byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3359         throws com.google.protobuf.InvalidProtocolBufferException {
3360       return PARSER.parseFrom(data, extensionRegistry);
3361     }
3362 
parseFrom( java.io.InputStream input)3363     public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom(
3364         java.io.InputStream input) throws java.io.IOException {
3365       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
3366     }
3367 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3368     public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom(
3369         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3370         throws java.io.IOException {
3371       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
3372           PARSER, input, extensionRegistry);
3373     }
3374 
parseDelimitedFrom( java.io.InputStream input)3375     public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseDelimitedFrom(
3376         java.io.InputStream input) throws java.io.IOException {
3377       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
3378     }
3379 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3380     public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseDelimitedFrom(
3381         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3382         throws java.io.IOException {
3383       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
3384           PARSER, input, extensionRegistry);
3385     }
3386 
parseFrom( com.google.protobuf.CodedInputStream input)3387     public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom(
3388         com.google.protobuf.CodedInputStream input) throws java.io.IOException {
3389       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
3390     }
3391 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3392     public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom(
3393         com.google.protobuf.CodedInputStream input,
3394         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3395         throws java.io.IOException {
3396       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
3397           PARSER, input, extensionRegistry);
3398     }
3399 
3400     @java.lang.Override
newBuilderForType()3401     public Builder newBuilderForType() {
3402       return newBuilder();
3403     }
3404 
newBuilder()3405     public static Builder newBuilder() {
3406       return DEFAULT_INSTANCE.toBuilder();
3407     }
3408 
newBuilder( com.google.privacy.dlp.v2.CustomInfoType.SurrogateType prototype)3409     public static Builder newBuilder(
3410         com.google.privacy.dlp.v2.CustomInfoType.SurrogateType prototype) {
3411       return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
3412     }
3413 
3414     @java.lang.Override
toBuilder()3415     public Builder toBuilder() {
3416       return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
3417     }
3418 
3419     @java.lang.Override
newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)3420     protected Builder newBuilderForType(
3421         com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
3422       Builder builder = new Builder(parent);
3423       return builder;
3424     }
3425     /**
3426      *
3427      *
3428      * <pre>
3429      * Message for detecting output from deidentification transformations
3430      * such as
3431      * [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
3432      * These types of transformations are
3433      * those that perform pseudonymization, thereby producing a "surrogate" as
3434      * output. This should be used in conjunction with a field on the
3435      * transformation such as `surrogate_info_type`. This CustomInfoType does
3436      * not support the use of `detection_rules`.
3437      * </pre>
3438      *
3439      * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.SurrogateType}
3440      */
3441     public static final class Builder
3442         extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
3443         implements
3444         // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType.SurrogateType)
3445         com.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeOrBuilder {
getDescriptor()3446       public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
3447         return com.google.privacy.dlp.v2.DlpStorage
3448             .internal_static_google_privacy_dlp_v2_CustomInfoType_SurrogateType_descriptor;
3449       }
3450 
3451       @java.lang.Override
3452       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()3453           internalGetFieldAccessorTable() {
3454         return com.google.privacy.dlp.v2.DlpStorage
3455             .internal_static_google_privacy_dlp_v2_CustomInfoType_SurrogateType_fieldAccessorTable
3456             .ensureFieldAccessorsInitialized(
3457                 com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.class,
3458                 com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder.class);
3459       }
3460 
3461       // Construct using com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.newBuilder()
Builder()3462       private Builder() {}
3463 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)3464       private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
3465         super(parent);
3466       }
3467 
3468       @java.lang.Override
clear()3469       public Builder clear() {
3470         super.clear();
3471         return this;
3472       }
3473 
3474       @java.lang.Override
getDescriptorForType()3475       public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
3476         return com.google.privacy.dlp.v2.DlpStorage
3477             .internal_static_google_privacy_dlp_v2_CustomInfoType_SurrogateType_descriptor;
3478       }
3479 
3480       @java.lang.Override
getDefaultInstanceForType()3481       public com.google.privacy.dlp.v2.CustomInfoType.SurrogateType getDefaultInstanceForType() {
3482         return com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance();
3483       }
3484 
3485       @java.lang.Override
build()3486       public com.google.privacy.dlp.v2.CustomInfoType.SurrogateType build() {
3487         com.google.privacy.dlp.v2.CustomInfoType.SurrogateType result = buildPartial();
3488         if (!result.isInitialized()) {
3489           throw newUninitializedMessageException(result);
3490         }
3491         return result;
3492       }
3493 
3494       @java.lang.Override
buildPartial()3495       public com.google.privacy.dlp.v2.CustomInfoType.SurrogateType buildPartial() {
3496         com.google.privacy.dlp.v2.CustomInfoType.SurrogateType result =
3497             new com.google.privacy.dlp.v2.CustomInfoType.SurrogateType(this);
3498         onBuilt();
3499         return result;
3500       }
3501 
3502       @java.lang.Override
clone()3503       public Builder clone() {
3504         return super.clone();
3505       }
3506 
3507       @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)3508       public Builder setField(
3509           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
3510         return super.setField(field, value);
3511       }
3512 
3513       @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)3514       public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
3515         return super.clearField(field);
3516       }
3517 
3518       @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)3519       public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
3520         return super.clearOneof(oneof);
3521       }
3522 
3523       @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)3524       public Builder setRepeatedField(
3525           com.google.protobuf.Descriptors.FieldDescriptor field,
3526           int index,
3527           java.lang.Object value) {
3528         return super.setRepeatedField(field, index, value);
3529       }
3530 
3531       @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)3532       public Builder addRepeatedField(
3533           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
3534         return super.addRepeatedField(field, value);
3535       }
3536 
3537       @java.lang.Override
mergeFrom(com.google.protobuf.Message other)3538       public Builder mergeFrom(com.google.protobuf.Message other) {
3539         if (other instanceof com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) {
3540           return mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) other);
3541         } else {
3542           super.mergeFrom(other);
3543           return this;
3544         }
3545       }
3546 
mergeFrom(com.google.privacy.dlp.v2.CustomInfoType.SurrogateType other)3547       public Builder mergeFrom(com.google.privacy.dlp.v2.CustomInfoType.SurrogateType other) {
3548         if (other == com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance())
3549           return this;
3550         this.mergeUnknownFields(other.getUnknownFields());
3551         onChanged();
3552         return this;
3553       }
3554 
3555       @java.lang.Override
isInitialized()3556       public final boolean isInitialized() {
3557         return true;
3558       }
3559 
3560       @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3561       public Builder mergeFrom(
3562           com.google.protobuf.CodedInputStream input,
3563           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3564           throws java.io.IOException {
3565         if (extensionRegistry == null) {
3566           throw new java.lang.NullPointerException();
3567         }
3568         try {
3569           boolean done = false;
3570           while (!done) {
3571             int tag = input.readTag();
3572             switch (tag) {
3573               case 0:
3574                 done = true;
3575                 break;
3576               default:
3577                 {
3578                   if (!super.parseUnknownField(input, extensionRegistry, tag)) {
3579                     done = true; // was an endgroup tag
3580                   }
3581                   break;
3582                 } // default:
3583             } // switch (tag)
3584           } // while (!done)
3585         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3586           throw e.unwrapIOException();
3587         } finally {
3588           onChanged();
3589         } // finally
3590         return this;
3591       }
3592 
3593       @java.lang.Override
setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)3594       public final Builder setUnknownFields(
3595           final com.google.protobuf.UnknownFieldSet unknownFields) {
3596         return super.setUnknownFields(unknownFields);
3597       }
3598 
3599       @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)3600       public final Builder mergeUnknownFields(
3601           final com.google.protobuf.UnknownFieldSet unknownFields) {
3602         return super.mergeUnknownFields(unknownFields);
3603       }
3604 
3605       // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType.SurrogateType)
3606     }
3607 
3608     // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType.SurrogateType)
3609     private static final com.google.privacy.dlp.v2.CustomInfoType.SurrogateType DEFAULT_INSTANCE;
3610 
3611     static {
3612       DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType.SurrogateType();
3613     }
3614 
getDefaultInstance()3615     public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType getDefaultInstance() {
3616       return DEFAULT_INSTANCE;
3617     }
3618 
3619     private static final com.google.protobuf.Parser<SurrogateType> PARSER =
3620         new com.google.protobuf.AbstractParser<SurrogateType>() {
3621           @java.lang.Override
3622           public SurrogateType parsePartialFrom(
3623               com.google.protobuf.CodedInputStream input,
3624               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3625               throws com.google.protobuf.InvalidProtocolBufferException {
3626             Builder builder = newBuilder();
3627             try {
3628               builder.mergeFrom(input, extensionRegistry);
3629             } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3630               throw e.setUnfinishedMessage(builder.buildPartial());
3631             } catch (com.google.protobuf.UninitializedMessageException e) {
3632               throw e.asInvalidProtocolBufferException()
3633                   .setUnfinishedMessage(builder.buildPartial());
3634             } catch (java.io.IOException e) {
3635               throw new com.google.protobuf.InvalidProtocolBufferException(e)
3636                   .setUnfinishedMessage(builder.buildPartial());
3637             }
3638             return builder.buildPartial();
3639           }
3640         };
3641 
parser()3642     public static com.google.protobuf.Parser<SurrogateType> parser() {
3643       return PARSER;
3644     }
3645 
3646     @java.lang.Override
getParserForType()3647     public com.google.protobuf.Parser<SurrogateType> getParserForType() {
3648       return PARSER;
3649     }
3650 
3651     @java.lang.Override
getDefaultInstanceForType()3652     public com.google.privacy.dlp.v2.CustomInfoType.SurrogateType getDefaultInstanceForType() {
3653       return DEFAULT_INSTANCE;
3654     }
3655   }
3656 
3657   public interface DetectionRuleOrBuilder
3658       extends
3659       // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType.DetectionRule)
3660       com.google.protobuf.MessageOrBuilder {
3661 
3662     /**
3663      *
3664      *
3665      * <pre>
3666      * Hotword-based detection rule.
3667      * </pre>
3668      *
3669      * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1;
3670      * </code>
3671      *
3672      * @return Whether the hotwordRule field is set.
3673      */
hasHotwordRule()3674     boolean hasHotwordRule();
3675     /**
3676      *
3677      *
3678      * <pre>
3679      * Hotword-based detection rule.
3680      * </pre>
3681      *
3682      * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1;
3683      * </code>
3684      *
3685      * @return The hotwordRule.
3686      */
getHotwordRule()3687     com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule getHotwordRule();
3688     /**
3689      *
3690      *
3691      * <pre>
3692      * Hotword-based detection rule.
3693      * </pre>
3694      *
3695      * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1;
3696      * </code>
3697      */
3698     com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder
getHotwordRuleOrBuilder()3699         getHotwordRuleOrBuilder();
3700 
getTypeCase()3701     public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.TypeCase getTypeCase();
3702   }
3703   /**
3704    *
3705    *
3706    * <pre>
3707    * Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
3708    * `CustomInfoType` to alter behavior under certain circumstances, depending
3709    * on the specific details of the rule. Not supported for the `surrogate_type`
3710    * custom infoType.
3711    * </pre>
3712    *
3713    * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.DetectionRule}
3714    */
3715   public static final class DetectionRule extends com.google.protobuf.GeneratedMessageV3
3716       implements
3717       // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType.DetectionRule)
3718       DetectionRuleOrBuilder {
3719     private static final long serialVersionUID = 0L;
3720     // Use DetectionRule.newBuilder() to construct.
DetectionRule(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)3721     private DetectionRule(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
3722       super(builder);
3723     }
3724 
DetectionRule()3725     private DetectionRule() {}
3726 
3727     @java.lang.Override
3728     @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)3729     protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
3730       return new DetectionRule();
3731     }
3732 
3733     @java.lang.Override
getUnknownFields()3734     public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
3735       return this.unknownFields;
3736     }
3737 
getDescriptor()3738     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
3739       return com.google.privacy.dlp.v2.DlpStorage
3740           .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_descriptor;
3741     }
3742 
3743     @java.lang.Override
3744     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()3745         internalGetFieldAccessorTable() {
3746       return com.google.privacy.dlp.v2.DlpStorage
3747           .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_fieldAccessorTable
3748           .ensureFieldAccessorsInitialized(
3749               com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.class,
3750               com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder.class);
3751     }
3752 
3753     public interface ProximityOrBuilder
3754         extends
3755         // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity)
3756         com.google.protobuf.MessageOrBuilder {
3757 
3758       /**
3759        *
3760        *
3761        * <pre>
3762        * Number of characters before the finding to consider. For tabular data,
3763        * if you want to modify the likelihood of an entire column of findngs,
3764        * set this to 1. For more information, see
3765        * [Hotword example: Set the match likelihood of a table column]
3766        * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
3767        * </pre>
3768        *
3769        * <code>int32 window_before = 1;</code>
3770        *
3771        * @return The windowBefore.
3772        */
getWindowBefore()3773       int getWindowBefore();
3774 
3775       /**
3776        *
3777        *
3778        * <pre>
3779        * Number of characters after the finding to consider.
3780        * </pre>
3781        *
3782        * <code>int32 window_after = 2;</code>
3783        *
3784        * @return The windowAfter.
3785        */
getWindowAfter()3786       int getWindowAfter();
3787     }
3788     /**
3789      *
3790      *
3791      * <pre>
3792      * Message for specifying a window around a finding to apply a detection
3793      * rule.
3794      * </pre>
3795      *
3796      * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity}
3797      */
3798     public static final class Proximity extends com.google.protobuf.GeneratedMessageV3
3799         implements
3800         // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity)
3801         ProximityOrBuilder {
3802       private static final long serialVersionUID = 0L;
3803       // Use Proximity.newBuilder() to construct.
Proximity(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)3804       private Proximity(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
3805         super(builder);
3806       }
3807 
Proximity()3808       private Proximity() {}
3809 
3810       @java.lang.Override
3811       @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)3812       protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
3813         return new Proximity();
3814       }
3815 
3816       @java.lang.Override
getUnknownFields()3817       public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
3818         return this.unknownFields;
3819       }
3820 
getDescriptor()3821       public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
3822         return com.google.privacy.dlp.v2.DlpStorage
3823             .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_Proximity_descriptor;
3824       }
3825 
3826       @java.lang.Override
3827       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()3828           internalGetFieldAccessorTable() {
3829         return com.google.privacy.dlp.v2.DlpStorage
3830             .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_Proximity_fieldAccessorTable
3831             .ensureFieldAccessorsInitialized(
3832                 com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.class,
3833                 com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.Builder.class);
3834       }
3835 
3836       public static final int WINDOW_BEFORE_FIELD_NUMBER = 1;
3837       private int windowBefore_ = 0;
3838       /**
3839        *
3840        *
3841        * <pre>
3842        * Number of characters before the finding to consider. For tabular data,
3843        * if you want to modify the likelihood of an entire column of findngs,
3844        * set this to 1. For more information, see
3845        * [Hotword example: Set the match likelihood of a table column]
3846        * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
3847        * </pre>
3848        *
3849        * <code>int32 window_before = 1;</code>
3850        *
3851        * @return The windowBefore.
3852        */
3853       @java.lang.Override
getWindowBefore()3854       public int getWindowBefore() {
3855         return windowBefore_;
3856       }
3857 
3858       public static final int WINDOW_AFTER_FIELD_NUMBER = 2;
3859       private int windowAfter_ = 0;
3860       /**
3861        *
3862        *
3863        * <pre>
3864        * Number of characters after the finding to consider.
3865        * </pre>
3866        *
3867        * <code>int32 window_after = 2;</code>
3868        *
3869        * @return The windowAfter.
3870        */
3871       @java.lang.Override
getWindowAfter()3872       public int getWindowAfter() {
3873         return windowAfter_;
3874       }
3875 
3876       private byte memoizedIsInitialized = -1;
3877 
3878       @java.lang.Override
isInitialized()3879       public final boolean isInitialized() {
3880         byte isInitialized = memoizedIsInitialized;
3881         if (isInitialized == 1) return true;
3882         if (isInitialized == 0) return false;
3883 
3884         memoizedIsInitialized = 1;
3885         return true;
3886       }
3887 
3888       @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)3889       public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
3890         if (windowBefore_ != 0) {
3891           output.writeInt32(1, windowBefore_);
3892         }
3893         if (windowAfter_ != 0) {
3894           output.writeInt32(2, windowAfter_);
3895         }
3896         getUnknownFields().writeTo(output);
3897       }
3898 
3899       @java.lang.Override
getSerializedSize()3900       public int getSerializedSize() {
3901         int size = memoizedSize;
3902         if (size != -1) return size;
3903 
3904         size = 0;
3905         if (windowBefore_ != 0) {
3906           size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, windowBefore_);
3907         }
3908         if (windowAfter_ != 0) {
3909           size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, windowAfter_);
3910         }
3911         size += getUnknownFields().getSerializedSize();
3912         memoizedSize = size;
3913         return size;
3914       }
3915 
3916       @java.lang.Override
equals(final java.lang.Object obj)3917       public boolean equals(final java.lang.Object obj) {
3918         if (obj == this) {
3919           return true;
3920         }
3921         if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity)) {
3922           return super.equals(obj);
3923         }
3924         com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity other =
3925             (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity) obj;
3926 
3927         if (getWindowBefore() != other.getWindowBefore()) return false;
3928         if (getWindowAfter() != other.getWindowAfter()) return false;
3929         if (!getUnknownFields().equals(other.getUnknownFields())) return false;
3930         return true;
3931       }
3932 
3933       @java.lang.Override
hashCode()3934       public int hashCode() {
3935         if (memoizedHashCode != 0) {
3936           return memoizedHashCode;
3937         }
3938         int hash = 41;
3939         hash = (19 * hash) + getDescriptor().hashCode();
3940         hash = (37 * hash) + WINDOW_BEFORE_FIELD_NUMBER;
3941         hash = (53 * hash) + getWindowBefore();
3942         hash = (37 * hash) + WINDOW_AFTER_FIELD_NUMBER;
3943         hash = (53 * hash) + getWindowAfter();
3944         hash = (29 * hash) + getUnknownFields().hashCode();
3945         memoizedHashCode = hash;
3946         return hash;
3947       }
3948 
parseFrom( java.nio.ByteBuffer data)3949       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom(
3950           java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
3951         return PARSER.parseFrom(data);
3952       }
3953 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3954       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom(
3955           java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3956           throws com.google.protobuf.InvalidProtocolBufferException {
3957         return PARSER.parseFrom(data, extensionRegistry);
3958       }
3959 
parseFrom( com.google.protobuf.ByteString data)3960       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom(
3961           com.google.protobuf.ByteString data)
3962           throws com.google.protobuf.InvalidProtocolBufferException {
3963         return PARSER.parseFrom(data);
3964       }
3965 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3966       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom(
3967           com.google.protobuf.ByteString data,
3968           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3969           throws com.google.protobuf.InvalidProtocolBufferException {
3970         return PARSER.parseFrom(data, extensionRegistry);
3971       }
3972 
parseFrom( byte[] data)3973       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom(
3974           byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
3975         return PARSER.parseFrom(data);
3976       }
3977 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3978       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom(
3979           byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3980           throws com.google.protobuf.InvalidProtocolBufferException {
3981         return PARSER.parseFrom(data, extensionRegistry);
3982       }
3983 
parseFrom( java.io.InputStream input)3984       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom(
3985           java.io.InputStream input) throws java.io.IOException {
3986         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
3987       }
3988 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3989       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom(
3990           java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3991           throws java.io.IOException {
3992         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
3993             PARSER, input, extensionRegistry);
3994       }
3995 
3996       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity
parseDelimitedFrom(java.io.InputStream input)3997           parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
3998         return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
3999       }
4000 
4001       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4002           parseDelimitedFrom(
4003               java.io.InputStream input,
4004               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4005               throws java.io.IOException {
4006         return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
4007             PARSER, input, extensionRegistry);
4008       }
4009 
parseFrom( com.google.protobuf.CodedInputStream input)4010       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom(
4011           com.google.protobuf.CodedInputStream input) throws java.io.IOException {
4012         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
4013       }
4014 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4015       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom(
4016           com.google.protobuf.CodedInputStream input,
4017           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4018           throws java.io.IOException {
4019         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
4020             PARSER, input, extensionRegistry);
4021       }
4022 
4023       @java.lang.Override
newBuilderForType()4024       public Builder newBuilderForType() {
4025         return newBuilder();
4026       }
4027 
newBuilder()4028       public static Builder newBuilder() {
4029         return DEFAULT_INSTANCE.toBuilder();
4030       }
4031 
newBuilder( com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity prototype)4032       public static Builder newBuilder(
4033           com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity prototype) {
4034         return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
4035       }
4036 
4037       @java.lang.Override
toBuilder()4038       public Builder toBuilder() {
4039         return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
4040       }
4041 
4042       @java.lang.Override
newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)4043       protected Builder newBuilderForType(
4044           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
4045         Builder builder = new Builder(parent);
4046         return builder;
4047       }
4048       /**
4049        *
4050        *
4051        * <pre>
4052        * Message for specifying a window around a finding to apply a detection
4053        * rule.
4054        * </pre>
4055        *
4056        * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity}
4057        */
4058       public static final class Builder
4059           extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
4060           implements
4061           // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity)
4062           com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.ProximityOrBuilder {
getDescriptor()4063         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
4064           return com.google.privacy.dlp.v2.DlpStorage
4065               .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_Proximity_descriptor;
4066         }
4067 
4068         @java.lang.Override
4069         protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()4070             internalGetFieldAccessorTable() {
4071           return com.google.privacy.dlp.v2.DlpStorage
4072               .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_Proximity_fieldAccessorTable
4073               .ensureFieldAccessorsInitialized(
4074                   com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.class,
4075                   com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.Builder.class);
4076         }
4077 
4078         // Construct using
4079         // com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.newBuilder()
Builder()4080         private Builder() {}
4081 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)4082         private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
4083           super(parent);
4084         }
4085 
4086         @java.lang.Override
clear()4087         public Builder clear() {
4088           super.clear();
4089           bitField0_ = 0;
4090           windowBefore_ = 0;
4091           windowAfter_ = 0;
4092           return this;
4093         }
4094 
4095         @java.lang.Override
getDescriptorForType()4096         public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
4097           return com.google.privacy.dlp.v2.DlpStorage
4098               .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_Proximity_descriptor;
4099         }
4100 
4101         @java.lang.Override
4102         public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity
getDefaultInstanceForType()4103             getDefaultInstanceForType() {
4104           return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity
4105               .getDefaultInstance();
4106         }
4107 
4108         @java.lang.Override
build()4109         public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity build() {
4110           com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity result = buildPartial();
4111           if (!result.isInitialized()) {
4112             throw newUninitializedMessageException(result);
4113           }
4114           return result;
4115         }
4116 
4117         @java.lang.Override
buildPartial()4118         public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity buildPartial() {
4119           com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity result =
4120               new com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity(this);
4121           if (bitField0_ != 0) {
4122             buildPartial0(result);
4123           }
4124           onBuilt();
4125           return result;
4126         }
4127 
buildPartial0( com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity result)4128         private void buildPartial0(
4129             com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity result) {
4130           int from_bitField0_ = bitField0_;
4131           if (((from_bitField0_ & 0x00000001) != 0)) {
4132             result.windowBefore_ = windowBefore_;
4133           }
4134           if (((from_bitField0_ & 0x00000002) != 0)) {
4135             result.windowAfter_ = windowAfter_;
4136           }
4137         }
4138 
4139         @java.lang.Override
clone()4140         public Builder clone() {
4141           return super.clone();
4142         }
4143 
4144         @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)4145         public Builder setField(
4146             com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
4147           return super.setField(field, value);
4148         }
4149 
4150         @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)4151         public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
4152           return super.clearField(field);
4153         }
4154 
4155         @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)4156         public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
4157           return super.clearOneof(oneof);
4158         }
4159 
4160         @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)4161         public Builder setRepeatedField(
4162             com.google.protobuf.Descriptors.FieldDescriptor field,
4163             int index,
4164             java.lang.Object value) {
4165           return super.setRepeatedField(field, index, value);
4166         }
4167 
4168         @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)4169         public Builder addRepeatedField(
4170             com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
4171           return super.addRepeatedField(field, value);
4172         }
4173 
4174         @java.lang.Override
mergeFrom(com.google.protobuf.Message other)4175         public Builder mergeFrom(com.google.protobuf.Message other) {
4176           if (other instanceof com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity) {
4177             return mergeFrom(
4178                 (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity) other);
4179           } else {
4180             super.mergeFrom(other);
4181             return this;
4182           }
4183         }
4184 
mergeFrom( com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity other)4185         public Builder mergeFrom(
4186             com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity other) {
4187           if (other
4188               == com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity
4189                   .getDefaultInstance()) return this;
4190           if (other.getWindowBefore() != 0) {
4191             setWindowBefore(other.getWindowBefore());
4192           }
4193           if (other.getWindowAfter() != 0) {
4194             setWindowAfter(other.getWindowAfter());
4195           }
4196           this.mergeUnknownFields(other.getUnknownFields());
4197           onChanged();
4198           return this;
4199         }
4200 
4201         @java.lang.Override
isInitialized()4202         public final boolean isInitialized() {
4203           return true;
4204         }
4205 
4206         @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4207         public Builder mergeFrom(
4208             com.google.protobuf.CodedInputStream input,
4209             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4210             throws java.io.IOException {
4211           if (extensionRegistry == null) {
4212             throw new java.lang.NullPointerException();
4213           }
4214           try {
4215             boolean done = false;
4216             while (!done) {
4217               int tag = input.readTag();
4218               switch (tag) {
4219                 case 0:
4220                   done = true;
4221                   break;
4222                 case 8:
4223                   {
4224                     windowBefore_ = input.readInt32();
4225                     bitField0_ |= 0x00000001;
4226                     break;
4227                   } // case 8
4228                 case 16:
4229                   {
4230                     windowAfter_ = input.readInt32();
4231                     bitField0_ |= 0x00000002;
4232                     break;
4233                   } // case 16
4234                 default:
4235                   {
4236                     if (!super.parseUnknownField(input, extensionRegistry, tag)) {
4237                       done = true; // was an endgroup tag
4238                     }
4239                     break;
4240                   } // default:
4241               } // switch (tag)
4242             } // while (!done)
4243           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
4244             throw e.unwrapIOException();
4245           } finally {
4246             onChanged();
4247           } // finally
4248           return this;
4249         }
4250 
4251         private int bitField0_;
4252 
4253         private int windowBefore_;
4254         /**
4255          *
4256          *
4257          * <pre>
4258          * Number of characters before the finding to consider. For tabular data,
4259          * if you want to modify the likelihood of an entire column of findngs,
4260          * set this to 1. For more information, see
4261          * [Hotword example: Set the match likelihood of a table column]
4262          * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
4263          * </pre>
4264          *
4265          * <code>int32 window_before = 1;</code>
4266          *
4267          * @return The windowBefore.
4268          */
4269         @java.lang.Override
getWindowBefore()4270         public int getWindowBefore() {
4271           return windowBefore_;
4272         }
4273         /**
4274          *
4275          *
4276          * <pre>
4277          * Number of characters before the finding to consider. For tabular data,
4278          * if you want to modify the likelihood of an entire column of findngs,
4279          * set this to 1. For more information, see
4280          * [Hotword example: Set the match likelihood of a table column]
4281          * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
4282          * </pre>
4283          *
4284          * <code>int32 window_before = 1;</code>
4285          *
4286          * @param value The windowBefore to set.
4287          * @return This builder for chaining.
4288          */
setWindowBefore(int value)4289         public Builder setWindowBefore(int value) {
4290 
4291           windowBefore_ = value;
4292           bitField0_ |= 0x00000001;
4293           onChanged();
4294           return this;
4295         }
4296         /**
4297          *
4298          *
4299          * <pre>
4300          * Number of characters before the finding to consider. For tabular data,
4301          * if you want to modify the likelihood of an entire column of findngs,
4302          * set this to 1. For more information, see
4303          * [Hotword example: Set the match likelihood of a table column]
4304          * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
4305          * </pre>
4306          *
4307          * <code>int32 window_before = 1;</code>
4308          *
4309          * @return This builder for chaining.
4310          */
clearWindowBefore()4311         public Builder clearWindowBefore() {
4312           bitField0_ = (bitField0_ & ~0x00000001);
4313           windowBefore_ = 0;
4314           onChanged();
4315           return this;
4316         }
4317 
4318         private int windowAfter_;
4319         /**
4320          *
4321          *
4322          * <pre>
4323          * Number of characters after the finding to consider.
4324          * </pre>
4325          *
4326          * <code>int32 window_after = 2;</code>
4327          *
4328          * @return The windowAfter.
4329          */
4330         @java.lang.Override
getWindowAfter()4331         public int getWindowAfter() {
4332           return windowAfter_;
4333         }
4334         /**
4335          *
4336          *
4337          * <pre>
4338          * Number of characters after the finding to consider.
4339          * </pre>
4340          *
4341          * <code>int32 window_after = 2;</code>
4342          *
4343          * @param value The windowAfter to set.
4344          * @return This builder for chaining.
4345          */
setWindowAfter(int value)4346         public Builder setWindowAfter(int value) {
4347 
4348           windowAfter_ = value;
4349           bitField0_ |= 0x00000002;
4350           onChanged();
4351           return this;
4352         }
4353         /**
4354          *
4355          *
4356          * <pre>
4357          * Number of characters after the finding to consider.
4358          * </pre>
4359          *
4360          * <code>int32 window_after = 2;</code>
4361          *
4362          * @return This builder for chaining.
4363          */
clearWindowAfter()4364         public Builder clearWindowAfter() {
4365           bitField0_ = (bitField0_ & ~0x00000002);
4366           windowAfter_ = 0;
4367           onChanged();
4368           return this;
4369         }
4370 
4371         @java.lang.Override
setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)4372         public final Builder setUnknownFields(
4373             final com.google.protobuf.UnknownFieldSet unknownFields) {
4374           return super.setUnknownFields(unknownFields);
4375         }
4376 
4377         @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)4378         public final Builder mergeUnknownFields(
4379             final com.google.protobuf.UnknownFieldSet unknownFields) {
4380           return super.mergeUnknownFields(unknownFields);
4381         }
4382 
4383         // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity)
4384       }
4385 
4386       // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity)
4387       private static final com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity
4388           DEFAULT_INSTANCE;
4389 
4390       static {
4391         DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity();
4392       }
4393 
4394       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity
getDefaultInstance()4395           getDefaultInstance() {
4396         return DEFAULT_INSTANCE;
4397       }
4398 
4399       private static final com.google.protobuf.Parser<Proximity> PARSER =
4400           new com.google.protobuf.AbstractParser<Proximity>() {
4401             @java.lang.Override
4402             public Proximity parsePartialFrom(
4403                 com.google.protobuf.CodedInputStream input,
4404                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4405                 throws com.google.protobuf.InvalidProtocolBufferException {
4406               Builder builder = newBuilder();
4407               try {
4408                 builder.mergeFrom(input, extensionRegistry);
4409               } catch (com.google.protobuf.InvalidProtocolBufferException e) {
4410                 throw e.setUnfinishedMessage(builder.buildPartial());
4411               } catch (com.google.protobuf.UninitializedMessageException e) {
4412                 throw e.asInvalidProtocolBufferException()
4413                     .setUnfinishedMessage(builder.buildPartial());
4414               } catch (java.io.IOException e) {
4415                 throw new com.google.protobuf.InvalidProtocolBufferException(e)
4416                     .setUnfinishedMessage(builder.buildPartial());
4417               }
4418               return builder.buildPartial();
4419             }
4420           };
4421 
parser()4422       public static com.google.protobuf.Parser<Proximity> parser() {
4423         return PARSER;
4424       }
4425 
4426       @java.lang.Override
getParserForType()4427       public com.google.protobuf.Parser<Proximity> getParserForType() {
4428         return PARSER;
4429       }
4430 
4431       @java.lang.Override
4432       public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity
getDefaultInstanceForType()4433           getDefaultInstanceForType() {
4434         return DEFAULT_INSTANCE;
4435       }
4436     }
4437 
4438     public interface LikelihoodAdjustmentOrBuilder
4439         extends
4440         // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment)
4441         com.google.protobuf.MessageOrBuilder {
4442 
4443       /**
4444        *
4445        *
4446        * <pre>
4447        * Set the likelihood of a finding to a fixed value.
4448        * </pre>
4449        *
4450        * <code>.google.privacy.dlp.v2.Likelihood fixed_likelihood = 1;</code>
4451        *
4452        * @return Whether the fixedLikelihood field is set.
4453        */
hasFixedLikelihood()4454       boolean hasFixedLikelihood();
4455       /**
4456        *
4457        *
4458        * <pre>
4459        * Set the likelihood of a finding to a fixed value.
4460        * </pre>
4461        *
4462        * <code>.google.privacy.dlp.v2.Likelihood fixed_likelihood = 1;</code>
4463        *
4464        * @return The enum numeric value on the wire for fixedLikelihood.
4465        */
getFixedLikelihoodValue()4466       int getFixedLikelihoodValue();
4467       /**
4468        *
4469        *
4470        * <pre>
4471        * Set the likelihood of a finding to a fixed value.
4472        * </pre>
4473        *
4474        * <code>.google.privacy.dlp.v2.Likelihood fixed_likelihood = 1;</code>
4475        *
4476        * @return The fixedLikelihood.
4477        */
getFixedLikelihood()4478       com.google.privacy.dlp.v2.Likelihood getFixedLikelihood();
4479 
4480       /**
4481        *
4482        *
4483        * <pre>
4484        * Increase or decrease the likelihood by the specified number of
4485        * levels. For example, if a finding would be `POSSIBLE` without the
4486        * detection rule and `relative_likelihood` is 1, then it is upgraded to
4487        * `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
4488        * Likelihood may never drop below `VERY_UNLIKELY` or exceed
4489        * `VERY_LIKELY`, so applying an adjustment of 1 followed by an
4490        * adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
4491        * a final likelihood of `LIKELY`.
4492        * </pre>
4493        *
4494        * <code>int32 relative_likelihood = 2;</code>
4495        *
4496        * @return Whether the relativeLikelihood field is set.
4497        */
hasRelativeLikelihood()4498       boolean hasRelativeLikelihood();
4499       /**
4500        *
4501        *
4502        * <pre>
4503        * Increase or decrease the likelihood by the specified number of
4504        * levels. For example, if a finding would be `POSSIBLE` without the
4505        * detection rule and `relative_likelihood` is 1, then it is upgraded to
4506        * `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
4507        * Likelihood may never drop below `VERY_UNLIKELY` or exceed
4508        * `VERY_LIKELY`, so applying an adjustment of 1 followed by an
4509        * adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
4510        * a final likelihood of `LIKELY`.
4511        * </pre>
4512        *
4513        * <code>int32 relative_likelihood = 2;</code>
4514        *
4515        * @return The relativeLikelihood.
4516        */
getRelativeLikelihood()4517       int getRelativeLikelihood();
4518 
4519       public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
4520               .AdjustmentCase
getAdjustmentCase()4521           getAdjustmentCase();
4522     }
4523     /**
4524      *
4525      *
4526      * <pre>
4527      * Message for specifying an adjustment to the likelihood of a finding as
4528      * part of a detection rule.
4529      * </pre>
4530      *
4531      * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment}
4532      */
4533     public static final class LikelihoodAdjustment extends com.google.protobuf.GeneratedMessageV3
4534         implements
4535         // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment)
4536         LikelihoodAdjustmentOrBuilder {
4537       private static final long serialVersionUID = 0L;
4538       // Use LikelihoodAdjustment.newBuilder() to construct.
LikelihoodAdjustment(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)4539       private LikelihoodAdjustment(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
4540         super(builder);
4541       }
4542 
LikelihoodAdjustment()4543       private LikelihoodAdjustment() {}
4544 
4545       @java.lang.Override
4546       @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)4547       protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
4548         return new LikelihoodAdjustment();
4549       }
4550 
4551       @java.lang.Override
getUnknownFields()4552       public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
4553         return this.unknownFields;
4554       }
4555 
getDescriptor()4556       public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
4557         return com.google.privacy.dlp.v2.DlpStorage
4558             .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_LikelihoodAdjustment_descriptor;
4559       }
4560 
4561       @java.lang.Override
4562       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()4563           internalGetFieldAccessorTable() {
4564         return com.google.privacy.dlp.v2.DlpStorage
4565             .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_LikelihoodAdjustment_fieldAccessorTable
4566             .ensureFieldAccessorsInitialized(
4567                 com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.class,
4568                 com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.Builder
4569                     .class);
4570       }
4571 
4572       private int adjustmentCase_ = 0;
4573       private java.lang.Object adjustment_;
4574 
4575       public enum AdjustmentCase
4576           implements
4577               com.google.protobuf.Internal.EnumLite,
4578               com.google.protobuf.AbstractMessage.InternalOneOfEnum {
4579         FIXED_LIKELIHOOD(1),
4580         RELATIVE_LIKELIHOOD(2),
4581         ADJUSTMENT_NOT_SET(0);
4582         private final int value;
4583 
AdjustmentCase(int value)4584         private AdjustmentCase(int value) {
4585           this.value = value;
4586         }
4587         /**
4588          * @param value The number of the enum to look for.
4589          * @return The enum associated with the given number.
4590          * @deprecated Use {@link #forNumber(int)} instead.
4591          */
4592         @java.lang.Deprecated
valueOf(int value)4593         public static AdjustmentCase valueOf(int value) {
4594           return forNumber(value);
4595         }
4596 
forNumber(int value)4597         public static AdjustmentCase forNumber(int value) {
4598           switch (value) {
4599             case 1:
4600               return FIXED_LIKELIHOOD;
4601             case 2:
4602               return RELATIVE_LIKELIHOOD;
4603             case 0:
4604               return ADJUSTMENT_NOT_SET;
4605             default:
4606               return null;
4607           }
4608         }
4609 
getNumber()4610         public int getNumber() {
4611           return this.value;
4612         }
4613       };
4614 
getAdjustmentCase()4615       public AdjustmentCase getAdjustmentCase() {
4616         return AdjustmentCase.forNumber(adjustmentCase_);
4617       }
4618 
4619       public static final int FIXED_LIKELIHOOD_FIELD_NUMBER = 1;
4620       /**
4621        *
4622        *
4623        * <pre>
4624        * Set the likelihood of a finding to a fixed value.
4625        * </pre>
4626        *
4627        * <code>.google.privacy.dlp.v2.Likelihood fixed_likelihood = 1;</code>
4628        *
4629        * @return Whether the fixedLikelihood field is set.
4630        */
hasFixedLikelihood()4631       public boolean hasFixedLikelihood() {
4632         return adjustmentCase_ == 1;
4633       }
4634       /**
4635        *
4636        *
4637        * <pre>
4638        * Set the likelihood of a finding to a fixed value.
4639        * </pre>
4640        *
4641        * <code>.google.privacy.dlp.v2.Likelihood fixed_likelihood = 1;</code>
4642        *
4643        * @return The enum numeric value on the wire for fixedLikelihood.
4644        */
getFixedLikelihoodValue()4645       public int getFixedLikelihoodValue() {
4646         if (adjustmentCase_ == 1) {
4647           return (java.lang.Integer) adjustment_;
4648         }
4649         return 0;
4650       }
4651       /**
4652        *
4653        *
4654        * <pre>
4655        * Set the likelihood of a finding to a fixed value.
4656        * </pre>
4657        *
4658        * <code>.google.privacy.dlp.v2.Likelihood fixed_likelihood = 1;</code>
4659        *
4660        * @return The fixedLikelihood.
4661        */
getFixedLikelihood()4662       public com.google.privacy.dlp.v2.Likelihood getFixedLikelihood() {
4663         if (adjustmentCase_ == 1) {
4664           com.google.privacy.dlp.v2.Likelihood result =
4665               com.google.privacy.dlp.v2.Likelihood.forNumber((java.lang.Integer) adjustment_);
4666           return result == null ? com.google.privacy.dlp.v2.Likelihood.UNRECOGNIZED : result;
4667         }
4668         return com.google.privacy.dlp.v2.Likelihood.LIKELIHOOD_UNSPECIFIED;
4669       }
4670 
4671       public static final int RELATIVE_LIKELIHOOD_FIELD_NUMBER = 2;
4672       /**
4673        *
4674        *
4675        * <pre>
4676        * Increase or decrease the likelihood by the specified number of
4677        * levels. For example, if a finding would be `POSSIBLE` without the
4678        * detection rule and `relative_likelihood` is 1, then it is upgraded to
4679        * `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
4680        * Likelihood may never drop below `VERY_UNLIKELY` or exceed
4681        * `VERY_LIKELY`, so applying an adjustment of 1 followed by an
4682        * adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
4683        * a final likelihood of `LIKELY`.
4684        * </pre>
4685        *
4686        * <code>int32 relative_likelihood = 2;</code>
4687        *
4688        * @return Whether the relativeLikelihood field is set.
4689        */
4690       @java.lang.Override
hasRelativeLikelihood()4691       public boolean hasRelativeLikelihood() {
4692         return adjustmentCase_ == 2;
4693       }
4694       /**
4695        *
4696        *
4697        * <pre>
4698        * Increase or decrease the likelihood by the specified number of
4699        * levels. For example, if a finding would be `POSSIBLE` without the
4700        * detection rule and `relative_likelihood` is 1, then it is upgraded to
4701        * `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
4702        * Likelihood may never drop below `VERY_UNLIKELY` or exceed
4703        * `VERY_LIKELY`, so applying an adjustment of 1 followed by an
4704        * adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
4705        * a final likelihood of `LIKELY`.
4706        * </pre>
4707        *
4708        * <code>int32 relative_likelihood = 2;</code>
4709        *
4710        * @return The relativeLikelihood.
4711        */
4712       @java.lang.Override
getRelativeLikelihood()4713       public int getRelativeLikelihood() {
4714         if (adjustmentCase_ == 2) {
4715           return (java.lang.Integer) adjustment_;
4716         }
4717         return 0;
4718       }
4719 
4720       private byte memoizedIsInitialized = -1;
4721 
4722       @java.lang.Override
isInitialized()4723       public final boolean isInitialized() {
4724         byte isInitialized = memoizedIsInitialized;
4725         if (isInitialized == 1) return true;
4726         if (isInitialized == 0) return false;
4727 
4728         memoizedIsInitialized = 1;
4729         return true;
4730       }
4731 
4732       @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)4733       public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
4734         if (adjustmentCase_ == 1) {
4735           output.writeEnum(1, ((java.lang.Integer) adjustment_));
4736         }
4737         if (adjustmentCase_ == 2) {
4738           output.writeInt32(2, (int) ((java.lang.Integer) adjustment_));
4739         }
4740         getUnknownFields().writeTo(output);
4741       }
4742 
4743       @java.lang.Override
getSerializedSize()4744       public int getSerializedSize() {
4745         int size = memoizedSize;
4746         if (size != -1) return size;
4747 
4748         size = 0;
4749         if (adjustmentCase_ == 1) {
4750           size +=
4751               com.google.protobuf.CodedOutputStream.computeEnumSize(
4752                   1, ((java.lang.Integer) adjustment_));
4753         }
4754         if (adjustmentCase_ == 2) {
4755           size +=
4756               com.google.protobuf.CodedOutputStream.computeInt32Size(
4757                   2, (int) ((java.lang.Integer) adjustment_));
4758         }
4759         size += getUnknownFields().getSerializedSize();
4760         memoizedSize = size;
4761         return size;
4762       }
4763 
4764       @java.lang.Override
equals(final java.lang.Object obj)4765       public boolean equals(final java.lang.Object obj) {
4766         if (obj == this) {
4767           return true;
4768         }
4769         if (!(obj
4770             instanceof
4771             com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment)) {
4772           return super.equals(obj);
4773         }
4774         com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment other =
4775             (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment) obj;
4776 
4777         if (!getAdjustmentCase().equals(other.getAdjustmentCase())) return false;
4778         switch (adjustmentCase_) {
4779           case 1:
4780             if (getFixedLikelihoodValue() != other.getFixedLikelihoodValue()) return false;
4781             break;
4782           case 2:
4783             if (getRelativeLikelihood() != other.getRelativeLikelihood()) return false;
4784             break;
4785           case 0:
4786           default:
4787         }
4788         if (!getUnknownFields().equals(other.getUnknownFields())) return false;
4789         return true;
4790       }
4791 
4792       @java.lang.Override
hashCode()4793       public int hashCode() {
4794         if (memoizedHashCode != 0) {
4795           return memoizedHashCode;
4796         }
4797         int hash = 41;
4798         hash = (19 * hash) + getDescriptor().hashCode();
4799         switch (adjustmentCase_) {
4800           case 1:
4801             hash = (37 * hash) + FIXED_LIKELIHOOD_FIELD_NUMBER;
4802             hash = (53 * hash) + getFixedLikelihoodValue();
4803             break;
4804           case 2:
4805             hash = (37 * hash) + RELATIVE_LIKELIHOOD_FIELD_NUMBER;
4806             hash = (53 * hash) + getRelativeLikelihood();
4807             break;
4808           case 0:
4809           default:
4810         }
4811         hash = (29 * hash) + getUnknownFields().hashCode();
4812         memoizedHashCode = hash;
4813         return hash;
4814       }
4815 
4816       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
parseFrom(java.nio.ByteBuffer data)4817           parseFrom(java.nio.ByteBuffer data)
4818               throws com.google.protobuf.InvalidProtocolBufferException {
4819         return PARSER.parseFrom(data);
4820       }
4821 
4822       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4823           parseFrom(
4824               java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4825               throws com.google.protobuf.InvalidProtocolBufferException {
4826         return PARSER.parseFrom(data, extensionRegistry);
4827       }
4828 
4829       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
parseFrom(com.google.protobuf.ByteString data)4830           parseFrom(com.google.protobuf.ByteString data)
4831               throws com.google.protobuf.InvalidProtocolBufferException {
4832         return PARSER.parseFrom(data);
4833       }
4834 
4835       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4836           parseFrom(
4837               com.google.protobuf.ByteString data,
4838               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4839               throws com.google.protobuf.InvalidProtocolBufferException {
4840         return PARSER.parseFrom(data, extensionRegistry);
4841       }
4842 
4843       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
parseFrom(byte[] data)4844           parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
4845         return PARSER.parseFrom(data);
4846       }
4847 
4848       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4849           parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4850               throws com.google.protobuf.InvalidProtocolBufferException {
4851         return PARSER.parseFrom(data, extensionRegistry);
4852       }
4853 
4854       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
parseFrom(java.io.InputStream input)4855           parseFrom(java.io.InputStream input) throws java.io.IOException {
4856         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
4857       }
4858 
4859       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4860           parseFrom(
4861               java.io.InputStream input,
4862               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4863               throws java.io.IOException {
4864         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
4865             PARSER, input, extensionRegistry);
4866       }
4867 
4868       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
parseDelimitedFrom(java.io.InputStream input)4869           parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
4870         return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
4871       }
4872 
4873       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4874           parseDelimitedFrom(
4875               java.io.InputStream input,
4876               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4877               throws java.io.IOException {
4878         return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
4879             PARSER, input, extensionRegistry);
4880       }
4881 
4882       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
parseFrom(com.google.protobuf.CodedInputStream input)4883           parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
4884         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
4885       }
4886 
4887       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)4888           parseFrom(
4889               com.google.protobuf.CodedInputStream input,
4890               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4891               throws java.io.IOException {
4892         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
4893             PARSER, input, extensionRegistry);
4894       }
4895 
4896       @java.lang.Override
newBuilderForType()4897       public Builder newBuilderForType() {
4898         return newBuilder();
4899       }
4900 
newBuilder()4901       public static Builder newBuilder() {
4902         return DEFAULT_INSTANCE.toBuilder();
4903       }
4904 
newBuilder( com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment prototype)4905       public static Builder newBuilder(
4906           com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment prototype) {
4907         return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
4908       }
4909 
4910       @java.lang.Override
toBuilder()4911       public Builder toBuilder() {
4912         return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
4913       }
4914 
4915       @java.lang.Override
newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)4916       protected Builder newBuilderForType(
4917           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
4918         Builder builder = new Builder(parent);
4919         return builder;
4920       }
4921       /**
4922        *
4923        *
4924        * <pre>
4925        * Message for specifying an adjustment to the likelihood of a finding as
4926        * part of a detection rule.
4927        * </pre>
4928        *
4929        * Protobuf type {@code
4930        * google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment}
4931        */
4932       public static final class Builder
4933           extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
4934           implements
4935           // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment)
4936           com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustmentOrBuilder {
getDescriptor()4937         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
4938           return com.google.privacy.dlp.v2.DlpStorage
4939               .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_LikelihoodAdjustment_descriptor;
4940         }
4941 
4942         @java.lang.Override
4943         protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()4944             internalGetFieldAccessorTable() {
4945           return com.google.privacy.dlp.v2.DlpStorage
4946               .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_LikelihoodAdjustment_fieldAccessorTable
4947               .ensureFieldAccessorsInitialized(
4948                   com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.class,
4949                   com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
4950                       .Builder.class);
4951         }
4952 
4953         // Construct using
4954         // com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.newBuilder()
Builder()4955         private Builder() {}
4956 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)4957         private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
4958           super(parent);
4959         }
4960 
4961         @java.lang.Override
clear()4962         public Builder clear() {
4963           super.clear();
4964           bitField0_ = 0;
4965           adjustmentCase_ = 0;
4966           adjustment_ = null;
4967           return this;
4968         }
4969 
4970         @java.lang.Override
getDescriptorForType()4971         public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
4972           return com.google.privacy.dlp.v2.DlpStorage
4973               .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_LikelihoodAdjustment_descriptor;
4974         }
4975 
4976         @java.lang.Override
4977         public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
getDefaultInstanceForType()4978             getDefaultInstanceForType() {
4979           return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
4980               .getDefaultInstance();
4981         }
4982 
4983         @java.lang.Override
build()4984         public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment build() {
4985           com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment result =
4986               buildPartial();
4987           if (!result.isInitialized()) {
4988             throw newUninitializedMessageException(result);
4989           }
4990           return result;
4991         }
4992 
4993         @java.lang.Override
4994         public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
buildPartial()4995             buildPartial() {
4996           com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment result =
4997               new com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment(this);
4998           if (bitField0_ != 0) {
4999             buildPartial0(result);
5000           }
5001           buildPartialOneofs(result);
5002           onBuilt();
5003           return result;
5004         }
5005 
buildPartial0( com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment result)5006         private void buildPartial0(
5007             com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment result) {
5008           int from_bitField0_ = bitField0_;
5009         }
5010 
buildPartialOneofs( com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment result)5011         private void buildPartialOneofs(
5012             com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment result) {
5013           result.adjustmentCase_ = adjustmentCase_;
5014           result.adjustment_ = this.adjustment_;
5015         }
5016 
5017         @java.lang.Override
clone()5018         public Builder clone() {
5019           return super.clone();
5020         }
5021 
5022         @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)5023         public Builder setField(
5024             com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
5025           return super.setField(field, value);
5026         }
5027 
5028         @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)5029         public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
5030           return super.clearField(field);
5031         }
5032 
5033         @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)5034         public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
5035           return super.clearOneof(oneof);
5036         }
5037 
5038         @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)5039         public Builder setRepeatedField(
5040             com.google.protobuf.Descriptors.FieldDescriptor field,
5041             int index,
5042             java.lang.Object value) {
5043           return super.setRepeatedField(field, index, value);
5044         }
5045 
5046         @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)5047         public Builder addRepeatedField(
5048             com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
5049           return super.addRepeatedField(field, value);
5050         }
5051 
5052         @java.lang.Override
mergeFrom(com.google.protobuf.Message other)5053         public Builder mergeFrom(com.google.protobuf.Message other) {
5054           if (other
5055               instanceof
5056               com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment) {
5057             return mergeFrom(
5058                 (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment)
5059                     other);
5060           } else {
5061             super.mergeFrom(other);
5062             return this;
5063           }
5064         }
5065 
mergeFrom( com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment other)5066         public Builder mergeFrom(
5067             com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment other) {
5068           if (other
5069               == com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
5070                   .getDefaultInstance()) return this;
5071           switch (other.getAdjustmentCase()) {
5072             case FIXED_LIKELIHOOD:
5073               {
5074                 setFixedLikelihoodValue(other.getFixedLikelihoodValue());
5075                 break;
5076               }
5077             case RELATIVE_LIKELIHOOD:
5078               {
5079                 setRelativeLikelihood(other.getRelativeLikelihood());
5080                 break;
5081               }
5082             case ADJUSTMENT_NOT_SET:
5083               {
5084                 break;
5085               }
5086           }
5087           this.mergeUnknownFields(other.getUnknownFields());
5088           onChanged();
5089           return this;
5090         }
5091 
5092         @java.lang.Override
isInitialized()5093         public final boolean isInitialized() {
5094           return true;
5095         }
5096 
5097         @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)5098         public Builder mergeFrom(
5099             com.google.protobuf.CodedInputStream input,
5100             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5101             throws java.io.IOException {
5102           if (extensionRegistry == null) {
5103             throw new java.lang.NullPointerException();
5104           }
5105           try {
5106             boolean done = false;
5107             while (!done) {
5108               int tag = input.readTag();
5109               switch (tag) {
5110                 case 0:
5111                   done = true;
5112                   break;
5113                 case 8:
5114                   {
5115                     int rawValue = input.readEnum();
5116                     adjustmentCase_ = 1;
5117                     adjustment_ = rawValue;
5118                     break;
5119                   } // case 8
5120                 case 16:
5121                   {
5122                     adjustment_ = input.readInt32();
5123                     adjustmentCase_ = 2;
5124                     break;
5125                   } // case 16
5126                 default:
5127                   {
5128                     if (!super.parseUnknownField(input, extensionRegistry, tag)) {
5129                       done = true; // was an endgroup tag
5130                     }
5131                     break;
5132                   } // default:
5133               } // switch (tag)
5134             } // while (!done)
5135           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
5136             throw e.unwrapIOException();
5137           } finally {
5138             onChanged();
5139           } // finally
5140           return this;
5141         }
5142 
5143         private int adjustmentCase_ = 0;
5144         private java.lang.Object adjustment_;
5145 
getAdjustmentCase()5146         public AdjustmentCase getAdjustmentCase() {
5147           return AdjustmentCase.forNumber(adjustmentCase_);
5148         }
5149 
clearAdjustment()5150         public Builder clearAdjustment() {
5151           adjustmentCase_ = 0;
5152           adjustment_ = null;
5153           onChanged();
5154           return this;
5155         }
5156 
5157         private int bitField0_;
5158 
5159         /**
5160          *
5161          *
5162          * <pre>
5163          * Set the likelihood of a finding to a fixed value.
5164          * </pre>
5165          *
5166          * <code>.google.privacy.dlp.v2.Likelihood fixed_likelihood = 1;</code>
5167          *
5168          * @return Whether the fixedLikelihood field is set.
5169          */
5170         @java.lang.Override
hasFixedLikelihood()5171         public boolean hasFixedLikelihood() {
5172           return adjustmentCase_ == 1;
5173         }
5174         /**
5175          *
5176          *
5177          * <pre>
5178          * Set the likelihood of a finding to a fixed value.
5179          * </pre>
5180          *
5181          * <code>.google.privacy.dlp.v2.Likelihood fixed_likelihood = 1;</code>
5182          *
5183          * @return The enum numeric value on the wire for fixedLikelihood.
5184          */
5185         @java.lang.Override
getFixedLikelihoodValue()5186         public int getFixedLikelihoodValue() {
5187           if (adjustmentCase_ == 1) {
5188             return ((java.lang.Integer) adjustment_).intValue();
5189           }
5190           return 0;
5191         }
5192         /**
5193          *
5194          *
5195          * <pre>
5196          * Set the likelihood of a finding to a fixed value.
5197          * </pre>
5198          *
5199          * <code>.google.privacy.dlp.v2.Likelihood fixed_likelihood = 1;</code>
5200          *
5201          * @param value The enum numeric value on the wire for fixedLikelihood to set.
5202          * @return This builder for chaining.
5203          */
setFixedLikelihoodValue(int value)5204         public Builder setFixedLikelihoodValue(int value) {
5205           adjustmentCase_ = 1;
5206           adjustment_ = value;
5207           onChanged();
5208           return this;
5209         }
5210         /**
5211          *
5212          *
5213          * <pre>
5214          * Set the likelihood of a finding to a fixed value.
5215          * </pre>
5216          *
5217          * <code>.google.privacy.dlp.v2.Likelihood fixed_likelihood = 1;</code>
5218          *
5219          * @return The fixedLikelihood.
5220          */
5221         @java.lang.Override
getFixedLikelihood()5222         public com.google.privacy.dlp.v2.Likelihood getFixedLikelihood() {
5223           if (adjustmentCase_ == 1) {
5224             com.google.privacy.dlp.v2.Likelihood result =
5225                 com.google.privacy.dlp.v2.Likelihood.forNumber((java.lang.Integer) adjustment_);
5226             return result == null ? com.google.privacy.dlp.v2.Likelihood.UNRECOGNIZED : result;
5227           }
5228           return com.google.privacy.dlp.v2.Likelihood.LIKELIHOOD_UNSPECIFIED;
5229         }
5230         /**
5231          *
5232          *
5233          * <pre>
5234          * Set the likelihood of a finding to a fixed value.
5235          * </pre>
5236          *
5237          * <code>.google.privacy.dlp.v2.Likelihood fixed_likelihood = 1;</code>
5238          *
5239          * @param value The fixedLikelihood to set.
5240          * @return This builder for chaining.
5241          */
setFixedLikelihood(com.google.privacy.dlp.v2.Likelihood value)5242         public Builder setFixedLikelihood(com.google.privacy.dlp.v2.Likelihood value) {
5243           if (value == null) {
5244             throw new NullPointerException();
5245           }
5246           adjustmentCase_ = 1;
5247           adjustment_ = value.getNumber();
5248           onChanged();
5249           return this;
5250         }
5251         /**
5252          *
5253          *
5254          * <pre>
5255          * Set the likelihood of a finding to a fixed value.
5256          * </pre>
5257          *
5258          * <code>.google.privacy.dlp.v2.Likelihood fixed_likelihood = 1;</code>
5259          *
5260          * @return This builder for chaining.
5261          */
clearFixedLikelihood()5262         public Builder clearFixedLikelihood() {
5263           if (adjustmentCase_ == 1) {
5264             adjustmentCase_ = 0;
5265             adjustment_ = null;
5266             onChanged();
5267           }
5268           return this;
5269         }
5270 
5271         /**
5272          *
5273          *
5274          * <pre>
5275          * Increase or decrease the likelihood by the specified number of
5276          * levels. For example, if a finding would be `POSSIBLE` without the
5277          * detection rule and `relative_likelihood` is 1, then it is upgraded to
5278          * `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
5279          * Likelihood may never drop below `VERY_UNLIKELY` or exceed
5280          * `VERY_LIKELY`, so applying an adjustment of 1 followed by an
5281          * adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
5282          * a final likelihood of `LIKELY`.
5283          * </pre>
5284          *
5285          * <code>int32 relative_likelihood = 2;</code>
5286          *
5287          * @return Whether the relativeLikelihood field is set.
5288          */
hasRelativeLikelihood()5289         public boolean hasRelativeLikelihood() {
5290           return adjustmentCase_ == 2;
5291         }
5292         /**
5293          *
5294          *
5295          * <pre>
5296          * Increase or decrease the likelihood by the specified number of
5297          * levels. For example, if a finding would be `POSSIBLE` without the
5298          * detection rule and `relative_likelihood` is 1, then it is upgraded to
5299          * `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
5300          * Likelihood may never drop below `VERY_UNLIKELY` or exceed
5301          * `VERY_LIKELY`, so applying an adjustment of 1 followed by an
5302          * adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
5303          * a final likelihood of `LIKELY`.
5304          * </pre>
5305          *
5306          * <code>int32 relative_likelihood = 2;</code>
5307          *
5308          * @return The relativeLikelihood.
5309          */
getRelativeLikelihood()5310         public int getRelativeLikelihood() {
5311           if (adjustmentCase_ == 2) {
5312             return (java.lang.Integer) adjustment_;
5313           }
5314           return 0;
5315         }
5316         /**
5317          *
5318          *
5319          * <pre>
5320          * Increase or decrease the likelihood by the specified number of
5321          * levels. For example, if a finding would be `POSSIBLE` without the
5322          * detection rule and `relative_likelihood` is 1, then it is upgraded to
5323          * `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
5324          * Likelihood may never drop below `VERY_UNLIKELY` or exceed
5325          * `VERY_LIKELY`, so applying an adjustment of 1 followed by an
5326          * adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
5327          * a final likelihood of `LIKELY`.
5328          * </pre>
5329          *
5330          * <code>int32 relative_likelihood = 2;</code>
5331          *
5332          * @param value The relativeLikelihood to set.
5333          * @return This builder for chaining.
5334          */
setRelativeLikelihood(int value)5335         public Builder setRelativeLikelihood(int value) {
5336 
5337           adjustmentCase_ = 2;
5338           adjustment_ = value;
5339           onChanged();
5340           return this;
5341         }
5342         /**
5343          *
5344          *
5345          * <pre>
5346          * Increase or decrease the likelihood by the specified number of
5347          * levels. For example, if a finding would be `POSSIBLE` without the
5348          * detection rule and `relative_likelihood` is 1, then it is upgraded to
5349          * `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
5350          * Likelihood may never drop below `VERY_UNLIKELY` or exceed
5351          * `VERY_LIKELY`, so applying an adjustment of 1 followed by an
5352          * adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
5353          * a final likelihood of `LIKELY`.
5354          * </pre>
5355          *
5356          * <code>int32 relative_likelihood = 2;</code>
5357          *
5358          * @return This builder for chaining.
5359          */
clearRelativeLikelihood()5360         public Builder clearRelativeLikelihood() {
5361           if (adjustmentCase_ == 2) {
5362             adjustmentCase_ = 0;
5363             adjustment_ = null;
5364             onChanged();
5365           }
5366           return this;
5367         }
5368 
5369         @java.lang.Override
setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)5370         public final Builder setUnknownFields(
5371             final com.google.protobuf.UnknownFieldSet unknownFields) {
5372           return super.setUnknownFields(unknownFields);
5373         }
5374 
5375         @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)5376         public final Builder mergeUnknownFields(
5377             final com.google.protobuf.UnknownFieldSet unknownFields) {
5378           return super.mergeUnknownFields(unknownFields);
5379         }
5380 
5381         // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment)
5382       }
5383 
5384       // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment)
5385       private static final com.google.privacy.dlp.v2.CustomInfoType.DetectionRule
5386               .LikelihoodAdjustment
5387           DEFAULT_INSTANCE;
5388 
5389       static {
5390         DEFAULT_INSTANCE =
5391             new com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment();
5392       }
5393 
5394       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
getDefaultInstance()5395           getDefaultInstance() {
5396         return DEFAULT_INSTANCE;
5397       }
5398 
5399       private static final com.google.protobuf.Parser<LikelihoodAdjustment> PARSER =
5400           new com.google.protobuf.AbstractParser<LikelihoodAdjustment>() {
5401             @java.lang.Override
5402             public LikelihoodAdjustment parsePartialFrom(
5403                 com.google.protobuf.CodedInputStream input,
5404                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5405                 throws com.google.protobuf.InvalidProtocolBufferException {
5406               Builder builder = newBuilder();
5407               try {
5408                 builder.mergeFrom(input, extensionRegistry);
5409               } catch (com.google.protobuf.InvalidProtocolBufferException e) {
5410                 throw e.setUnfinishedMessage(builder.buildPartial());
5411               } catch (com.google.protobuf.UninitializedMessageException e) {
5412                 throw e.asInvalidProtocolBufferException()
5413                     .setUnfinishedMessage(builder.buildPartial());
5414               } catch (java.io.IOException e) {
5415                 throw new com.google.protobuf.InvalidProtocolBufferException(e)
5416                     .setUnfinishedMessage(builder.buildPartial());
5417               }
5418               return builder.buildPartial();
5419             }
5420           };
5421 
parser()5422       public static com.google.protobuf.Parser<LikelihoodAdjustment> parser() {
5423         return PARSER;
5424       }
5425 
5426       @java.lang.Override
getParserForType()5427       public com.google.protobuf.Parser<LikelihoodAdjustment> getParserForType() {
5428         return PARSER;
5429       }
5430 
5431       @java.lang.Override
5432       public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
getDefaultInstanceForType()5433           getDefaultInstanceForType() {
5434         return DEFAULT_INSTANCE;
5435       }
5436     }
5437 
5438     public interface HotwordRuleOrBuilder
5439         extends
5440         // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule)
5441         com.google.protobuf.MessageOrBuilder {
5442 
5443       /**
5444        *
5445        *
5446        * <pre>
5447        * Regular expression pattern defining what qualifies as a hotword.
5448        * </pre>
5449        *
5450        * <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
5451        *
5452        * @return Whether the hotwordRegex field is set.
5453        */
hasHotwordRegex()5454       boolean hasHotwordRegex();
5455       /**
5456        *
5457        *
5458        * <pre>
5459        * Regular expression pattern defining what qualifies as a hotword.
5460        * </pre>
5461        *
5462        * <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
5463        *
5464        * @return The hotwordRegex.
5465        */
getHotwordRegex()5466       com.google.privacy.dlp.v2.CustomInfoType.Regex getHotwordRegex();
5467       /**
5468        *
5469        *
5470        * <pre>
5471        * Regular expression pattern defining what qualifies as a hotword.
5472        * </pre>
5473        *
5474        * <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
5475        */
getHotwordRegexOrBuilder()5476       com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getHotwordRegexOrBuilder();
5477 
5478       /**
5479        *
5480        *
5481        * <pre>
5482        * Range of characters within which the entire hotword must reside.
5483        * The total length of the window cannot exceed 1000 characters.
5484        * The finding itself will be included in the window, so that hotwords can
5485        * be used to match substrings of the finding itself. Suppose you
5486        * want Cloud DLP to promote the likelihood of the phone number
5487        * regex "&#92;(&#92;d{3}&#92;) &#92;d{3}-&#92;d{4}" if the area code is known to be the
5488        * area code of a company's office. In this case, use the hotword regex
5489        * "&#92;(xxx&#92;)", where "xxx" is the area code in question.
5490        * For tabular data, if you want to modify the likelihood of an entire
5491        * column of findngs, see
5492        * [Hotword example: Set the match likelihood of a table column]
5493        * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
5494        * </pre>
5495        *
5496        * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
5497        *
5498        * @return Whether the proximity field is set.
5499        */
hasProximity()5500       boolean hasProximity();
5501       /**
5502        *
5503        *
5504        * <pre>
5505        * Range of characters within which the entire hotword must reside.
5506        * The total length of the window cannot exceed 1000 characters.
5507        * The finding itself will be included in the window, so that hotwords can
5508        * be used to match substrings of the finding itself. Suppose you
5509        * want Cloud DLP to promote the likelihood of the phone number
5510        * regex "&#92;(&#92;d{3}&#92;) &#92;d{3}-&#92;d{4}" if the area code is known to be the
5511        * area code of a company's office. In this case, use the hotword regex
5512        * "&#92;(xxx&#92;)", where "xxx" is the area code in question.
5513        * For tabular data, if you want to modify the likelihood of an entire
5514        * column of findngs, see
5515        * [Hotword example: Set the match likelihood of a table column]
5516        * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
5517        * </pre>
5518        *
5519        * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
5520        *
5521        * @return The proximity.
5522        */
getProximity()5523       com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity getProximity();
5524       /**
5525        *
5526        *
5527        * <pre>
5528        * Range of characters within which the entire hotword must reside.
5529        * The total length of the window cannot exceed 1000 characters.
5530        * The finding itself will be included in the window, so that hotwords can
5531        * be used to match substrings of the finding itself. Suppose you
5532        * want Cloud DLP to promote the likelihood of the phone number
5533        * regex "&#92;(&#92;d{3}&#92;) &#92;d{3}-&#92;d{4}" if the area code is known to be the
5534        * area code of a company's office. In this case, use the hotword regex
5535        * "&#92;(xxx&#92;)", where "xxx" is the area code in question.
5536        * For tabular data, if you want to modify the likelihood of an entire
5537        * column of findngs, see
5538        * [Hotword example: Set the match likelihood of a table column]
5539        * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
5540        * </pre>
5541        *
5542        * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
5543        */
5544       com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.ProximityOrBuilder
getProximityOrBuilder()5545           getProximityOrBuilder();
5546 
5547       /**
5548        *
5549        *
5550        * <pre>
5551        * Likelihood adjustment to apply to all matching findings.
5552        * </pre>
5553        *
5554        * <code>
5555        * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;
5556        * </code>
5557        *
5558        * @return Whether the likelihoodAdjustment field is set.
5559        */
hasLikelihoodAdjustment()5560       boolean hasLikelihoodAdjustment();
5561       /**
5562        *
5563        *
5564        * <pre>
5565        * Likelihood adjustment to apply to all matching findings.
5566        * </pre>
5567        *
5568        * <code>
5569        * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;
5570        * </code>
5571        *
5572        * @return The likelihoodAdjustment.
5573        */
5574       com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
getLikelihoodAdjustment()5575           getLikelihoodAdjustment();
5576       /**
5577        *
5578        *
5579        * <pre>
5580        * Likelihood adjustment to apply to all matching findings.
5581        * </pre>
5582        *
5583        * <code>
5584        * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;
5585        * </code>
5586        */
5587       com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustmentOrBuilder
getLikelihoodAdjustmentOrBuilder()5588           getLikelihoodAdjustmentOrBuilder();
5589     }
5590     /**
5591      *
5592      *
5593      * <pre>
5594      * The rule that adjusts the likelihood of findings within a certain
5595      * proximity of hotwords.
5596      * </pre>
5597      *
5598      * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule}
5599      */
5600     public static final class HotwordRule extends com.google.protobuf.GeneratedMessageV3
5601         implements
5602         // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule)
5603         HotwordRuleOrBuilder {
5604       private static final long serialVersionUID = 0L;
5605       // Use HotwordRule.newBuilder() to construct.
HotwordRule(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)5606       private HotwordRule(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
5607         super(builder);
5608       }
5609 
HotwordRule()5610       private HotwordRule() {}
5611 
5612       @java.lang.Override
5613       @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)5614       protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
5615         return new HotwordRule();
5616       }
5617 
5618       @java.lang.Override
getUnknownFields()5619       public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
5620         return this.unknownFields;
5621       }
5622 
getDescriptor()5623       public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
5624         return com.google.privacy.dlp.v2.DlpStorage
5625             .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_HotwordRule_descriptor;
5626       }
5627 
5628       @java.lang.Override
5629       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()5630           internalGetFieldAccessorTable() {
5631         return com.google.privacy.dlp.v2.DlpStorage
5632             .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_HotwordRule_fieldAccessorTable
5633             .ensureFieldAccessorsInitialized(
5634                 com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.class,
5635                 com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder.class);
5636       }
5637 
5638       public static final int HOTWORD_REGEX_FIELD_NUMBER = 1;
5639       private com.google.privacy.dlp.v2.CustomInfoType.Regex hotwordRegex_;
5640       /**
5641        *
5642        *
5643        * <pre>
5644        * Regular expression pattern defining what qualifies as a hotword.
5645        * </pre>
5646        *
5647        * <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
5648        *
5649        * @return Whether the hotwordRegex field is set.
5650        */
5651       @java.lang.Override
hasHotwordRegex()5652       public boolean hasHotwordRegex() {
5653         return hotwordRegex_ != null;
5654       }
5655       /**
5656        *
5657        *
5658        * <pre>
5659        * Regular expression pattern defining what qualifies as a hotword.
5660        * </pre>
5661        *
5662        * <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
5663        *
5664        * @return The hotwordRegex.
5665        */
5666       @java.lang.Override
getHotwordRegex()5667       public com.google.privacy.dlp.v2.CustomInfoType.Regex getHotwordRegex() {
5668         return hotwordRegex_ == null
5669             ? com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance()
5670             : hotwordRegex_;
5671       }
5672       /**
5673        *
5674        *
5675        * <pre>
5676        * Regular expression pattern defining what qualifies as a hotword.
5677        * </pre>
5678        *
5679        * <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
5680        */
5681       @java.lang.Override
getHotwordRegexOrBuilder()5682       public com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getHotwordRegexOrBuilder() {
5683         return hotwordRegex_ == null
5684             ? com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance()
5685             : hotwordRegex_;
5686       }
5687 
5688       public static final int PROXIMITY_FIELD_NUMBER = 2;
5689       private com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity_;
5690       /**
5691        *
5692        *
5693        * <pre>
5694        * Range of characters within which the entire hotword must reside.
5695        * The total length of the window cannot exceed 1000 characters.
5696        * The finding itself will be included in the window, so that hotwords can
5697        * be used to match substrings of the finding itself. Suppose you
5698        * want Cloud DLP to promote the likelihood of the phone number
5699        * regex "&#92;(&#92;d{3}&#92;) &#92;d{3}-&#92;d{4}" if the area code is known to be the
5700        * area code of a company's office. In this case, use the hotword regex
5701        * "&#92;(xxx&#92;)", where "xxx" is the area code in question.
5702        * For tabular data, if you want to modify the likelihood of an entire
5703        * column of findngs, see
5704        * [Hotword example: Set the match likelihood of a table column]
5705        * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
5706        * </pre>
5707        *
5708        * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
5709        *
5710        * @return Whether the proximity field is set.
5711        */
5712       @java.lang.Override
hasProximity()5713       public boolean hasProximity() {
5714         return proximity_ != null;
5715       }
5716       /**
5717        *
5718        *
5719        * <pre>
5720        * Range of characters within which the entire hotword must reside.
5721        * The total length of the window cannot exceed 1000 characters.
5722        * The finding itself will be included in the window, so that hotwords can
5723        * be used to match substrings of the finding itself. Suppose you
5724        * want Cloud DLP to promote the likelihood of the phone number
5725        * regex "&#92;(&#92;d{3}&#92;) &#92;d{3}-&#92;d{4}" if the area code is known to be the
5726        * area code of a company's office. In this case, use the hotword regex
5727        * "&#92;(xxx&#92;)", where "xxx" is the area code in question.
5728        * For tabular data, if you want to modify the likelihood of an entire
5729        * column of findngs, see
5730        * [Hotword example: Set the match likelihood of a table column]
5731        * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
5732        * </pre>
5733        *
5734        * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
5735        *
5736        * @return The proximity.
5737        */
5738       @java.lang.Override
getProximity()5739       public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity getProximity() {
5740         return proximity_ == null
5741             ? com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.getDefaultInstance()
5742             : proximity_;
5743       }
5744       /**
5745        *
5746        *
5747        * <pre>
5748        * Range of characters within which the entire hotword must reside.
5749        * The total length of the window cannot exceed 1000 characters.
5750        * The finding itself will be included in the window, so that hotwords can
5751        * be used to match substrings of the finding itself. Suppose you
5752        * want Cloud DLP to promote the likelihood of the phone number
5753        * regex "&#92;(&#92;d{3}&#92;) &#92;d{3}-&#92;d{4}" if the area code is known to be the
5754        * area code of a company's office. In this case, use the hotword regex
5755        * "&#92;(xxx&#92;)", where "xxx" is the area code in question.
5756        * For tabular data, if you want to modify the likelihood of an entire
5757        * column of findngs, see
5758        * [Hotword example: Set the match likelihood of a table column]
5759        * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
5760        * </pre>
5761        *
5762        * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
5763        */
5764       @java.lang.Override
5765       public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.ProximityOrBuilder
getProximityOrBuilder()5766           getProximityOrBuilder() {
5767         return proximity_ == null
5768             ? com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.getDefaultInstance()
5769             : proximity_;
5770       }
5771 
5772       public static final int LIKELIHOOD_ADJUSTMENT_FIELD_NUMBER = 3;
5773       private com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
5774           likelihoodAdjustment_;
5775       /**
5776        *
5777        *
5778        * <pre>
5779        * Likelihood adjustment to apply to all matching findings.
5780        * </pre>
5781        *
5782        * <code>
5783        * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;
5784        * </code>
5785        *
5786        * @return Whether the likelihoodAdjustment field is set.
5787        */
5788       @java.lang.Override
hasLikelihoodAdjustment()5789       public boolean hasLikelihoodAdjustment() {
5790         return likelihoodAdjustment_ != null;
5791       }
5792       /**
5793        *
5794        *
5795        * <pre>
5796        * Likelihood adjustment to apply to all matching findings.
5797        * </pre>
5798        *
5799        * <code>
5800        * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;
5801        * </code>
5802        *
5803        * @return The likelihoodAdjustment.
5804        */
5805       @java.lang.Override
5806       public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
getLikelihoodAdjustment()5807           getLikelihoodAdjustment() {
5808         return likelihoodAdjustment_ == null
5809             ? com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
5810                 .getDefaultInstance()
5811             : likelihoodAdjustment_;
5812       }
5813       /**
5814        *
5815        *
5816        * <pre>
5817        * Likelihood adjustment to apply to all matching findings.
5818        * </pre>
5819        *
5820        * <code>
5821        * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;
5822        * </code>
5823        */
5824       @java.lang.Override
5825       public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustmentOrBuilder
getLikelihoodAdjustmentOrBuilder()5826           getLikelihoodAdjustmentOrBuilder() {
5827         return likelihoodAdjustment_ == null
5828             ? com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
5829                 .getDefaultInstance()
5830             : likelihoodAdjustment_;
5831       }
5832 
5833       private byte memoizedIsInitialized = -1;
5834 
5835       @java.lang.Override
isInitialized()5836       public final boolean isInitialized() {
5837         byte isInitialized = memoizedIsInitialized;
5838         if (isInitialized == 1) return true;
5839         if (isInitialized == 0) return false;
5840 
5841         memoizedIsInitialized = 1;
5842         return true;
5843       }
5844 
5845       @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)5846       public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
5847         if (hotwordRegex_ != null) {
5848           output.writeMessage(1, getHotwordRegex());
5849         }
5850         if (proximity_ != null) {
5851           output.writeMessage(2, getProximity());
5852         }
5853         if (likelihoodAdjustment_ != null) {
5854           output.writeMessage(3, getLikelihoodAdjustment());
5855         }
5856         getUnknownFields().writeTo(output);
5857       }
5858 
5859       @java.lang.Override
getSerializedSize()5860       public int getSerializedSize() {
5861         int size = memoizedSize;
5862         if (size != -1) return size;
5863 
5864         size = 0;
5865         if (hotwordRegex_ != null) {
5866           size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getHotwordRegex());
5867         }
5868         if (proximity_ != null) {
5869           size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getProximity());
5870         }
5871         if (likelihoodAdjustment_ != null) {
5872           size +=
5873               com.google.protobuf.CodedOutputStream.computeMessageSize(
5874                   3, getLikelihoodAdjustment());
5875         }
5876         size += getUnknownFields().getSerializedSize();
5877         memoizedSize = size;
5878         return size;
5879       }
5880 
5881       @java.lang.Override
equals(final java.lang.Object obj)5882       public boolean equals(final java.lang.Object obj) {
5883         if (obj == this) {
5884           return true;
5885         }
5886         if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule)) {
5887           return super.equals(obj);
5888         }
5889         com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule other =
5890             (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) obj;
5891 
5892         if (hasHotwordRegex() != other.hasHotwordRegex()) return false;
5893         if (hasHotwordRegex()) {
5894           if (!getHotwordRegex().equals(other.getHotwordRegex())) return false;
5895         }
5896         if (hasProximity() != other.hasProximity()) return false;
5897         if (hasProximity()) {
5898           if (!getProximity().equals(other.getProximity())) return false;
5899         }
5900         if (hasLikelihoodAdjustment() != other.hasLikelihoodAdjustment()) return false;
5901         if (hasLikelihoodAdjustment()) {
5902           if (!getLikelihoodAdjustment().equals(other.getLikelihoodAdjustment())) return false;
5903         }
5904         if (!getUnknownFields().equals(other.getUnknownFields())) return false;
5905         return true;
5906       }
5907 
5908       @java.lang.Override
hashCode()5909       public int hashCode() {
5910         if (memoizedHashCode != 0) {
5911           return memoizedHashCode;
5912         }
5913         int hash = 41;
5914         hash = (19 * hash) + getDescriptor().hashCode();
5915         if (hasHotwordRegex()) {
5916           hash = (37 * hash) + HOTWORD_REGEX_FIELD_NUMBER;
5917           hash = (53 * hash) + getHotwordRegex().hashCode();
5918         }
5919         if (hasProximity()) {
5920           hash = (37 * hash) + PROXIMITY_FIELD_NUMBER;
5921           hash = (53 * hash) + getProximity().hashCode();
5922         }
5923         if (hasLikelihoodAdjustment()) {
5924           hash = (37 * hash) + LIKELIHOOD_ADJUSTMENT_FIELD_NUMBER;
5925           hash = (53 * hash) + getLikelihoodAdjustment().hashCode();
5926         }
5927         hash = (29 * hash) + getUnknownFields().hashCode();
5928         memoizedHashCode = hash;
5929         return hash;
5930       }
5931 
parseFrom( java.nio.ByteBuffer data)5932       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom(
5933           java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
5934         return PARSER.parseFrom(data);
5935       }
5936 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)5937       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom(
5938           java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5939           throws com.google.protobuf.InvalidProtocolBufferException {
5940         return PARSER.parseFrom(data, extensionRegistry);
5941       }
5942 
parseFrom( com.google.protobuf.ByteString data)5943       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom(
5944           com.google.protobuf.ByteString data)
5945           throws com.google.protobuf.InvalidProtocolBufferException {
5946         return PARSER.parseFrom(data);
5947       }
5948 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)5949       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom(
5950           com.google.protobuf.ByteString data,
5951           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5952           throws com.google.protobuf.InvalidProtocolBufferException {
5953         return PARSER.parseFrom(data, extensionRegistry);
5954       }
5955 
parseFrom( byte[] data)5956       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom(
5957           byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
5958         return PARSER.parseFrom(data);
5959       }
5960 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)5961       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom(
5962           byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5963           throws com.google.protobuf.InvalidProtocolBufferException {
5964         return PARSER.parseFrom(data, extensionRegistry);
5965       }
5966 
parseFrom( java.io.InputStream input)5967       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom(
5968           java.io.InputStream input) throws java.io.IOException {
5969         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
5970       }
5971 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)5972       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom(
5973           java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5974           throws java.io.IOException {
5975         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
5976             PARSER, input, extensionRegistry);
5977       }
5978 
5979       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule
parseDelimitedFrom(java.io.InputStream input)5980           parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
5981         return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
5982       }
5983 
5984       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)5985           parseDelimitedFrom(
5986               java.io.InputStream input,
5987               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5988               throws java.io.IOException {
5989         return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
5990             PARSER, input, extensionRegistry);
5991       }
5992 
parseFrom( com.google.protobuf.CodedInputStream input)5993       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom(
5994           com.google.protobuf.CodedInputStream input) throws java.io.IOException {
5995         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
5996       }
5997 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)5998       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom(
5999           com.google.protobuf.CodedInputStream input,
6000           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6001           throws java.io.IOException {
6002         return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
6003             PARSER, input, extensionRegistry);
6004       }
6005 
6006       @java.lang.Override
newBuilderForType()6007       public Builder newBuilderForType() {
6008         return newBuilder();
6009       }
6010 
newBuilder()6011       public static Builder newBuilder() {
6012         return DEFAULT_INSTANCE.toBuilder();
6013       }
6014 
newBuilder( com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule prototype)6015       public static Builder newBuilder(
6016           com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule prototype) {
6017         return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
6018       }
6019 
6020       @java.lang.Override
toBuilder()6021       public Builder toBuilder() {
6022         return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
6023       }
6024 
6025       @java.lang.Override
newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)6026       protected Builder newBuilderForType(
6027           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
6028         Builder builder = new Builder(parent);
6029         return builder;
6030       }
6031       /**
6032        *
6033        *
6034        * <pre>
6035        * The rule that adjusts the likelihood of findings within a certain
6036        * proximity of hotwords.
6037        * </pre>
6038        *
6039        * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule}
6040        */
6041       public static final class Builder
6042           extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
6043           implements
6044           // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule)
6045           com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder {
getDescriptor()6046         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
6047           return com.google.privacy.dlp.v2.DlpStorage
6048               .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_HotwordRule_descriptor;
6049         }
6050 
6051         @java.lang.Override
6052         protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()6053             internalGetFieldAccessorTable() {
6054           return com.google.privacy.dlp.v2.DlpStorage
6055               .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_HotwordRule_fieldAccessorTable
6056               .ensureFieldAccessorsInitialized(
6057                   com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.class,
6058                   com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder.class);
6059         }
6060 
6061         // Construct using
6062         // com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.newBuilder()
Builder()6063         private Builder() {}
6064 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)6065         private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
6066           super(parent);
6067         }
6068 
6069         @java.lang.Override
clear()6070         public Builder clear() {
6071           super.clear();
6072           bitField0_ = 0;
6073           hotwordRegex_ = null;
6074           if (hotwordRegexBuilder_ != null) {
6075             hotwordRegexBuilder_.dispose();
6076             hotwordRegexBuilder_ = null;
6077           }
6078           proximity_ = null;
6079           if (proximityBuilder_ != null) {
6080             proximityBuilder_.dispose();
6081             proximityBuilder_ = null;
6082           }
6083           likelihoodAdjustment_ = null;
6084           if (likelihoodAdjustmentBuilder_ != null) {
6085             likelihoodAdjustmentBuilder_.dispose();
6086             likelihoodAdjustmentBuilder_ = null;
6087           }
6088           return this;
6089         }
6090 
6091         @java.lang.Override
getDescriptorForType()6092         public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
6093           return com.google.privacy.dlp.v2.DlpStorage
6094               .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_HotwordRule_descriptor;
6095         }
6096 
6097         @java.lang.Override
6098         public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule
getDefaultInstanceForType()6099             getDefaultInstanceForType() {
6100           return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule
6101               .getDefaultInstance();
6102         }
6103 
6104         @java.lang.Override
build()6105         public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule build() {
6106           com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule result =
6107               buildPartial();
6108           if (!result.isInitialized()) {
6109             throw newUninitializedMessageException(result);
6110           }
6111           return result;
6112         }
6113 
6114         @java.lang.Override
buildPartial()6115         public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule buildPartial() {
6116           com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule result =
6117               new com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule(this);
6118           if (bitField0_ != 0) {
6119             buildPartial0(result);
6120           }
6121           onBuilt();
6122           return result;
6123         }
6124 
buildPartial0( com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule result)6125         private void buildPartial0(
6126             com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule result) {
6127           int from_bitField0_ = bitField0_;
6128           if (((from_bitField0_ & 0x00000001) != 0)) {
6129             result.hotwordRegex_ =
6130                 hotwordRegexBuilder_ == null ? hotwordRegex_ : hotwordRegexBuilder_.build();
6131           }
6132           if (((from_bitField0_ & 0x00000002) != 0)) {
6133             result.proximity_ = proximityBuilder_ == null ? proximity_ : proximityBuilder_.build();
6134           }
6135           if (((from_bitField0_ & 0x00000004) != 0)) {
6136             result.likelihoodAdjustment_ =
6137                 likelihoodAdjustmentBuilder_ == null
6138                     ? likelihoodAdjustment_
6139                     : likelihoodAdjustmentBuilder_.build();
6140           }
6141         }
6142 
6143         @java.lang.Override
clone()6144         public Builder clone() {
6145           return super.clone();
6146         }
6147 
6148         @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)6149         public Builder setField(
6150             com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
6151           return super.setField(field, value);
6152         }
6153 
6154         @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)6155         public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
6156           return super.clearField(field);
6157         }
6158 
6159         @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)6160         public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
6161           return super.clearOneof(oneof);
6162         }
6163 
6164         @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)6165         public Builder setRepeatedField(
6166             com.google.protobuf.Descriptors.FieldDescriptor field,
6167             int index,
6168             java.lang.Object value) {
6169           return super.setRepeatedField(field, index, value);
6170         }
6171 
6172         @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)6173         public Builder addRepeatedField(
6174             com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
6175           return super.addRepeatedField(field, value);
6176         }
6177 
6178         @java.lang.Override
mergeFrom(com.google.protobuf.Message other)6179         public Builder mergeFrom(com.google.protobuf.Message other) {
6180           if (other instanceof com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) {
6181             return mergeFrom(
6182                 (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) other);
6183           } else {
6184             super.mergeFrom(other);
6185             return this;
6186           }
6187         }
6188 
mergeFrom( com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule other)6189         public Builder mergeFrom(
6190             com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule other) {
6191           if (other
6192               == com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule
6193                   .getDefaultInstance()) return this;
6194           if (other.hasHotwordRegex()) {
6195             mergeHotwordRegex(other.getHotwordRegex());
6196           }
6197           if (other.hasProximity()) {
6198             mergeProximity(other.getProximity());
6199           }
6200           if (other.hasLikelihoodAdjustment()) {
6201             mergeLikelihoodAdjustment(other.getLikelihoodAdjustment());
6202           }
6203           this.mergeUnknownFields(other.getUnknownFields());
6204           onChanged();
6205           return this;
6206         }
6207 
6208         @java.lang.Override
isInitialized()6209         public final boolean isInitialized() {
6210           return true;
6211         }
6212 
6213         @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)6214         public Builder mergeFrom(
6215             com.google.protobuf.CodedInputStream input,
6216             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6217             throws java.io.IOException {
6218           if (extensionRegistry == null) {
6219             throw new java.lang.NullPointerException();
6220           }
6221           try {
6222             boolean done = false;
6223             while (!done) {
6224               int tag = input.readTag();
6225               switch (tag) {
6226                 case 0:
6227                   done = true;
6228                   break;
6229                 case 10:
6230                   {
6231                     input.readMessage(
6232                         getHotwordRegexFieldBuilder().getBuilder(), extensionRegistry);
6233                     bitField0_ |= 0x00000001;
6234                     break;
6235                   } // case 10
6236                 case 18:
6237                   {
6238                     input.readMessage(getProximityFieldBuilder().getBuilder(), extensionRegistry);
6239                     bitField0_ |= 0x00000002;
6240                     break;
6241                   } // case 18
6242                 case 26:
6243                   {
6244                     input.readMessage(
6245                         getLikelihoodAdjustmentFieldBuilder().getBuilder(), extensionRegistry);
6246                     bitField0_ |= 0x00000004;
6247                     break;
6248                   } // case 26
6249                 default:
6250                   {
6251                     if (!super.parseUnknownField(input, extensionRegistry, tag)) {
6252                       done = true; // was an endgroup tag
6253                     }
6254                     break;
6255                   } // default:
6256               } // switch (tag)
6257             } // while (!done)
6258           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
6259             throw e.unwrapIOException();
6260           } finally {
6261             onChanged();
6262           } // finally
6263           return this;
6264         }
6265 
6266         private int bitField0_;
6267 
6268         private com.google.privacy.dlp.v2.CustomInfoType.Regex hotwordRegex_;
6269         private com.google.protobuf.SingleFieldBuilderV3<
6270                 com.google.privacy.dlp.v2.CustomInfoType.Regex,
6271                 com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder,
6272                 com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder>
6273             hotwordRegexBuilder_;
6274         /**
6275          *
6276          *
6277          * <pre>
6278          * Regular expression pattern defining what qualifies as a hotword.
6279          * </pre>
6280          *
6281          * <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
6282          *
6283          * @return Whether the hotwordRegex field is set.
6284          */
hasHotwordRegex()6285         public boolean hasHotwordRegex() {
6286           return ((bitField0_ & 0x00000001) != 0);
6287         }
6288         /**
6289          *
6290          *
6291          * <pre>
6292          * Regular expression pattern defining what qualifies as a hotword.
6293          * </pre>
6294          *
6295          * <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
6296          *
6297          * @return The hotwordRegex.
6298          */
getHotwordRegex()6299         public com.google.privacy.dlp.v2.CustomInfoType.Regex getHotwordRegex() {
6300           if (hotwordRegexBuilder_ == null) {
6301             return hotwordRegex_ == null
6302                 ? com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance()
6303                 : hotwordRegex_;
6304           } else {
6305             return hotwordRegexBuilder_.getMessage();
6306           }
6307         }
6308         /**
6309          *
6310          *
6311          * <pre>
6312          * Regular expression pattern defining what qualifies as a hotword.
6313          * </pre>
6314          *
6315          * <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
6316          */
setHotwordRegex(com.google.privacy.dlp.v2.CustomInfoType.Regex value)6317         public Builder setHotwordRegex(com.google.privacy.dlp.v2.CustomInfoType.Regex value) {
6318           if (hotwordRegexBuilder_ == null) {
6319             if (value == null) {
6320               throw new NullPointerException();
6321             }
6322             hotwordRegex_ = value;
6323           } else {
6324             hotwordRegexBuilder_.setMessage(value);
6325           }
6326           bitField0_ |= 0x00000001;
6327           onChanged();
6328           return this;
6329         }
6330         /**
6331          *
6332          *
6333          * <pre>
6334          * Regular expression pattern defining what qualifies as a hotword.
6335          * </pre>
6336          *
6337          * <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
6338          */
setHotwordRegex( com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder builderForValue)6339         public Builder setHotwordRegex(
6340             com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder builderForValue) {
6341           if (hotwordRegexBuilder_ == null) {
6342             hotwordRegex_ = builderForValue.build();
6343           } else {
6344             hotwordRegexBuilder_.setMessage(builderForValue.build());
6345           }
6346           bitField0_ |= 0x00000001;
6347           onChanged();
6348           return this;
6349         }
6350         /**
6351          *
6352          *
6353          * <pre>
6354          * Regular expression pattern defining what qualifies as a hotword.
6355          * </pre>
6356          *
6357          * <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
6358          */
mergeHotwordRegex(com.google.privacy.dlp.v2.CustomInfoType.Regex value)6359         public Builder mergeHotwordRegex(com.google.privacy.dlp.v2.CustomInfoType.Regex value) {
6360           if (hotwordRegexBuilder_ == null) {
6361             if (((bitField0_ & 0x00000001) != 0)
6362                 && hotwordRegex_ != null
6363                 && hotwordRegex_
6364                     != com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance()) {
6365               getHotwordRegexBuilder().mergeFrom(value);
6366             } else {
6367               hotwordRegex_ = value;
6368             }
6369           } else {
6370             hotwordRegexBuilder_.mergeFrom(value);
6371           }
6372           bitField0_ |= 0x00000001;
6373           onChanged();
6374           return this;
6375         }
6376         /**
6377          *
6378          *
6379          * <pre>
6380          * Regular expression pattern defining what qualifies as a hotword.
6381          * </pre>
6382          *
6383          * <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
6384          */
clearHotwordRegex()6385         public Builder clearHotwordRegex() {
6386           bitField0_ = (bitField0_ & ~0x00000001);
6387           hotwordRegex_ = null;
6388           if (hotwordRegexBuilder_ != null) {
6389             hotwordRegexBuilder_.dispose();
6390             hotwordRegexBuilder_ = null;
6391           }
6392           onChanged();
6393           return this;
6394         }
6395         /**
6396          *
6397          *
6398          * <pre>
6399          * Regular expression pattern defining what qualifies as a hotword.
6400          * </pre>
6401          *
6402          * <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
6403          */
getHotwordRegexBuilder()6404         public com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder getHotwordRegexBuilder() {
6405           bitField0_ |= 0x00000001;
6406           onChanged();
6407           return getHotwordRegexFieldBuilder().getBuilder();
6408         }
6409         /**
6410          *
6411          *
6412          * <pre>
6413          * Regular expression pattern defining what qualifies as a hotword.
6414          * </pre>
6415          *
6416          * <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
6417          */
getHotwordRegexOrBuilder()6418         public com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getHotwordRegexOrBuilder() {
6419           if (hotwordRegexBuilder_ != null) {
6420             return hotwordRegexBuilder_.getMessageOrBuilder();
6421           } else {
6422             return hotwordRegex_ == null
6423                 ? com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance()
6424                 : hotwordRegex_;
6425           }
6426         }
6427         /**
6428          *
6429          *
6430          * <pre>
6431          * Regular expression pattern defining what qualifies as a hotword.
6432          * </pre>
6433          *
6434          * <code>.google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1;</code>
6435          */
6436         private com.google.protobuf.SingleFieldBuilderV3<
6437                 com.google.privacy.dlp.v2.CustomInfoType.Regex,
6438                 com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder,
6439                 com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder>
getHotwordRegexFieldBuilder()6440             getHotwordRegexFieldBuilder() {
6441           if (hotwordRegexBuilder_ == null) {
6442             hotwordRegexBuilder_ =
6443                 new com.google.protobuf.SingleFieldBuilderV3<
6444                     com.google.privacy.dlp.v2.CustomInfoType.Regex,
6445                     com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder,
6446                     com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder>(
6447                     getHotwordRegex(), getParentForChildren(), isClean());
6448             hotwordRegex_ = null;
6449           }
6450           return hotwordRegexBuilder_;
6451         }
6452 
6453         private com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity_;
6454         private com.google.protobuf.SingleFieldBuilderV3<
6455                 com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity,
6456                 com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.Builder,
6457                 com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.ProximityOrBuilder>
6458             proximityBuilder_;
6459         /**
6460          *
6461          *
6462          * <pre>
6463          * Range of characters within which the entire hotword must reside.
6464          * The total length of the window cannot exceed 1000 characters.
6465          * The finding itself will be included in the window, so that hotwords can
6466          * be used to match substrings of the finding itself. Suppose you
6467          * want Cloud DLP to promote the likelihood of the phone number
6468          * regex "&#92;(&#92;d{3}&#92;) &#92;d{3}-&#92;d{4}" if the area code is known to be the
6469          * area code of a company's office. In this case, use the hotword regex
6470          * "&#92;(xxx&#92;)", where "xxx" is the area code in question.
6471          * For tabular data, if you want to modify the likelihood of an entire
6472          * column of findngs, see
6473          * [Hotword example: Set the match likelihood of a table column]
6474          * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
6475          * </pre>
6476          *
6477          * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
6478          *
6479          * @return Whether the proximity field is set.
6480          */
hasProximity()6481         public boolean hasProximity() {
6482           return ((bitField0_ & 0x00000002) != 0);
6483         }
6484         /**
6485          *
6486          *
6487          * <pre>
6488          * Range of characters within which the entire hotword must reside.
6489          * The total length of the window cannot exceed 1000 characters.
6490          * The finding itself will be included in the window, so that hotwords can
6491          * be used to match substrings of the finding itself. Suppose you
6492          * want Cloud DLP to promote the likelihood of the phone number
6493          * regex "&#92;(&#92;d{3}&#92;) &#92;d{3}-&#92;d{4}" if the area code is known to be the
6494          * area code of a company's office. In this case, use the hotword regex
6495          * "&#92;(xxx&#92;)", where "xxx" is the area code in question.
6496          * For tabular data, if you want to modify the likelihood of an entire
6497          * column of findngs, see
6498          * [Hotword example: Set the match likelihood of a table column]
6499          * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
6500          * </pre>
6501          *
6502          * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
6503          *
6504          * @return The proximity.
6505          */
getProximity()6506         public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity getProximity() {
6507           if (proximityBuilder_ == null) {
6508             return proximity_ == null
6509                 ? com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity
6510                     .getDefaultInstance()
6511                 : proximity_;
6512           } else {
6513             return proximityBuilder_.getMessage();
6514           }
6515         }
6516         /**
6517          *
6518          *
6519          * <pre>
6520          * Range of characters within which the entire hotword must reside.
6521          * The total length of the window cannot exceed 1000 characters.
6522          * The finding itself will be included in the window, so that hotwords can
6523          * be used to match substrings of the finding itself. Suppose you
6524          * want Cloud DLP to promote the likelihood of the phone number
6525          * regex "&#92;(&#92;d{3}&#92;) &#92;d{3}-&#92;d{4}" if the area code is known to be the
6526          * area code of a company's office. In this case, use the hotword regex
6527          * "&#92;(xxx&#92;)", where "xxx" is the area code in question.
6528          * For tabular data, if you want to modify the likelihood of an entire
6529          * column of findngs, see
6530          * [Hotword example: Set the match likelihood of a table column]
6531          * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
6532          * </pre>
6533          *
6534          * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
6535          */
setProximity( com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity value)6536         public Builder setProximity(
6537             com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity value) {
6538           if (proximityBuilder_ == null) {
6539             if (value == null) {
6540               throw new NullPointerException();
6541             }
6542             proximity_ = value;
6543           } else {
6544             proximityBuilder_.setMessage(value);
6545           }
6546           bitField0_ |= 0x00000002;
6547           onChanged();
6548           return this;
6549         }
6550         /**
6551          *
6552          *
6553          * <pre>
6554          * Range of characters within which the entire hotword must reside.
6555          * The total length of the window cannot exceed 1000 characters.
6556          * The finding itself will be included in the window, so that hotwords can
6557          * be used to match substrings of the finding itself. Suppose you
6558          * want Cloud DLP to promote the likelihood of the phone number
6559          * regex "&#92;(&#92;d{3}&#92;) &#92;d{3}-&#92;d{4}" if the area code is known to be the
6560          * area code of a company's office. In this case, use the hotword regex
6561          * "&#92;(xxx&#92;)", where "xxx" is the area code in question.
6562          * For tabular data, if you want to modify the likelihood of an entire
6563          * column of findngs, see
6564          * [Hotword example: Set the match likelihood of a table column]
6565          * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
6566          * </pre>
6567          *
6568          * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
6569          */
setProximity( com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.Builder builderForValue)6570         public Builder setProximity(
6571             com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.Builder
6572                 builderForValue) {
6573           if (proximityBuilder_ == null) {
6574             proximity_ = builderForValue.build();
6575           } else {
6576             proximityBuilder_.setMessage(builderForValue.build());
6577           }
6578           bitField0_ |= 0x00000002;
6579           onChanged();
6580           return this;
6581         }
6582         /**
6583          *
6584          *
6585          * <pre>
6586          * Range of characters within which the entire hotword must reside.
6587          * The total length of the window cannot exceed 1000 characters.
6588          * The finding itself will be included in the window, so that hotwords can
6589          * be used to match substrings of the finding itself. Suppose you
6590          * want Cloud DLP to promote the likelihood of the phone number
6591          * regex "&#92;(&#92;d{3}&#92;) &#92;d{3}-&#92;d{4}" if the area code is known to be the
6592          * area code of a company's office. In this case, use the hotword regex
6593          * "&#92;(xxx&#92;)", where "xxx" is the area code in question.
6594          * For tabular data, if you want to modify the likelihood of an entire
6595          * column of findngs, see
6596          * [Hotword example: Set the match likelihood of a table column]
6597          * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
6598          * </pre>
6599          *
6600          * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
6601          */
mergeProximity( com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity value)6602         public Builder mergeProximity(
6603             com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity value) {
6604           if (proximityBuilder_ == null) {
6605             if (((bitField0_ & 0x00000002) != 0)
6606                 && proximity_ != null
6607                 && proximity_
6608                     != com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity
6609                         .getDefaultInstance()) {
6610               getProximityBuilder().mergeFrom(value);
6611             } else {
6612               proximity_ = value;
6613             }
6614           } else {
6615             proximityBuilder_.mergeFrom(value);
6616           }
6617           bitField0_ |= 0x00000002;
6618           onChanged();
6619           return this;
6620         }
6621         /**
6622          *
6623          *
6624          * <pre>
6625          * Range of characters within which the entire hotword must reside.
6626          * The total length of the window cannot exceed 1000 characters.
6627          * The finding itself will be included in the window, so that hotwords can
6628          * be used to match substrings of the finding itself. Suppose you
6629          * want Cloud DLP to promote the likelihood of the phone number
6630          * regex "&#92;(&#92;d{3}&#92;) &#92;d{3}-&#92;d{4}" if the area code is known to be the
6631          * area code of a company's office. In this case, use the hotword regex
6632          * "&#92;(xxx&#92;)", where "xxx" is the area code in question.
6633          * For tabular data, if you want to modify the likelihood of an entire
6634          * column of findngs, see
6635          * [Hotword example: Set the match likelihood of a table column]
6636          * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
6637          * </pre>
6638          *
6639          * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
6640          */
clearProximity()6641         public Builder clearProximity() {
6642           bitField0_ = (bitField0_ & ~0x00000002);
6643           proximity_ = null;
6644           if (proximityBuilder_ != null) {
6645             proximityBuilder_.dispose();
6646             proximityBuilder_ = null;
6647           }
6648           onChanged();
6649           return this;
6650         }
6651         /**
6652          *
6653          *
6654          * <pre>
6655          * Range of characters within which the entire hotword must reside.
6656          * The total length of the window cannot exceed 1000 characters.
6657          * The finding itself will be included in the window, so that hotwords can
6658          * be used to match substrings of the finding itself. Suppose you
6659          * want Cloud DLP to promote the likelihood of the phone number
6660          * regex "&#92;(&#92;d{3}&#92;) &#92;d{3}-&#92;d{4}" if the area code is known to be the
6661          * area code of a company's office. In this case, use the hotword regex
6662          * "&#92;(xxx&#92;)", where "xxx" is the area code in question.
6663          * For tabular data, if you want to modify the likelihood of an entire
6664          * column of findngs, see
6665          * [Hotword example: Set the match likelihood of a table column]
6666          * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
6667          * </pre>
6668          *
6669          * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
6670          */
6671         public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.Builder
getProximityBuilder()6672             getProximityBuilder() {
6673           bitField0_ |= 0x00000002;
6674           onChanged();
6675           return getProximityFieldBuilder().getBuilder();
6676         }
6677         /**
6678          *
6679          *
6680          * <pre>
6681          * Range of characters within which the entire hotword must reside.
6682          * The total length of the window cannot exceed 1000 characters.
6683          * The finding itself will be included in the window, so that hotwords can
6684          * be used to match substrings of the finding itself. Suppose you
6685          * want Cloud DLP to promote the likelihood of the phone number
6686          * regex "&#92;(&#92;d{3}&#92;) &#92;d{3}-&#92;d{4}" if the area code is known to be the
6687          * area code of a company's office. In this case, use the hotword regex
6688          * "&#92;(xxx&#92;)", where "xxx" is the area code in question.
6689          * For tabular data, if you want to modify the likelihood of an entire
6690          * column of findngs, see
6691          * [Hotword example: Set the match likelihood of a table column]
6692          * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
6693          * </pre>
6694          *
6695          * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
6696          */
6697         public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.ProximityOrBuilder
getProximityOrBuilder()6698             getProximityOrBuilder() {
6699           if (proximityBuilder_ != null) {
6700             return proximityBuilder_.getMessageOrBuilder();
6701           } else {
6702             return proximity_ == null
6703                 ? com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity
6704                     .getDefaultInstance()
6705                 : proximity_;
6706           }
6707         }
6708         /**
6709          *
6710          *
6711          * <pre>
6712          * Range of characters within which the entire hotword must reside.
6713          * The total length of the window cannot exceed 1000 characters.
6714          * The finding itself will be included in the window, so that hotwords can
6715          * be used to match substrings of the finding itself. Suppose you
6716          * want Cloud DLP to promote the likelihood of the phone number
6717          * regex "&#92;(&#92;d{3}&#92;) &#92;d{3}-&#92;d{4}" if the area code is known to be the
6718          * area code of a company's office. In this case, use the hotword regex
6719          * "&#92;(xxx&#92;)", where "xxx" is the area code in question.
6720          * For tabular data, if you want to modify the likelihood of an entire
6721          * column of findngs, see
6722          * [Hotword example: Set the match likelihood of a table column]
6723          * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
6724          * </pre>
6725          *
6726          * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2;</code>
6727          */
6728         private com.google.protobuf.SingleFieldBuilderV3<
6729                 com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity,
6730                 com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.Builder,
6731                 com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.ProximityOrBuilder>
getProximityFieldBuilder()6732             getProximityFieldBuilder() {
6733           if (proximityBuilder_ == null) {
6734             proximityBuilder_ =
6735                 new com.google.protobuf.SingleFieldBuilderV3<
6736                     com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity,
6737                     com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.Builder,
6738                     com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.ProximityOrBuilder>(
6739                     getProximity(), getParentForChildren(), isClean());
6740             proximity_ = null;
6741           }
6742           return proximityBuilder_;
6743         }
6744 
6745         private com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
6746             likelihoodAdjustment_;
6747         private com.google.protobuf.SingleFieldBuilderV3<
6748                 com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment,
6749                 com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.Builder,
6750                 com.google.privacy.dlp.v2.CustomInfoType.DetectionRule
6751                     .LikelihoodAdjustmentOrBuilder>
6752             likelihoodAdjustmentBuilder_;
6753         /**
6754          *
6755          *
6756          * <pre>
6757          * Likelihood adjustment to apply to all matching findings.
6758          * </pre>
6759          *
6760          * <code>
6761          * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;
6762          * </code>
6763          *
6764          * @return Whether the likelihoodAdjustment field is set.
6765          */
hasLikelihoodAdjustment()6766         public boolean hasLikelihoodAdjustment() {
6767           return ((bitField0_ & 0x00000004) != 0);
6768         }
6769         /**
6770          *
6771          *
6772          * <pre>
6773          * Likelihood adjustment to apply to all matching findings.
6774          * </pre>
6775          *
6776          * <code>
6777          * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;
6778          * </code>
6779          *
6780          * @return The likelihoodAdjustment.
6781          */
6782         public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
getLikelihoodAdjustment()6783             getLikelihoodAdjustment() {
6784           if (likelihoodAdjustmentBuilder_ == null) {
6785             return likelihoodAdjustment_ == null
6786                 ? com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
6787                     .getDefaultInstance()
6788                 : likelihoodAdjustment_;
6789           } else {
6790             return likelihoodAdjustmentBuilder_.getMessage();
6791           }
6792         }
6793         /**
6794          *
6795          *
6796          * <pre>
6797          * Likelihood adjustment to apply to all matching findings.
6798          * </pre>
6799          *
6800          * <code>
6801          * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;
6802          * </code>
6803          */
setLikelihoodAdjustment( com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment value)6804         public Builder setLikelihoodAdjustment(
6805             com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment value) {
6806           if (likelihoodAdjustmentBuilder_ == null) {
6807             if (value == null) {
6808               throw new NullPointerException();
6809             }
6810             likelihoodAdjustment_ = value;
6811           } else {
6812             likelihoodAdjustmentBuilder_.setMessage(value);
6813           }
6814           bitField0_ |= 0x00000004;
6815           onChanged();
6816           return this;
6817         }
6818         /**
6819          *
6820          *
6821          * <pre>
6822          * Likelihood adjustment to apply to all matching findings.
6823          * </pre>
6824          *
6825          * <code>
6826          * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;
6827          * </code>
6828          */
setLikelihoodAdjustment( com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.Builder builderForValue)6829         public Builder setLikelihoodAdjustment(
6830             com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.Builder
6831                 builderForValue) {
6832           if (likelihoodAdjustmentBuilder_ == null) {
6833             likelihoodAdjustment_ = builderForValue.build();
6834           } else {
6835             likelihoodAdjustmentBuilder_.setMessage(builderForValue.build());
6836           }
6837           bitField0_ |= 0x00000004;
6838           onChanged();
6839           return this;
6840         }
6841         /**
6842          *
6843          *
6844          * <pre>
6845          * Likelihood adjustment to apply to all matching findings.
6846          * </pre>
6847          *
6848          * <code>
6849          * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;
6850          * </code>
6851          */
mergeLikelihoodAdjustment( com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment value)6852         public Builder mergeLikelihoodAdjustment(
6853             com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment value) {
6854           if (likelihoodAdjustmentBuilder_ == null) {
6855             if (((bitField0_ & 0x00000004) != 0)
6856                 && likelihoodAdjustment_ != null
6857                 && likelihoodAdjustment_
6858                     != com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
6859                         .getDefaultInstance()) {
6860               getLikelihoodAdjustmentBuilder().mergeFrom(value);
6861             } else {
6862               likelihoodAdjustment_ = value;
6863             }
6864           } else {
6865             likelihoodAdjustmentBuilder_.mergeFrom(value);
6866           }
6867           bitField0_ |= 0x00000004;
6868           onChanged();
6869           return this;
6870         }
6871         /**
6872          *
6873          *
6874          * <pre>
6875          * Likelihood adjustment to apply to all matching findings.
6876          * </pre>
6877          *
6878          * <code>
6879          * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;
6880          * </code>
6881          */
clearLikelihoodAdjustment()6882         public Builder clearLikelihoodAdjustment() {
6883           bitField0_ = (bitField0_ & ~0x00000004);
6884           likelihoodAdjustment_ = null;
6885           if (likelihoodAdjustmentBuilder_ != null) {
6886             likelihoodAdjustmentBuilder_.dispose();
6887             likelihoodAdjustmentBuilder_ = null;
6888           }
6889           onChanged();
6890           return this;
6891         }
6892         /**
6893          *
6894          *
6895          * <pre>
6896          * Likelihood adjustment to apply to all matching findings.
6897          * </pre>
6898          *
6899          * <code>
6900          * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;
6901          * </code>
6902          */
6903         public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.Builder
getLikelihoodAdjustmentBuilder()6904             getLikelihoodAdjustmentBuilder() {
6905           bitField0_ |= 0x00000004;
6906           onChanged();
6907           return getLikelihoodAdjustmentFieldBuilder().getBuilder();
6908         }
6909         /**
6910          *
6911          *
6912          * <pre>
6913          * Likelihood adjustment to apply to all matching findings.
6914          * </pre>
6915          *
6916          * <code>
6917          * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;
6918          * </code>
6919          */
6920         public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustmentOrBuilder
getLikelihoodAdjustmentOrBuilder()6921             getLikelihoodAdjustmentOrBuilder() {
6922           if (likelihoodAdjustmentBuilder_ != null) {
6923             return likelihoodAdjustmentBuilder_.getMessageOrBuilder();
6924           } else {
6925             return likelihoodAdjustment_ == null
6926                 ? com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
6927                     .getDefaultInstance()
6928                 : likelihoodAdjustment_;
6929           }
6930         }
6931         /**
6932          *
6933          *
6934          * <pre>
6935          * Likelihood adjustment to apply to all matching findings.
6936          * </pre>
6937          *
6938          * <code>
6939          * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3;
6940          * </code>
6941          */
6942         private com.google.protobuf.SingleFieldBuilderV3<
6943                 com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment,
6944                 com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.Builder,
6945                 com.google.privacy.dlp.v2.CustomInfoType.DetectionRule
6946                     .LikelihoodAdjustmentOrBuilder>
getLikelihoodAdjustmentFieldBuilder()6947             getLikelihoodAdjustmentFieldBuilder() {
6948           if (likelihoodAdjustmentBuilder_ == null) {
6949             likelihoodAdjustmentBuilder_ =
6950                 new com.google.protobuf.SingleFieldBuilderV3<
6951                     com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment,
6952                     com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment
6953                         .Builder,
6954                     com.google.privacy.dlp.v2.CustomInfoType.DetectionRule
6955                         .LikelihoodAdjustmentOrBuilder>(
6956                     getLikelihoodAdjustment(), getParentForChildren(), isClean());
6957             likelihoodAdjustment_ = null;
6958           }
6959           return likelihoodAdjustmentBuilder_;
6960         }
6961 
6962         @java.lang.Override
setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)6963         public final Builder setUnknownFields(
6964             final com.google.protobuf.UnknownFieldSet unknownFields) {
6965           return super.setUnknownFields(unknownFields);
6966         }
6967 
6968         @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)6969         public final Builder mergeUnknownFields(
6970             final com.google.protobuf.UnknownFieldSet unknownFields) {
6971           return super.mergeUnknownFields(unknownFields);
6972         }
6973 
6974         // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule)
6975       }
6976 
6977       // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule)
6978       private static final com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule
6979           DEFAULT_INSTANCE;
6980 
6981       static {
6982         DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule();
6983       }
6984 
6985       public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule
getDefaultInstance()6986           getDefaultInstance() {
6987         return DEFAULT_INSTANCE;
6988       }
6989 
6990       private static final com.google.protobuf.Parser<HotwordRule> PARSER =
6991           new com.google.protobuf.AbstractParser<HotwordRule>() {
6992             @java.lang.Override
6993             public HotwordRule parsePartialFrom(
6994                 com.google.protobuf.CodedInputStream input,
6995                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6996                 throws com.google.protobuf.InvalidProtocolBufferException {
6997               Builder builder = newBuilder();
6998               try {
6999                 builder.mergeFrom(input, extensionRegistry);
7000               } catch (com.google.protobuf.InvalidProtocolBufferException e) {
7001                 throw e.setUnfinishedMessage(builder.buildPartial());
7002               } catch (com.google.protobuf.UninitializedMessageException e) {
7003                 throw e.asInvalidProtocolBufferException()
7004                     .setUnfinishedMessage(builder.buildPartial());
7005               } catch (java.io.IOException e) {
7006                 throw new com.google.protobuf.InvalidProtocolBufferException(e)
7007                     .setUnfinishedMessage(builder.buildPartial());
7008               }
7009               return builder.buildPartial();
7010             }
7011           };
7012 
parser()7013       public static com.google.protobuf.Parser<HotwordRule> parser() {
7014         return PARSER;
7015       }
7016 
7017       @java.lang.Override
getParserForType()7018       public com.google.protobuf.Parser<HotwordRule> getParserForType() {
7019         return PARSER;
7020       }
7021 
7022       @java.lang.Override
7023       public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule
getDefaultInstanceForType()7024           getDefaultInstanceForType() {
7025         return DEFAULT_INSTANCE;
7026       }
7027     }
7028 
7029     private int typeCase_ = 0;
7030     private java.lang.Object type_;
7031 
7032     public enum TypeCase
7033         implements
7034             com.google.protobuf.Internal.EnumLite,
7035             com.google.protobuf.AbstractMessage.InternalOneOfEnum {
7036       HOTWORD_RULE(1),
7037       TYPE_NOT_SET(0);
7038       private final int value;
7039 
TypeCase(int value)7040       private TypeCase(int value) {
7041         this.value = value;
7042       }
7043       /**
7044        * @param value The number of the enum to look for.
7045        * @return The enum associated with the given number.
7046        * @deprecated Use {@link #forNumber(int)} instead.
7047        */
7048       @java.lang.Deprecated
valueOf(int value)7049       public static TypeCase valueOf(int value) {
7050         return forNumber(value);
7051       }
7052 
forNumber(int value)7053       public static TypeCase forNumber(int value) {
7054         switch (value) {
7055           case 1:
7056             return HOTWORD_RULE;
7057           case 0:
7058             return TYPE_NOT_SET;
7059           default:
7060             return null;
7061         }
7062       }
7063 
getNumber()7064       public int getNumber() {
7065         return this.value;
7066       }
7067     };
7068 
getTypeCase()7069     public TypeCase getTypeCase() {
7070       return TypeCase.forNumber(typeCase_);
7071     }
7072 
7073     public static final int HOTWORD_RULE_FIELD_NUMBER = 1;
7074     /**
7075      *
7076      *
7077      * <pre>
7078      * Hotword-based detection rule.
7079      * </pre>
7080      *
7081      * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1;
7082      * </code>
7083      *
7084      * @return Whether the hotwordRule field is set.
7085      */
7086     @java.lang.Override
hasHotwordRule()7087     public boolean hasHotwordRule() {
7088       return typeCase_ == 1;
7089     }
7090     /**
7091      *
7092      *
7093      * <pre>
7094      * Hotword-based detection rule.
7095      * </pre>
7096      *
7097      * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1;
7098      * </code>
7099      *
7100      * @return The hotwordRule.
7101      */
7102     @java.lang.Override
getHotwordRule()7103     public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule getHotwordRule() {
7104       if (typeCase_ == 1) {
7105         return (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_;
7106       }
7107       return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule
7108           .getDefaultInstance();
7109     }
7110     /**
7111      *
7112      *
7113      * <pre>
7114      * Hotword-based detection rule.
7115      * </pre>
7116      *
7117      * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1;
7118      * </code>
7119      */
7120     @java.lang.Override
7121     public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder
getHotwordRuleOrBuilder()7122         getHotwordRuleOrBuilder() {
7123       if (typeCase_ == 1) {
7124         return (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_;
7125       }
7126       return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule
7127           .getDefaultInstance();
7128     }
7129 
7130     private byte memoizedIsInitialized = -1;
7131 
7132     @java.lang.Override
isInitialized()7133     public final boolean isInitialized() {
7134       byte isInitialized = memoizedIsInitialized;
7135       if (isInitialized == 1) return true;
7136       if (isInitialized == 0) return false;
7137 
7138       memoizedIsInitialized = 1;
7139       return true;
7140     }
7141 
7142     @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)7143     public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
7144       if (typeCase_ == 1) {
7145         output.writeMessage(
7146             1, (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_);
7147       }
7148       getUnknownFields().writeTo(output);
7149     }
7150 
7151     @java.lang.Override
getSerializedSize()7152     public int getSerializedSize() {
7153       int size = memoizedSize;
7154       if (size != -1) return size;
7155 
7156       size = 0;
7157       if (typeCase_ == 1) {
7158         size +=
7159             com.google.protobuf.CodedOutputStream.computeMessageSize(
7160                 1, (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_);
7161       }
7162       size += getUnknownFields().getSerializedSize();
7163       memoizedSize = size;
7164       return size;
7165     }
7166 
7167     @java.lang.Override
equals(final java.lang.Object obj)7168     public boolean equals(final java.lang.Object obj) {
7169       if (obj == this) {
7170         return true;
7171       }
7172       if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType.DetectionRule)) {
7173         return super.equals(obj);
7174       }
7175       com.google.privacy.dlp.v2.CustomInfoType.DetectionRule other =
7176           (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule) obj;
7177 
7178       if (!getTypeCase().equals(other.getTypeCase())) return false;
7179       switch (typeCase_) {
7180         case 1:
7181           if (!getHotwordRule().equals(other.getHotwordRule())) return false;
7182           break;
7183         case 0:
7184         default:
7185       }
7186       if (!getUnknownFields().equals(other.getUnknownFields())) return false;
7187       return true;
7188     }
7189 
7190     @java.lang.Override
hashCode()7191     public int hashCode() {
7192       if (memoizedHashCode != 0) {
7193         return memoizedHashCode;
7194       }
7195       int hash = 41;
7196       hash = (19 * hash) + getDescriptor().hashCode();
7197       switch (typeCase_) {
7198         case 1:
7199           hash = (37 * hash) + HOTWORD_RULE_FIELD_NUMBER;
7200           hash = (53 * hash) + getHotwordRule().hashCode();
7201           break;
7202         case 0:
7203         default:
7204       }
7205       hash = (29 * hash) + getUnknownFields().hashCode();
7206       memoizedHashCode = hash;
7207       return hash;
7208     }
7209 
parseFrom( java.nio.ByteBuffer data)7210     public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom(
7211         java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
7212       return PARSER.parseFrom(data);
7213     }
7214 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)7215     public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom(
7216         java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7217         throws com.google.protobuf.InvalidProtocolBufferException {
7218       return PARSER.parseFrom(data, extensionRegistry);
7219     }
7220 
parseFrom( com.google.protobuf.ByteString data)7221     public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom(
7222         com.google.protobuf.ByteString data)
7223         throws com.google.protobuf.InvalidProtocolBufferException {
7224       return PARSER.parseFrom(data);
7225     }
7226 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)7227     public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom(
7228         com.google.protobuf.ByteString data,
7229         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7230         throws com.google.protobuf.InvalidProtocolBufferException {
7231       return PARSER.parseFrom(data, extensionRegistry);
7232     }
7233 
parseFrom(byte[] data)7234     public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom(byte[] data)
7235         throws com.google.protobuf.InvalidProtocolBufferException {
7236       return PARSER.parseFrom(data);
7237     }
7238 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)7239     public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom(
7240         byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7241         throws com.google.protobuf.InvalidProtocolBufferException {
7242       return PARSER.parseFrom(data, extensionRegistry);
7243     }
7244 
parseFrom( java.io.InputStream input)7245     public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom(
7246         java.io.InputStream input) throws java.io.IOException {
7247       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
7248     }
7249 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)7250     public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom(
7251         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7252         throws java.io.IOException {
7253       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
7254           PARSER, input, extensionRegistry);
7255     }
7256 
parseDelimitedFrom( java.io.InputStream input)7257     public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseDelimitedFrom(
7258         java.io.InputStream input) throws java.io.IOException {
7259       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
7260     }
7261 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)7262     public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseDelimitedFrom(
7263         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7264         throws java.io.IOException {
7265       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
7266           PARSER, input, extensionRegistry);
7267     }
7268 
parseFrom( com.google.protobuf.CodedInputStream input)7269     public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom(
7270         com.google.protobuf.CodedInputStream input) throws java.io.IOException {
7271       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
7272     }
7273 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)7274     public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom(
7275         com.google.protobuf.CodedInputStream input,
7276         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7277         throws java.io.IOException {
7278       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
7279           PARSER, input, extensionRegistry);
7280     }
7281 
7282     @java.lang.Override
newBuilderForType()7283     public Builder newBuilderForType() {
7284       return newBuilder();
7285     }
7286 
newBuilder()7287     public static Builder newBuilder() {
7288       return DEFAULT_INSTANCE.toBuilder();
7289     }
7290 
newBuilder( com.google.privacy.dlp.v2.CustomInfoType.DetectionRule prototype)7291     public static Builder newBuilder(
7292         com.google.privacy.dlp.v2.CustomInfoType.DetectionRule prototype) {
7293       return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
7294     }
7295 
7296     @java.lang.Override
toBuilder()7297     public Builder toBuilder() {
7298       return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
7299     }
7300 
7301     @java.lang.Override
newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)7302     protected Builder newBuilderForType(
7303         com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
7304       Builder builder = new Builder(parent);
7305       return builder;
7306     }
7307     /**
7308      *
7309      *
7310      * <pre>
7311      * Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
7312      * `CustomInfoType` to alter behavior under certain circumstances, depending
7313      * on the specific details of the rule. Not supported for the `surrogate_type`
7314      * custom infoType.
7315      * </pre>
7316      *
7317      * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.DetectionRule}
7318      */
7319     public static final class Builder
7320         extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
7321         implements
7322         // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType.DetectionRule)
7323         com.google.privacy.dlp.v2.CustomInfoType.DetectionRuleOrBuilder {
getDescriptor()7324       public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
7325         return com.google.privacy.dlp.v2.DlpStorage
7326             .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_descriptor;
7327       }
7328 
7329       @java.lang.Override
7330       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()7331           internalGetFieldAccessorTable() {
7332         return com.google.privacy.dlp.v2.DlpStorage
7333             .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_fieldAccessorTable
7334             .ensureFieldAccessorsInitialized(
7335                 com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.class,
7336                 com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder.class);
7337       }
7338 
7339       // Construct using com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.newBuilder()
Builder()7340       private Builder() {}
7341 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)7342       private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
7343         super(parent);
7344       }
7345 
7346       @java.lang.Override
clear()7347       public Builder clear() {
7348         super.clear();
7349         bitField0_ = 0;
7350         if (hotwordRuleBuilder_ != null) {
7351           hotwordRuleBuilder_.clear();
7352         }
7353         typeCase_ = 0;
7354         type_ = null;
7355         return this;
7356       }
7357 
7358       @java.lang.Override
getDescriptorForType()7359       public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
7360         return com.google.privacy.dlp.v2.DlpStorage
7361             .internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_descriptor;
7362       }
7363 
7364       @java.lang.Override
getDefaultInstanceForType()7365       public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule getDefaultInstanceForType() {
7366         return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.getDefaultInstance();
7367       }
7368 
7369       @java.lang.Override
build()7370       public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule build() {
7371         com.google.privacy.dlp.v2.CustomInfoType.DetectionRule result = buildPartial();
7372         if (!result.isInitialized()) {
7373           throw newUninitializedMessageException(result);
7374         }
7375         return result;
7376       }
7377 
7378       @java.lang.Override
buildPartial()7379       public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule buildPartial() {
7380         com.google.privacy.dlp.v2.CustomInfoType.DetectionRule result =
7381             new com.google.privacy.dlp.v2.CustomInfoType.DetectionRule(this);
7382         if (bitField0_ != 0) {
7383           buildPartial0(result);
7384         }
7385         buildPartialOneofs(result);
7386         onBuilt();
7387         return result;
7388       }
7389 
buildPartial0(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule result)7390       private void buildPartial0(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule result) {
7391         int from_bitField0_ = bitField0_;
7392       }
7393 
buildPartialOneofs( com.google.privacy.dlp.v2.CustomInfoType.DetectionRule result)7394       private void buildPartialOneofs(
7395           com.google.privacy.dlp.v2.CustomInfoType.DetectionRule result) {
7396         result.typeCase_ = typeCase_;
7397         result.type_ = this.type_;
7398         if (typeCase_ == 1 && hotwordRuleBuilder_ != null) {
7399           result.type_ = hotwordRuleBuilder_.build();
7400         }
7401       }
7402 
7403       @java.lang.Override
clone()7404       public Builder clone() {
7405         return super.clone();
7406       }
7407 
7408       @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)7409       public Builder setField(
7410           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
7411         return super.setField(field, value);
7412       }
7413 
7414       @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)7415       public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
7416         return super.clearField(field);
7417       }
7418 
7419       @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)7420       public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
7421         return super.clearOneof(oneof);
7422       }
7423 
7424       @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)7425       public Builder setRepeatedField(
7426           com.google.protobuf.Descriptors.FieldDescriptor field,
7427           int index,
7428           java.lang.Object value) {
7429         return super.setRepeatedField(field, index, value);
7430       }
7431 
7432       @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)7433       public Builder addRepeatedField(
7434           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
7435         return super.addRepeatedField(field, value);
7436       }
7437 
7438       @java.lang.Override
mergeFrom(com.google.protobuf.Message other)7439       public Builder mergeFrom(com.google.protobuf.Message other) {
7440         if (other instanceof com.google.privacy.dlp.v2.CustomInfoType.DetectionRule) {
7441           return mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.DetectionRule) other);
7442         } else {
7443           super.mergeFrom(other);
7444           return this;
7445         }
7446       }
7447 
mergeFrom(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule other)7448       public Builder mergeFrom(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule other) {
7449         if (other == com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.getDefaultInstance())
7450           return this;
7451         switch (other.getTypeCase()) {
7452           case HOTWORD_RULE:
7453             {
7454               mergeHotwordRule(other.getHotwordRule());
7455               break;
7456             }
7457           case TYPE_NOT_SET:
7458             {
7459               break;
7460             }
7461         }
7462         this.mergeUnknownFields(other.getUnknownFields());
7463         onChanged();
7464         return this;
7465       }
7466 
7467       @java.lang.Override
isInitialized()7468       public final boolean isInitialized() {
7469         return true;
7470       }
7471 
7472       @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)7473       public Builder mergeFrom(
7474           com.google.protobuf.CodedInputStream input,
7475           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7476           throws java.io.IOException {
7477         if (extensionRegistry == null) {
7478           throw new java.lang.NullPointerException();
7479         }
7480         try {
7481           boolean done = false;
7482           while (!done) {
7483             int tag = input.readTag();
7484             switch (tag) {
7485               case 0:
7486                 done = true;
7487                 break;
7488               case 10:
7489                 {
7490                   input.readMessage(getHotwordRuleFieldBuilder().getBuilder(), extensionRegistry);
7491                   typeCase_ = 1;
7492                   break;
7493                 } // case 10
7494               default:
7495                 {
7496                   if (!super.parseUnknownField(input, extensionRegistry, tag)) {
7497                     done = true; // was an endgroup tag
7498                   }
7499                   break;
7500                 } // default:
7501             } // switch (tag)
7502           } // while (!done)
7503         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
7504           throw e.unwrapIOException();
7505         } finally {
7506           onChanged();
7507         } // finally
7508         return this;
7509       }
7510 
7511       private int typeCase_ = 0;
7512       private java.lang.Object type_;
7513 
getTypeCase()7514       public TypeCase getTypeCase() {
7515         return TypeCase.forNumber(typeCase_);
7516       }
7517 
clearType()7518       public Builder clearType() {
7519         typeCase_ = 0;
7520         type_ = null;
7521         onChanged();
7522         return this;
7523       }
7524 
7525       private int bitField0_;
7526 
7527       private com.google.protobuf.SingleFieldBuilderV3<
7528               com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule,
7529               com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder,
7530               com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder>
7531           hotwordRuleBuilder_;
7532       /**
7533        *
7534        *
7535        * <pre>
7536        * Hotword-based detection rule.
7537        * </pre>
7538        *
7539        * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1;
7540        * </code>
7541        *
7542        * @return Whether the hotwordRule field is set.
7543        */
7544       @java.lang.Override
hasHotwordRule()7545       public boolean hasHotwordRule() {
7546         return typeCase_ == 1;
7547       }
7548       /**
7549        *
7550        *
7551        * <pre>
7552        * Hotword-based detection rule.
7553        * </pre>
7554        *
7555        * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1;
7556        * </code>
7557        *
7558        * @return The hotwordRule.
7559        */
7560       @java.lang.Override
getHotwordRule()7561       public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule getHotwordRule() {
7562         if (hotwordRuleBuilder_ == null) {
7563           if (typeCase_ == 1) {
7564             return (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_;
7565           }
7566           return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule
7567               .getDefaultInstance();
7568         } else {
7569           if (typeCase_ == 1) {
7570             return hotwordRuleBuilder_.getMessage();
7571           }
7572           return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule
7573               .getDefaultInstance();
7574         }
7575       }
7576       /**
7577        *
7578        *
7579        * <pre>
7580        * Hotword-based detection rule.
7581        * </pre>
7582        *
7583        * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1;
7584        * </code>
7585        */
setHotwordRule( com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule value)7586       public Builder setHotwordRule(
7587           com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule value) {
7588         if (hotwordRuleBuilder_ == null) {
7589           if (value == null) {
7590             throw new NullPointerException();
7591           }
7592           type_ = value;
7593           onChanged();
7594         } else {
7595           hotwordRuleBuilder_.setMessage(value);
7596         }
7597         typeCase_ = 1;
7598         return this;
7599       }
7600       /**
7601        *
7602        *
7603        * <pre>
7604        * Hotword-based detection rule.
7605        * </pre>
7606        *
7607        * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1;
7608        * </code>
7609        */
setHotwordRule( com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder builderForValue)7610       public Builder setHotwordRule(
7611           com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder
7612               builderForValue) {
7613         if (hotwordRuleBuilder_ == null) {
7614           type_ = builderForValue.build();
7615           onChanged();
7616         } else {
7617           hotwordRuleBuilder_.setMessage(builderForValue.build());
7618         }
7619         typeCase_ = 1;
7620         return this;
7621       }
7622       /**
7623        *
7624        *
7625        * <pre>
7626        * Hotword-based detection rule.
7627        * </pre>
7628        *
7629        * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1;
7630        * </code>
7631        */
mergeHotwordRule( com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule value)7632       public Builder mergeHotwordRule(
7633           com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule value) {
7634         if (hotwordRuleBuilder_ == null) {
7635           if (typeCase_ == 1
7636               && type_
7637                   != com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule
7638                       .getDefaultInstance()) {
7639             type_ =
7640                 com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.newBuilder(
7641                         (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_)
7642                     .mergeFrom(value)
7643                     .buildPartial();
7644           } else {
7645             type_ = value;
7646           }
7647           onChanged();
7648         } else {
7649           if (typeCase_ == 1) {
7650             hotwordRuleBuilder_.mergeFrom(value);
7651           } else {
7652             hotwordRuleBuilder_.setMessage(value);
7653           }
7654         }
7655         typeCase_ = 1;
7656         return this;
7657       }
7658       /**
7659        *
7660        *
7661        * <pre>
7662        * Hotword-based detection rule.
7663        * </pre>
7664        *
7665        * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1;
7666        * </code>
7667        */
clearHotwordRule()7668       public Builder clearHotwordRule() {
7669         if (hotwordRuleBuilder_ == null) {
7670           if (typeCase_ == 1) {
7671             typeCase_ = 0;
7672             type_ = null;
7673             onChanged();
7674           }
7675         } else {
7676           if (typeCase_ == 1) {
7677             typeCase_ = 0;
7678             type_ = null;
7679           }
7680           hotwordRuleBuilder_.clear();
7681         }
7682         return this;
7683       }
7684       /**
7685        *
7686        *
7687        * <pre>
7688        * Hotword-based detection rule.
7689        * </pre>
7690        *
7691        * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1;
7692        * </code>
7693        */
7694       public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder
getHotwordRuleBuilder()7695           getHotwordRuleBuilder() {
7696         return getHotwordRuleFieldBuilder().getBuilder();
7697       }
7698       /**
7699        *
7700        *
7701        * <pre>
7702        * Hotword-based detection rule.
7703        * </pre>
7704        *
7705        * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1;
7706        * </code>
7707        */
7708       @java.lang.Override
7709       public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder
getHotwordRuleOrBuilder()7710           getHotwordRuleOrBuilder() {
7711         if ((typeCase_ == 1) && (hotwordRuleBuilder_ != null)) {
7712           return hotwordRuleBuilder_.getMessageOrBuilder();
7713         } else {
7714           if (typeCase_ == 1) {
7715             return (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_;
7716           }
7717           return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule
7718               .getDefaultInstance();
7719         }
7720       }
7721       /**
7722        *
7723        *
7724        * <pre>
7725        * Hotword-based detection rule.
7726        * </pre>
7727        *
7728        * <code>.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1;
7729        * </code>
7730        */
7731       private com.google.protobuf.SingleFieldBuilderV3<
7732               com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule,
7733               com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder,
7734               com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder>
getHotwordRuleFieldBuilder()7735           getHotwordRuleFieldBuilder() {
7736         if (hotwordRuleBuilder_ == null) {
7737           if (!(typeCase_ == 1)) {
7738             type_ =
7739                 com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule
7740                     .getDefaultInstance();
7741           }
7742           hotwordRuleBuilder_ =
7743               new com.google.protobuf.SingleFieldBuilderV3<
7744                   com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule,
7745                   com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder,
7746                   com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder>(
7747                   (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_,
7748                   getParentForChildren(),
7749                   isClean());
7750           type_ = null;
7751         }
7752         typeCase_ = 1;
7753         onChanged();
7754         return hotwordRuleBuilder_;
7755       }
7756 
7757       @java.lang.Override
setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)7758       public final Builder setUnknownFields(
7759           final com.google.protobuf.UnknownFieldSet unknownFields) {
7760         return super.setUnknownFields(unknownFields);
7761       }
7762 
7763       @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)7764       public final Builder mergeUnknownFields(
7765           final com.google.protobuf.UnknownFieldSet unknownFields) {
7766         return super.mergeUnknownFields(unknownFields);
7767       }
7768 
7769       // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType.DetectionRule)
7770     }
7771 
7772     // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType.DetectionRule)
7773     private static final com.google.privacy.dlp.v2.CustomInfoType.DetectionRule DEFAULT_INSTANCE;
7774 
7775     static {
7776       DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType.DetectionRule();
7777     }
7778 
getDefaultInstance()7779     public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule getDefaultInstance() {
7780       return DEFAULT_INSTANCE;
7781     }
7782 
7783     private static final com.google.protobuf.Parser<DetectionRule> PARSER =
7784         new com.google.protobuf.AbstractParser<DetectionRule>() {
7785           @java.lang.Override
7786           public DetectionRule parsePartialFrom(
7787               com.google.protobuf.CodedInputStream input,
7788               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7789               throws com.google.protobuf.InvalidProtocolBufferException {
7790             Builder builder = newBuilder();
7791             try {
7792               builder.mergeFrom(input, extensionRegistry);
7793             } catch (com.google.protobuf.InvalidProtocolBufferException e) {
7794               throw e.setUnfinishedMessage(builder.buildPartial());
7795             } catch (com.google.protobuf.UninitializedMessageException e) {
7796               throw e.asInvalidProtocolBufferException()
7797                   .setUnfinishedMessage(builder.buildPartial());
7798             } catch (java.io.IOException e) {
7799               throw new com.google.protobuf.InvalidProtocolBufferException(e)
7800                   .setUnfinishedMessage(builder.buildPartial());
7801             }
7802             return builder.buildPartial();
7803           }
7804         };
7805 
parser()7806     public static com.google.protobuf.Parser<DetectionRule> parser() {
7807       return PARSER;
7808     }
7809 
7810     @java.lang.Override
getParserForType()7811     public com.google.protobuf.Parser<DetectionRule> getParserForType() {
7812       return PARSER;
7813     }
7814 
7815     @java.lang.Override
getDefaultInstanceForType()7816     public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule getDefaultInstanceForType() {
7817       return DEFAULT_INSTANCE;
7818     }
7819   }
7820 
7821   private int typeCase_ = 0;
7822   private java.lang.Object type_;
7823 
7824   public enum TypeCase
7825       implements
7826           com.google.protobuf.Internal.EnumLite,
7827           com.google.protobuf.AbstractMessage.InternalOneOfEnum {
7828     DICTIONARY(2),
7829     REGEX(3),
7830     SURROGATE_TYPE(4),
7831     STORED_TYPE(5),
7832     TYPE_NOT_SET(0);
7833     private final int value;
7834 
TypeCase(int value)7835     private TypeCase(int value) {
7836       this.value = value;
7837     }
7838     /**
7839      * @param value The number of the enum to look for.
7840      * @return The enum associated with the given number.
7841      * @deprecated Use {@link #forNumber(int)} instead.
7842      */
7843     @java.lang.Deprecated
valueOf(int value)7844     public static TypeCase valueOf(int value) {
7845       return forNumber(value);
7846     }
7847 
forNumber(int value)7848     public static TypeCase forNumber(int value) {
7849       switch (value) {
7850         case 2:
7851           return DICTIONARY;
7852         case 3:
7853           return REGEX;
7854         case 4:
7855           return SURROGATE_TYPE;
7856         case 5:
7857           return STORED_TYPE;
7858         case 0:
7859           return TYPE_NOT_SET;
7860         default:
7861           return null;
7862       }
7863     }
7864 
getNumber()7865     public int getNumber() {
7866       return this.value;
7867     }
7868   };
7869 
getTypeCase()7870   public TypeCase getTypeCase() {
7871     return TypeCase.forNumber(typeCase_);
7872   }
7873 
7874   public static final int INFO_TYPE_FIELD_NUMBER = 1;
7875   private com.google.privacy.dlp.v2.InfoType infoType_;
7876   /**
7877    *
7878    *
7879    * <pre>
7880    * CustomInfoType can either be a new infoType, or an extension of built-in
7881    * infoType, when the name matches one of existing infoTypes and that infoType
7882    * is specified in `InspectContent.info_types` field. Specifying the latter
7883    * adds findings to the one detected by the system. If built-in info type is
7884    * not specified in `InspectContent.info_types` list then the name is treated
7885    * as a custom info type.
7886    * </pre>
7887    *
7888    * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
7889    *
7890    * @return Whether the infoType field is set.
7891    */
7892   @java.lang.Override
hasInfoType()7893   public boolean hasInfoType() {
7894     return infoType_ != null;
7895   }
7896   /**
7897    *
7898    *
7899    * <pre>
7900    * CustomInfoType can either be a new infoType, or an extension of built-in
7901    * infoType, when the name matches one of existing infoTypes and that infoType
7902    * is specified in `InspectContent.info_types` field. Specifying the latter
7903    * adds findings to the one detected by the system. If built-in info type is
7904    * not specified in `InspectContent.info_types` list then the name is treated
7905    * as a custom info type.
7906    * </pre>
7907    *
7908    * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
7909    *
7910    * @return The infoType.
7911    */
7912   @java.lang.Override
getInfoType()7913   public com.google.privacy.dlp.v2.InfoType getInfoType() {
7914     return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_;
7915   }
7916   /**
7917    *
7918    *
7919    * <pre>
7920    * CustomInfoType can either be a new infoType, or an extension of built-in
7921    * infoType, when the name matches one of existing infoTypes and that infoType
7922    * is specified in `InspectContent.info_types` field. Specifying the latter
7923    * adds findings to the one detected by the system. If built-in info type is
7924    * not specified in `InspectContent.info_types` list then the name is treated
7925    * as a custom info type.
7926    * </pre>
7927    *
7928    * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
7929    */
7930   @java.lang.Override
getInfoTypeOrBuilder()7931   public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() {
7932     return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_;
7933   }
7934 
7935   public static final int LIKELIHOOD_FIELD_NUMBER = 6;
7936   private int likelihood_ = 0;
7937   /**
7938    *
7939    *
7940    * <pre>
7941    * Likelihood to return for this CustomInfoType. This base value can be
7942    * altered by a detection rule if the finding meets the criteria specified by
7943    * the rule. Defaults to `VERY_LIKELY` if not specified.
7944    * </pre>
7945    *
7946    * <code>.google.privacy.dlp.v2.Likelihood likelihood = 6;</code>
7947    *
7948    * @return The enum numeric value on the wire for likelihood.
7949    */
7950   @java.lang.Override
getLikelihoodValue()7951   public int getLikelihoodValue() {
7952     return likelihood_;
7953   }
7954   /**
7955    *
7956    *
7957    * <pre>
7958    * Likelihood to return for this CustomInfoType. This base value can be
7959    * altered by a detection rule if the finding meets the criteria specified by
7960    * the rule. Defaults to `VERY_LIKELY` if not specified.
7961    * </pre>
7962    *
7963    * <code>.google.privacy.dlp.v2.Likelihood likelihood = 6;</code>
7964    *
7965    * @return The likelihood.
7966    */
7967   @java.lang.Override
getLikelihood()7968   public com.google.privacy.dlp.v2.Likelihood getLikelihood() {
7969     com.google.privacy.dlp.v2.Likelihood result =
7970         com.google.privacy.dlp.v2.Likelihood.forNumber(likelihood_);
7971     return result == null ? com.google.privacy.dlp.v2.Likelihood.UNRECOGNIZED : result;
7972   }
7973 
7974   public static final int DICTIONARY_FIELD_NUMBER = 2;
7975   /**
7976    *
7977    *
7978    * <pre>
7979    * A list of phrases to detect as a CustomInfoType.
7980    * </pre>
7981    *
7982    * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2;</code>
7983    *
7984    * @return Whether the dictionary field is set.
7985    */
7986   @java.lang.Override
hasDictionary()7987   public boolean hasDictionary() {
7988     return typeCase_ == 2;
7989   }
7990   /**
7991    *
7992    *
7993    * <pre>
7994    * A list of phrases to detect as a CustomInfoType.
7995    * </pre>
7996    *
7997    * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2;</code>
7998    *
7999    * @return The dictionary.
8000    */
8001   @java.lang.Override
getDictionary()8002   public com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDictionary() {
8003     if (typeCase_ == 2) {
8004       return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_;
8005     }
8006     return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance();
8007   }
8008   /**
8009    *
8010    *
8011    * <pre>
8012    * A list of phrases to detect as a CustomInfoType.
8013    * </pre>
8014    *
8015    * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2;</code>
8016    */
8017   @java.lang.Override
getDictionaryOrBuilder()8018   public com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder getDictionaryOrBuilder() {
8019     if (typeCase_ == 2) {
8020       return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_;
8021     }
8022     return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance();
8023   }
8024 
8025   public static final int REGEX_FIELD_NUMBER = 3;
8026   /**
8027    *
8028    *
8029    * <pre>
8030    * Regular expression based CustomInfoType.
8031    * </pre>
8032    *
8033    * <code>.google.privacy.dlp.v2.CustomInfoType.Regex regex = 3;</code>
8034    *
8035    * @return Whether the regex field is set.
8036    */
8037   @java.lang.Override
hasRegex()8038   public boolean hasRegex() {
8039     return typeCase_ == 3;
8040   }
8041   /**
8042    *
8043    *
8044    * <pre>
8045    * Regular expression based CustomInfoType.
8046    * </pre>
8047    *
8048    * <code>.google.privacy.dlp.v2.CustomInfoType.Regex regex = 3;</code>
8049    *
8050    * @return The regex.
8051    */
8052   @java.lang.Override
getRegex()8053   public com.google.privacy.dlp.v2.CustomInfoType.Regex getRegex() {
8054     if (typeCase_ == 3) {
8055       return (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_;
8056     }
8057     return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance();
8058   }
8059   /**
8060    *
8061    *
8062    * <pre>
8063    * Regular expression based CustomInfoType.
8064    * </pre>
8065    *
8066    * <code>.google.privacy.dlp.v2.CustomInfoType.Regex regex = 3;</code>
8067    */
8068   @java.lang.Override
getRegexOrBuilder()8069   public com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getRegexOrBuilder() {
8070     if (typeCase_ == 3) {
8071       return (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_;
8072     }
8073     return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance();
8074   }
8075 
8076   public static final int SURROGATE_TYPE_FIELD_NUMBER = 4;
8077   /**
8078    *
8079    *
8080    * <pre>
8081    * Message for detecting output from deidentification transformations that
8082    * support reversing.
8083    * </pre>
8084    *
8085    * <code>.google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4;</code>
8086    *
8087    * @return Whether the surrogateType field is set.
8088    */
8089   @java.lang.Override
hasSurrogateType()8090   public boolean hasSurrogateType() {
8091     return typeCase_ == 4;
8092   }
8093   /**
8094    *
8095    *
8096    * <pre>
8097    * Message for detecting output from deidentification transformations that
8098    * support reversing.
8099    * </pre>
8100    *
8101    * <code>.google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4;</code>
8102    *
8103    * @return The surrogateType.
8104    */
8105   @java.lang.Override
getSurrogateType()8106   public com.google.privacy.dlp.v2.CustomInfoType.SurrogateType getSurrogateType() {
8107     if (typeCase_ == 4) {
8108       return (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_;
8109     }
8110     return com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance();
8111   }
8112   /**
8113    *
8114    *
8115    * <pre>
8116    * Message for detecting output from deidentification transformations that
8117    * support reversing.
8118    * </pre>
8119    *
8120    * <code>.google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4;</code>
8121    */
8122   @java.lang.Override
8123   public com.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeOrBuilder
getSurrogateTypeOrBuilder()8124       getSurrogateTypeOrBuilder() {
8125     if (typeCase_ == 4) {
8126       return (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_;
8127     }
8128     return com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance();
8129   }
8130 
8131   public static final int STORED_TYPE_FIELD_NUMBER = 5;
8132   /**
8133    *
8134    *
8135    * <pre>
8136    * Load an existing `StoredInfoType` resource for use in
8137    * `InspectDataSource`. Not currently supported in `InspectContent`.
8138    * </pre>
8139    *
8140    * <code>.google.privacy.dlp.v2.StoredType stored_type = 5;</code>
8141    *
8142    * @return Whether the storedType field is set.
8143    */
8144   @java.lang.Override
hasStoredType()8145   public boolean hasStoredType() {
8146     return typeCase_ == 5;
8147   }
8148   /**
8149    *
8150    *
8151    * <pre>
8152    * Load an existing `StoredInfoType` resource for use in
8153    * `InspectDataSource`. Not currently supported in `InspectContent`.
8154    * </pre>
8155    *
8156    * <code>.google.privacy.dlp.v2.StoredType stored_type = 5;</code>
8157    *
8158    * @return The storedType.
8159    */
8160   @java.lang.Override
getStoredType()8161   public com.google.privacy.dlp.v2.StoredType getStoredType() {
8162     if (typeCase_ == 5) {
8163       return (com.google.privacy.dlp.v2.StoredType) type_;
8164     }
8165     return com.google.privacy.dlp.v2.StoredType.getDefaultInstance();
8166   }
8167   /**
8168    *
8169    *
8170    * <pre>
8171    * Load an existing `StoredInfoType` resource for use in
8172    * `InspectDataSource`. Not currently supported in `InspectContent`.
8173    * </pre>
8174    *
8175    * <code>.google.privacy.dlp.v2.StoredType stored_type = 5;</code>
8176    */
8177   @java.lang.Override
getStoredTypeOrBuilder()8178   public com.google.privacy.dlp.v2.StoredTypeOrBuilder getStoredTypeOrBuilder() {
8179     if (typeCase_ == 5) {
8180       return (com.google.privacy.dlp.v2.StoredType) type_;
8181     }
8182     return com.google.privacy.dlp.v2.StoredType.getDefaultInstance();
8183   }
8184 
8185   public static final int DETECTION_RULES_FIELD_NUMBER = 7;
8186 
8187   @SuppressWarnings("serial")
8188   private java.util.List<com.google.privacy.dlp.v2.CustomInfoType.DetectionRule> detectionRules_;
8189   /**
8190    *
8191    *
8192    * <pre>
8193    * Set of detection rules to apply to all findings of this CustomInfoType.
8194    * Rules are applied in order that they are specified. Not supported for the
8195    * `surrogate_type` CustomInfoType.
8196    * </pre>
8197    *
8198    * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;</code>
8199    */
8200   @java.lang.Override
8201   public java.util.List<com.google.privacy.dlp.v2.CustomInfoType.DetectionRule>
getDetectionRulesList()8202       getDetectionRulesList() {
8203     return detectionRules_;
8204   }
8205   /**
8206    *
8207    *
8208    * <pre>
8209    * Set of detection rules to apply to all findings of this CustomInfoType.
8210    * Rules are applied in order that they are specified. Not supported for the
8211    * `surrogate_type` CustomInfoType.
8212    * </pre>
8213    *
8214    * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;</code>
8215    */
8216   @java.lang.Override
8217   public java.util.List<? extends com.google.privacy.dlp.v2.CustomInfoType.DetectionRuleOrBuilder>
getDetectionRulesOrBuilderList()8218       getDetectionRulesOrBuilderList() {
8219     return detectionRules_;
8220   }
8221   /**
8222    *
8223    *
8224    * <pre>
8225    * Set of detection rules to apply to all findings of this CustomInfoType.
8226    * Rules are applied in order that they are specified. Not supported for the
8227    * `surrogate_type` CustomInfoType.
8228    * </pre>
8229    *
8230    * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;</code>
8231    */
8232   @java.lang.Override
getDetectionRulesCount()8233   public int getDetectionRulesCount() {
8234     return detectionRules_.size();
8235   }
8236   /**
8237    *
8238    *
8239    * <pre>
8240    * Set of detection rules to apply to all findings of this CustomInfoType.
8241    * Rules are applied in order that they are specified. Not supported for the
8242    * `surrogate_type` CustomInfoType.
8243    * </pre>
8244    *
8245    * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;</code>
8246    */
8247   @java.lang.Override
getDetectionRules(int index)8248   public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule getDetectionRules(int index) {
8249     return detectionRules_.get(index);
8250   }
8251   /**
8252    *
8253    *
8254    * <pre>
8255    * Set of detection rules to apply to all findings of this CustomInfoType.
8256    * Rules are applied in order that they are specified. Not supported for the
8257    * `surrogate_type` CustomInfoType.
8258    * </pre>
8259    *
8260    * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;</code>
8261    */
8262   @java.lang.Override
getDetectionRulesOrBuilder( int index)8263   public com.google.privacy.dlp.v2.CustomInfoType.DetectionRuleOrBuilder getDetectionRulesOrBuilder(
8264       int index) {
8265     return detectionRules_.get(index);
8266   }
8267 
8268   public static final int EXCLUSION_TYPE_FIELD_NUMBER = 8;
8269   private int exclusionType_ = 0;
8270   /**
8271    *
8272    *
8273    * <pre>
8274    * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
8275    * to be returned. It still can be used for rules matching.
8276    * </pre>
8277    *
8278    * <code>.google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8;</code>
8279    *
8280    * @return The enum numeric value on the wire for exclusionType.
8281    */
8282   @java.lang.Override
getExclusionTypeValue()8283   public int getExclusionTypeValue() {
8284     return exclusionType_;
8285   }
8286   /**
8287    *
8288    *
8289    * <pre>
8290    * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
8291    * to be returned. It still can be used for rules matching.
8292    * </pre>
8293    *
8294    * <code>.google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8;</code>
8295    *
8296    * @return The exclusionType.
8297    */
8298   @java.lang.Override
getExclusionType()8299   public com.google.privacy.dlp.v2.CustomInfoType.ExclusionType getExclusionType() {
8300     com.google.privacy.dlp.v2.CustomInfoType.ExclusionType result =
8301         com.google.privacy.dlp.v2.CustomInfoType.ExclusionType.forNumber(exclusionType_);
8302     return result == null
8303         ? com.google.privacy.dlp.v2.CustomInfoType.ExclusionType.UNRECOGNIZED
8304         : result;
8305   }
8306 
8307   private byte memoizedIsInitialized = -1;
8308 
8309   @java.lang.Override
isInitialized()8310   public final boolean isInitialized() {
8311     byte isInitialized = memoizedIsInitialized;
8312     if (isInitialized == 1) return true;
8313     if (isInitialized == 0) return false;
8314 
8315     memoizedIsInitialized = 1;
8316     return true;
8317   }
8318 
8319   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)8320   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
8321     if (infoType_ != null) {
8322       output.writeMessage(1, getInfoType());
8323     }
8324     if (typeCase_ == 2) {
8325       output.writeMessage(2, (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_);
8326     }
8327     if (typeCase_ == 3) {
8328       output.writeMessage(3, (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_);
8329     }
8330     if (typeCase_ == 4) {
8331       output.writeMessage(4, (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_);
8332     }
8333     if (typeCase_ == 5) {
8334       output.writeMessage(5, (com.google.privacy.dlp.v2.StoredType) type_);
8335     }
8336     if (likelihood_ != com.google.privacy.dlp.v2.Likelihood.LIKELIHOOD_UNSPECIFIED.getNumber()) {
8337       output.writeEnum(6, likelihood_);
8338     }
8339     for (int i = 0; i < detectionRules_.size(); i++) {
8340       output.writeMessage(7, detectionRules_.get(i));
8341     }
8342     if (exclusionType_
8343         != com.google.privacy.dlp.v2.CustomInfoType.ExclusionType.EXCLUSION_TYPE_UNSPECIFIED
8344             .getNumber()) {
8345       output.writeEnum(8, exclusionType_);
8346     }
8347     getUnknownFields().writeTo(output);
8348   }
8349 
8350   @java.lang.Override
getSerializedSize()8351   public int getSerializedSize() {
8352     int size = memoizedSize;
8353     if (size != -1) return size;
8354 
8355     size = 0;
8356     if (infoType_ != null) {
8357       size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInfoType());
8358     }
8359     if (typeCase_ == 2) {
8360       size +=
8361           com.google.protobuf.CodedOutputStream.computeMessageSize(
8362               2, (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_);
8363     }
8364     if (typeCase_ == 3) {
8365       size +=
8366           com.google.protobuf.CodedOutputStream.computeMessageSize(
8367               3, (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_);
8368     }
8369     if (typeCase_ == 4) {
8370       size +=
8371           com.google.protobuf.CodedOutputStream.computeMessageSize(
8372               4, (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_);
8373     }
8374     if (typeCase_ == 5) {
8375       size +=
8376           com.google.protobuf.CodedOutputStream.computeMessageSize(
8377               5, (com.google.privacy.dlp.v2.StoredType) type_);
8378     }
8379     if (likelihood_ != com.google.privacy.dlp.v2.Likelihood.LIKELIHOOD_UNSPECIFIED.getNumber()) {
8380       size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, likelihood_);
8381     }
8382     for (int i = 0; i < detectionRules_.size(); i++) {
8383       size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, detectionRules_.get(i));
8384     }
8385     if (exclusionType_
8386         != com.google.privacy.dlp.v2.CustomInfoType.ExclusionType.EXCLUSION_TYPE_UNSPECIFIED
8387             .getNumber()) {
8388       size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, exclusionType_);
8389     }
8390     size += getUnknownFields().getSerializedSize();
8391     memoizedSize = size;
8392     return size;
8393   }
8394 
8395   @java.lang.Override
equals(final java.lang.Object obj)8396   public boolean equals(final java.lang.Object obj) {
8397     if (obj == this) {
8398       return true;
8399     }
8400     if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType)) {
8401       return super.equals(obj);
8402     }
8403     com.google.privacy.dlp.v2.CustomInfoType other = (com.google.privacy.dlp.v2.CustomInfoType) obj;
8404 
8405     if (hasInfoType() != other.hasInfoType()) return false;
8406     if (hasInfoType()) {
8407       if (!getInfoType().equals(other.getInfoType())) return false;
8408     }
8409     if (likelihood_ != other.likelihood_) return false;
8410     if (!getDetectionRulesList().equals(other.getDetectionRulesList())) return false;
8411     if (exclusionType_ != other.exclusionType_) return false;
8412     if (!getTypeCase().equals(other.getTypeCase())) return false;
8413     switch (typeCase_) {
8414       case 2:
8415         if (!getDictionary().equals(other.getDictionary())) return false;
8416         break;
8417       case 3:
8418         if (!getRegex().equals(other.getRegex())) return false;
8419         break;
8420       case 4:
8421         if (!getSurrogateType().equals(other.getSurrogateType())) return false;
8422         break;
8423       case 5:
8424         if (!getStoredType().equals(other.getStoredType())) return false;
8425         break;
8426       case 0:
8427       default:
8428     }
8429     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
8430     return true;
8431   }
8432 
8433   @java.lang.Override
hashCode()8434   public int hashCode() {
8435     if (memoizedHashCode != 0) {
8436       return memoizedHashCode;
8437     }
8438     int hash = 41;
8439     hash = (19 * hash) + getDescriptor().hashCode();
8440     if (hasInfoType()) {
8441       hash = (37 * hash) + INFO_TYPE_FIELD_NUMBER;
8442       hash = (53 * hash) + getInfoType().hashCode();
8443     }
8444     hash = (37 * hash) + LIKELIHOOD_FIELD_NUMBER;
8445     hash = (53 * hash) + likelihood_;
8446     if (getDetectionRulesCount() > 0) {
8447       hash = (37 * hash) + DETECTION_RULES_FIELD_NUMBER;
8448       hash = (53 * hash) + getDetectionRulesList().hashCode();
8449     }
8450     hash = (37 * hash) + EXCLUSION_TYPE_FIELD_NUMBER;
8451     hash = (53 * hash) + exclusionType_;
8452     switch (typeCase_) {
8453       case 2:
8454         hash = (37 * hash) + DICTIONARY_FIELD_NUMBER;
8455         hash = (53 * hash) + getDictionary().hashCode();
8456         break;
8457       case 3:
8458         hash = (37 * hash) + REGEX_FIELD_NUMBER;
8459         hash = (53 * hash) + getRegex().hashCode();
8460         break;
8461       case 4:
8462         hash = (37 * hash) + SURROGATE_TYPE_FIELD_NUMBER;
8463         hash = (53 * hash) + getSurrogateType().hashCode();
8464         break;
8465       case 5:
8466         hash = (37 * hash) + STORED_TYPE_FIELD_NUMBER;
8467         hash = (53 * hash) + getStoredType().hashCode();
8468         break;
8469       case 0:
8470       default:
8471     }
8472     hash = (29 * hash) + getUnknownFields().hashCode();
8473     memoizedHashCode = hash;
8474     return hash;
8475   }
8476 
parseFrom(java.nio.ByteBuffer data)8477   public static com.google.privacy.dlp.v2.CustomInfoType parseFrom(java.nio.ByteBuffer data)
8478       throws com.google.protobuf.InvalidProtocolBufferException {
8479     return PARSER.parseFrom(data);
8480   }
8481 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)8482   public static com.google.privacy.dlp.v2.CustomInfoType parseFrom(
8483       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
8484       throws com.google.protobuf.InvalidProtocolBufferException {
8485     return PARSER.parseFrom(data, extensionRegistry);
8486   }
8487 
parseFrom( com.google.protobuf.ByteString data)8488   public static com.google.privacy.dlp.v2.CustomInfoType parseFrom(
8489       com.google.protobuf.ByteString data)
8490       throws com.google.protobuf.InvalidProtocolBufferException {
8491     return PARSER.parseFrom(data);
8492   }
8493 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)8494   public static com.google.privacy.dlp.v2.CustomInfoType parseFrom(
8495       com.google.protobuf.ByteString data,
8496       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
8497       throws com.google.protobuf.InvalidProtocolBufferException {
8498     return PARSER.parseFrom(data, extensionRegistry);
8499   }
8500 
parseFrom(byte[] data)8501   public static com.google.privacy.dlp.v2.CustomInfoType parseFrom(byte[] data)
8502       throws com.google.protobuf.InvalidProtocolBufferException {
8503     return PARSER.parseFrom(data);
8504   }
8505 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)8506   public static com.google.privacy.dlp.v2.CustomInfoType parseFrom(
8507       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
8508       throws com.google.protobuf.InvalidProtocolBufferException {
8509     return PARSER.parseFrom(data, extensionRegistry);
8510   }
8511 
parseFrom(java.io.InputStream input)8512   public static com.google.privacy.dlp.v2.CustomInfoType parseFrom(java.io.InputStream input)
8513       throws java.io.IOException {
8514     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
8515   }
8516 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)8517   public static com.google.privacy.dlp.v2.CustomInfoType parseFrom(
8518       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
8519       throws java.io.IOException {
8520     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
8521         PARSER, input, extensionRegistry);
8522   }
8523 
parseDelimitedFrom( java.io.InputStream input)8524   public static com.google.privacy.dlp.v2.CustomInfoType parseDelimitedFrom(
8525       java.io.InputStream input) throws java.io.IOException {
8526     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
8527   }
8528 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)8529   public static com.google.privacy.dlp.v2.CustomInfoType parseDelimitedFrom(
8530       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
8531       throws java.io.IOException {
8532     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
8533         PARSER, input, extensionRegistry);
8534   }
8535 
parseFrom( com.google.protobuf.CodedInputStream input)8536   public static com.google.privacy.dlp.v2.CustomInfoType parseFrom(
8537       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
8538     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
8539   }
8540 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)8541   public static com.google.privacy.dlp.v2.CustomInfoType parseFrom(
8542       com.google.protobuf.CodedInputStream input,
8543       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
8544       throws java.io.IOException {
8545     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
8546         PARSER, input, extensionRegistry);
8547   }
8548 
8549   @java.lang.Override
newBuilderForType()8550   public Builder newBuilderForType() {
8551     return newBuilder();
8552   }
8553 
newBuilder()8554   public static Builder newBuilder() {
8555     return DEFAULT_INSTANCE.toBuilder();
8556   }
8557 
newBuilder(com.google.privacy.dlp.v2.CustomInfoType prototype)8558   public static Builder newBuilder(com.google.privacy.dlp.v2.CustomInfoType prototype) {
8559     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
8560   }
8561 
8562   @java.lang.Override
toBuilder()8563   public Builder toBuilder() {
8564     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
8565   }
8566 
8567   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)8568   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
8569     Builder builder = new Builder(parent);
8570     return builder;
8571   }
8572   /**
8573    *
8574    *
8575    * <pre>
8576    * Custom information type provided by the user. Used to find domain-specific
8577    * sensitive information configurable to the data in question.
8578    * </pre>
8579    *
8580    * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType}
8581    */
8582   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
8583       implements
8584       // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType)
8585       com.google.privacy.dlp.v2.CustomInfoTypeOrBuilder {
getDescriptor()8586     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
8587       return com.google.privacy.dlp.v2.DlpStorage
8588           .internal_static_google_privacy_dlp_v2_CustomInfoType_descriptor;
8589     }
8590 
8591     @java.lang.Override
8592     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()8593         internalGetFieldAccessorTable() {
8594       return com.google.privacy.dlp.v2.DlpStorage
8595           .internal_static_google_privacy_dlp_v2_CustomInfoType_fieldAccessorTable
8596           .ensureFieldAccessorsInitialized(
8597               com.google.privacy.dlp.v2.CustomInfoType.class,
8598               com.google.privacy.dlp.v2.CustomInfoType.Builder.class);
8599     }
8600 
8601     // Construct using com.google.privacy.dlp.v2.CustomInfoType.newBuilder()
Builder()8602     private Builder() {}
8603 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)8604     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
8605       super(parent);
8606     }
8607 
8608     @java.lang.Override
clear()8609     public Builder clear() {
8610       super.clear();
8611       bitField0_ = 0;
8612       infoType_ = null;
8613       if (infoTypeBuilder_ != null) {
8614         infoTypeBuilder_.dispose();
8615         infoTypeBuilder_ = null;
8616       }
8617       likelihood_ = 0;
8618       if (dictionaryBuilder_ != null) {
8619         dictionaryBuilder_.clear();
8620       }
8621       if (regexBuilder_ != null) {
8622         regexBuilder_.clear();
8623       }
8624       if (surrogateTypeBuilder_ != null) {
8625         surrogateTypeBuilder_.clear();
8626       }
8627       if (storedTypeBuilder_ != null) {
8628         storedTypeBuilder_.clear();
8629       }
8630       if (detectionRulesBuilder_ == null) {
8631         detectionRules_ = java.util.Collections.emptyList();
8632       } else {
8633         detectionRules_ = null;
8634         detectionRulesBuilder_.clear();
8635       }
8636       bitField0_ = (bitField0_ & ~0x00000040);
8637       exclusionType_ = 0;
8638       typeCase_ = 0;
8639       type_ = null;
8640       return this;
8641     }
8642 
8643     @java.lang.Override
getDescriptorForType()8644     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
8645       return com.google.privacy.dlp.v2.DlpStorage
8646           .internal_static_google_privacy_dlp_v2_CustomInfoType_descriptor;
8647     }
8648 
8649     @java.lang.Override
getDefaultInstanceForType()8650     public com.google.privacy.dlp.v2.CustomInfoType getDefaultInstanceForType() {
8651       return com.google.privacy.dlp.v2.CustomInfoType.getDefaultInstance();
8652     }
8653 
8654     @java.lang.Override
build()8655     public com.google.privacy.dlp.v2.CustomInfoType build() {
8656       com.google.privacy.dlp.v2.CustomInfoType result = buildPartial();
8657       if (!result.isInitialized()) {
8658         throw newUninitializedMessageException(result);
8659       }
8660       return result;
8661     }
8662 
8663     @java.lang.Override
buildPartial()8664     public com.google.privacy.dlp.v2.CustomInfoType buildPartial() {
8665       com.google.privacy.dlp.v2.CustomInfoType result =
8666           new com.google.privacy.dlp.v2.CustomInfoType(this);
8667       buildPartialRepeatedFields(result);
8668       if (bitField0_ != 0) {
8669         buildPartial0(result);
8670       }
8671       buildPartialOneofs(result);
8672       onBuilt();
8673       return result;
8674     }
8675 
buildPartialRepeatedFields(com.google.privacy.dlp.v2.CustomInfoType result)8676     private void buildPartialRepeatedFields(com.google.privacy.dlp.v2.CustomInfoType result) {
8677       if (detectionRulesBuilder_ == null) {
8678         if (((bitField0_ & 0x00000040) != 0)) {
8679           detectionRules_ = java.util.Collections.unmodifiableList(detectionRules_);
8680           bitField0_ = (bitField0_ & ~0x00000040);
8681         }
8682         result.detectionRules_ = detectionRules_;
8683       } else {
8684         result.detectionRules_ = detectionRulesBuilder_.build();
8685       }
8686     }
8687 
buildPartial0(com.google.privacy.dlp.v2.CustomInfoType result)8688     private void buildPartial0(com.google.privacy.dlp.v2.CustomInfoType result) {
8689       int from_bitField0_ = bitField0_;
8690       if (((from_bitField0_ & 0x00000001) != 0)) {
8691         result.infoType_ = infoTypeBuilder_ == null ? infoType_ : infoTypeBuilder_.build();
8692       }
8693       if (((from_bitField0_ & 0x00000002) != 0)) {
8694         result.likelihood_ = likelihood_;
8695       }
8696       if (((from_bitField0_ & 0x00000080) != 0)) {
8697         result.exclusionType_ = exclusionType_;
8698       }
8699     }
8700 
buildPartialOneofs(com.google.privacy.dlp.v2.CustomInfoType result)8701     private void buildPartialOneofs(com.google.privacy.dlp.v2.CustomInfoType result) {
8702       result.typeCase_ = typeCase_;
8703       result.type_ = this.type_;
8704       if (typeCase_ == 2 && dictionaryBuilder_ != null) {
8705         result.type_ = dictionaryBuilder_.build();
8706       }
8707       if (typeCase_ == 3 && regexBuilder_ != null) {
8708         result.type_ = regexBuilder_.build();
8709       }
8710       if (typeCase_ == 4 && surrogateTypeBuilder_ != null) {
8711         result.type_ = surrogateTypeBuilder_.build();
8712       }
8713       if (typeCase_ == 5 && storedTypeBuilder_ != null) {
8714         result.type_ = storedTypeBuilder_.build();
8715       }
8716     }
8717 
8718     @java.lang.Override
clone()8719     public Builder clone() {
8720       return super.clone();
8721     }
8722 
8723     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)8724     public Builder setField(
8725         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
8726       return super.setField(field, value);
8727     }
8728 
8729     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)8730     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
8731       return super.clearField(field);
8732     }
8733 
8734     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)8735     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
8736       return super.clearOneof(oneof);
8737     }
8738 
8739     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)8740     public Builder setRepeatedField(
8741         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
8742       return super.setRepeatedField(field, index, value);
8743     }
8744 
8745     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)8746     public Builder addRepeatedField(
8747         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
8748       return super.addRepeatedField(field, value);
8749     }
8750 
8751     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)8752     public Builder mergeFrom(com.google.protobuf.Message other) {
8753       if (other instanceof com.google.privacy.dlp.v2.CustomInfoType) {
8754         return mergeFrom((com.google.privacy.dlp.v2.CustomInfoType) other);
8755       } else {
8756         super.mergeFrom(other);
8757         return this;
8758       }
8759     }
8760 
mergeFrom(com.google.privacy.dlp.v2.CustomInfoType other)8761     public Builder mergeFrom(com.google.privacy.dlp.v2.CustomInfoType other) {
8762       if (other == com.google.privacy.dlp.v2.CustomInfoType.getDefaultInstance()) return this;
8763       if (other.hasInfoType()) {
8764         mergeInfoType(other.getInfoType());
8765       }
8766       if (other.likelihood_ != 0) {
8767         setLikelihoodValue(other.getLikelihoodValue());
8768       }
8769       if (detectionRulesBuilder_ == null) {
8770         if (!other.detectionRules_.isEmpty()) {
8771           if (detectionRules_.isEmpty()) {
8772             detectionRules_ = other.detectionRules_;
8773             bitField0_ = (bitField0_ & ~0x00000040);
8774           } else {
8775             ensureDetectionRulesIsMutable();
8776             detectionRules_.addAll(other.detectionRules_);
8777           }
8778           onChanged();
8779         }
8780       } else {
8781         if (!other.detectionRules_.isEmpty()) {
8782           if (detectionRulesBuilder_.isEmpty()) {
8783             detectionRulesBuilder_.dispose();
8784             detectionRulesBuilder_ = null;
8785             detectionRules_ = other.detectionRules_;
8786             bitField0_ = (bitField0_ & ~0x00000040);
8787             detectionRulesBuilder_ =
8788                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
8789                     ? getDetectionRulesFieldBuilder()
8790                     : null;
8791           } else {
8792             detectionRulesBuilder_.addAllMessages(other.detectionRules_);
8793           }
8794         }
8795       }
8796       if (other.exclusionType_ != 0) {
8797         setExclusionTypeValue(other.getExclusionTypeValue());
8798       }
8799       switch (other.getTypeCase()) {
8800         case DICTIONARY:
8801           {
8802             mergeDictionary(other.getDictionary());
8803             break;
8804           }
8805         case REGEX:
8806           {
8807             mergeRegex(other.getRegex());
8808             break;
8809           }
8810         case SURROGATE_TYPE:
8811           {
8812             mergeSurrogateType(other.getSurrogateType());
8813             break;
8814           }
8815         case STORED_TYPE:
8816           {
8817             mergeStoredType(other.getStoredType());
8818             break;
8819           }
8820         case TYPE_NOT_SET:
8821           {
8822             break;
8823           }
8824       }
8825       this.mergeUnknownFields(other.getUnknownFields());
8826       onChanged();
8827       return this;
8828     }
8829 
8830     @java.lang.Override
isInitialized()8831     public final boolean isInitialized() {
8832       return true;
8833     }
8834 
8835     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)8836     public Builder mergeFrom(
8837         com.google.protobuf.CodedInputStream input,
8838         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
8839         throws java.io.IOException {
8840       if (extensionRegistry == null) {
8841         throw new java.lang.NullPointerException();
8842       }
8843       try {
8844         boolean done = false;
8845         while (!done) {
8846           int tag = input.readTag();
8847           switch (tag) {
8848             case 0:
8849               done = true;
8850               break;
8851             case 10:
8852               {
8853                 input.readMessage(getInfoTypeFieldBuilder().getBuilder(), extensionRegistry);
8854                 bitField0_ |= 0x00000001;
8855                 break;
8856               } // case 10
8857             case 18:
8858               {
8859                 input.readMessage(getDictionaryFieldBuilder().getBuilder(), extensionRegistry);
8860                 typeCase_ = 2;
8861                 break;
8862               } // case 18
8863             case 26:
8864               {
8865                 input.readMessage(getRegexFieldBuilder().getBuilder(), extensionRegistry);
8866                 typeCase_ = 3;
8867                 break;
8868               } // case 26
8869             case 34:
8870               {
8871                 input.readMessage(getSurrogateTypeFieldBuilder().getBuilder(), extensionRegistry);
8872                 typeCase_ = 4;
8873                 break;
8874               } // case 34
8875             case 42:
8876               {
8877                 input.readMessage(getStoredTypeFieldBuilder().getBuilder(), extensionRegistry);
8878                 typeCase_ = 5;
8879                 break;
8880               } // case 42
8881             case 48:
8882               {
8883                 likelihood_ = input.readEnum();
8884                 bitField0_ |= 0x00000002;
8885                 break;
8886               } // case 48
8887             case 58:
8888               {
8889                 com.google.privacy.dlp.v2.CustomInfoType.DetectionRule m =
8890                     input.readMessage(
8891                         com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.parser(),
8892                         extensionRegistry);
8893                 if (detectionRulesBuilder_ == null) {
8894                   ensureDetectionRulesIsMutable();
8895                   detectionRules_.add(m);
8896                 } else {
8897                   detectionRulesBuilder_.addMessage(m);
8898                 }
8899                 break;
8900               } // case 58
8901             case 64:
8902               {
8903                 exclusionType_ = input.readEnum();
8904                 bitField0_ |= 0x00000080;
8905                 break;
8906               } // case 64
8907             default:
8908               {
8909                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
8910                   done = true; // was an endgroup tag
8911                 }
8912                 break;
8913               } // default:
8914           } // switch (tag)
8915         } // while (!done)
8916       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
8917         throw e.unwrapIOException();
8918       } finally {
8919         onChanged();
8920       } // finally
8921       return this;
8922     }
8923 
8924     private int typeCase_ = 0;
8925     private java.lang.Object type_;
8926 
getTypeCase()8927     public TypeCase getTypeCase() {
8928       return TypeCase.forNumber(typeCase_);
8929     }
8930 
clearType()8931     public Builder clearType() {
8932       typeCase_ = 0;
8933       type_ = null;
8934       onChanged();
8935       return this;
8936     }
8937 
8938     private int bitField0_;
8939 
8940     private com.google.privacy.dlp.v2.InfoType infoType_;
8941     private com.google.protobuf.SingleFieldBuilderV3<
8942             com.google.privacy.dlp.v2.InfoType,
8943             com.google.privacy.dlp.v2.InfoType.Builder,
8944             com.google.privacy.dlp.v2.InfoTypeOrBuilder>
8945         infoTypeBuilder_;
8946     /**
8947      *
8948      *
8949      * <pre>
8950      * CustomInfoType can either be a new infoType, or an extension of built-in
8951      * infoType, when the name matches one of existing infoTypes and that infoType
8952      * is specified in `InspectContent.info_types` field. Specifying the latter
8953      * adds findings to the one detected by the system. If built-in info type is
8954      * not specified in `InspectContent.info_types` list then the name is treated
8955      * as a custom info type.
8956      * </pre>
8957      *
8958      * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
8959      *
8960      * @return Whether the infoType field is set.
8961      */
hasInfoType()8962     public boolean hasInfoType() {
8963       return ((bitField0_ & 0x00000001) != 0);
8964     }
8965     /**
8966      *
8967      *
8968      * <pre>
8969      * CustomInfoType can either be a new infoType, or an extension of built-in
8970      * infoType, when the name matches one of existing infoTypes and that infoType
8971      * is specified in `InspectContent.info_types` field. Specifying the latter
8972      * adds findings to the one detected by the system. If built-in info type is
8973      * not specified in `InspectContent.info_types` list then the name is treated
8974      * as a custom info type.
8975      * </pre>
8976      *
8977      * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
8978      *
8979      * @return The infoType.
8980      */
getInfoType()8981     public com.google.privacy.dlp.v2.InfoType getInfoType() {
8982       if (infoTypeBuilder_ == null) {
8983         return infoType_ == null
8984             ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance()
8985             : infoType_;
8986       } else {
8987         return infoTypeBuilder_.getMessage();
8988       }
8989     }
8990     /**
8991      *
8992      *
8993      * <pre>
8994      * CustomInfoType can either be a new infoType, or an extension of built-in
8995      * infoType, when the name matches one of existing infoTypes and that infoType
8996      * is specified in `InspectContent.info_types` field. Specifying the latter
8997      * adds findings to the one detected by the system. If built-in info type is
8998      * not specified in `InspectContent.info_types` list then the name is treated
8999      * as a custom info type.
9000      * </pre>
9001      *
9002      * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
9003      */
setInfoType(com.google.privacy.dlp.v2.InfoType value)9004     public Builder setInfoType(com.google.privacy.dlp.v2.InfoType value) {
9005       if (infoTypeBuilder_ == null) {
9006         if (value == null) {
9007           throw new NullPointerException();
9008         }
9009         infoType_ = value;
9010       } else {
9011         infoTypeBuilder_.setMessage(value);
9012       }
9013       bitField0_ |= 0x00000001;
9014       onChanged();
9015       return this;
9016     }
9017     /**
9018      *
9019      *
9020      * <pre>
9021      * CustomInfoType can either be a new infoType, or an extension of built-in
9022      * infoType, when the name matches one of existing infoTypes and that infoType
9023      * is specified in `InspectContent.info_types` field. Specifying the latter
9024      * adds findings to the one detected by the system. If built-in info type is
9025      * not specified in `InspectContent.info_types` list then the name is treated
9026      * as a custom info type.
9027      * </pre>
9028      *
9029      * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
9030      */
setInfoType(com.google.privacy.dlp.v2.InfoType.Builder builderForValue)9031     public Builder setInfoType(com.google.privacy.dlp.v2.InfoType.Builder builderForValue) {
9032       if (infoTypeBuilder_ == null) {
9033         infoType_ = builderForValue.build();
9034       } else {
9035         infoTypeBuilder_.setMessage(builderForValue.build());
9036       }
9037       bitField0_ |= 0x00000001;
9038       onChanged();
9039       return this;
9040     }
9041     /**
9042      *
9043      *
9044      * <pre>
9045      * CustomInfoType can either be a new infoType, or an extension of built-in
9046      * infoType, when the name matches one of existing infoTypes and that infoType
9047      * is specified in `InspectContent.info_types` field. Specifying the latter
9048      * adds findings to the one detected by the system. If built-in info type is
9049      * not specified in `InspectContent.info_types` list then the name is treated
9050      * as a custom info type.
9051      * </pre>
9052      *
9053      * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
9054      */
mergeInfoType(com.google.privacy.dlp.v2.InfoType value)9055     public Builder mergeInfoType(com.google.privacy.dlp.v2.InfoType value) {
9056       if (infoTypeBuilder_ == null) {
9057         if (((bitField0_ & 0x00000001) != 0)
9058             && infoType_ != null
9059             && infoType_ != com.google.privacy.dlp.v2.InfoType.getDefaultInstance()) {
9060           getInfoTypeBuilder().mergeFrom(value);
9061         } else {
9062           infoType_ = value;
9063         }
9064       } else {
9065         infoTypeBuilder_.mergeFrom(value);
9066       }
9067       bitField0_ |= 0x00000001;
9068       onChanged();
9069       return this;
9070     }
9071     /**
9072      *
9073      *
9074      * <pre>
9075      * CustomInfoType can either be a new infoType, or an extension of built-in
9076      * infoType, when the name matches one of existing infoTypes and that infoType
9077      * is specified in `InspectContent.info_types` field. Specifying the latter
9078      * adds findings to the one detected by the system. If built-in info type is
9079      * not specified in `InspectContent.info_types` list then the name is treated
9080      * as a custom info type.
9081      * </pre>
9082      *
9083      * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
9084      */
clearInfoType()9085     public Builder clearInfoType() {
9086       bitField0_ = (bitField0_ & ~0x00000001);
9087       infoType_ = null;
9088       if (infoTypeBuilder_ != null) {
9089         infoTypeBuilder_.dispose();
9090         infoTypeBuilder_ = null;
9091       }
9092       onChanged();
9093       return this;
9094     }
9095     /**
9096      *
9097      *
9098      * <pre>
9099      * CustomInfoType can either be a new infoType, or an extension of built-in
9100      * infoType, when the name matches one of existing infoTypes and that infoType
9101      * is specified in `InspectContent.info_types` field. Specifying the latter
9102      * adds findings to the one detected by the system. If built-in info type is
9103      * not specified in `InspectContent.info_types` list then the name is treated
9104      * as a custom info type.
9105      * </pre>
9106      *
9107      * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
9108      */
getInfoTypeBuilder()9109     public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypeBuilder() {
9110       bitField0_ |= 0x00000001;
9111       onChanged();
9112       return getInfoTypeFieldBuilder().getBuilder();
9113     }
9114     /**
9115      *
9116      *
9117      * <pre>
9118      * CustomInfoType can either be a new infoType, or an extension of built-in
9119      * infoType, when the name matches one of existing infoTypes and that infoType
9120      * is specified in `InspectContent.info_types` field. Specifying the latter
9121      * adds findings to the one detected by the system. If built-in info type is
9122      * not specified in `InspectContent.info_types` list then the name is treated
9123      * as a custom info type.
9124      * </pre>
9125      *
9126      * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
9127      */
getInfoTypeOrBuilder()9128     public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() {
9129       if (infoTypeBuilder_ != null) {
9130         return infoTypeBuilder_.getMessageOrBuilder();
9131       } else {
9132         return infoType_ == null
9133             ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance()
9134             : infoType_;
9135       }
9136     }
9137     /**
9138      *
9139      *
9140      * <pre>
9141      * CustomInfoType can either be a new infoType, or an extension of built-in
9142      * infoType, when the name matches one of existing infoTypes and that infoType
9143      * is specified in `InspectContent.info_types` field. Specifying the latter
9144      * adds findings to the one detected by the system. If built-in info type is
9145      * not specified in `InspectContent.info_types` list then the name is treated
9146      * as a custom info type.
9147      * </pre>
9148      *
9149      * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
9150      */
9151     private com.google.protobuf.SingleFieldBuilderV3<
9152             com.google.privacy.dlp.v2.InfoType,
9153             com.google.privacy.dlp.v2.InfoType.Builder,
9154             com.google.privacy.dlp.v2.InfoTypeOrBuilder>
getInfoTypeFieldBuilder()9155         getInfoTypeFieldBuilder() {
9156       if (infoTypeBuilder_ == null) {
9157         infoTypeBuilder_ =
9158             new com.google.protobuf.SingleFieldBuilderV3<
9159                 com.google.privacy.dlp.v2.InfoType,
9160                 com.google.privacy.dlp.v2.InfoType.Builder,
9161                 com.google.privacy.dlp.v2.InfoTypeOrBuilder>(
9162                 getInfoType(), getParentForChildren(), isClean());
9163         infoType_ = null;
9164       }
9165       return infoTypeBuilder_;
9166     }
9167 
9168     private int likelihood_ = 0;
9169     /**
9170      *
9171      *
9172      * <pre>
9173      * Likelihood to return for this CustomInfoType. This base value can be
9174      * altered by a detection rule if the finding meets the criteria specified by
9175      * the rule. Defaults to `VERY_LIKELY` if not specified.
9176      * </pre>
9177      *
9178      * <code>.google.privacy.dlp.v2.Likelihood likelihood = 6;</code>
9179      *
9180      * @return The enum numeric value on the wire for likelihood.
9181      */
9182     @java.lang.Override
getLikelihoodValue()9183     public int getLikelihoodValue() {
9184       return likelihood_;
9185     }
9186     /**
9187      *
9188      *
9189      * <pre>
9190      * Likelihood to return for this CustomInfoType. This base value can be
9191      * altered by a detection rule if the finding meets the criteria specified by
9192      * the rule. Defaults to `VERY_LIKELY` if not specified.
9193      * </pre>
9194      *
9195      * <code>.google.privacy.dlp.v2.Likelihood likelihood = 6;</code>
9196      *
9197      * @param value The enum numeric value on the wire for likelihood to set.
9198      * @return This builder for chaining.
9199      */
setLikelihoodValue(int value)9200     public Builder setLikelihoodValue(int value) {
9201       likelihood_ = value;
9202       bitField0_ |= 0x00000002;
9203       onChanged();
9204       return this;
9205     }
9206     /**
9207      *
9208      *
9209      * <pre>
9210      * Likelihood to return for this CustomInfoType. This base value can be
9211      * altered by a detection rule if the finding meets the criteria specified by
9212      * the rule. Defaults to `VERY_LIKELY` if not specified.
9213      * </pre>
9214      *
9215      * <code>.google.privacy.dlp.v2.Likelihood likelihood = 6;</code>
9216      *
9217      * @return The likelihood.
9218      */
9219     @java.lang.Override
getLikelihood()9220     public com.google.privacy.dlp.v2.Likelihood getLikelihood() {
9221       com.google.privacy.dlp.v2.Likelihood result =
9222           com.google.privacy.dlp.v2.Likelihood.forNumber(likelihood_);
9223       return result == null ? com.google.privacy.dlp.v2.Likelihood.UNRECOGNIZED : result;
9224     }
9225     /**
9226      *
9227      *
9228      * <pre>
9229      * Likelihood to return for this CustomInfoType. This base value can be
9230      * altered by a detection rule if the finding meets the criteria specified by
9231      * the rule. Defaults to `VERY_LIKELY` if not specified.
9232      * </pre>
9233      *
9234      * <code>.google.privacy.dlp.v2.Likelihood likelihood = 6;</code>
9235      *
9236      * @param value The likelihood to set.
9237      * @return This builder for chaining.
9238      */
setLikelihood(com.google.privacy.dlp.v2.Likelihood value)9239     public Builder setLikelihood(com.google.privacy.dlp.v2.Likelihood value) {
9240       if (value == null) {
9241         throw new NullPointerException();
9242       }
9243       bitField0_ |= 0x00000002;
9244       likelihood_ = value.getNumber();
9245       onChanged();
9246       return this;
9247     }
9248     /**
9249      *
9250      *
9251      * <pre>
9252      * Likelihood to return for this CustomInfoType. This base value can be
9253      * altered by a detection rule if the finding meets the criteria specified by
9254      * the rule. Defaults to `VERY_LIKELY` if not specified.
9255      * </pre>
9256      *
9257      * <code>.google.privacy.dlp.v2.Likelihood likelihood = 6;</code>
9258      *
9259      * @return This builder for chaining.
9260      */
clearLikelihood()9261     public Builder clearLikelihood() {
9262       bitField0_ = (bitField0_ & ~0x00000002);
9263       likelihood_ = 0;
9264       onChanged();
9265       return this;
9266     }
9267 
9268     private com.google.protobuf.SingleFieldBuilderV3<
9269             com.google.privacy.dlp.v2.CustomInfoType.Dictionary,
9270             com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder,
9271             com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder>
9272         dictionaryBuilder_;
9273     /**
9274      *
9275      *
9276      * <pre>
9277      * A list of phrases to detect as a CustomInfoType.
9278      * </pre>
9279      *
9280      * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2;</code>
9281      *
9282      * @return Whether the dictionary field is set.
9283      */
9284     @java.lang.Override
hasDictionary()9285     public boolean hasDictionary() {
9286       return typeCase_ == 2;
9287     }
9288     /**
9289      *
9290      *
9291      * <pre>
9292      * A list of phrases to detect as a CustomInfoType.
9293      * </pre>
9294      *
9295      * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2;</code>
9296      *
9297      * @return The dictionary.
9298      */
9299     @java.lang.Override
getDictionary()9300     public com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDictionary() {
9301       if (dictionaryBuilder_ == null) {
9302         if (typeCase_ == 2) {
9303           return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_;
9304         }
9305         return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance();
9306       } else {
9307         if (typeCase_ == 2) {
9308           return dictionaryBuilder_.getMessage();
9309         }
9310         return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance();
9311       }
9312     }
9313     /**
9314      *
9315      *
9316      * <pre>
9317      * A list of phrases to detect as a CustomInfoType.
9318      * </pre>
9319      *
9320      * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2;</code>
9321      */
setDictionary(com.google.privacy.dlp.v2.CustomInfoType.Dictionary value)9322     public Builder setDictionary(com.google.privacy.dlp.v2.CustomInfoType.Dictionary value) {
9323       if (dictionaryBuilder_ == null) {
9324         if (value == null) {
9325           throw new NullPointerException();
9326         }
9327         type_ = value;
9328         onChanged();
9329       } else {
9330         dictionaryBuilder_.setMessage(value);
9331       }
9332       typeCase_ = 2;
9333       return this;
9334     }
9335     /**
9336      *
9337      *
9338      * <pre>
9339      * A list of phrases to detect as a CustomInfoType.
9340      * </pre>
9341      *
9342      * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2;</code>
9343      */
setDictionary( com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder builderForValue)9344     public Builder setDictionary(
9345         com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder builderForValue) {
9346       if (dictionaryBuilder_ == null) {
9347         type_ = builderForValue.build();
9348         onChanged();
9349       } else {
9350         dictionaryBuilder_.setMessage(builderForValue.build());
9351       }
9352       typeCase_ = 2;
9353       return this;
9354     }
9355     /**
9356      *
9357      *
9358      * <pre>
9359      * A list of phrases to detect as a CustomInfoType.
9360      * </pre>
9361      *
9362      * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2;</code>
9363      */
mergeDictionary(com.google.privacy.dlp.v2.CustomInfoType.Dictionary value)9364     public Builder mergeDictionary(com.google.privacy.dlp.v2.CustomInfoType.Dictionary value) {
9365       if (dictionaryBuilder_ == null) {
9366         if (typeCase_ == 2
9367             && type_ != com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance()) {
9368           type_ =
9369               com.google.privacy.dlp.v2.CustomInfoType.Dictionary.newBuilder(
9370                       (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_)
9371                   .mergeFrom(value)
9372                   .buildPartial();
9373         } else {
9374           type_ = value;
9375         }
9376         onChanged();
9377       } else {
9378         if (typeCase_ == 2) {
9379           dictionaryBuilder_.mergeFrom(value);
9380         } else {
9381           dictionaryBuilder_.setMessage(value);
9382         }
9383       }
9384       typeCase_ = 2;
9385       return this;
9386     }
9387     /**
9388      *
9389      *
9390      * <pre>
9391      * A list of phrases to detect as a CustomInfoType.
9392      * </pre>
9393      *
9394      * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2;</code>
9395      */
clearDictionary()9396     public Builder clearDictionary() {
9397       if (dictionaryBuilder_ == null) {
9398         if (typeCase_ == 2) {
9399           typeCase_ = 0;
9400           type_ = null;
9401           onChanged();
9402         }
9403       } else {
9404         if (typeCase_ == 2) {
9405           typeCase_ = 0;
9406           type_ = null;
9407         }
9408         dictionaryBuilder_.clear();
9409       }
9410       return this;
9411     }
9412     /**
9413      *
9414      *
9415      * <pre>
9416      * A list of phrases to detect as a CustomInfoType.
9417      * </pre>
9418      *
9419      * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2;</code>
9420      */
getDictionaryBuilder()9421     public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder getDictionaryBuilder() {
9422       return getDictionaryFieldBuilder().getBuilder();
9423     }
9424     /**
9425      *
9426      *
9427      * <pre>
9428      * A list of phrases to detect as a CustomInfoType.
9429      * </pre>
9430      *
9431      * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2;</code>
9432      */
9433     @java.lang.Override
getDictionaryOrBuilder()9434     public com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder getDictionaryOrBuilder() {
9435       if ((typeCase_ == 2) && (dictionaryBuilder_ != null)) {
9436         return dictionaryBuilder_.getMessageOrBuilder();
9437       } else {
9438         if (typeCase_ == 2) {
9439           return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_;
9440         }
9441         return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance();
9442       }
9443     }
9444     /**
9445      *
9446      *
9447      * <pre>
9448      * A list of phrases to detect as a CustomInfoType.
9449      * </pre>
9450      *
9451      * <code>.google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2;</code>
9452      */
9453     private com.google.protobuf.SingleFieldBuilderV3<
9454             com.google.privacy.dlp.v2.CustomInfoType.Dictionary,
9455             com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder,
9456             com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder>
getDictionaryFieldBuilder()9457         getDictionaryFieldBuilder() {
9458       if (dictionaryBuilder_ == null) {
9459         if (!(typeCase_ == 2)) {
9460           type_ = com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance();
9461         }
9462         dictionaryBuilder_ =
9463             new com.google.protobuf.SingleFieldBuilderV3<
9464                 com.google.privacy.dlp.v2.CustomInfoType.Dictionary,
9465                 com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder,
9466                 com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder>(
9467                 (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_,
9468                 getParentForChildren(),
9469                 isClean());
9470         type_ = null;
9471       }
9472       typeCase_ = 2;
9473       onChanged();
9474       return dictionaryBuilder_;
9475     }
9476 
9477     private com.google.protobuf.SingleFieldBuilderV3<
9478             com.google.privacy.dlp.v2.CustomInfoType.Regex,
9479             com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder,
9480             com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder>
9481         regexBuilder_;
9482     /**
9483      *
9484      *
9485      * <pre>
9486      * Regular expression based CustomInfoType.
9487      * </pre>
9488      *
9489      * <code>.google.privacy.dlp.v2.CustomInfoType.Regex regex = 3;</code>
9490      *
9491      * @return Whether the regex field is set.
9492      */
9493     @java.lang.Override
hasRegex()9494     public boolean hasRegex() {
9495       return typeCase_ == 3;
9496     }
9497     /**
9498      *
9499      *
9500      * <pre>
9501      * Regular expression based CustomInfoType.
9502      * </pre>
9503      *
9504      * <code>.google.privacy.dlp.v2.CustomInfoType.Regex regex = 3;</code>
9505      *
9506      * @return The regex.
9507      */
9508     @java.lang.Override
getRegex()9509     public com.google.privacy.dlp.v2.CustomInfoType.Regex getRegex() {
9510       if (regexBuilder_ == null) {
9511         if (typeCase_ == 3) {
9512           return (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_;
9513         }
9514         return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance();
9515       } else {
9516         if (typeCase_ == 3) {
9517           return regexBuilder_.getMessage();
9518         }
9519         return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance();
9520       }
9521     }
9522     /**
9523      *
9524      *
9525      * <pre>
9526      * Regular expression based CustomInfoType.
9527      * </pre>
9528      *
9529      * <code>.google.privacy.dlp.v2.CustomInfoType.Regex regex = 3;</code>
9530      */
setRegex(com.google.privacy.dlp.v2.CustomInfoType.Regex value)9531     public Builder setRegex(com.google.privacy.dlp.v2.CustomInfoType.Regex value) {
9532       if (regexBuilder_ == null) {
9533         if (value == null) {
9534           throw new NullPointerException();
9535         }
9536         type_ = value;
9537         onChanged();
9538       } else {
9539         regexBuilder_.setMessage(value);
9540       }
9541       typeCase_ = 3;
9542       return this;
9543     }
9544     /**
9545      *
9546      *
9547      * <pre>
9548      * Regular expression based CustomInfoType.
9549      * </pre>
9550      *
9551      * <code>.google.privacy.dlp.v2.CustomInfoType.Regex regex = 3;</code>
9552      */
setRegex( com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder builderForValue)9553     public Builder setRegex(
9554         com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder builderForValue) {
9555       if (regexBuilder_ == null) {
9556         type_ = builderForValue.build();
9557         onChanged();
9558       } else {
9559         regexBuilder_.setMessage(builderForValue.build());
9560       }
9561       typeCase_ = 3;
9562       return this;
9563     }
9564     /**
9565      *
9566      *
9567      * <pre>
9568      * Regular expression based CustomInfoType.
9569      * </pre>
9570      *
9571      * <code>.google.privacy.dlp.v2.CustomInfoType.Regex regex = 3;</code>
9572      */
mergeRegex(com.google.privacy.dlp.v2.CustomInfoType.Regex value)9573     public Builder mergeRegex(com.google.privacy.dlp.v2.CustomInfoType.Regex value) {
9574       if (regexBuilder_ == null) {
9575         if (typeCase_ == 3
9576             && type_ != com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance()) {
9577           type_ =
9578               com.google.privacy.dlp.v2.CustomInfoType.Regex.newBuilder(
9579                       (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_)
9580                   .mergeFrom(value)
9581                   .buildPartial();
9582         } else {
9583           type_ = value;
9584         }
9585         onChanged();
9586       } else {
9587         if (typeCase_ == 3) {
9588           regexBuilder_.mergeFrom(value);
9589         } else {
9590           regexBuilder_.setMessage(value);
9591         }
9592       }
9593       typeCase_ = 3;
9594       return this;
9595     }
9596     /**
9597      *
9598      *
9599      * <pre>
9600      * Regular expression based CustomInfoType.
9601      * </pre>
9602      *
9603      * <code>.google.privacy.dlp.v2.CustomInfoType.Regex regex = 3;</code>
9604      */
clearRegex()9605     public Builder clearRegex() {
9606       if (regexBuilder_ == null) {
9607         if (typeCase_ == 3) {
9608           typeCase_ = 0;
9609           type_ = null;
9610           onChanged();
9611         }
9612       } else {
9613         if (typeCase_ == 3) {
9614           typeCase_ = 0;
9615           type_ = null;
9616         }
9617         regexBuilder_.clear();
9618       }
9619       return this;
9620     }
9621     /**
9622      *
9623      *
9624      * <pre>
9625      * Regular expression based CustomInfoType.
9626      * </pre>
9627      *
9628      * <code>.google.privacy.dlp.v2.CustomInfoType.Regex regex = 3;</code>
9629      */
getRegexBuilder()9630     public com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder getRegexBuilder() {
9631       return getRegexFieldBuilder().getBuilder();
9632     }
9633     /**
9634      *
9635      *
9636      * <pre>
9637      * Regular expression based CustomInfoType.
9638      * </pre>
9639      *
9640      * <code>.google.privacy.dlp.v2.CustomInfoType.Regex regex = 3;</code>
9641      */
9642     @java.lang.Override
getRegexOrBuilder()9643     public com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getRegexOrBuilder() {
9644       if ((typeCase_ == 3) && (regexBuilder_ != null)) {
9645         return regexBuilder_.getMessageOrBuilder();
9646       } else {
9647         if (typeCase_ == 3) {
9648           return (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_;
9649         }
9650         return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance();
9651       }
9652     }
9653     /**
9654      *
9655      *
9656      * <pre>
9657      * Regular expression based CustomInfoType.
9658      * </pre>
9659      *
9660      * <code>.google.privacy.dlp.v2.CustomInfoType.Regex regex = 3;</code>
9661      */
9662     private com.google.protobuf.SingleFieldBuilderV3<
9663             com.google.privacy.dlp.v2.CustomInfoType.Regex,
9664             com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder,
9665             com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder>
getRegexFieldBuilder()9666         getRegexFieldBuilder() {
9667       if (regexBuilder_ == null) {
9668         if (!(typeCase_ == 3)) {
9669           type_ = com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance();
9670         }
9671         regexBuilder_ =
9672             new com.google.protobuf.SingleFieldBuilderV3<
9673                 com.google.privacy.dlp.v2.CustomInfoType.Regex,
9674                 com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder,
9675                 com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder>(
9676                 (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_,
9677                 getParentForChildren(),
9678                 isClean());
9679         type_ = null;
9680       }
9681       typeCase_ = 3;
9682       onChanged();
9683       return regexBuilder_;
9684     }
9685 
9686     private com.google.protobuf.SingleFieldBuilderV3<
9687             com.google.privacy.dlp.v2.CustomInfoType.SurrogateType,
9688             com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder,
9689             com.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeOrBuilder>
9690         surrogateTypeBuilder_;
9691     /**
9692      *
9693      *
9694      * <pre>
9695      * Message for detecting output from deidentification transformations that
9696      * support reversing.
9697      * </pre>
9698      *
9699      * <code>.google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4;</code>
9700      *
9701      * @return Whether the surrogateType field is set.
9702      */
9703     @java.lang.Override
hasSurrogateType()9704     public boolean hasSurrogateType() {
9705       return typeCase_ == 4;
9706     }
9707     /**
9708      *
9709      *
9710      * <pre>
9711      * Message for detecting output from deidentification transformations that
9712      * support reversing.
9713      * </pre>
9714      *
9715      * <code>.google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4;</code>
9716      *
9717      * @return The surrogateType.
9718      */
9719     @java.lang.Override
getSurrogateType()9720     public com.google.privacy.dlp.v2.CustomInfoType.SurrogateType getSurrogateType() {
9721       if (surrogateTypeBuilder_ == null) {
9722         if (typeCase_ == 4) {
9723           return (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_;
9724         }
9725         return com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance();
9726       } else {
9727         if (typeCase_ == 4) {
9728           return surrogateTypeBuilder_.getMessage();
9729         }
9730         return com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance();
9731       }
9732     }
9733     /**
9734      *
9735      *
9736      * <pre>
9737      * Message for detecting output from deidentification transformations that
9738      * support reversing.
9739      * </pre>
9740      *
9741      * <code>.google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4;</code>
9742      */
setSurrogateType(com.google.privacy.dlp.v2.CustomInfoType.SurrogateType value)9743     public Builder setSurrogateType(com.google.privacy.dlp.v2.CustomInfoType.SurrogateType value) {
9744       if (surrogateTypeBuilder_ == null) {
9745         if (value == null) {
9746           throw new NullPointerException();
9747         }
9748         type_ = value;
9749         onChanged();
9750       } else {
9751         surrogateTypeBuilder_.setMessage(value);
9752       }
9753       typeCase_ = 4;
9754       return this;
9755     }
9756     /**
9757      *
9758      *
9759      * <pre>
9760      * Message for detecting output from deidentification transformations that
9761      * support reversing.
9762      * </pre>
9763      *
9764      * <code>.google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4;</code>
9765      */
setSurrogateType( com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder builderForValue)9766     public Builder setSurrogateType(
9767         com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder builderForValue) {
9768       if (surrogateTypeBuilder_ == null) {
9769         type_ = builderForValue.build();
9770         onChanged();
9771       } else {
9772         surrogateTypeBuilder_.setMessage(builderForValue.build());
9773       }
9774       typeCase_ = 4;
9775       return this;
9776     }
9777     /**
9778      *
9779      *
9780      * <pre>
9781      * Message for detecting output from deidentification transformations that
9782      * support reversing.
9783      * </pre>
9784      *
9785      * <code>.google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4;</code>
9786      */
mergeSurrogateType( com.google.privacy.dlp.v2.CustomInfoType.SurrogateType value)9787     public Builder mergeSurrogateType(
9788         com.google.privacy.dlp.v2.CustomInfoType.SurrogateType value) {
9789       if (surrogateTypeBuilder_ == null) {
9790         if (typeCase_ == 4
9791             && type_
9792                 != com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance()) {
9793           type_ =
9794               com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.newBuilder(
9795                       (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_)
9796                   .mergeFrom(value)
9797                   .buildPartial();
9798         } else {
9799           type_ = value;
9800         }
9801         onChanged();
9802       } else {
9803         if (typeCase_ == 4) {
9804           surrogateTypeBuilder_.mergeFrom(value);
9805         } else {
9806           surrogateTypeBuilder_.setMessage(value);
9807         }
9808       }
9809       typeCase_ = 4;
9810       return this;
9811     }
9812     /**
9813      *
9814      *
9815      * <pre>
9816      * Message for detecting output from deidentification transformations that
9817      * support reversing.
9818      * </pre>
9819      *
9820      * <code>.google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4;</code>
9821      */
clearSurrogateType()9822     public Builder clearSurrogateType() {
9823       if (surrogateTypeBuilder_ == null) {
9824         if (typeCase_ == 4) {
9825           typeCase_ = 0;
9826           type_ = null;
9827           onChanged();
9828         }
9829       } else {
9830         if (typeCase_ == 4) {
9831           typeCase_ = 0;
9832           type_ = null;
9833         }
9834         surrogateTypeBuilder_.clear();
9835       }
9836       return this;
9837     }
9838     /**
9839      *
9840      *
9841      * <pre>
9842      * Message for detecting output from deidentification transformations that
9843      * support reversing.
9844      * </pre>
9845      *
9846      * <code>.google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4;</code>
9847      */
9848     public com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder
getSurrogateTypeBuilder()9849         getSurrogateTypeBuilder() {
9850       return getSurrogateTypeFieldBuilder().getBuilder();
9851     }
9852     /**
9853      *
9854      *
9855      * <pre>
9856      * Message for detecting output from deidentification transformations that
9857      * support reversing.
9858      * </pre>
9859      *
9860      * <code>.google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4;</code>
9861      */
9862     @java.lang.Override
9863     public com.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeOrBuilder
getSurrogateTypeOrBuilder()9864         getSurrogateTypeOrBuilder() {
9865       if ((typeCase_ == 4) && (surrogateTypeBuilder_ != null)) {
9866         return surrogateTypeBuilder_.getMessageOrBuilder();
9867       } else {
9868         if (typeCase_ == 4) {
9869           return (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_;
9870         }
9871         return com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance();
9872       }
9873     }
9874     /**
9875      *
9876      *
9877      * <pre>
9878      * Message for detecting output from deidentification transformations that
9879      * support reversing.
9880      * </pre>
9881      *
9882      * <code>.google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4;</code>
9883      */
9884     private com.google.protobuf.SingleFieldBuilderV3<
9885             com.google.privacy.dlp.v2.CustomInfoType.SurrogateType,
9886             com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder,
9887             com.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeOrBuilder>
getSurrogateTypeFieldBuilder()9888         getSurrogateTypeFieldBuilder() {
9889       if (surrogateTypeBuilder_ == null) {
9890         if (!(typeCase_ == 4)) {
9891           type_ = com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance();
9892         }
9893         surrogateTypeBuilder_ =
9894             new com.google.protobuf.SingleFieldBuilderV3<
9895                 com.google.privacy.dlp.v2.CustomInfoType.SurrogateType,
9896                 com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder,
9897                 com.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeOrBuilder>(
9898                 (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_,
9899                 getParentForChildren(),
9900                 isClean());
9901         type_ = null;
9902       }
9903       typeCase_ = 4;
9904       onChanged();
9905       return surrogateTypeBuilder_;
9906     }
9907 
9908     private com.google.protobuf.SingleFieldBuilderV3<
9909             com.google.privacy.dlp.v2.StoredType,
9910             com.google.privacy.dlp.v2.StoredType.Builder,
9911             com.google.privacy.dlp.v2.StoredTypeOrBuilder>
9912         storedTypeBuilder_;
9913     /**
9914      *
9915      *
9916      * <pre>
9917      * Load an existing `StoredInfoType` resource for use in
9918      * `InspectDataSource`. Not currently supported in `InspectContent`.
9919      * </pre>
9920      *
9921      * <code>.google.privacy.dlp.v2.StoredType stored_type = 5;</code>
9922      *
9923      * @return Whether the storedType field is set.
9924      */
9925     @java.lang.Override
hasStoredType()9926     public boolean hasStoredType() {
9927       return typeCase_ == 5;
9928     }
9929     /**
9930      *
9931      *
9932      * <pre>
9933      * Load an existing `StoredInfoType` resource for use in
9934      * `InspectDataSource`. Not currently supported in `InspectContent`.
9935      * </pre>
9936      *
9937      * <code>.google.privacy.dlp.v2.StoredType stored_type = 5;</code>
9938      *
9939      * @return The storedType.
9940      */
9941     @java.lang.Override
getStoredType()9942     public com.google.privacy.dlp.v2.StoredType getStoredType() {
9943       if (storedTypeBuilder_ == null) {
9944         if (typeCase_ == 5) {
9945           return (com.google.privacy.dlp.v2.StoredType) type_;
9946         }
9947         return com.google.privacy.dlp.v2.StoredType.getDefaultInstance();
9948       } else {
9949         if (typeCase_ == 5) {
9950           return storedTypeBuilder_.getMessage();
9951         }
9952         return com.google.privacy.dlp.v2.StoredType.getDefaultInstance();
9953       }
9954     }
9955     /**
9956      *
9957      *
9958      * <pre>
9959      * Load an existing `StoredInfoType` resource for use in
9960      * `InspectDataSource`. Not currently supported in `InspectContent`.
9961      * </pre>
9962      *
9963      * <code>.google.privacy.dlp.v2.StoredType stored_type = 5;</code>
9964      */
setStoredType(com.google.privacy.dlp.v2.StoredType value)9965     public Builder setStoredType(com.google.privacy.dlp.v2.StoredType value) {
9966       if (storedTypeBuilder_ == null) {
9967         if (value == null) {
9968           throw new NullPointerException();
9969         }
9970         type_ = value;
9971         onChanged();
9972       } else {
9973         storedTypeBuilder_.setMessage(value);
9974       }
9975       typeCase_ = 5;
9976       return this;
9977     }
9978     /**
9979      *
9980      *
9981      * <pre>
9982      * Load an existing `StoredInfoType` resource for use in
9983      * `InspectDataSource`. Not currently supported in `InspectContent`.
9984      * </pre>
9985      *
9986      * <code>.google.privacy.dlp.v2.StoredType stored_type = 5;</code>
9987      */
setStoredType(com.google.privacy.dlp.v2.StoredType.Builder builderForValue)9988     public Builder setStoredType(com.google.privacy.dlp.v2.StoredType.Builder builderForValue) {
9989       if (storedTypeBuilder_ == null) {
9990         type_ = builderForValue.build();
9991         onChanged();
9992       } else {
9993         storedTypeBuilder_.setMessage(builderForValue.build());
9994       }
9995       typeCase_ = 5;
9996       return this;
9997     }
9998     /**
9999      *
10000      *
10001      * <pre>
10002      * Load an existing `StoredInfoType` resource for use in
10003      * `InspectDataSource`. Not currently supported in `InspectContent`.
10004      * </pre>
10005      *
10006      * <code>.google.privacy.dlp.v2.StoredType stored_type = 5;</code>
10007      */
mergeStoredType(com.google.privacy.dlp.v2.StoredType value)10008     public Builder mergeStoredType(com.google.privacy.dlp.v2.StoredType value) {
10009       if (storedTypeBuilder_ == null) {
10010         if (typeCase_ == 5 && type_ != com.google.privacy.dlp.v2.StoredType.getDefaultInstance()) {
10011           type_ =
10012               com.google.privacy.dlp.v2.StoredType.newBuilder(
10013                       (com.google.privacy.dlp.v2.StoredType) type_)
10014                   .mergeFrom(value)
10015                   .buildPartial();
10016         } else {
10017           type_ = value;
10018         }
10019         onChanged();
10020       } else {
10021         if (typeCase_ == 5) {
10022           storedTypeBuilder_.mergeFrom(value);
10023         } else {
10024           storedTypeBuilder_.setMessage(value);
10025         }
10026       }
10027       typeCase_ = 5;
10028       return this;
10029     }
10030     /**
10031      *
10032      *
10033      * <pre>
10034      * Load an existing `StoredInfoType` resource for use in
10035      * `InspectDataSource`. Not currently supported in `InspectContent`.
10036      * </pre>
10037      *
10038      * <code>.google.privacy.dlp.v2.StoredType stored_type = 5;</code>
10039      */
clearStoredType()10040     public Builder clearStoredType() {
10041       if (storedTypeBuilder_ == null) {
10042         if (typeCase_ == 5) {
10043           typeCase_ = 0;
10044           type_ = null;
10045           onChanged();
10046         }
10047       } else {
10048         if (typeCase_ == 5) {
10049           typeCase_ = 0;
10050           type_ = null;
10051         }
10052         storedTypeBuilder_.clear();
10053       }
10054       return this;
10055     }
10056     /**
10057      *
10058      *
10059      * <pre>
10060      * Load an existing `StoredInfoType` resource for use in
10061      * `InspectDataSource`. Not currently supported in `InspectContent`.
10062      * </pre>
10063      *
10064      * <code>.google.privacy.dlp.v2.StoredType stored_type = 5;</code>
10065      */
getStoredTypeBuilder()10066     public com.google.privacy.dlp.v2.StoredType.Builder getStoredTypeBuilder() {
10067       return getStoredTypeFieldBuilder().getBuilder();
10068     }
10069     /**
10070      *
10071      *
10072      * <pre>
10073      * Load an existing `StoredInfoType` resource for use in
10074      * `InspectDataSource`. Not currently supported in `InspectContent`.
10075      * </pre>
10076      *
10077      * <code>.google.privacy.dlp.v2.StoredType stored_type = 5;</code>
10078      */
10079     @java.lang.Override
getStoredTypeOrBuilder()10080     public com.google.privacy.dlp.v2.StoredTypeOrBuilder getStoredTypeOrBuilder() {
10081       if ((typeCase_ == 5) && (storedTypeBuilder_ != null)) {
10082         return storedTypeBuilder_.getMessageOrBuilder();
10083       } else {
10084         if (typeCase_ == 5) {
10085           return (com.google.privacy.dlp.v2.StoredType) type_;
10086         }
10087         return com.google.privacy.dlp.v2.StoredType.getDefaultInstance();
10088       }
10089     }
10090     /**
10091      *
10092      *
10093      * <pre>
10094      * Load an existing `StoredInfoType` resource for use in
10095      * `InspectDataSource`. Not currently supported in `InspectContent`.
10096      * </pre>
10097      *
10098      * <code>.google.privacy.dlp.v2.StoredType stored_type = 5;</code>
10099      */
10100     private com.google.protobuf.SingleFieldBuilderV3<
10101             com.google.privacy.dlp.v2.StoredType,
10102             com.google.privacy.dlp.v2.StoredType.Builder,
10103             com.google.privacy.dlp.v2.StoredTypeOrBuilder>
getStoredTypeFieldBuilder()10104         getStoredTypeFieldBuilder() {
10105       if (storedTypeBuilder_ == null) {
10106         if (!(typeCase_ == 5)) {
10107           type_ = com.google.privacy.dlp.v2.StoredType.getDefaultInstance();
10108         }
10109         storedTypeBuilder_ =
10110             new com.google.protobuf.SingleFieldBuilderV3<
10111                 com.google.privacy.dlp.v2.StoredType,
10112                 com.google.privacy.dlp.v2.StoredType.Builder,
10113                 com.google.privacy.dlp.v2.StoredTypeOrBuilder>(
10114                 (com.google.privacy.dlp.v2.StoredType) type_, getParentForChildren(), isClean());
10115         type_ = null;
10116       }
10117       typeCase_ = 5;
10118       onChanged();
10119       return storedTypeBuilder_;
10120     }
10121 
10122     private java.util.List<com.google.privacy.dlp.v2.CustomInfoType.DetectionRule> detectionRules_ =
10123         java.util.Collections.emptyList();
10124 
ensureDetectionRulesIsMutable()10125     private void ensureDetectionRulesIsMutable() {
10126       if (!((bitField0_ & 0x00000040) != 0)) {
10127         detectionRules_ =
10128             new java.util.ArrayList<com.google.privacy.dlp.v2.CustomInfoType.DetectionRule>(
10129                 detectionRules_);
10130         bitField0_ |= 0x00000040;
10131       }
10132     }
10133 
10134     private com.google.protobuf.RepeatedFieldBuilderV3<
10135             com.google.privacy.dlp.v2.CustomInfoType.DetectionRule,
10136             com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder,
10137             com.google.privacy.dlp.v2.CustomInfoType.DetectionRuleOrBuilder>
10138         detectionRulesBuilder_;
10139 
10140     /**
10141      *
10142      *
10143      * <pre>
10144      * Set of detection rules to apply to all findings of this CustomInfoType.
10145      * Rules are applied in order that they are specified. Not supported for the
10146      * `surrogate_type` CustomInfoType.
10147      * </pre>
10148      *
10149      * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
10150      * </code>
10151      */
10152     public java.util.List<com.google.privacy.dlp.v2.CustomInfoType.DetectionRule>
getDetectionRulesList()10153         getDetectionRulesList() {
10154       if (detectionRulesBuilder_ == null) {
10155         return java.util.Collections.unmodifiableList(detectionRules_);
10156       } else {
10157         return detectionRulesBuilder_.getMessageList();
10158       }
10159     }
10160     /**
10161      *
10162      *
10163      * <pre>
10164      * Set of detection rules to apply to all findings of this CustomInfoType.
10165      * Rules are applied in order that they are specified. Not supported for the
10166      * `surrogate_type` CustomInfoType.
10167      * </pre>
10168      *
10169      * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
10170      * </code>
10171      */
getDetectionRulesCount()10172     public int getDetectionRulesCount() {
10173       if (detectionRulesBuilder_ == null) {
10174         return detectionRules_.size();
10175       } else {
10176         return detectionRulesBuilder_.getCount();
10177       }
10178     }
10179     /**
10180      *
10181      *
10182      * <pre>
10183      * Set of detection rules to apply to all findings of this CustomInfoType.
10184      * Rules are applied in order that they are specified. Not supported for the
10185      * `surrogate_type` CustomInfoType.
10186      * </pre>
10187      *
10188      * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
10189      * </code>
10190      */
getDetectionRules(int index)10191     public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule getDetectionRules(int index) {
10192       if (detectionRulesBuilder_ == null) {
10193         return detectionRules_.get(index);
10194       } else {
10195         return detectionRulesBuilder_.getMessage(index);
10196       }
10197     }
10198     /**
10199      *
10200      *
10201      * <pre>
10202      * Set of detection rules to apply to all findings of this CustomInfoType.
10203      * Rules are applied in order that they are specified. Not supported for the
10204      * `surrogate_type` CustomInfoType.
10205      * </pre>
10206      *
10207      * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
10208      * </code>
10209      */
setDetectionRules( int index, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule value)10210     public Builder setDetectionRules(
10211         int index, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule value) {
10212       if (detectionRulesBuilder_ == null) {
10213         if (value == null) {
10214           throw new NullPointerException();
10215         }
10216         ensureDetectionRulesIsMutable();
10217         detectionRules_.set(index, value);
10218         onChanged();
10219       } else {
10220         detectionRulesBuilder_.setMessage(index, value);
10221       }
10222       return this;
10223     }
10224     /**
10225      *
10226      *
10227      * <pre>
10228      * Set of detection rules to apply to all findings of this CustomInfoType.
10229      * Rules are applied in order that they are specified. Not supported for the
10230      * `surrogate_type` CustomInfoType.
10231      * </pre>
10232      *
10233      * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
10234      * </code>
10235      */
setDetectionRules( int index, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder builderForValue)10236     public Builder setDetectionRules(
10237         int index, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder builderForValue) {
10238       if (detectionRulesBuilder_ == null) {
10239         ensureDetectionRulesIsMutable();
10240         detectionRules_.set(index, builderForValue.build());
10241         onChanged();
10242       } else {
10243         detectionRulesBuilder_.setMessage(index, builderForValue.build());
10244       }
10245       return this;
10246     }
10247     /**
10248      *
10249      *
10250      * <pre>
10251      * Set of detection rules to apply to all findings of this CustomInfoType.
10252      * Rules are applied in order that they are specified. Not supported for the
10253      * `surrogate_type` CustomInfoType.
10254      * </pre>
10255      *
10256      * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
10257      * </code>
10258      */
addDetectionRules(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule value)10259     public Builder addDetectionRules(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule value) {
10260       if (detectionRulesBuilder_ == null) {
10261         if (value == null) {
10262           throw new NullPointerException();
10263         }
10264         ensureDetectionRulesIsMutable();
10265         detectionRules_.add(value);
10266         onChanged();
10267       } else {
10268         detectionRulesBuilder_.addMessage(value);
10269       }
10270       return this;
10271     }
10272     /**
10273      *
10274      *
10275      * <pre>
10276      * Set of detection rules to apply to all findings of this CustomInfoType.
10277      * Rules are applied in order that they are specified. Not supported for the
10278      * `surrogate_type` CustomInfoType.
10279      * </pre>
10280      *
10281      * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
10282      * </code>
10283      */
addDetectionRules( int index, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule value)10284     public Builder addDetectionRules(
10285         int index, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule value) {
10286       if (detectionRulesBuilder_ == null) {
10287         if (value == null) {
10288           throw new NullPointerException();
10289         }
10290         ensureDetectionRulesIsMutable();
10291         detectionRules_.add(index, value);
10292         onChanged();
10293       } else {
10294         detectionRulesBuilder_.addMessage(index, value);
10295       }
10296       return this;
10297     }
10298     /**
10299      *
10300      *
10301      * <pre>
10302      * Set of detection rules to apply to all findings of this CustomInfoType.
10303      * Rules are applied in order that they are specified. Not supported for the
10304      * `surrogate_type` CustomInfoType.
10305      * </pre>
10306      *
10307      * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
10308      * </code>
10309      */
addDetectionRules( com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder builderForValue)10310     public Builder addDetectionRules(
10311         com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder builderForValue) {
10312       if (detectionRulesBuilder_ == null) {
10313         ensureDetectionRulesIsMutable();
10314         detectionRules_.add(builderForValue.build());
10315         onChanged();
10316       } else {
10317         detectionRulesBuilder_.addMessage(builderForValue.build());
10318       }
10319       return this;
10320     }
10321     /**
10322      *
10323      *
10324      * <pre>
10325      * Set of detection rules to apply to all findings of this CustomInfoType.
10326      * Rules are applied in order that they are specified. Not supported for the
10327      * `surrogate_type` CustomInfoType.
10328      * </pre>
10329      *
10330      * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
10331      * </code>
10332      */
addDetectionRules( int index, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder builderForValue)10333     public Builder addDetectionRules(
10334         int index, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder builderForValue) {
10335       if (detectionRulesBuilder_ == null) {
10336         ensureDetectionRulesIsMutable();
10337         detectionRules_.add(index, builderForValue.build());
10338         onChanged();
10339       } else {
10340         detectionRulesBuilder_.addMessage(index, builderForValue.build());
10341       }
10342       return this;
10343     }
10344     /**
10345      *
10346      *
10347      * <pre>
10348      * Set of detection rules to apply to all findings of this CustomInfoType.
10349      * Rules are applied in order that they are specified. Not supported for the
10350      * `surrogate_type` CustomInfoType.
10351      * </pre>
10352      *
10353      * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
10354      * </code>
10355      */
addAllDetectionRules( java.lang.Iterable<? extends com.google.privacy.dlp.v2.CustomInfoType.DetectionRule> values)10356     public Builder addAllDetectionRules(
10357         java.lang.Iterable<? extends com.google.privacy.dlp.v2.CustomInfoType.DetectionRule>
10358             values) {
10359       if (detectionRulesBuilder_ == null) {
10360         ensureDetectionRulesIsMutable();
10361         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, detectionRules_);
10362         onChanged();
10363       } else {
10364         detectionRulesBuilder_.addAllMessages(values);
10365       }
10366       return this;
10367     }
10368     /**
10369      *
10370      *
10371      * <pre>
10372      * Set of detection rules to apply to all findings of this CustomInfoType.
10373      * Rules are applied in order that they are specified. Not supported for the
10374      * `surrogate_type` CustomInfoType.
10375      * </pre>
10376      *
10377      * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
10378      * </code>
10379      */
clearDetectionRules()10380     public Builder clearDetectionRules() {
10381       if (detectionRulesBuilder_ == null) {
10382         detectionRules_ = java.util.Collections.emptyList();
10383         bitField0_ = (bitField0_ & ~0x00000040);
10384         onChanged();
10385       } else {
10386         detectionRulesBuilder_.clear();
10387       }
10388       return this;
10389     }
10390     /**
10391      *
10392      *
10393      * <pre>
10394      * Set of detection rules to apply to all findings of this CustomInfoType.
10395      * Rules are applied in order that they are specified. Not supported for the
10396      * `surrogate_type` CustomInfoType.
10397      * </pre>
10398      *
10399      * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
10400      * </code>
10401      */
removeDetectionRules(int index)10402     public Builder removeDetectionRules(int index) {
10403       if (detectionRulesBuilder_ == null) {
10404         ensureDetectionRulesIsMutable();
10405         detectionRules_.remove(index);
10406         onChanged();
10407       } else {
10408         detectionRulesBuilder_.remove(index);
10409       }
10410       return this;
10411     }
10412     /**
10413      *
10414      *
10415      * <pre>
10416      * Set of detection rules to apply to all findings of this CustomInfoType.
10417      * Rules are applied in order that they are specified. Not supported for the
10418      * `surrogate_type` CustomInfoType.
10419      * </pre>
10420      *
10421      * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
10422      * </code>
10423      */
getDetectionRulesBuilder( int index)10424     public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder getDetectionRulesBuilder(
10425         int index) {
10426       return getDetectionRulesFieldBuilder().getBuilder(index);
10427     }
10428     /**
10429      *
10430      *
10431      * <pre>
10432      * Set of detection rules to apply to all findings of this CustomInfoType.
10433      * Rules are applied in order that they are specified. Not supported for the
10434      * `surrogate_type` CustomInfoType.
10435      * </pre>
10436      *
10437      * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
10438      * </code>
10439      */
10440     public com.google.privacy.dlp.v2.CustomInfoType.DetectionRuleOrBuilder
getDetectionRulesOrBuilder(int index)10441         getDetectionRulesOrBuilder(int index) {
10442       if (detectionRulesBuilder_ == null) {
10443         return detectionRules_.get(index);
10444       } else {
10445         return detectionRulesBuilder_.getMessageOrBuilder(index);
10446       }
10447     }
10448     /**
10449      *
10450      *
10451      * <pre>
10452      * Set of detection rules to apply to all findings of this CustomInfoType.
10453      * Rules are applied in order that they are specified. Not supported for the
10454      * `surrogate_type` CustomInfoType.
10455      * </pre>
10456      *
10457      * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
10458      * </code>
10459      */
10460     public java.util.List<? extends com.google.privacy.dlp.v2.CustomInfoType.DetectionRuleOrBuilder>
getDetectionRulesOrBuilderList()10461         getDetectionRulesOrBuilderList() {
10462       if (detectionRulesBuilder_ != null) {
10463         return detectionRulesBuilder_.getMessageOrBuilderList();
10464       } else {
10465         return java.util.Collections.unmodifiableList(detectionRules_);
10466       }
10467     }
10468     /**
10469      *
10470      *
10471      * <pre>
10472      * Set of detection rules to apply to all findings of this CustomInfoType.
10473      * Rules are applied in order that they are specified. Not supported for the
10474      * `surrogate_type` CustomInfoType.
10475      * </pre>
10476      *
10477      * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
10478      * </code>
10479      */
10480     public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder
addDetectionRulesBuilder()10481         addDetectionRulesBuilder() {
10482       return getDetectionRulesFieldBuilder()
10483           .addBuilder(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.getDefaultInstance());
10484     }
10485     /**
10486      *
10487      *
10488      * <pre>
10489      * Set of detection rules to apply to all findings of this CustomInfoType.
10490      * Rules are applied in order that they are specified. Not supported for the
10491      * `surrogate_type` CustomInfoType.
10492      * </pre>
10493      *
10494      * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
10495      * </code>
10496      */
addDetectionRulesBuilder( int index)10497     public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder addDetectionRulesBuilder(
10498         int index) {
10499       return getDetectionRulesFieldBuilder()
10500           .addBuilder(
10501               index, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.getDefaultInstance());
10502     }
10503     /**
10504      *
10505      *
10506      * <pre>
10507      * Set of detection rules to apply to all findings of this CustomInfoType.
10508      * Rules are applied in order that they are specified. Not supported for the
10509      * `surrogate_type` CustomInfoType.
10510      * </pre>
10511      *
10512      * <code>repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7;
10513      * </code>
10514      */
10515     public java.util.List<com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder>
getDetectionRulesBuilderList()10516         getDetectionRulesBuilderList() {
10517       return getDetectionRulesFieldBuilder().getBuilderList();
10518     }
10519 
10520     private com.google.protobuf.RepeatedFieldBuilderV3<
10521             com.google.privacy.dlp.v2.CustomInfoType.DetectionRule,
10522             com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder,
10523             com.google.privacy.dlp.v2.CustomInfoType.DetectionRuleOrBuilder>
getDetectionRulesFieldBuilder()10524         getDetectionRulesFieldBuilder() {
10525       if (detectionRulesBuilder_ == null) {
10526         detectionRulesBuilder_ =
10527             new com.google.protobuf.RepeatedFieldBuilderV3<
10528                 com.google.privacy.dlp.v2.CustomInfoType.DetectionRule,
10529                 com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder,
10530                 com.google.privacy.dlp.v2.CustomInfoType.DetectionRuleOrBuilder>(
10531                 detectionRules_,
10532                 ((bitField0_ & 0x00000040) != 0),
10533                 getParentForChildren(),
10534                 isClean());
10535         detectionRules_ = null;
10536       }
10537       return detectionRulesBuilder_;
10538     }
10539 
10540     private int exclusionType_ = 0;
10541     /**
10542      *
10543      *
10544      * <pre>
10545      * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
10546      * to be returned. It still can be used for rules matching.
10547      * </pre>
10548      *
10549      * <code>.google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8;</code>
10550      *
10551      * @return The enum numeric value on the wire for exclusionType.
10552      */
10553     @java.lang.Override
getExclusionTypeValue()10554     public int getExclusionTypeValue() {
10555       return exclusionType_;
10556     }
10557     /**
10558      *
10559      *
10560      * <pre>
10561      * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
10562      * to be returned. It still can be used for rules matching.
10563      * </pre>
10564      *
10565      * <code>.google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8;</code>
10566      *
10567      * @param value The enum numeric value on the wire for exclusionType to set.
10568      * @return This builder for chaining.
10569      */
setExclusionTypeValue(int value)10570     public Builder setExclusionTypeValue(int value) {
10571       exclusionType_ = value;
10572       bitField0_ |= 0x00000080;
10573       onChanged();
10574       return this;
10575     }
10576     /**
10577      *
10578      *
10579      * <pre>
10580      * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
10581      * to be returned. It still can be used for rules matching.
10582      * </pre>
10583      *
10584      * <code>.google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8;</code>
10585      *
10586      * @return The exclusionType.
10587      */
10588     @java.lang.Override
getExclusionType()10589     public com.google.privacy.dlp.v2.CustomInfoType.ExclusionType getExclusionType() {
10590       com.google.privacy.dlp.v2.CustomInfoType.ExclusionType result =
10591           com.google.privacy.dlp.v2.CustomInfoType.ExclusionType.forNumber(exclusionType_);
10592       return result == null
10593           ? com.google.privacy.dlp.v2.CustomInfoType.ExclusionType.UNRECOGNIZED
10594           : result;
10595     }
10596     /**
10597      *
10598      *
10599      * <pre>
10600      * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
10601      * to be returned. It still can be used for rules matching.
10602      * </pre>
10603      *
10604      * <code>.google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8;</code>
10605      *
10606      * @param value The exclusionType to set.
10607      * @return This builder for chaining.
10608      */
setExclusionType(com.google.privacy.dlp.v2.CustomInfoType.ExclusionType value)10609     public Builder setExclusionType(com.google.privacy.dlp.v2.CustomInfoType.ExclusionType value) {
10610       if (value == null) {
10611         throw new NullPointerException();
10612       }
10613       bitField0_ |= 0x00000080;
10614       exclusionType_ = value.getNumber();
10615       onChanged();
10616       return this;
10617     }
10618     /**
10619      *
10620      *
10621      * <pre>
10622      * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
10623      * to be returned. It still can be used for rules matching.
10624      * </pre>
10625      *
10626      * <code>.google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8;</code>
10627      *
10628      * @return This builder for chaining.
10629      */
clearExclusionType()10630     public Builder clearExclusionType() {
10631       bitField0_ = (bitField0_ & ~0x00000080);
10632       exclusionType_ = 0;
10633       onChanged();
10634       return this;
10635     }
10636 
10637     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)10638     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
10639       return super.setUnknownFields(unknownFields);
10640     }
10641 
10642     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)10643     public final Builder mergeUnknownFields(
10644         final com.google.protobuf.UnknownFieldSet unknownFields) {
10645       return super.mergeUnknownFields(unknownFields);
10646     }
10647 
10648     // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType)
10649   }
10650 
10651   // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType)
10652   private static final com.google.privacy.dlp.v2.CustomInfoType DEFAULT_INSTANCE;
10653 
10654   static {
10655     DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType();
10656   }
10657 
getDefaultInstance()10658   public static com.google.privacy.dlp.v2.CustomInfoType getDefaultInstance() {
10659     return DEFAULT_INSTANCE;
10660   }
10661 
10662   private static final com.google.protobuf.Parser<CustomInfoType> PARSER =
10663       new com.google.protobuf.AbstractParser<CustomInfoType>() {
10664         @java.lang.Override
10665         public CustomInfoType parsePartialFrom(
10666             com.google.protobuf.CodedInputStream input,
10667             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
10668             throws com.google.protobuf.InvalidProtocolBufferException {
10669           Builder builder = newBuilder();
10670           try {
10671             builder.mergeFrom(input, extensionRegistry);
10672           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
10673             throw e.setUnfinishedMessage(builder.buildPartial());
10674           } catch (com.google.protobuf.UninitializedMessageException e) {
10675             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
10676           } catch (java.io.IOException e) {
10677             throw new com.google.protobuf.InvalidProtocolBufferException(e)
10678                 .setUnfinishedMessage(builder.buildPartial());
10679           }
10680           return builder.buildPartial();
10681         }
10682       };
10683 
parser()10684   public static com.google.protobuf.Parser<CustomInfoType> parser() {
10685     return PARSER;
10686   }
10687 
10688   @java.lang.Override
getParserForType()10689   public com.google.protobuf.Parser<CustomInfoType> getParserForType() {
10690     return PARSER;
10691   }
10692 
10693   @java.lang.Override
getDefaultInstanceForType()10694   public com.google.privacy.dlp.v2.CustomInfoType getDefaultInstanceForType() {
10695     return DEFAULT_INSTANCE;
10696   }
10697 }
10698