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