• 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  * The transformation to apply to the field.
26  * </pre>
27  *
28  * Protobuf type {@code google.privacy.dlp.v2.FieldTransformation}
29  */
30 public final class FieldTransformation extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.FieldTransformation)
33     FieldTransformationOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use FieldTransformation.newBuilder() to construct.
FieldTransformation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private FieldTransformation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
FieldTransformation()40   private FieldTransformation() {
41     fields_ = java.util.Collections.emptyList();
42   }
43 
44   @java.lang.Override
45   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)46   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
47     return new FieldTransformation();
48   }
49 
50   @java.lang.Override
getUnknownFields()51   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
52     return this.unknownFields;
53   }
54 
getDescriptor()55   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
56     return com.google.privacy.dlp.v2.DlpProto
57         .internal_static_google_privacy_dlp_v2_FieldTransformation_descriptor;
58   }
59 
60   @java.lang.Override
61   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()62       internalGetFieldAccessorTable() {
63     return com.google.privacy.dlp.v2.DlpProto
64         .internal_static_google_privacy_dlp_v2_FieldTransformation_fieldAccessorTable
65         .ensureFieldAccessorsInitialized(
66             com.google.privacy.dlp.v2.FieldTransformation.class,
67             com.google.privacy.dlp.v2.FieldTransformation.Builder.class);
68   }
69 
70   private int transformationCase_ = 0;
71   private java.lang.Object transformation_;
72 
73   public enum TransformationCase
74       implements
75           com.google.protobuf.Internal.EnumLite,
76           com.google.protobuf.AbstractMessage.InternalOneOfEnum {
77     PRIMITIVE_TRANSFORMATION(4),
78     INFO_TYPE_TRANSFORMATIONS(5),
79     TRANSFORMATION_NOT_SET(0);
80     private final int value;
81 
TransformationCase(int value)82     private TransformationCase(int value) {
83       this.value = value;
84     }
85     /**
86      * @param value The number of the enum to look for.
87      * @return The enum associated with the given number.
88      * @deprecated Use {@link #forNumber(int)} instead.
89      */
90     @java.lang.Deprecated
valueOf(int value)91     public static TransformationCase valueOf(int value) {
92       return forNumber(value);
93     }
94 
forNumber(int value)95     public static TransformationCase forNumber(int value) {
96       switch (value) {
97         case 4:
98           return PRIMITIVE_TRANSFORMATION;
99         case 5:
100           return INFO_TYPE_TRANSFORMATIONS;
101         case 0:
102           return TRANSFORMATION_NOT_SET;
103         default:
104           return null;
105       }
106     }
107 
getNumber()108     public int getNumber() {
109       return this.value;
110     }
111   };
112 
getTransformationCase()113   public TransformationCase getTransformationCase() {
114     return TransformationCase.forNumber(transformationCase_);
115   }
116 
117   public static final int FIELDS_FIELD_NUMBER = 1;
118 
119   @SuppressWarnings("serial")
120   private java.util.List<com.google.privacy.dlp.v2.FieldId> fields_;
121   /**
122    *
123    *
124    * <pre>
125    * Required. Input field(s) to apply the transformation to.
126    * When you have columns that reference their position within a list,
127    * omit the index from the FieldId. FieldId name matching ignores the index.
128    * For example, instead of "contact.nums[0].type", use "contact.nums.type".
129    * </pre>
130    *
131    * <code>
132    * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];
133    * </code>
134    */
135   @java.lang.Override
getFieldsList()136   public java.util.List<com.google.privacy.dlp.v2.FieldId> getFieldsList() {
137     return fields_;
138   }
139   /**
140    *
141    *
142    * <pre>
143    * Required. Input field(s) to apply the transformation to.
144    * When you have columns that reference their position within a list,
145    * omit the index from the FieldId. FieldId name matching ignores the index.
146    * For example, instead of "contact.nums[0].type", use "contact.nums.type".
147    * </pre>
148    *
149    * <code>
150    * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];
151    * </code>
152    */
153   @java.lang.Override
154   public java.util.List<? extends com.google.privacy.dlp.v2.FieldIdOrBuilder>
getFieldsOrBuilderList()155       getFieldsOrBuilderList() {
156     return fields_;
157   }
158   /**
159    *
160    *
161    * <pre>
162    * Required. Input field(s) to apply the transformation to.
163    * When you have columns that reference their position within a list,
164    * omit the index from the FieldId. FieldId name matching ignores the index.
165    * For example, instead of "contact.nums[0].type", use "contact.nums.type".
166    * </pre>
167    *
168    * <code>
169    * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];
170    * </code>
171    */
172   @java.lang.Override
getFieldsCount()173   public int getFieldsCount() {
174     return fields_.size();
175   }
176   /**
177    *
178    *
179    * <pre>
180    * Required. Input field(s) to apply the transformation to.
181    * When you have columns that reference their position within a list,
182    * omit the index from the FieldId. FieldId name matching ignores the index.
183    * For example, instead of "contact.nums[0].type", use "contact.nums.type".
184    * </pre>
185    *
186    * <code>
187    * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];
188    * </code>
189    */
190   @java.lang.Override
getFields(int index)191   public com.google.privacy.dlp.v2.FieldId getFields(int index) {
192     return fields_.get(index);
193   }
194   /**
195    *
196    *
197    * <pre>
198    * Required. Input field(s) to apply the transformation to.
199    * When you have columns that reference their position within a list,
200    * omit the index from the FieldId. FieldId name matching ignores the index.
201    * For example, instead of "contact.nums[0].type", use "contact.nums.type".
202    * </pre>
203    *
204    * <code>
205    * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];
206    * </code>
207    */
208   @java.lang.Override
getFieldsOrBuilder(int index)209   public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldsOrBuilder(int index) {
210     return fields_.get(index);
211   }
212 
213   public static final int CONDITION_FIELD_NUMBER = 3;
214   private com.google.privacy.dlp.v2.RecordCondition condition_;
215   /**
216    *
217    *
218    * <pre>
219    * Only apply the transformation if the condition evaluates to true for the
220    * given `RecordCondition`. The conditions are allowed to reference fields
221    * that are not used in the actual transformation.
222    * Example Use Cases:
223    * - Apply a different bucket transformation to an age column if the zip code
224    * column for the same record is within a specific range.
225    * - Redact a field if the date of birth field is greater than 85.
226    * </pre>
227    *
228    * <code>.google.privacy.dlp.v2.RecordCondition condition = 3;</code>
229    *
230    * @return Whether the condition field is set.
231    */
232   @java.lang.Override
hasCondition()233   public boolean hasCondition() {
234     return condition_ != null;
235   }
236   /**
237    *
238    *
239    * <pre>
240    * Only apply the transformation if the condition evaluates to true for the
241    * given `RecordCondition`. The conditions are allowed to reference fields
242    * that are not used in the actual transformation.
243    * Example Use Cases:
244    * - Apply a different bucket transformation to an age column if the zip code
245    * column for the same record is within a specific range.
246    * - Redact a field if the date of birth field is greater than 85.
247    * </pre>
248    *
249    * <code>.google.privacy.dlp.v2.RecordCondition condition = 3;</code>
250    *
251    * @return The condition.
252    */
253   @java.lang.Override
getCondition()254   public com.google.privacy.dlp.v2.RecordCondition getCondition() {
255     return condition_ == null
256         ? com.google.privacy.dlp.v2.RecordCondition.getDefaultInstance()
257         : condition_;
258   }
259   /**
260    *
261    *
262    * <pre>
263    * Only apply the transformation if the condition evaluates to true for the
264    * given `RecordCondition`. The conditions are allowed to reference fields
265    * that are not used in the actual transformation.
266    * Example Use Cases:
267    * - Apply a different bucket transformation to an age column if the zip code
268    * column for the same record is within a specific range.
269    * - Redact a field if the date of birth field is greater than 85.
270    * </pre>
271    *
272    * <code>.google.privacy.dlp.v2.RecordCondition condition = 3;</code>
273    */
274   @java.lang.Override
getConditionOrBuilder()275   public com.google.privacy.dlp.v2.RecordConditionOrBuilder getConditionOrBuilder() {
276     return condition_ == null
277         ? com.google.privacy.dlp.v2.RecordCondition.getDefaultInstance()
278         : condition_;
279   }
280 
281   public static final int PRIMITIVE_TRANSFORMATION_FIELD_NUMBER = 4;
282   /**
283    *
284    *
285    * <pre>
286    * Apply the transformation to the entire field.
287    * </pre>
288    *
289    * <code>.google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4;</code>
290    *
291    * @return Whether the primitiveTransformation field is set.
292    */
293   @java.lang.Override
hasPrimitiveTransformation()294   public boolean hasPrimitiveTransformation() {
295     return transformationCase_ == 4;
296   }
297   /**
298    *
299    *
300    * <pre>
301    * Apply the transformation to the entire field.
302    * </pre>
303    *
304    * <code>.google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4;</code>
305    *
306    * @return The primitiveTransformation.
307    */
308   @java.lang.Override
getPrimitiveTransformation()309   public com.google.privacy.dlp.v2.PrimitiveTransformation getPrimitiveTransformation() {
310     if (transformationCase_ == 4) {
311       return (com.google.privacy.dlp.v2.PrimitiveTransformation) transformation_;
312     }
313     return com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance();
314   }
315   /**
316    *
317    *
318    * <pre>
319    * Apply the transformation to the entire field.
320    * </pre>
321    *
322    * <code>.google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4;</code>
323    */
324   @java.lang.Override
325   public com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder
getPrimitiveTransformationOrBuilder()326       getPrimitiveTransformationOrBuilder() {
327     if (transformationCase_ == 4) {
328       return (com.google.privacy.dlp.v2.PrimitiveTransformation) transformation_;
329     }
330     return com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance();
331   }
332 
333   public static final int INFO_TYPE_TRANSFORMATIONS_FIELD_NUMBER = 5;
334   /**
335    *
336    *
337    * <pre>
338    * Treat the contents of the field as free text, and selectively
339    * transform content that matches an `InfoType`.
340    * </pre>
341    *
342    * <code>.google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5;</code>
343    *
344    * @return Whether the infoTypeTransformations field is set.
345    */
346   @java.lang.Override
hasInfoTypeTransformations()347   public boolean hasInfoTypeTransformations() {
348     return transformationCase_ == 5;
349   }
350   /**
351    *
352    *
353    * <pre>
354    * Treat the contents of the field as free text, and selectively
355    * transform content that matches an `InfoType`.
356    * </pre>
357    *
358    * <code>.google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5;</code>
359    *
360    * @return The infoTypeTransformations.
361    */
362   @java.lang.Override
getInfoTypeTransformations()363   public com.google.privacy.dlp.v2.InfoTypeTransformations getInfoTypeTransformations() {
364     if (transformationCase_ == 5) {
365       return (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_;
366     }
367     return com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance();
368   }
369   /**
370    *
371    *
372    * <pre>
373    * Treat the contents of the field as free text, and selectively
374    * transform content that matches an `InfoType`.
375    * </pre>
376    *
377    * <code>.google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5;</code>
378    */
379   @java.lang.Override
380   public com.google.privacy.dlp.v2.InfoTypeTransformationsOrBuilder
getInfoTypeTransformationsOrBuilder()381       getInfoTypeTransformationsOrBuilder() {
382     if (transformationCase_ == 5) {
383       return (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_;
384     }
385     return com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance();
386   }
387 
388   private byte memoizedIsInitialized = -1;
389 
390   @java.lang.Override
isInitialized()391   public final boolean isInitialized() {
392     byte isInitialized = memoizedIsInitialized;
393     if (isInitialized == 1) return true;
394     if (isInitialized == 0) return false;
395 
396     memoizedIsInitialized = 1;
397     return true;
398   }
399 
400   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)401   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
402     for (int i = 0; i < fields_.size(); i++) {
403       output.writeMessage(1, fields_.get(i));
404     }
405     if (condition_ != null) {
406       output.writeMessage(3, getCondition());
407     }
408     if (transformationCase_ == 4) {
409       output.writeMessage(4, (com.google.privacy.dlp.v2.PrimitiveTransformation) transformation_);
410     }
411     if (transformationCase_ == 5) {
412       output.writeMessage(5, (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_);
413     }
414     getUnknownFields().writeTo(output);
415   }
416 
417   @java.lang.Override
getSerializedSize()418   public int getSerializedSize() {
419     int size = memoizedSize;
420     if (size != -1) return size;
421 
422     size = 0;
423     for (int i = 0; i < fields_.size(); i++) {
424       size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, fields_.get(i));
425     }
426     if (condition_ != null) {
427       size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCondition());
428     }
429     if (transformationCase_ == 4) {
430       size +=
431           com.google.protobuf.CodedOutputStream.computeMessageSize(
432               4, (com.google.privacy.dlp.v2.PrimitiveTransformation) transformation_);
433     }
434     if (transformationCase_ == 5) {
435       size +=
436           com.google.protobuf.CodedOutputStream.computeMessageSize(
437               5, (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_);
438     }
439     size += getUnknownFields().getSerializedSize();
440     memoizedSize = size;
441     return size;
442   }
443 
444   @java.lang.Override
equals(final java.lang.Object obj)445   public boolean equals(final java.lang.Object obj) {
446     if (obj == this) {
447       return true;
448     }
449     if (!(obj instanceof com.google.privacy.dlp.v2.FieldTransformation)) {
450       return super.equals(obj);
451     }
452     com.google.privacy.dlp.v2.FieldTransformation other =
453         (com.google.privacy.dlp.v2.FieldTransformation) obj;
454 
455     if (!getFieldsList().equals(other.getFieldsList())) return false;
456     if (hasCondition() != other.hasCondition()) return false;
457     if (hasCondition()) {
458       if (!getCondition().equals(other.getCondition())) return false;
459     }
460     if (!getTransformationCase().equals(other.getTransformationCase())) return false;
461     switch (transformationCase_) {
462       case 4:
463         if (!getPrimitiveTransformation().equals(other.getPrimitiveTransformation())) return false;
464         break;
465       case 5:
466         if (!getInfoTypeTransformations().equals(other.getInfoTypeTransformations())) return false;
467         break;
468       case 0:
469       default:
470     }
471     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
472     return true;
473   }
474 
475   @java.lang.Override
hashCode()476   public int hashCode() {
477     if (memoizedHashCode != 0) {
478       return memoizedHashCode;
479     }
480     int hash = 41;
481     hash = (19 * hash) + getDescriptor().hashCode();
482     if (getFieldsCount() > 0) {
483       hash = (37 * hash) + FIELDS_FIELD_NUMBER;
484       hash = (53 * hash) + getFieldsList().hashCode();
485     }
486     if (hasCondition()) {
487       hash = (37 * hash) + CONDITION_FIELD_NUMBER;
488       hash = (53 * hash) + getCondition().hashCode();
489     }
490     switch (transformationCase_) {
491       case 4:
492         hash = (37 * hash) + PRIMITIVE_TRANSFORMATION_FIELD_NUMBER;
493         hash = (53 * hash) + getPrimitiveTransformation().hashCode();
494         break;
495       case 5:
496         hash = (37 * hash) + INFO_TYPE_TRANSFORMATIONS_FIELD_NUMBER;
497         hash = (53 * hash) + getInfoTypeTransformations().hashCode();
498         break;
499       case 0:
500       default:
501     }
502     hash = (29 * hash) + getUnknownFields().hashCode();
503     memoizedHashCode = hash;
504     return hash;
505   }
506 
parseFrom(java.nio.ByteBuffer data)507   public static com.google.privacy.dlp.v2.FieldTransformation parseFrom(java.nio.ByteBuffer data)
508       throws com.google.protobuf.InvalidProtocolBufferException {
509     return PARSER.parseFrom(data);
510   }
511 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)512   public static com.google.privacy.dlp.v2.FieldTransformation parseFrom(
513       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
514       throws com.google.protobuf.InvalidProtocolBufferException {
515     return PARSER.parseFrom(data, extensionRegistry);
516   }
517 
parseFrom( com.google.protobuf.ByteString data)518   public static com.google.privacy.dlp.v2.FieldTransformation parseFrom(
519       com.google.protobuf.ByteString data)
520       throws com.google.protobuf.InvalidProtocolBufferException {
521     return PARSER.parseFrom(data);
522   }
523 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)524   public static com.google.privacy.dlp.v2.FieldTransformation parseFrom(
525       com.google.protobuf.ByteString data,
526       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
527       throws com.google.protobuf.InvalidProtocolBufferException {
528     return PARSER.parseFrom(data, extensionRegistry);
529   }
530 
parseFrom(byte[] data)531   public static com.google.privacy.dlp.v2.FieldTransformation parseFrom(byte[] data)
532       throws com.google.protobuf.InvalidProtocolBufferException {
533     return PARSER.parseFrom(data);
534   }
535 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)536   public static com.google.privacy.dlp.v2.FieldTransformation parseFrom(
537       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
538       throws com.google.protobuf.InvalidProtocolBufferException {
539     return PARSER.parseFrom(data, extensionRegistry);
540   }
541 
parseFrom(java.io.InputStream input)542   public static com.google.privacy.dlp.v2.FieldTransformation parseFrom(java.io.InputStream input)
543       throws java.io.IOException {
544     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
545   }
546 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)547   public static com.google.privacy.dlp.v2.FieldTransformation parseFrom(
548       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
549       throws java.io.IOException {
550     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
551         PARSER, input, extensionRegistry);
552   }
553 
parseDelimitedFrom( java.io.InputStream input)554   public static com.google.privacy.dlp.v2.FieldTransformation parseDelimitedFrom(
555       java.io.InputStream input) throws java.io.IOException {
556     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
557   }
558 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)559   public static com.google.privacy.dlp.v2.FieldTransformation parseDelimitedFrom(
560       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
561       throws java.io.IOException {
562     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
563         PARSER, input, extensionRegistry);
564   }
565 
parseFrom( com.google.protobuf.CodedInputStream input)566   public static com.google.privacy.dlp.v2.FieldTransformation parseFrom(
567       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
568     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
569   }
570 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)571   public static com.google.privacy.dlp.v2.FieldTransformation parseFrom(
572       com.google.protobuf.CodedInputStream input,
573       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
574       throws java.io.IOException {
575     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
576         PARSER, input, extensionRegistry);
577   }
578 
579   @java.lang.Override
newBuilderForType()580   public Builder newBuilderForType() {
581     return newBuilder();
582   }
583 
newBuilder()584   public static Builder newBuilder() {
585     return DEFAULT_INSTANCE.toBuilder();
586   }
587 
newBuilder(com.google.privacy.dlp.v2.FieldTransformation prototype)588   public static Builder newBuilder(com.google.privacy.dlp.v2.FieldTransformation prototype) {
589     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
590   }
591 
592   @java.lang.Override
toBuilder()593   public Builder toBuilder() {
594     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
595   }
596 
597   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)598   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
599     Builder builder = new Builder(parent);
600     return builder;
601   }
602   /**
603    *
604    *
605    * <pre>
606    * The transformation to apply to the field.
607    * </pre>
608    *
609    * Protobuf type {@code google.privacy.dlp.v2.FieldTransformation}
610    */
611   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
612       implements
613       // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.FieldTransformation)
614       com.google.privacy.dlp.v2.FieldTransformationOrBuilder {
getDescriptor()615     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
616       return com.google.privacy.dlp.v2.DlpProto
617           .internal_static_google_privacy_dlp_v2_FieldTransformation_descriptor;
618     }
619 
620     @java.lang.Override
621     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()622         internalGetFieldAccessorTable() {
623       return com.google.privacy.dlp.v2.DlpProto
624           .internal_static_google_privacy_dlp_v2_FieldTransformation_fieldAccessorTable
625           .ensureFieldAccessorsInitialized(
626               com.google.privacy.dlp.v2.FieldTransformation.class,
627               com.google.privacy.dlp.v2.FieldTransformation.Builder.class);
628     }
629 
630     // Construct using com.google.privacy.dlp.v2.FieldTransformation.newBuilder()
Builder()631     private Builder() {}
632 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)633     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
634       super(parent);
635     }
636 
637     @java.lang.Override
clear()638     public Builder clear() {
639       super.clear();
640       bitField0_ = 0;
641       if (fieldsBuilder_ == null) {
642         fields_ = java.util.Collections.emptyList();
643       } else {
644         fields_ = null;
645         fieldsBuilder_.clear();
646       }
647       bitField0_ = (bitField0_ & ~0x00000001);
648       condition_ = null;
649       if (conditionBuilder_ != null) {
650         conditionBuilder_.dispose();
651         conditionBuilder_ = null;
652       }
653       if (primitiveTransformationBuilder_ != null) {
654         primitiveTransformationBuilder_.clear();
655       }
656       if (infoTypeTransformationsBuilder_ != null) {
657         infoTypeTransformationsBuilder_.clear();
658       }
659       transformationCase_ = 0;
660       transformation_ = null;
661       return this;
662     }
663 
664     @java.lang.Override
getDescriptorForType()665     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
666       return com.google.privacy.dlp.v2.DlpProto
667           .internal_static_google_privacy_dlp_v2_FieldTransformation_descriptor;
668     }
669 
670     @java.lang.Override
getDefaultInstanceForType()671     public com.google.privacy.dlp.v2.FieldTransformation getDefaultInstanceForType() {
672       return com.google.privacy.dlp.v2.FieldTransformation.getDefaultInstance();
673     }
674 
675     @java.lang.Override
build()676     public com.google.privacy.dlp.v2.FieldTransformation build() {
677       com.google.privacy.dlp.v2.FieldTransformation result = buildPartial();
678       if (!result.isInitialized()) {
679         throw newUninitializedMessageException(result);
680       }
681       return result;
682     }
683 
684     @java.lang.Override
buildPartial()685     public com.google.privacy.dlp.v2.FieldTransformation buildPartial() {
686       com.google.privacy.dlp.v2.FieldTransformation result =
687           new com.google.privacy.dlp.v2.FieldTransformation(this);
688       buildPartialRepeatedFields(result);
689       if (bitField0_ != 0) {
690         buildPartial0(result);
691       }
692       buildPartialOneofs(result);
693       onBuilt();
694       return result;
695     }
696 
buildPartialRepeatedFields(com.google.privacy.dlp.v2.FieldTransformation result)697     private void buildPartialRepeatedFields(com.google.privacy.dlp.v2.FieldTransformation result) {
698       if (fieldsBuilder_ == null) {
699         if (((bitField0_ & 0x00000001) != 0)) {
700           fields_ = java.util.Collections.unmodifiableList(fields_);
701           bitField0_ = (bitField0_ & ~0x00000001);
702         }
703         result.fields_ = fields_;
704       } else {
705         result.fields_ = fieldsBuilder_.build();
706       }
707     }
708 
buildPartial0(com.google.privacy.dlp.v2.FieldTransformation result)709     private void buildPartial0(com.google.privacy.dlp.v2.FieldTransformation result) {
710       int from_bitField0_ = bitField0_;
711       if (((from_bitField0_ & 0x00000002) != 0)) {
712         result.condition_ = conditionBuilder_ == null ? condition_ : conditionBuilder_.build();
713       }
714     }
715 
buildPartialOneofs(com.google.privacy.dlp.v2.FieldTransformation result)716     private void buildPartialOneofs(com.google.privacy.dlp.v2.FieldTransformation result) {
717       result.transformationCase_ = transformationCase_;
718       result.transformation_ = this.transformation_;
719       if (transformationCase_ == 4 && primitiveTransformationBuilder_ != null) {
720         result.transformation_ = primitiveTransformationBuilder_.build();
721       }
722       if (transformationCase_ == 5 && infoTypeTransformationsBuilder_ != null) {
723         result.transformation_ = infoTypeTransformationsBuilder_.build();
724       }
725     }
726 
727     @java.lang.Override
clone()728     public Builder clone() {
729       return super.clone();
730     }
731 
732     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)733     public Builder setField(
734         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
735       return super.setField(field, value);
736     }
737 
738     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)739     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
740       return super.clearField(field);
741     }
742 
743     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)744     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
745       return super.clearOneof(oneof);
746     }
747 
748     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)749     public Builder setRepeatedField(
750         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
751       return super.setRepeatedField(field, index, value);
752     }
753 
754     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)755     public Builder addRepeatedField(
756         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
757       return super.addRepeatedField(field, value);
758     }
759 
760     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)761     public Builder mergeFrom(com.google.protobuf.Message other) {
762       if (other instanceof com.google.privacy.dlp.v2.FieldTransformation) {
763         return mergeFrom((com.google.privacy.dlp.v2.FieldTransformation) other);
764       } else {
765         super.mergeFrom(other);
766         return this;
767       }
768     }
769 
mergeFrom(com.google.privacy.dlp.v2.FieldTransformation other)770     public Builder mergeFrom(com.google.privacy.dlp.v2.FieldTransformation other) {
771       if (other == com.google.privacy.dlp.v2.FieldTransformation.getDefaultInstance()) return this;
772       if (fieldsBuilder_ == null) {
773         if (!other.fields_.isEmpty()) {
774           if (fields_.isEmpty()) {
775             fields_ = other.fields_;
776             bitField0_ = (bitField0_ & ~0x00000001);
777           } else {
778             ensureFieldsIsMutable();
779             fields_.addAll(other.fields_);
780           }
781           onChanged();
782         }
783       } else {
784         if (!other.fields_.isEmpty()) {
785           if (fieldsBuilder_.isEmpty()) {
786             fieldsBuilder_.dispose();
787             fieldsBuilder_ = null;
788             fields_ = other.fields_;
789             bitField0_ = (bitField0_ & ~0x00000001);
790             fieldsBuilder_ =
791                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
792                     ? getFieldsFieldBuilder()
793                     : null;
794           } else {
795             fieldsBuilder_.addAllMessages(other.fields_);
796           }
797         }
798       }
799       if (other.hasCondition()) {
800         mergeCondition(other.getCondition());
801       }
802       switch (other.getTransformationCase()) {
803         case PRIMITIVE_TRANSFORMATION:
804           {
805             mergePrimitiveTransformation(other.getPrimitiveTransformation());
806             break;
807           }
808         case INFO_TYPE_TRANSFORMATIONS:
809           {
810             mergeInfoTypeTransformations(other.getInfoTypeTransformations());
811             break;
812           }
813         case TRANSFORMATION_NOT_SET:
814           {
815             break;
816           }
817       }
818       this.mergeUnknownFields(other.getUnknownFields());
819       onChanged();
820       return this;
821     }
822 
823     @java.lang.Override
isInitialized()824     public final boolean isInitialized() {
825       return true;
826     }
827 
828     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)829     public Builder mergeFrom(
830         com.google.protobuf.CodedInputStream input,
831         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
832         throws java.io.IOException {
833       if (extensionRegistry == null) {
834         throw new java.lang.NullPointerException();
835       }
836       try {
837         boolean done = false;
838         while (!done) {
839           int tag = input.readTag();
840           switch (tag) {
841             case 0:
842               done = true;
843               break;
844             case 10:
845               {
846                 com.google.privacy.dlp.v2.FieldId m =
847                     input.readMessage(
848                         com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry);
849                 if (fieldsBuilder_ == null) {
850                   ensureFieldsIsMutable();
851                   fields_.add(m);
852                 } else {
853                   fieldsBuilder_.addMessage(m);
854                 }
855                 break;
856               } // case 10
857             case 26:
858               {
859                 input.readMessage(getConditionFieldBuilder().getBuilder(), extensionRegistry);
860                 bitField0_ |= 0x00000002;
861                 break;
862               } // case 26
863             case 34:
864               {
865                 input.readMessage(
866                     getPrimitiveTransformationFieldBuilder().getBuilder(), extensionRegistry);
867                 transformationCase_ = 4;
868                 break;
869               } // case 34
870             case 42:
871               {
872                 input.readMessage(
873                     getInfoTypeTransformationsFieldBuilder().getBuilder(), extensionRegistry);
874                 transformationCase_ = 5;
875                 break;
876               } // case 42
877             default:
878               {
879                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
880                   done = true; // was an endgroup tag
881                 }
882                 break;
883               } // default:
884           } // switch (tag)
885         } // while (!done)
886       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
887         throw e.unwrapIOException();
888       } finally {
889         onChanged();
890       } // finally
891       return this;
892     }
893 
894     private int transformationCase_ = 0;
895     private java.lang.Object transformation_;
896 
getTransformationCase()897     public TransformationCase getTransformationCase() {
898       return TransformationCase.forNumber(transformationCase_);
899     }
900 
clearTransformation()901     public Builder clearTransformation() {
902       transformationCase_ = 0;
903       transformation_ = null;
904       onChanged();
905       return this;
906     }
907 
908     private int bitField0_;
909 
910     private java.util.List<com.google.privacy.dlp.v2.FieldId> fields_ =
911         java.util.Collections.emptyList();
912 
ensureFieldsIsMutable()913     private void ensureFieldsIsMutable() {
914       if (!((bitField0_ & 0x00000001) != 0)) {
915         fields_ = new java.util.ArrayList<com.google.privacy.dlp.v2.FieldId>(fields_);
916         bitField0_ |= 0x00000001;
917       }
918     }
919 
920     private com.google.protobuf.RepeatedFieldBuilderV3<
921             com.google.privacy.dlp.v2.FieldId,
922             com.google.privacy.dlp.v2.FieldId.Builder,
923             com.google.privacy.dlp.v2.FieldIdOrBuilder>
924         fieldsBuilder_;
925 
926     /**
927      *
928      *
929      * <pre>
930      * Required. Input field(s) to apply the transformation to.
931      * When you have columns that reference their position within a list,
932      * omit the index from the FieldId. FieldId name matching ignores the index.
933      * For example, instead of "contact.nums[0].type", use "contact.nums.type".
934      * </pre>
935      *
936      * <code>
937      * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];
938      * </code>
939      */
getFieldsList()940     public java.util.List<com.google.privacy.dlp.v2.FieldId> getFieldsList() {
941       if (fieldsBuilder_ == null) {
942         return java.util.Collections.unmodifiableList(fields_);
943       } else {
944         return fieldsBuilder_.getMessageList();
945       }
946     }
947     /**
948      *
949      *
950      * <pre>
951      * Required. Input field(s) to apply the transformation to.
952      * When you have columns that reference their position within a list,
953      * omit the index from the FieldId. FieldId name matching ignores the index.
954      * For example, instead of "contact.nums[0].type", use "contact.nums.type".
955      * </pre>
956      *
957      * <code>
958      * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];
959      * </code>
960      */
getFieldsCount()961     public int getFieldsCount() {
962       if (fieldsBuilder_ == null) {
963         return fields_.size();
964       } else {
965         return fieldsBuilder_.getCount();
966       }
967     }
968     /**
969      *
970      *
971      * <pre>
972      * Required. Input field(s) to apply the transformation to.
973      * When you have columns that reference their position within a list,
974      * omit the index from the FieldId. FieldId name matching ignores the index.
975      * For example, instead of "contact.nums[0].type", use "contact.nums.type".
976      * </pre>
977      *
978      * <code>
979      * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];
980      * </code>
981      */
getFields(int index)982     public com.google.privacy.dlp.v2.FieldId getFields(int index) {
983       if (fieldsBuilder_ == null) {
984         return fields_.get(index);
985       } else {
986         return fieldsBuilder_.getMessage(index);
987       }
988     }
989     /**
990      *
991      *
992      * <pre>
993      * Required. Input field(s) to apply the transformation to.
994      * When you have columns that reference their position within a list,
995      * omit the index from the FieldId. FieldId name matching ignores the index.
996      * For example, instead of "contact.nums[0].type", use "contact.nums.type".
997      * </pre>
998      *
999      * <code>
1000      * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];
1001      * </code>
1002      */
setFields(int index, com.google.privacy.dlp.v2.FieldId value)1003     public Builder setFields(int index, com.google.privacy.dlp.v2.FieldId value) {
1004       if (fieldsBuilder_ == null) {
1005         if (value == null) {
1006           throw new NullPointerException();
1007         }
1008         ensureFieldsIsMutable();
1009         fields_.set(index, value);
1010         onChanged();
1011       } else {
1012         fieldsBuilder_.setMessage(index, value);
1013       }
1014       return this;
1015     }
1016     /**
1017      *
1018      *
1019      * <pre>
1020      * Required. Input field(s) to apply the transformation to.
1021      * When you have columns that reference their position within a list,
1022      * omit the index from the FieldId. FieldId name matching ignores the index.
1023      * For example, instead of "contact.nums[0].type", use "contact.nums.type".
1024      * </pre>
1025      *
1026      * <code>
1027      * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];
1028      * </code>
1029      */
setFields(int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue)1030     public Builder setFields(int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) {
1031       if (fieldsBuilder_ == null) {
1032         ensureFieldsIsMutable();
1033         fields_.set(index, builderForValue.build());
1034         onChanged();
1035       } else {
1036         fieldsBuilder_.setMessage(index, builderForValue.build());
1037       }
1038       return this;
1039     }
1040     /**
1041      *
1042      *
1043      * <pre>
1044      * Required. Input field(s) to apply the transformation to.
1045      * When you have columns that reference their position within a list,
1046      * omit the index from the FieldId. FieldId name matching ignores the index.
1047      * For example, instead of "contact.nums[0].type", use "contact.nums.type".
1048      * </pre>
1049      *
1050      * <code>
1051      * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];
1052      * </code>
1053      */
addFields(com.google.privacy.dlp.v2.FieldId value)1054     public Builder addFields(com.google.privacy.dlp.v2.FieldId value) {
1055       if (fieldsBuilder_ == null) {
1056         if (value == null) {
1057           throw new NullPointerException();
1058         }
1059         ensureFieldsIsMutable();
1060         fields_.add(value);
1061         onChanged();
1062       } else {
1063         fieldsBuilder_.addMessage(value);
1064       }
1065       return this;
1066     }
1067     /**
1068      *
1069      *
1070      * <pre>
1071      * Required. Input field(s) to apply the transformation to.
1072      * When you have columns that reference their position within a list,
1073      * omit the index from the FieldId. FieldId name matching ignores the index.
1074      * For example, instead of "contact.nums[0].type", use "contact.nums.type".
1075      * </pre>
1076      *
1077      * <code>
1078      * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];
1079      * </code>
1080      */
addFields(int index, com.google.privacy.dlp.v2.FieldId value)1081     public Builder addFields(int index, com.google.privacy.dlp.v2.FieldId value) {
1082       if (fieldsBuilder_ == null) {
1083         if (value == null) {
1084           throw new NullPointerException();
1085         }
1086         ensureFieldsIsMutable();
1087         fields_.add(index, value);
1088         onChanged();
1089       } else {
1090         fieldsBuilder_.addMessage(index, value);
1091       }
1092       return this;
1093     }
1094     /**
1095      *
1096      *
1097      * <pre>
1098      * Required. Input field(s) to apply the transformation to.
1099      * When you have columns that reference their position within a list,
1100      * omit the index from the FieldId. FieldId name matching ignores the index.
1101      * For example, instead of "contact.nums[0].type", use "contact.nums.type".
1102      * </pre>
1103      *
1104      * <code>
1105      * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];
1106      * </code>
1107      */
addFields(com.google.privacy.dlp.v2.FieldId.Builder builderForValue)1108     public Builder addFields(com.google.privacy.dlp.v2.FieldId.Builder builderForValue) {
1109       if (fieldsBuilder_ == null) {
1110         ensureFieldsIsMutable();
1111         fields_.add(builderForValue.build());
1112         onChanged();
1113       } else {
1114         fieldsBuilder_.addMessage(builderForValue.build());
1115       }
1116       return this;
1117     }
1118     /**
1119      *
1120      *
1121      * <pre>
1122      * Required. Input field(s) to apply the transformation to.
1123      * When you have columns that reference their position within a list,
1124      * omit the index from the FieldId. FieldId name matching ignores the index.
1125      * For example, instead of "contact.nums[0].type", use "contact.nums.type".
1126      * </pre>
1127      *
1128      * <code>
1129      * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];
1130      * </code>
1131      */
addFields(int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue)1132     public Builder addFields(int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) {
1133       if (fieldsBuilder_ == null) {
1134         ensureFieldsIsMutable();
1135         fields_.add(index, builderForValue.build());
1136         onChanged();
1137       } else {
1138         fieldsBuilder_.addMessage(index, builderForValue.build());
1139       }
1140       return this;
1141     }
1142     /**
1143      *
1144      *
1145      * <pre>
1146      * Required. Input field(s) to apply the transformation to.
1147      * When you have columns that reference their position within a list,
1148      * omit the index from the FieldId. FieldId name matching ignores the index.
1149      * For example, instead of "contact.nums[0].type", use "contact.nums.type".
1150      * </pre>
1151      *
1152      * <code>
1153      * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];
1154      * </code>
1155      */
addAllFields( java.lang.Iterable<? extends com.google.privacy.dlp.v2.FieldId> values)1156     public Builder addAllFields(
1157         java.lang.Iterable<? extends com.google.privacy.dlp.v2.FieldId> values) {
1158       if (fieldsBuilder_ == null) {
1159         ensureFieldsIsMutable();
1160         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fields_);
1161         onChanged();
1162       } else {
1163         fieldsBuilder_.addAllMessages(values);
1164       }
1165       return this;
1166     }
1167     /**
1168      *
1169      *
1170      * <pre>
1171      * Required. Input field(s) to apply the transformation to.
1172      * When you have columns that reference their position within a list,
1173      * omit the index from the FieldId. FieldId name matching ignores the index.
1174      * For example, instead of "contact.nums[0].type", use "contact.nums.type".
1175      * </pre>
1176      *
1177      * <code>
1178      * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];
1179      * </code>
1180      */
clearFields()1181     public Builder clearFields() {
1182       if (fieldsBuilder_ == null) {
1183         fields_ = java.util.Collections.emptyList();
1184         bitField0_ = (bitField0_ & ~0x00000001);
1185         onChanged();
1186       } else {
1187         fieldsBuilder_.clear();
1188       }
1189       return this;
1190     }
1191     /**
1192      *
1193      *
1194      * <pre>
1195      * Required. Input field(s) to apply the transformation to.
1196      * When you have columns that reference their position within a list,
1197      * omit the index from the FieldId. FieldId name matching ignores the index.
1198      * For example, instead of "contact.nums[0].type", use "contact.nums.type".
1199      * </pre>
1200      *
1201      * <code>
1202      * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];
1203      * </code>
1204      */
removeFields(int index)1205     public Builder removeFields(int index) {
1206       if (fieldsBuilder_ == null) {
1207         ensureFieldsIsMutable();
1208         fields_.remove(index);
1209         onChanged();
1210       } else {
1211         fieldsBuilder_.remove(index);
1212       }
1213       return this;
1214     }
1215     /**
1216      *
1217      *
1218      * <pre>
1219      * Required. Input field(s) to apply the transformation to.
1220      * When you have columns that reference their position within a list,
1221      * omit the index from the FieldId. FieldId name matching ignores the index.
1222      * For example, instead of "contact.nums[0].type", use "contact.nums.type".
1223      * </pre>
1224      *
1225      * <code>
1226      * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];
1227      * </code>
1228      */
getFieldsBuilder(int index)1229     public com.google.privacy.dlp.v2.FieldId.Builder getFieldsBuilder(int index) {
1230       return getFieldsFieldBuilder().getBuilder(index);
1231     }
1232     /**
1233      *
1234      *
1235      * <pre>
1236      * Required. Input field(s) to apply the transformation to.
1237      * When you have columns that reference their position within a list,
1238      * omit the index from the FieldId. FieldId name matching ignores the index.
1239      * For example, instead of "contact.nums[0].type", use "contact.nums.type".
1240      * </pre>
1241      *
1242      * <code>
1243      * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];
1244      * </code>
1245      */
getFieldsOrBuilder(int index)1246     public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldsOrBuilder(int index) {
1247       if (fieldsBuilder_ == null) {
1248         return fields_.get(index);
1249       } else {
1250         return fieldsBuilder_.getMessageOrBuilder(index);
1251       }
1252     }
1253     /**
1254      *
1255      *
1256      * <pre>
1257      * Required. Input field(s) to apply the transformation to.
1258      * When you have columns that reference their position within a list,
1259      * omit the index from the FieldId. FieldId name matching ignores the index.
1260      * For example, instead of "contact.nums[0].type", use "contact.nums.type".
1261      * </pre>
1262      *
1263      * <code>
1264      * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];
1265      * </code>
1266      */
1267     public java.util.List<? extends com.google.privacy.dlp.v2.FieldIdOrBuilder>
getFieldsOrBuilderList()1268         getFieldsOrBuilderList() {
1269       if (fieldsBuilder_ != null) {
1270         return fieldsBuilder_.getMessageOrBuilderList();
1271       } else {
1272         return java.util.Collections.unmodifiableList(fields_);
1273       }
1274     }
1275     /**
1276      *
1277      *
1278      * <pre>
1279      * Required. Input field(s) to apply the transformation to.
1280      * When you have columns that reference their position within a list,
1281      * omit the index from the FieldId. FieldId name matching ignores the index.
1282      * For example, instead of "contact.nums[0].type", use "contact.nums.type".
1283      * </pre>
1284      *
1285      * <code>
1286      * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];
1287      * </code>
1288      */
addFieldsBuilder()1289     public com.google.privacy.dlp.v2.FieldId.Builder addFieldsBuilder() {
1290       return getFieldsFieldBuilder()
1291           .addBuilder(com.google.privacy.dlp.v2.FieldId.getDefaultInstance());
1292     }
1293     /**
1294      *
1295      *
1296      * <pre>
1297      * Required. Input field(s) to apply the transformation to.
1298      * When you have columns that reference their position within a list,
1299      * omit the index from the FieldId. FieldId name matching ignores the index.
1300      * For example, instead of "contact.nums[0].type", use "contact.nums.type".
1301      * </pre>
1302      *
1303      * <code>
1304      * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];
1305      * </code>
1306      */
addFieldsBuilder(int index)1307     public com.google.privacy.dlp.v2.FieldId.Builder addFieldsBuilder(int index) {
1308       return getFieldsFieldBuilder()
1309           .addBuilder(index, com.google.privacy.dlp.v2.FieldId.getDefaultInstance());
1310     }
1311     /**
1312      *
1313      *
1314      * <pre>
1315      * Required. Input field(s) to apply the transformation to.
1316      * When you have columns that reference their position within a list,
1317      * omit the index from the FieldId. FieldId name matching ignores the index.
1318      * For example, instead of "contact.nums[0].type", use "contact.nums.type".
1319      * </pre>
1320      *
1321      * <code>
1322      * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED];
1323      * </code>
1324      */
getFieldsBuilderList()1325     public java.util.List<com.google.privacy.dlp.v2.FieldId.Builder> getFieldsBuilderList() {
1326       return getFieldsFieldBuilder().getBuilderList();
1327     }
1328 
1329     private com.google.protobuf.RepeatedFieldBuilderV3<
1330             com.google.privacy.dlp.v2.FieldId,
1331             com.google.privacy.dlp.v2.FieldId.Builder,
1332             com.google.privacy.dlp.v2.FieldIdOrBuilder>
getFieldsFieldBuilder()1333         getFieldsFieldBuilder() {
1334       if (fieldsBuilder_ == null) {
1335         fieldsBuilder_ =
1336             new com.google.protobuf.RepeatedFieldBuilderV3<
1337                 com.google.privacy.dlp.v2.FieldId,
1338                 com.google.privacy.dlp.v2.FieldId.Builder,
1339                 com.google.privacy.dlp.v2.FieldIdOrBuilder>(
1340                 fields_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
1341         fields_ = null;
1342       }
1343       return fieldsBuilder_;
1344     }
1345 
1346     private com.google.privacy.dlp.v2.RecordCondition condition_;
1347     private com.google.protobuf.SingleFieldBuilderV3<
1348             com.google.privacy.dlp.v2.RecordCondition,
1349             com.google.privacy.dlp.v2.RecordCondition.Builder,
1350             com.google.privacy.dlp.v2.RecordConditionOrBuilder>
1351         conditionBuilder_;
1352     /**
1353      *
1354      *
1355      * <pre>
1356      * Only apply the transformation if the condition evaluates to true for the
1357      * given `RecordCondition`. The conditions are allowed to reference fields
1358      * that are not used in the actual transformation.
1359      * Example Use Cases:
1360      * - Apply a different bucket transformation to an age column if the zip code
1361      * column for the same record is within a specific range.
1362      * - Redact a field if the date of birth field is greater than 85.
1363      * </pre>
1364      *
1365      * <code>.google.privacy.dlp.v2.RecordCondition condition = 3;</code>
1366      *
1367      * @return Whether the condition field is set.
1368      */
hasCondition()1369     public boolean hasCondition() {
1370       return ((bitField0_ & 0x00000002) != 0);
1371     }
1372     /**
1373      *
1374      *
1375      * <pre>
1376      * Only apply the transformation if the condition evaluates to true for the
1377      * given `RecordCondition`. The conditions are allowed to reference fields
1378      * that are not used in the actual transformation.
1379      * Example Use Cases:
1380      * - Apply a different bucket transformation to an age column if the zip code
1381      * column for the same record is within a specific range.
1382      * - Redact a field if the date of birth field is greater than 85.
1383      * </pre>
1384      *
1385      * <code>.google.privacy.dlp.v2.RecordCondition condition = 3;</code>
1386      *
1387      * @return The condition.
1388      */
getCondition()1389     public com.google.privacy.dlp.v2.RecordCondition getCondition() {
1390       if (conditionBuilder_ == null) {
1391         return condition_ == null
1392             ? com.google.privacy.dlp.v2.RecordCondition.getDefaultInstance()
1393             : condition_;
1394       } else {
1395         return conditionBuilder_.getMessage();
1396       }
1397     }
1398     /**
1399      *
1400      *
1401      * <pre>
1402      * Only apply the transformation if the condition evaluates to true for the
1403      * given `RecordCondition`. The conditions are allowed to reference fields
1404      * that are not used in the actual transformation.
1405      * Example Use Cases:
1406      * - Apply a different bucket transformation to an age column if the zip code
1407      * column for the same record is within a specific range.
1408      * - Redact a field if the date of birth field is greater than 85.
1409      * </pre>
1410      *
1411      * <code>.google.privacy.dlp.v2.RecordCondition condition = 3;</code>
1412      */
setCondition(com.google.privacy.dlp.v2.RecordCondition value)1413     public Builder setCondition(com.google.privacy.dlp.v2.RecordCondition value) {
1414       if (conditionBuilder_ == null) {
1415         if (value == null) {
1416           throw new NullPointerException();
1417         }
1418         condition_ = value;
1419       } else {
1420         conditionBuilder_.setMessage(value);
1421       }
1422       bitField0_ |= 0x00000002;
1423       onChanged();
1424       return this;
1425     }
1426     /**
1427      *
1428      *
1429      * <pre>
1430      * Only apply the transformation if the condition evaluates to true for the
1431      * given `RecordCondition`. The conditions are allowed to reference fields
1432      * that are not used in the actual transformation.
1433      * Example Use Cases:
1434      * - Apply a different bucket transformation to an age column if the zip code
1435      * column for the same record is within a specific range.
1436      * - Redact a field if the date of birth field is greater than 85.
1437      * </pre>
1438      *
1439      * <code>.google.privacy.dlp.v2.RecordCondition condition = 3;</code>
1440      */
setCondition(com.google.privacy.dlp.v2.RecordCondition.Builder builderForValue)1441     public Builder setCondition(com.google.privacy.dlp.v2.RecordCondition.Builder builderForValue) {
1442       if (conditionBuilder_ == null) {
1443         condition_ = builderForValue.build();
1444       } else {
1445         conditionBuilder_.setMessage(builderForValue.build());
1446       }
1447       bitField0_ |= 0x00000002;
1448       onChanged();
1449       return this;
1450     }
1451     /**
1452      *
1453      *
1454      * <pre>
1455      * Only apply the transformation if the condition evaluates to true for the
1456      * given `RecordCondition`. The conditions are allowed to reference fields
1457      * that are not used in the actual transformation.
1458      * Example Use Cases:
1459      * - Apply a different bucket transformation to an age column if the zip code
1460      * column for the same record is within a specific range.
1461      * - Redact a field if the date of birth field is greater than 85.
1462      * </pre>
1463      *
1464      * <code>.google.privacy.dlp.v2.RecordCondition condition = 3;</code>
1465      */
mergeCondition(com.google.privacy.dlp.v2.RecordCondition value)1466     public Builder mergeCondition(com.google.privacy.dlp.v2.RecordCondition value) {
1467       if (conditionBuilder_ == null) {
1468         if (((bitField0_ & 0x00000002) != 0)
1469             && condition_ != null
1470             && condition_ != com.google.privacy.dlp.v2.RecordCondition.getDefaultInstance()) {
1471           getConditionBuilder().mergeFrom(value);
1472         } else {
1473           condition_ = value;
1474         }
1475       } else {
1476         conditionBuilder_.mergeFrom(value);
1477       }
1478       bitField0_ |= 0x00000002;
1479       onChanged();
1480       return this;
1481     }
1482     /**
1483      *
1484      *
1485      * <pre>
1486      * Only apply the transformation if the condition evaluates to true for the
1487      * given `RecordCondition`. The conditions are allowed to reference fields
1488      * that are not used in the actual transformation.
1489      * Example Use Cases:
1490      * - Apply a different bucket transformation to an age column if the zip code
1491      * column for the same record is within a specific range.
1492      * - Redact a field if the date of birth field is greater than 85.
1493      * </pre>
1494      *
1495      * <code>.google.privacy.dlp.v2.RecordCondition condition = 3;</code>
1496      */
clearCondition()1497     public Builder clearCondition() {
1498       bitField0_ = (bitField0_ & ~0x00000002);
1499       condition_ = null;
1500       if (conditionBuilder_ != null) {
1501         conditionBuilder_.dispose();
1502         conditionBuilder_ = null;
1503       }
1504       onChanged();
1505       return this;
1506     }
1507     /**
1508      *
1509      *
1510      * <pre>
1511      * Only apply the transformation if the condition evaluates to true for the
1512      * given `RecordCondition`. The conditions are allowed to reference fields
1513      * that are not used in the actual transformation.
1514      * Example Use Cases:
1515      * - Apply a different bucket transformation to an age column if the zip code
1516      * column for the same record is within a specific range.
1517      * - Redact a field if the date of birth field is greater than 85.
1518      * </pre>
1519      *
1520      * <code>.google.privacy.dlp.v2.RecordCondition condition = 3;</code>
1521      */
getConditionBuilder()1522     public com.google.privacy.dlp.v2.RecordCondition.Builder getConditionBuilder() {
1523       bitField0_ |= 0x00000002;
1524       onChanged();
1525       return getConditionFieldBuilder().getBuilder();
1526     }
1527     /**
1528      *
1529      *
1530      * <pre>
1531      * Only apply the transformation if the condition evaluates to true for the
1532      * given `RecordCondition`. The conditions are allowed to reference fields
1533      * that are not used in the actual transformation.
1534      * Example Use Cases:
1535      * - Apply a different bucket transformation to an age column if the zip code
1536      * column for the same record is within a specific range.
1537      * - Redact a field if the date of birth field is greater than 85.
1538      * </pre>
1539      *
1540      * <code>.google.privacy.dlp.v2.RecordCondition condition = 3;</code>
1541      */
getConditionOrBuilder()1542     public com.google.privacy.dlp.v2.RecordConditionOrBuilder getConditionOrBuilder() {
1543       if (conditionBuilder_ != null) {
1544         return conditionBuilder_.getMessageOrBuilder();
1545       } else {
1546         return condition_ == null
1547             ? com.google.privacy.dlp.v2.RecordCondition.getDefaultInstance()
1548             : condition_;
1549       }
1550     }
1551     /**
1552      *
1553      *
1554      * <pre>
1555      * Only apply the transformation if the condition evaluates to true for the
1556      * given `RecordCondition`. The conditions are allowed to reference fields
1557      * that are not used in the actual transformation.
1558      * Example Use Cases:
1559      * - Apply a different bucket transformation to an age column if the zip code
1560      * column for the same record is within a specific range.
1561      * - Redact a field if the date of birth field is greater than 85.
1562      * </pre>
1563      *
1564      * <code>.google.privacy.dlp.v2.RecordCondition condition = 3;</code>
1565      */
1566     private com.google.protobuf.SingleFieldBuilderV3<
1567             com.google.privacy.dlp.v2.RecordCondition,
1568             com.google.privacy.dlp.v2.RecordCondition.Builder,
1569             com.google.privacy.dlp.v2.RecordConditionOrBuilder>
getConditionFieldBuilder()1570         getConditionFieldBuilder() {
1571       if (conditionBuilder_ == null) {
1572         conditionBuilder_ =
1573             new com.google.protobuf.SingleFieldBuilderV3<
1574                 com.google.privacy.dlp.v2.RecordCondition,
1575                 com.google.privacy.dlp.v2.RecordCondition.Builder,
1576                 com.google.privacy.dlp.v2.RecordConditionOrBuilder>(
1577                 getCondition(), getParentForChildren(), isClean());
1578         condition_ = null;
1579       }
1580       return conditionBuilder_;
1581     }
1582 
1583     private com.google.protobuf.SingleFieldBuilderV3<
1584             com.google.privacy.dlp.v2.PrimitiveTransformation,
1585             com.google.privacy.dlp.v2.PrimitiveTransformation.Builder,
1586             com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder>
1587         primitiveTransformationBuilder_;
1588     /**
1589      *
1590      *
1591      * <pre>
1592      * Apply the transformation to the entire field.
1593      * </pre>
1594      *
1595      * <code>.google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4;</code>
1596      *
1597      * @return Whether the primitiveTransformation field is set.
1598      */
1599     @java.lang.Override
hasPrimitiveTransformation()1600     public boolean hasPrimitiveTransformation() {
1601       return transformationCase_ == 4;
1602     }
1603     /**
1604      *
1605      *
1606      * <pre>
1607      * Apply the transformation to the entire field.
1608      * </pre>
1609      *
1610      * <code>.google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4;</code>
1611      *
1612      * @return The primitiveTransformation.
1613      */
1614     @java.lang.Override
getPrimitiveTransformation()1615     public com.google.privacy.dlp.v2.PrimitiveTransformation getPrimitiveTransformation() {
1616       if (primitiveTransformationBuilder_ == null) {
1617         if (transformationCase_ == 4) {
1618           return (com.google.privacy.dlp.v2.PrimitiveTransformation) transformation_;
1619         }
1620         return com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance();
1621       } else {
1622         if (transformationCase_ == 4) {
1623           return primitiveTransformationBuilder_.getMessage();
1624         }
1625         return com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance();
1626       }
1627     }
1628     /**
1629      *
1630      *
1631      * <pre>
1632      * Apply the transformation to the entire field.
1633      * </pre>
1634      *
1635      * <code>.google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4;</code>
1636      */
setPrimitiveTransformation( com.google.privacy.dlp.v2.PrimitiveTransformation value)1637     public Builder setPrimitiveTransformation(
1638         com.google.privacy.dlp.v2.PrimitiveTransformation value) {
1639       if (primitiveTransformationBuilder_ == null) {
1640         if (value == null) {
1641           throw new NullPointerException();
1642         }
1643         transformation_ = value;
1644         onChanged();
1645       } else {
1646         primitiveTransformationBuilder_.setMessage(value);
1647       }
1648       transformationCase_ = 4;
1649       return this;
1650     }
1651     /**
1652      *
1653      *
1654      * <pre>
1655      * Apply the transformation to the entire field.
1656      * </pre>
1657      *
1658      * <code>.google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4;</code>
1659      */
setPrimitiveTransformation( com.google.privacy.dlp.v2.PrimitiveTransformation.Builder builderForValue)1660     public Builder setPrimitiveTransformation(
1661         com.google.privacy.dlp.v2.PrimitiveTransformation.Builder builderForValue) {
1662       if (primitiveTransformationBuilder_ == null) {
1663         transformation_ = builderForValue.build();
1664         onChanged();
1665       } else {
1666         primitiveTransformationBuilder_.setMessage(builderForValue.build());
1667       }
1668       transformationCase_ = 4;
1669       return this;
1670     }
1671     /**
1672      *
1673      *
1674      * <pre>
1675      * Apply the transformation to the entire field.
1676      * </pre>
1677      *
1678      * <code>.google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4;</code>
1679      */
mergePrimitiveTransformation( com.google.privacy.dlp.v2.PrimitiveTransformation value)1680     public Builder mergePrimitiveTransformation(
1681         com.google.privacy.dlp.v2.PrimitiveTransformation value) {
1682       if (primitiveTransformationBuilder_ == null) {
1683         if (transformationCase_ == 4
1684             && transformation_
1685                 != com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance()) {
1686           transformation_ =
1687               com.google.privacy.dlp.v2.PrimitiveTransformation.newBuilder(
1688                       (com.google.privacy.dlp.v2.PrimitiveTransformation) transformation_)
1689                   .mergeFrom(value)
1690                   .buildPartial();
1691         } else {
1692           transformation_ = value;
1693         }
1694         onChanged();
1695       } else {
1696         if (transformationCase_ == 4) {
1697           primitiveTransformationBuilder_.mergeFrom(value);
1698         } else {
1699           primitiveTransformationBuilder_.setMessage(value);
1700         }
1701       }
1702       transformationCase_ = 4;
1703       return this;
1704     }
1705     /**
1706      *
1707      *
1708      * <pre>
1709      * Apply the transformation to the entire field.
1710      * </pre>
1711      *
1712      * <code>.google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4;</code>
1713      */
clearPrimitiveTransformation()1714     public Builder clearPrimitiveTransformation() {
1715       if (primitiveTransformationBuilder_ == null) {
1716         if (transformationCase_ == 4) {
1717           transformationCase_ = 0;
1718           transformation_ = null;
1719           onChanged();
1720         }
1721       } else {
1722         if (transformationCase_ == 4) {
1723           transformationCase_ = 0;
1724           transformation_ = null;
1725         }
1726         primitiveTransformationBuilder_.clear();
1727       }
1728       return this;
1729     }
1730     /**
1731      *
1732      *
1733      * <pre>
1734      * Apply the transformation to the entire field.
1735      * </pre>
1736      *
1737      * <code>.google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4;</code>
1738      */
1739     public com.google.privacy.dlp.v2.PrimitiveTransformation.Builder
getPrimitiveTransformationBuilder()1740         getPrimitiveTransformationBuilder() {
1741       return getPrimitiveTransformationFieldBuilder().getBuilder();
1742     }
1743     /**
1744      *
1745      *
1746      * <pre>
1747      * Apply the transformation to the entire field.
1748      * </pre>
1749      *
1750      * <code>.google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4;</code>
1751      */
1752     @java.lang.Override
1753     public com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder
getPrimitiveTransformationOrBuilder()1754         getPrimitiveTransformationOrBuilder() {
1755       if ((transformationCase_ == 4) && (primitiveTransformationBuilder_ != null)) {
1756         return primitiveTransformationBuilder_.getMessageOrBuilder();
1757       } else {
1758         if (transformationCase_ == 4) {
1759           return (com.google.privacy.dlp.v2.PrimitiveTransformation) transformation_;
1760         }
1761         return com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance();
1762       }
1763     }
1764     /**
1765      *
1766      *
1767      * <pre>
1768      * Apply the transformation to the entire field.
1769      * </pre>
1770      *
1771      * <code>.google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4;</code>
1772      */
1773     private com.google.protobuf.SingleFieldBuilderV3<
1774             com.google.privacy.dlp.v2.PrimitiveTransformation,
1775             com.google.privacy.dlp.v2.PrimitiveTransformation.Builder,
1776             com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder>
getPrimitiveTransformationFieldBuilder()1777         getPrimitiveTransformationFieldBuilder() {
1778       if (primitiveTransformationBuilder_ == null) {
1779         if (!(transformationCase_ == 4)) {
1780           transformation_ = com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance();
1781         }
1782         primitiveTransformationBuilder_ =
1783             new com.google.protobuf.SingleFieldBuilderV3<
1784                 com.google.privacy.dlp.v2.PrimitiveTransformation,
1785                 com.google.privacy.dlp.v2.PrimitiveTransformation.Builder,
1786                 com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder>(
1787                 (com.google.privacy.dlp.v2.PrimitiveTransformation) transformation_,
1788                 getParentForChildren(),
1789                 isClean());
1790         transformation_ = null;
1791       }
1792       transformationCase_ = 4;
1793       onChanged();
1794       return primitiveTransformationBuilder_;
1795     }
1796 
1797     private com.google.protobuf.SingleFieldBuilderV3<
1798             com.google.privacy.dlp.v2.InfoTypeTransformations,
1799             com.google.privacy.dlp.v2.InfoTypeTransformations.Builder,
1800             com.google.privacy.dlp.v2.InfoTypeTransformationsOrBuilder>
1801         infoTypeTransformationsBuilder_;
1802     /**
1803      *
1804      *
1805      * <pre>
1806      * Treat the contents of the field as free text, and selectively
1807      * transform content that matches an `InfoType`.
1808      * </pre>
1809      *
1810      * <code>.google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5;</code>
1811      *
1812      * @return Whether the infoTypeTransformations field is set.
1813      */
1814     @java.lang.Override
hasInfoTypeTransformations()1815     public boolean hasInfoTypeTransformations() {
1816       return transformationCase_ == 5;
1817     }
1818     /**
1819      *
1820      *
1821      * <pre>
1822      * Treat the contents of the field as free text, and selectively
1823      * transform content that matches an `InfoType`.
1824      * </pre>
1825      *
1826      * <code>.google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5;</code>
1827      *
1828      * @return The infoTypeTransformations.
1829      */
1830     @java.lang.Override
getInfoTypeTransformations()1831     public com.google.privacy.dlp.v2.InfoTypeTransformations getInfoTypeTransformations() {
1832       if (infoTypeTransformationsBuilder_ == null) {
1833         if (transformationCase_ == 5) {
1834           return (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_;
1835         }
1836         return com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance();
1837       } else {
1838         if (transformationCase_ == 5) {
1839           return infoTypeTransformationsBuilder_.getMessage();
1840         }
1841         return com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance();
1842       }
1843     }
1844     /**
1845      *
1846      *
1847      * <pre>
1848      * Treat the contents of the field as free text, and selectively
1849      * transform content that matches an `InfoType`.
1850      * </pre>
1851      *
1852      * <code>.google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5;</code>
1853      */
setInfoTypeTransformations( com.google.privacy.dlp.v2.InfoTypeTransformations value)1854     public Builder setInfoTypeTransformations(
1855         com.google.privacy.dlp.v2.InfoTypeTransformations value) {
1856       if (infoTypeTransformationsBuilder_ == null) {
1857         if (value == null) {
1858           throw new NullPointerException();
1859         }
1860         transformation_ = value;
1861         onChanged();
1862       } else {
1863         infoTypeTransformationsBuilder_.setMessage(value);
1864       }
1865       transformationCase_ = 5;
1866       return this;
1867     }
1868     /**
1869      *
1870      *
1871      * <pre>
1872      * Treat the contents of the field as free text, and selectively
1873      * transform content that matches an `InfoType`.
1874      * </pre>
1875      *
1876      * <code>.google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5;</code>
1877      */
setInfoTypeTransformations( com.google.privacy.dlp.v2.InfoTypeTransformations.Builder builderForValue)1878     public Builder setInfoTypeTransformations(
1879         com.google.privacy.dlp.v2.InfoTypeTransformations.Builder builderForValue) {
1880       if (infoTypeTransformationsBuilder_ == null) {
1881         transformation_ = builderForValue.build();
1882         onChanged();
1883       } else {
1884         infoTypeTransformationsBuilder_.setMessage(builderForValue.build());
1885       }
1886       transformationCase_ = 5;
1887       return this;
1888     }
1889     /**
1890      *
1891      *
1892      * <pre>
1893      * Treat the contents of the field as free text, and selectively
1894      * transform content that matches an `InfoType`.
1895      * </pre>
1896      *
1897      * <code>.google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5;</code>
1898      */
mergeInfoTypeTransformations( com.google.privacy.dlp.v2.InfoTypeTransformations value)1899     public Builder mergeInfoTypeTransformations(
1900         com.google.privacy.dlp.v2.InfoTypeTransformations value) {
1901       if (infoTypeTransformationsBuilder_ == null) {
1902         if (transformationCase_ == 5
1903             && transformation_
1904                 != com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance()) {
1905           transformation_ =
1906               com.google.privacy.dlp.v2.InfoTypeTransformations.newBuilder(
1907                       (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_)
1908                   .mergeFrom(value)
1909                   .buildPartial();
1910         } else {
1911           transformation_ = value;
1912         }
1913         onChanged();
1914       } else {
1915         if (transformationCase_ == 5) {
1916           infoTypeTransformationsBuilder_.mergeFrom(value);
1917         } else {
1918           infoTypeTransformationsBuilder_.setMessage(value);
1919         }
1920       }
1921       transformationCase_ = 5;
1922       return this;
1923     }
1924     /**
1925      *
1926      *
1927      * <pre>
1928      * Treat the contents of the field as free text, and selectively
1929      * transform content that matches an `InfoType`.
1930      * </pre>
1931      *
1932      * <code>.google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5;</code>
1933      */
clearInfoTypeTransformations()1934     public Builder clearInfoTypeTransformations() {
1935       if (infoTypeTransformationsBuilder_ == null) {
1936         if (transformationCase_ == 5) {
1937           transformationCase_ = 0;
1938           transformation_ = null;
1939           onChanged();
1940         }
1941       } else {
1942         if (transformationCase_ == 5) {
1943           transformationCase_ = 0;
1944           transformation_ = null;
1945         }
1946         infoTypeTransformationsBuilder_.clear();
1947       }
1948       return this;
1949     }
1950     /**
1951      *
1952      *
1953      * <pre>
1954      * Treat the contents of the field as free text, and selectively
1955      * transform content that matches an `InfoType`.
1956      * </pre>
1957      *
1958      * <code>.google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5;</code>
1959      */
1960     public com.google.privacy.dlp.v2.InfoTypeTransformations.Builder
getInfoTypeTransformationsBuilder()1961         getInfoTypeTransformationsBuilder() {
1962       return getInfoTypeTransformationsFieldBuilder().getBuilder();
1963     }
1964     /**
1965      *
1966      *
1967      * <pre>
1968      * Treat the contents of the field as free text, and selectively
1969      * transform content that matches an `InfoType`.
1970      * </pre>
1971      *
1972      * <code>.google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5;</code>
1973      */
1974     @java.lang.Override
1975     public com.google.privacy.dlp.v2.InfoTypeTransformationsOrBuilder
getInfoTypeTransformationsOrBuilder()1976         getInfoTypeTransformationsOrBuilder() {
1977       if ((transformationCase_ == 5) && (infoTypeTransformationsBuilder_ != null)) {
1978         return infoTypeTransformationsBuilder_.getMessageOrBuilder();
1979       } else {
1980         if (transformationCase_ == 5) {
1981           return (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_;
1982         }
1983         return com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance();
1984       }
1985     }
1986     /**
1987      *
1988      *
1989      * <pre>
1990      * Treat the contents of the field as free text, and selectively
1991      * transform content that matches an `InfoType`.
1992      * </pre>
1993      *
1994      * <code>.google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5;</code>
1995      */
1996     private com.google.protobuf.SingleFieldBuilderV3<
1997             com.google.privacy.dlp.v2.InfoTypeTransformations,
1998             com.google.privacy.dlp.v2.InfoTypeTransformations.Builder,
1999             com.google.privacy.dlp.v2.InfoTypeTransformationsOrBuilder>
getInfoTypeTransformationsFieldBuilder()2000         getInfoTypeTransformationsFieldBuilder() {
2001       if (infoTypeTransformationsBuilder_ == null) {
2002         if (!(transformationCase_ == 5)) {
2003           transformation_ = com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance();
2004         }
2005         infoTypeTransformationsBuilder_ =
2006             new com.google.protobuf.SingleFieldBuilderV3<
2007                 com.google.privacy.dlp.v2.InfoTypeTransformations,
2008                 com.google.privacy.dlp.v2.InfoTypeTransformations.Builder,
2009                 com.google.privacy.dlp.v2.InfoTypeTransformationsOrBuilder>(
2010                 (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_,
2011                 getParentForChildren(),
2012                 isClean());
2013         transformation_ = null;
2014       }
2015       transformationCase_ = 5;
2016       onChanged();
2017       return infoTypeTransformationsBuilder_;
2018     }
2019 
2020     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)2021     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
2022       return super.setUnknownFields(unknownFields);
2023     }
2024 
2025     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2026     public final Builder mergeUnknownFields(
2027         final com.google.protobuf.UnknownFieldSet unknownFields) {
2028       return super.mergeUnknownFields(unknownFields);
2029     }
2030 
2031     // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.FieldTransformation)
2032   }
2033 
2034   // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.FieldTransformation)
2035   private static final com.google.privacy.dlp.v2.FieldTransformation DEFAULT_INSTANCE;
2036 
2037   static {
2038     DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.FieldTransformation();
2039   }
2040 
getDefaultInstance()2041   public static com.google.privacy.dlp.v2.FieldTransformation getDefaultInstance() {
2042     return DEFAULT_INSTANCE;
2043   }
2044 
2045   private static final com.google.protobuf.Parser<FieldTransformation> PARSER =
2046       new com.google.protobuf.AbstractParser<FieldTransformation>() {
2047         @java.lang.Override
2048         public FieldTransformation parsePartialFrom(
2049             com.google.protobuf.CodedInputStream input,
2050             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2051             throws com.google.protobuf.InvalidProtocolBufferException {
2052           Builder builder = newBuilder();
2053           try {
2054             builder.mergeFrom(input, extensionRegistry);
2055           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2056             throw e.setUnfinishedMessage(builder.buildPartial());
2057           } catch (com.google.protobuf.UninitializedMessageException e) {
2058             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
2059           } catch (java.io.IOException e) {
2060             throw new com.google.protobuf.InvalidProtocolBufferException(e)
2061                 .setUnfinishedMessage(builder.buildPartial());
2062           }
2063           return builder.buildPartial();
2064         }
2065       };
2066 
parser()2067   public static com.google.protobuf.Parser<FieldTransformation> parser() {
2068     return PARSER;
2069   }
2070 
2071   @java.lang.Override
getParserForType()2072   public com.google.protobuf.Parser<FieldTransformation> getParserForType() {
2073     return PARSER;
2074   }
2075 
2076   @java.lang.Override
getDefaultInstanceForType()2077   public com.google.privacy.dlp.v2.FieldTransformation getDefaultInstanceForType() {
2078     return DEFAULT_INSTANCE;
2079   }
2080 }
2081