• 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  * Request to search for potentially sensitive info in an image and redact it
26  * by covering it with a colored rectangle.
27  * </pre>
28  *
29  * Protobuf type {@code google.privacy.dlp.v2.RedactImageRequest}
30  */
31 public final class RedactImageRequest extends com.google.protobuf.GeneratedMessageV3
32     implements
33     // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.RedactImageRequest)
34     RedactImageRequestOrBuilder {
35   private static final long serialVersionUID = 0L;
36   // Use RedactImageRequest.newBuilder() to construct.
RedactImageRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37   private RedactImageRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
38     super(builder);
39   }
40 
RedactImageRequest()41   private RedactImageRequest() {
42     parent_ = "";
43     locationId_ = "";
44     imageRedactionConfigs_ = java.util.Collections.emptyList();
45   }
46 
47   @java.lang.Override
48   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)49   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
50     return new RedactImageRequest();
51   }
52 
53   @java.lang.Override
getUnknownFields()54   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
55     return this.unknownFields;
56   }
57 
getDescriptor()58   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
59     return com.google.privacy.dlp.v2.DlpProto
60         .internal_static_google_privacy_dlp_v2_RedactImageRequest_descriptor;
61   }
62 
63   @java.lang.Override
64   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()65       internalGetFieldAccessorTable() {
66     return com.google.privacy.dlp.v2.DlpProto
67         .internal_static_google_privacy_dlp_v2_RedactImageRequest_fieldAccessorTable
68         .ensureFieldAccessorsInitialized(
69             com.google.privacy.dlp.v2.RedactImageRequest.class,
70             com.google.privacy.dlp.v2.RedactImageRequest.Builder.class);
71   }
72 
73   public interface ImageRedactionConfigOrBuilder
74       extends
75       // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig)
76       com.google.protobuf.MessageOrBuilder {
77 
78     /**
79      *
80      *
81      * <pre>
82      * Only one per info_type should be provided per request. If not
83      * specified, and redact_all_text is false, the DLP API will redact all
84      * text that it matches against all info_types that are found, but not
85      * specified in another ImageRedactionConfig.
86      * </pre>
87      *
88      * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
89      *
90      * @return Whether the infoType field is set.
91      */
hasInfoType()92     boolean hasInfoType();
93     /**
94      *
95      *
96      * <pre>
97      * Only one per info_type should be provided per request. If not
98      * specified, and redact_all_text is false, the DLP API will redact all
99      * text that it matches against all info_types that are found, but not
100      * specified in another ImageRedactionConfig.
101      * </pre>
102      *
103      * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
104      *
105      * @return The infoType.
106      */
getInfoType()107     com.google.privacy.dlp.v2.InfoType getInfoType();
108     /**
109      *
110      *
111      * <pre>
112      * Only one per info_type should be provided per request. If not
113      * specified, and redact_all_text is false, the DLP API will redact all
114      * text that it matches against all info_types that are found, but not
115      * specified in another ImageRedactionConfig.
116      * </pre>
117      *
118      * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
119      */
getInfoTypeOrBuilder()120     com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder();
121 
122     /**
123      *
124      *
125      * <pre>
126      * If true, all text found in the image, regardless whether it matches an
127      * info_type, is redacted. Only one should be provided.
128      * </pre>
129      *
130      * <code>bool redact_all_text = 2;</code>
131      *
132      * @return Whether the redactAllText field is set.
133      */
hasRedactAllText()134     boolean hasRedactAllText();
135     /**
136      *
137      *
138      * <pre>
139      * If true, all text found in the image, regardless whether it matches an
140      * info_type, is redacted. Only one should be provided.
141      * </pre>
142      *
143      * <code>bool redact_all_text = 2;</code>
144      *
145      * @return The redactAllText.
146      */
getRedactAllText()147     boolean getRedactAllText();
148 
149     /**
150      *
151      *
152      * <pre>
153      * The color to use when redacting content from an image. If not specified,
154      * the default is black.
155      * </pre>
156      *
157      * <code>.google.privacy.dlp.v2.Color redaction_color = 3;</code>
158      *
159      * @return Whether the redactionColor field is set.
160      */
hasRedactionColor()161     boolean hasRedactionColor();
162     /**
163      *
164      *
165      * <pre>
166      * The color to use when redacting content from an image. If not specified,
167      * the default is black.
168      * </pre>
169      *
170      * <code>.google.privacy.dlp.v2.Color redaction_color = 3;</code>
171      *
172      * @return The redactionColor.
173      */
getRedactionColor()174     com.google.privacy.dlp.v2.Color getRedactionColor();
175     /**
176      *
177      *
178      * <pre>
179      * The color to use when redacting content from an image. If not specified,
180      * the default is black.
181      * </pre>
182      *
183      * <code>.google.privacy.dlp.v2.Color redaction_color = 3;</code>
184      */
getRedactionColorOrBuilder()185     com.google.privacy.dlp.v2.ColorOrBuilder getRedactionColorOrBuilder();
186 
187     public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.TargetCase
getTargetCase()188         getTargetCase();
189   }
190   /**
191    *
192    *
193    * <pre>
194    * Configuration for determining how redaction of images should occur.
195    * </pre>
196    *
197    * Protobuf type {@code google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig}
198    */
199   public static final class ImageRedactionConfig extends com.google.protobuf.GeneratedMessageV3
200       implements
201       // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig)
202       ImageRedactionConfigOrBuilder {
203     private static final long serialVersionUID = 0L;
204     // Use ImageRedactionConfig.newBuilder() to construct.
ImageRedactionConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)205     private ImageRedactionConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
206       super(builder);
207     }
208 
ImageRedactionConfig()209     private ImageRedactionConfig() {}
210 
211     @java.lang.Override
212     @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)213     protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
214       return new ImageRedactionConfig();
215     }
216 
217     @java.lang.Override
getUnknownFields()218     public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
219       return this.unknownFields;
220     }
221 
getDescriptor()222     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
223       return com.google.privacy.dlp.v2.DlpProto
224           .internal_static_google_privacy_dlp_v2_RedactImageRequest_ImageRedactionConfig_descriptor;
225     }
226 
227     @java.lang.Override
228     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()229         internalGetFieldAccessorTable() {
230       return com.google.privacy.dlp.v2.DlpProto
231           .internal_static_google_privacy_dlp_v2_RedactImageRequest_ImageRedactionConfig_fieldAccessorTable
232           .ensureFieldAccessorsInitialized(
233               com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.class,
234               com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder.class);
235     }
236 
237     private int targetCase_ = 0;
238     private java.lang.Object target_;
239 
240     public enum TargetCase
241         implements
242             com.google.protobuf.Internal.EnumLite,
243             com.google.protobuf.AbstractMessage.InternalOneOfEnum {
244       INFO_TYPE(1),
245       REDACT_ALL_TEXT(2),
246       TARGET_NOT_SET(0);
247       private final int value;
248 
TargetCase(int value)249       private TargetCase(int value) {
250         this.value = value;
251       }
252       /**
253        * @param value The number of the enum to look for.
254        * @return The enum associated with the given number.
255        * @deprecated Use {@link #forNumber(int)} instead.
256        */
257       @java.lang.Deprecated
valueOf(int value)258       public static TargetCase valueOf(int value) {
259         return forNumber(value);
260       }
261 
forNumber(int value)262       public static TargetCase forNumber(int value) {
263         switch (value) {
264           case 1:
265             return INFO_TYPE;
266           case 2:
267             return REDACT_ALL_TEXT;
268           case 0:
269             return TARGET_NOT_SET;
270           default:
271             return null;
272         }
273       }
274 
getNumber()275       public int getNumber() {
276         return this.value;
277       }
278     };
279 
getTargetCase()280     public TargetCase getTargetCase() {
281       return TargetCase.forNumber(targetCase_);
282     }
283 
284     public static final int INFO_TYPE_FIELD_NUMBER = 1;
285     /**
286      *
287      *
288      * <pre>
289      * Only one per info_type should be provided per request. If not
290      * specified, and redact_all_text is false, the DLP API will redact all
291      * text that it matches against all info_types that are found, but not
292      * specified in another ImageRedactionConfig.
293      * </pre>
294      *
295      * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
296      *
297      * @return Whether the infoType field is set.
298      */
299     @java.lang.Override
hasInfoType()300     public boolean hasInfoType() {
301       return targetCase_ == 1;
302     }
303     /**
304      *
305      *
306      * <pre>
307      * Only one per info_type should be provided per request. If not
308      * specified, and redact_all_text is false, the DLP API will redact all
309      * text that it matches against all info_types that are found, but not
310      * specified in another ImageRedactionConfig.
311      * </pre>
312      *
313      * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
314      *
315      * @return The infoType.
316      */
317     @java.lang.Override
getInfoType()318     public com.google.privacy.dlp.v2.InfoType getInfoType() {
319       if (targetCase_ == 1) {
320         return (com.google.privacy.dlp.v2.InfoType) target_;
321       }
322       return com.google.privacy.dlp.v2.InfoType.getDefaultInstance();
323     }
324     /**
325      *
326      *
327      * <pre>
328      * Only one per info_type should be provided per request. If not
329      * specified, and redact_all_text is false, the DLP API will redact all
330      * text that it matches against all info_types that are found, but not
331      * specified in another ImageRedactionConfig.
332      * </pre>
333      *
334      * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
335      */
336     @java.lang.Override
getInfoTypeOrBuilder()337     public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() {
338       if (targetCase_ == 1) {
339         return (com.google.privacy.dlp.v2.InfoType) target_;
340       }
341       return com.google.privacy.dlp.v2.InfoType.getDefaultInstance();
342     }
343 
344     public static final int REDACT_ALL_TEXT_FIELD_NUMBER = 2;
345     /**
346      *
347      *
348      * <pre>
349      * If true, all text found in the image, regardless whether it matches an
350      * info_type, is redacted. Only one should be provided.
351      * </pre>
352      *
353      * <code>bool redact_all_text = 2;</code>
354      *
355      * @return Whether the redactAllText field is set.
356      */
357     @java.lang.Override
hasRedactAllText()358     public boolean hasRedactAllText() {
359       return targetCase_ == 2;
360     }
361     /**
362      *
363      *
364      * <pre>
365      * If true, all text found in the image, regardless whether it matches an
366      * info_type, is redacted. Only one should be provided.
367      * </pre>
368      *
369      * <code>bool redact_all_text = 2;</code>
370      *
371      * @return The redactAllText.
372      */
373     @java.lang.Override
getRedactAllText()374     public boolean getRedactAllText() {
375       if (targetCase_ == 2) {
376         return (java.lang.Boolean) target_;
377       }
378       return false;
379     }
380 
381     public static final int REDACTION_COLOR_FIELD_NUMBER = 3;
382     private com.google.privacy.dlp.v2.Color redactionColor_;
383     /**
384      *
385      *
386      * <pre>
387      * The color to use when redacting content from an image. If not specified,
388      * the default is black.
389      * </pre>
390      *
391      * <code>.google.privacy.dlp.v2.Color redaction_color = 3;</code>
392      *
393      * @return Whether the redactionColor field is set.
394      */
395     @java.lang.Override
hasRedactionColor()396     public boolean hasRedactionColor() {
397       return redactionColor_ != null;
398     }
399     /**
400      *
401      *
402      * <pre>
403      * The color to use when redacting content from an image. If not specified,
404      * the default is black.
405      * </pre>
406      *
407      * <code>.google.privacy.dlp.v2.Color redaction_color = 3;</code>
408      *
409      * @return The redactionColor.
410      */
411     @java.lang.Override
getRedactionColor()412     public com.google.privacy.dlp.v2.Color getRedactionColor() {
413       return redactionColor_ == null
414           ? com.google.privacy.dlp.v2.Color.getDefaultInstance()
415           : redactionColor_;
416     }
417     /**
418      *
419      *
420      * <pre>
421      * The color to use when redacting content from an image. If not specified,
422      * the default is black.
423      * </pre>
424      *
425      * <code>.google.privacy.dlp.v2.Color redaction_color = 3;</code>
426      */
427     @java.lang.Override
getRedactionColorOrBuilder()428     public com.google.privacy.dlp.v2.ColorOrBuilder getRedactionColorOrBuilder() {
429       return redactionColor_ == null
430           ? com.google.privacy.dlp.v2.Color.getDefaultInstance()
431           : redactionColor_;
432     }
433 
434     private byte memoizedIsInitialized = -1;
435 
436     @java.lang.Override
isInitialized()437     public final boolean isInitialized() {
438       byte isInitialized = memoizedIsInitialized;
439       if (isInitialized == 1) return true;
440       if (isInitialized == 0) return false;
441 
442       memoizedIsInitialized = 1;
443       return true;
444     }
445 
446     @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)447     public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
448       if (targetCase_ == 1) {
449         output.writeMessage(1, (com.google.privacy.dlp.v2.InfoType) target_);
450       }
451       if (targetCase_ == 2) {
452         output.writeBool(2, (boolean) ((java.lang.Boolean) target_));
453       }
454       if (redactionColor_ != null) {
455         output.writeMessage(3, getRedactionColor());
456       }
457       getUnknownFields().writeTo(output);
458     }
459 
460     @java.lang.Override
getSerializedSize()461     public int getSerializedSize() {
462       int size = memoizedSize;
463       if (size != -1) return size;
464 
465       size = 0;
466       if (targetCase_ == 1) {
467         size +=
468             com.google.protobuf.CodedOutputStream.computeMessageSize(
469                 1, (com.google.privacy.dlp.v2.InfoType) target_);
470       }
471       if (targetCase_ == 2) {
472         size +=
473             com.google.protobuf.CodedOutputStream.computeBoolSize(
474                 2, (boolean) ((java.lang.Boolean) target_));
475       }
476       if (redactionColor_ != null) {
477         size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getRedactionColor());
478       }
479       size += getUnknownFields().getSerializedSize();
480       memoizedSize = size;
481       return size;
482     }
483 
484     @java.lang.Override
equals(final java.lang.Object obj)485     public boolean equals(final java.lang.Object obj) {
486       if (obj == this) {
487         return true;
488       }
489       if (!(obj instanceof com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig)) {
490         return super.equals(obj);
491       }
492       com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig other =
493           (com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig) obj;
494 
495       if (hasRedactionColor() != other.hasRedactionColor()) return false;
496       if (hasRedactionColor()) {
497         if (!getRedactionColor().equals(other.getRedactionColor())) return false;
498       }
499       if (!getTargetCase().equals(other.getTargetCase())) return false;
500       switch (targetCase_) {
501         case 1:
502           if (!getInfoType().equals(other.getInfoType())) return false;
503           break;
504         case 2:
505           if (getRedactAllText() != other.getRedactAllText()) return false;
506           break;
507         case 0:
508         default:
509       }
510       if (!getUnknownFields().equals(other.getUnknownFields())) return false;
511       return true;
512     }
513 
514     @java.lang.Override
hashCode()515     public int hashCode() {
516       if (memoizedHashCode != 0) {
517         return memoizedHashCode;
518       }
519       int hash = 41;
520       hash = (19 * hash) + getDescriptor().hashCode();
521       if (hasRedactionColor()) {
522         hash = (37 * hash) + REDACTION_COLOR_FIELD_NUMBER;
523         hash = (53 * hash) + getRedactionColor().hashCode();
524       }
525       switch (targetCase_) {
526         case 1:
527           hash = (37 * hash) + INFO_TYPE_FIELD_NUMBER;
528           hash = (53 * hash) + getInfoType().hashCode();
529           break;
530         case 2:
531           hash = (37 * hash) + REDACT_ALL_TEXT_FIELD_NUMBER;
532           hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRedactAllText());
533           break;
534         case 0:
535         default:
536       }
537       hash = (29 * hash) + getUnknownFields().hashCode();
538       memoizedHashCode = hash;
539       return hash;
540     }
541 
parseFrom( java.nio.ByteBuffer data)542     public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseFrom(
543         java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
544       return PARSER.parseFrom(data);
545     }
546 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)547     public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseFrom(
548         java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
549         throws com.google.protobuf.InvalidProtocolBufferException {
550       return PARSER.parseFrom(data, extensionRegistry);
551     }
552 
parseFrom( com.google.protobuf.ByteString data)553     public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseFrom(
554         com.google.protobuf.ByteString data)
555         throws com.google.protobuf.InvalidProtocolBufferException {
556       return PARSER.parseFrom(data);
557     }
558 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)559     public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseFrom(
560         com.google.protobuf.ByteString data,
561         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
562         throws com.google.protobuf.InvalidProtocolBufferException {
563       return PARSER.parseFrom(data, extensionRegistry);
564     }
565 
parseFrom( byte[] data)566     public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseFrom(
567         byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
568       return PARSER.parseFrom(data);
569     }
570 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)571     public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseFrom(
572         byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
573         throws com.google.protobuf.InvalidProtocolBufferException {
574       return PARSER.parseFrom(data, extensionRegistry);
575     }
576 
parseFrom( java.io.InputStream input)577     public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseFrom(
578         java.io.InputStream input) throws java.io.IOException {
579       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
580     }
581 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)582     public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseFrom(
583         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
584         throws java.io.IOException {
585       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
586           PARSER, input, extensionRegistry);
587     }
588 
589     public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig
parseDelimitedFrom(java.io.InputStream input)590         parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
591       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
592     }
593 
594     public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)595         parseDelimitedFrom(
596             java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
597             throws java.io.IOException {
598       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
599           PARSER, input, extensionRegistry);
600     }
601 
parseFrom( com.google.protobuf.CodedInputStream input)602     public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseFrom(
603         com.google.protobuf.CodedInputStream input) throws java.io.IOException {
604       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
605     }
606 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)607     public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseFrom(
608         com.google.protobuf.CodedInputStream input,
609         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
610         throws java.io.IOException {
611       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
612           PARSER, input, extensionRegistry);
613     }
614 
615     @java.lang.Override
newBuilderForType()616     public Builder newBuilderForType() {
617       return newBuilder();
618     }
619 
newBuilder()620     public static Builder newBuilder() {
621       return DEFAULT_INSTANCE.toBuilder();
622     }
623 
newBuilder( com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig prototype)624     public static Builder newBuilder(
625         com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig prototype) {
626       return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
627     }
628 
629     @java.lang.Override
toBuilder()630     public Builder toBuilder() {
631       return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
632     }
633 
634     @java.lang.Override
newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)635     protected Builder newBuilderForType(
636         com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
637       Builder builder = new Builder(parent);
638       return builder;
639     }
640     /**
641      *
642      *
643      * <pre>
644      * Configuration for determining how redaction of images should occur.
645      * </pre>
646      *
647      * Protobuf type {@code google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig}
648      */
649     public static final class Builder
650         extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
651         implements
652         // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig)
653         com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfigOrBuilder {
getDescriptor()654       public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
655         return com.google.privacy.dlp.v2.DlpProto
656             .internal_static_google_privacy_dlp_v2_RedactImageRequest_ImageRedactionConfig_descriptor;
657       }
658 
659       @java.lang.Override
660       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()661           internalGetFieldAccessorTable() {
662         return com.google.privacy.dlp.v2.DlpProto
663             .internal_static_google_privacy_dlp_v2_RedactImageRequest_ImageRedactionConfig_fieldAccessorTable
664             .ensureFieldAccessorsInitialized(
665                 com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.class,
666                 com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder.class);
667       }
668 
669       // Construct using
670       // com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.newBuilder()
Builder()671       private Builder() {}
672 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)673       private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
674         super(parent);
675       }
676 
677       @java.lang.Override
clear()678       public Builder clear() {
679         super.clear();
680         bitField0_ = 0;
681         if (infoTypeBuilder_ != null) {
682           infoTypeBuilder_.clear();
683         }
684         redactionColor_ = null;
685         if (redactionColorBuilder_ != null) {
686           redactionColorBuilder_.dispose();
687           redactionColorBuilder_ = null;
688         }
689         targetCase_ = 0;
690         target_ = null;
691         return this;
692       }
693 
694       @java.lang.Override
getDescriptorForType()695       public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
696         return com.google.privacy.dlp.v2.DlpProto
697             .internal_static_google_privacy_dlp_v2_RedactImageRequest_ImageRedactionConfig_descriptor;
698       }
699 
700       @java.lang.Override
701       public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig
getDefaultInstanceForType()702           getDefaultInstanceForType() {
703         return com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig
704             .getDefaultInstance();
705       }
706 
707       @java.lang.Override
build()708       public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig build() {
709         com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig result = buildPartial();
710         if (!result.isInitialized()) {
711           throw newUninitializedMessageException(result);
712         }
713         return result;
714       }
715 
716       @java.lang.Override
buildPartial()717       public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig buildPartial() {
718         com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig result =
719             new com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig(this);
720         if (bitField0_ != 0) {
721           buildPartial0(result);
722         }
723         buildPartialOneofs(result);
724         onBuilt();
725         return result;
726       }
727 
buildPartial0( com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig result)728       private void buildPartial0(
729           com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig result) {
730         int from_bitField0_ = bitField0_;
731         if (((from_bitField0_ & 0x00000004) != 0)) {
732           result.redactionColor_ =
733               redactionColorBuilder_ == null ? redactionColor_ : redactionColorBuilder_.build();
734         }
735       }
736 
buildPartialOneofs( com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig result)737       private void buildPartialOneofs(
738           com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig result) {
739         result.targetCase_ = targetCase_;
740         result.target_ = this.target_;
741         if (targetCase_ == 1 && infoTypeBuilder_ != null) {
742           result.target_ = infoTypeBuilder_.build();
743         }
744       }
745 
746       @java.lang.Override
clone()747       public Builder clone() {
748         return super.clone();
749       }
750 
751       @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)752       public Builder setField(
753           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
754         return super.setField(field, value);
755       }
756 
757       @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)758       public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
759         return super.clearField(field);
760       }
761 
762       @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)763       public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
764         return super.clearOneof(oneof);
765       }
766 
767       @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)768       public Builder setRepeatedField(
769           com.google.protobuf.Descriptors.FieldDescriptor field,
770           int index,
771           java.lang.Object value) {
772         return super.setRepeatedField(field, index, value);
773       }
774 
775       @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)776       public Builder addRepeatedField(
777           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
778         return super.addRepeatedField(field, value);
779       }
780 
781       @java.lang.Override
mergeFrom(com.google.protobuf.Message other)782       public Builder mergeFrom(com.google.protobuf.Message other) {
783         if (other instanceof com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig) {
784           return mergeFrom(
785               (com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig) other);
786         } else {
787           super.mergeFrom(other);
788           return this;
789         }
790       }
791 
mergeFrom( com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig other)792       public Builder mergeFrom(
793           com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig other) {
794         if (other
795             == com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig
796                 .getDefaultInstance()) return this;
797         if (other.hasRedactionColor()) {
798           mergeRedactionColor(other.getRedactionColor());
799         }
800         switch (other.getTargetCase()) {
801           case INFO_TYPE:
802             {
803               mergeInfoType(other.getInfoType());
804               break;
805             }
806           case REDACT_ALL_TEXT:
807             {
808               setRedactAllText(other.getRedactAllText());
809               break;
810             }
811           case TARGET_NOT_SET:
812             {
813               break;
814             }
815         }
816         this.mergeUnknownFields(other.getUnknownFields());
817         onChanged();
818         return this;
819       }
820 
821       @java.lang.Override
isInitialized()822       public final boolean isInitialized() {
823         return true;
824       }
825 
826       @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)827       public Builder mergeFrom(
828           com.google.protobuf.CodedInputStream input,
829           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
830           throws java.io.IOException {
831         if (extensionRegistry == null) {
832           throw new java.lang.NullPointerException();
833         }
834         try {
835           boolean done = false;
836           while (!done) {
837             int tag = input.readTag();
838             switch (tag) {
839               case 0:
840                 done = true;
841                 break;
842               case 10:
843                 {
844                   input.readMessage(getInfoTypeFieldBuilder().getBuilder(), extensionRegistry);
845                   targetCase_ = 1;
846                   break;
847                 } // case 10
848               case 16:
849                 {
850                   target_ = input.readBool();
851                   targetCase_ = 2;
852                   break;
853                 } // case 16
854               case 26:
855                 {
856                   input.readMessage(
857                       getRedactionColorFieldBuilder().getBuilder(), extensionRegistry);
858                   bitField0_ |= 0x00000004;
859                   break;
860                 } // case 26
861               default:
862                 {
863                   if (!super.parseUnknownField(input, extensionRegistry, tag)) {
864                     done = true; // was an endgroup tag
865                   }
866                   break;
867                 } // default:
868             } // switch (tag)
869           } // while (!done)
870         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
871           throw e.unwrapIOException();
872         } finally {
873           onChanged();
874         } // finally
875         return this;
876       }
877 
878       private int targetCase_ = 0;
879       private java.lang.Object target_;
880 
getTargetCase()881       public TargetCase getTargetCase() {
882         return TargetCase.forNumber(targetCase_);
883       }
884 
clearTarget()885       public Builder clearTarget() {
886         targetCase_ = 0;
887         target_ = null;
888         onChanged();
889         return this;
890       }
891 
892       private int bitField0_;
893 
894       private com.google.protobuf.SingleFieldBuilderV3<
895               com.google.privacy.dlp.v2.InfoType,
896               com.google.privacy.dlp.v2.InfoType.Builder,
897               com.google.privacy.dlp.v2.InfoTypeOrBuilder>
898           infoTypeBuilder_;
899       /**
900        *
901        *
902        * <pre>
903        * Only one per info_type should be provided per request. If not
904        * specified, and redact_all_text is false, the DLP API will redact all
905        * text that it matches against all info_types that are found, but not
906        * specified in another ImageRedactionConfig.
907        * </pre>
908        *
909        * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
910        *
911        * @return Whether the infoType field is set.
912        */
913       @java.lang.Override
hasInfoType()914       public boolean hasInfoType() {
915         return targetCase_ == 1;
916       }
917       /**
918        *
919        *
920        * <pre>
921        * Only one per info_type should be provided per request. If not
922        * specified, and redact_all_text is false, the DLP API will redact all
923        * text that it matches against all info_types that are found, but not
924        * specified in another ImageRedactionConfig.
925        * </pre>
926        *
927        * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
928        *
929        * @return The infoType.
930        */
931       @java.lang.Override
getInfoType()932       public com.google.privacy.dlp.v2.InfoType getInfoType() {
933         if (infoTypeBuilder_ == null) {
934           if (targetCase_ == 1) {
935             return (com.google.privacy.dlp.v2.InfoType) target_;
936           }
937           return com.google.privacy.dlp.v2.InfoType.getDefaultInstance();
938         } else {
939           if (targetCase_ == 1) {
940             return infoTypeBuilder_.getMessage();
941           }
942           return com.google.privacy.dlp.v2.InfoType.getDefaultInstance();
943         }
944       }
945       /**
946        *
947        *
948        * <pre>
949        * Only one per info_type should be provided per request. If not
950        * specified, and redact_all_text is false, the DLP API will redact all
951        * text that it matches against all info_types that are found, but not
952        * specified in another ImageRedactionConfig.
953        * </pre>
954        *
955        * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
956        */
setInfoType(com.google.privacy.dlp.v2.InfoType value)957       public Builder setInfoType(com.google.privacy.dlp.v2.InfoType value) {
958         if (infoTypeBuilder_ == null) {
959           if (value == null) {
960             throw new NullPointerException();
961           }
962           target_ = value;
963           onChanged();
964         } else {
965           infoTypeBuilder_.setMessage(value);
966         }
967         targetCase_ = 1;
968         return this;
969       }
970       /**
971        *
972        *
973        * <pre>
974        * Only one per info_type should be provided per request. If not
975        * specified, and redact_all_text is false, the DLP API will redact all
976        * text that it matches against all info_types that are found, but not
977        * specified in another ImageRedactionConfig.
978        * </pre>
979        *
980        * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
981        */
setInfoType(com.google.privacy.dlp.v2.InfoType.Builder builderForValue)982       public Builder setInfoType(com.google.privacy.dlp.v2.InfoType.Builder builderForValue) {
983         if (infoTypeBuilder_ == null) {
984           target_ = builderForValue.build();
985           onChanged();
986         } else {
987           infoTypeBuilder_.setMessage(builderForValue.build());
988         }
989         targetCase_ = 1;
990         return this;
991       }
992       /**
993        *
994        *
995        * <pre>
996        * Only one per info_type should be provided per request. If not
997        * specified, and redact_all_text is false, the DLP API will redact all
998        * text that it matches against all info_types that are found, but not
999        * specified in another ImageRedactionConfig.
1000        * </pre>
1001        *
1002        * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
1003        */
mergeInfoType(com.google.privacy.dlp.v2.InfoType value)1004       public Builder mergeInfoType(com.google.privacy.dlp.v2.InfoType value) {
1005         if (infoTypeBuilder_ == null) {
1006           if (targetCase_ == 1
1007               && target_ != com.google.privacy.dlp.v2.InfoType.getDefaultInstance()) {
1008             target_ =
1009                 com.google.privacy.dlp.v2.InfoType.newBuilder(
1010                         (com.google.privacy.dlp.v2.InfoType) target_)
1011                     .mergeFrom(value)
1012                     .buildPartial();
1013           } else {
1014             target_ = value;
1015           }
1016           onChanged();
1017         } else {
1018           if (targetCase_ == 1) {
1019             infoTypeBuilder_.mergeFrom(value);
1020           } else {
1021             infoTypeBuilder_.setMessage(value);
1022           }
1023         }
1024         targetCase_ = 1;
1025         return this;
1026       }
1027       /**
1028        *
1029        *
1030        * <pre>
1031        * Only one per info_type should be provided per request. If not
1032        * specified, and redact_all_text is false, the DLP API will redact all
1033        * text that it matches against all info_types that are found, but not
1034        * specified in another ImageRedactionConfig.
1035        * </pre>
1036        *
1037        * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
1038        */
clearInfoType()1039       public Builder clearInfoType() {
1040         if (infoTypeBuilder_ == null) {
1041           if (targetCase_ == 1) {
1042             targetCase_ = 0;
1043             target_ = null;
1044             onChanged();
1045           }
1046         } else {
1047           if (targetCase_ == 1) {
1048             targetCase_ = 0;
1049             target_ = null;
1050           }
1051           infoTypeBuilder_.clear();
1052         }
1053         return this;
1054       }
1055       /**
1056        *
1057        *
1058        * <pre>
1059        * Only one per info_type should be provided per request. If not
1060        * specified, and redact_all_text is false, the DLP API will redact all
1061        * text that it matches against all info_types that are found, but not
1062        * specified in another ImageRedactionConfig.
1063        * </pre>
1064        *
1065        * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
1066        */
getInfoTypeBuilder()1067       public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypeBuilder() {
1068         return getInfoTypeFieldBuilder().getBuilder();
1069       }
1070       /**
1071        *
1072        *
1073        * <pre>
1074        * Only one per info_type should be provided per request. If not
1075        * specified, and redact_all_text is false, the DLP API will redact all
1076        * text that it matches against all info_types that are found, but not
1077        * specified in another ImageRedactionConfig.
1078        * </pre>
1079        *
1080        * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
1081        */
1082       @java.lang.Override
getInfoTypeOrBuilder()1083       public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() {
1084         if ((targetCase_ == 1) && (infoTypeBuilder_ != null)) {
1085           return infoTypeBuilder_.getMessageOrBuilder();
1086         } else {
1087           if (targetCase_ == 1) {
1088             return (com.google.privacy.dlp.v2.InfoType) target_;
1089           }
1090           return com.google.privacy.dlp.v2.InfoType.getDefaultInstance();
1091         }
1092       }
1093       /**
1094        *
1095        *
1096        * <pre>
1097        * Only one per info_type should be provided per request. If not
1098        * specified, and redact_all_text is false, the DLP API will redact all
1099        * text that it matches against all info_types that are found, but not
1100        * specified in another ImageRedactionConfig.
1101        * </pre>
1102        *
1103        * <code>.google.privacy.dlp.v2.InfoType info_type = 1;</code>
1104        */
1105       private com.google.protobuf.SingleFieldBuilderV3<
1106               com.google.privacy.dlp.v2.InfoType,
1107               com.google.privacy.dlp.v2.InfoType.Builder,
1108               com.google.privacy.dlp.v2.InfoTypeOrBuilder>
getInfoTypeFieldBuilder()1109           getInfoTypeFieldBuilder() {
1110         if (infoTypeBuilder_ == null) {
1111           if (!(targetCase_ == 1)) {
1112             target_ = com.google.privacy.dlp.v2.InfoType.getDefaultInstance();
1113           }
1114           infoTypeBuilder_ =
1115               new com.google.protobuf.SingleFieldBuilderV3<
1116                   com.google.privacy.dlp.v2.InfoType,
1117                   com.google.privacy.dlp.v2.InfoType.Builder,
1118                   com.google.privacy.dlp.v2.InfoTypeOrBuilder>(
1119                   (com.google.privacy.dlp.v2.InfoType) target_, getParentForChildren(), isClean());
1120           target_ = null;
1121         }
1122         targetCase_ = 1;
1123         onChanged();
1124         return infoTypeBuilder_;
1125       }
1126 
1127       /**
1128        *
1129        *
1130        * <pre>
1131        * If true, all text found in the image, regardless whether it matches an
1132        * info_type, is redacted. Only one should be provided.
1133        * </pre>
1134        *
1135        * <code>bool redact_all_text = 2;</code>
1136        *
1137        * @return Whether the redactAllText field is set.
1138        */
hasRedactAllText()1139       public boolean hasRedactAllText() {
1140         return targetCase_ == 2;
1141       }
1142       /**
1143        *
1144        *
1145        * <pre>
1146        * If true, all text found in the image, regardless whether it matches an
1147        * info_type, is redacted. Only one should be provided.
1148        * </pre>
1149        *
1150        * <code>bool redact_all_text = 2;</code>
1151        *
1152        * @return The redactAllText.
1153        */
getRedactAllText()1154       public boolean getRedactAllText() {
1155         if (targetCase_ == 2) {
1156           return (java.lang.Boolean) target_;
1157         }
1158         return false;
1159       }
1160       /**
1161        *
1162        *
1163        * <pre>
1164        * If true, all text found in the image, regardless whether it matches an
1165        * info_type, is redacted. Only one should be provided.
1166        * </pre>
1167        *
1168        * <code>bool redact_all_text = 2;</code>
1169        *
1170        * @param value The redactAllText to set.
1171        * @return This builder for chaining.
1172        */
setRedactAllText(boolean value)1173       public Builder setRedactAllText(boolean value) {
1174 
1175         targetCase_ = 2;
1176         target_ = value;
1177         onChanged();
1178         return this;
1179       }
1180       /**
1181        *
1182        *
1183        * <pre>
1184        * If true, all text found in the image, regardless whether it matches an
1185        * info_type, is redacted. Only one should be provided.
1186        * </pre>
1187        *
1188        * <code>bool redact_all_text = 2;</code>
1189        *
1190        * @return This builder for chaining.
1191        */
clearRedactAllText()1192       public Builder clearRedactAllText() {
1193         if (targetCase_ == 2) {
1194           targetCase_ = 0;
1195           target_ = null;
1196           onChanged();
1197         }
1198         return this;
1199       }
1200 
1201       private com.google.privacy.dlp.v2.Color redactionColor_;
1202       private com.google.protobuf.SingleFieldBuilderV3<
1203               com.google.privacy.dlp.v2.Color,
1204               com.google.privacy.dlp.v2.Color.Builder,
1205               com.google.privacy.dlp.v2.ColorOrBuilder>
1206           redactionColorBuilder_;
1207       /**
1208        *
1209        *
1210        * <pre>
1211        * The color to use when redacting content from an image. If not specified,
1212        * the default is black.
1213        * </pre>
1214        *
1215        * <code>.google.privacy.dlp.v2.Color redaction_color = 3;</code>
1216        *
1217        * @return Whether the redactionColor field is set.
1218        */
hasRedactionColor()1219       public boolean hasRedactionColor() {
1220         return ((bitField0_ & 0x00000004) != 0);
1221       }
1222       /**
1223        *
1224        *
1225        * <pre>
1226        * The color to use when redacting content from an image. If not specified,
1227        * the default is black.
1228        * </pre>
1229        *
1230        * <code>.google.privacy.dlp.v2.Color redaction_color = 3;</code>
1231        *
1232        * @return The redactionColor.
1233        */
getRedactionColor()1234       public com.google.privacy.dlp.v2.Color getRedactionColor() {
1235         if (redactionColorBuilder_ == null) {
1236           return redactionColor_ == null
1237               ? com.google.privacy.dlp.v2.Color.getDefaultInstance()
1238               : redactionColor_;
1239         } else {
1240           return redactionColorBuilder_.getMessage();
1241         }
1242       }
1243       /**
1244        *
1245        *
1246        * <pre>
1247        * The color to use when redacting content from an image. If not specified,
1248        * the default is black.
1249        * </pre>
1250        *
1251        * <code>.google.privacy.dlp.v2.Color redaction_color = 3;</code>
1252        */
setRedactionColor(com.google.privacy.dlp.v2.Color value)1253       public Builder setRedactionColor(com.google.privacy.dlp.v2.Color value) {
1254         if (redactionColorBuilder_ == null) {
1255           if (value == null) {
1256             throw new NullPointerException();
1257           }
1258           redactionColor_ = value;
1259         } else {
1260           redactionColorBuilder_.setMessage(value);
1261         }
1262         bitField0_ |= 0x00000004;
1263         onChanged();
1264         return this;
1265       }
1266       /**
1267        *
1268        *
1269        * <pre>
1270        * The color to use when redacting content from an image. If not specified,
1271        * the default is black.
1272        * </pre>
1273        *
1274        * <code>.google.privacy.dlp.v2.Color redaction_color = 3;</code>
1275        */
setRedactionColor(com.google.privacy.dlp.v2.Color.Builder builderForValue)1276       public Builder setRedactionColor(com.google.privacy.dlp.v2.Color.Builder builderForValue) {
1277         if (redactionColorBuilder_ == null) {
1278           redactionColor_ = builderForValue.build();
1279         } else {
1280           redactionColorBuilder_.setMessage(builderForValue.build());
1281         }
1282         bitField0_ |= 0x00000004;
1283         onChanged();
1284         return this;
1285       }
1286       /**
1287        *
1288        *
1289        * <pre>
1290        * The color to use when redacting content from an image. If not specified,
1291        * the default is black.
1292        * </pre>
1293        *
1294        * <code>.google.privacy.dlp.v2.Color redaction_color = 3;</code>
1295        */
mergeRedactionColor(com.google.privacy.dlp.v2.Color value)1296       public Builder mergeRedactionColor(com.google.privacy.dlp.v2.Color value) {
1297         if (redactionColorBuilder_ == null) {
1298           if (((bitField0_ & 0x00000004) != 0)
1299               && redactionColor_ != null
1300               && redactionColor_ != com.google.privacy.dlp.v2.Color.getDefaultInstance()) {
1301             getRedactionColorBuilder().mergeFrom(value);
1302           } else {
1303             redactionColor_ = value;
1304           }
1305         } else {
1306           redactionColorBuilder_.mergeFrom(value);
1307         }
1308         bitField0_ |= 0x00000004;
1309         onChanged();
1310         return this;
1311       }
1312       /**
1313        *
1314        *
1315        * <pre>
1316        * The color to use when redacting content from an image. If not specified,
1317        * the default is black.
1318        * </pre>
1319        *
1320        * <code>.google.privacy.dlp.v2.Color redaction_color = 3;</code>
1321        */
clearRedactionColor()1322       public Builder clearRedactionColor() {
1323         bitField0_ = (bitField0_ & ~0x00000004);
1324         redactionColor_ = null;
1325         if (redactionColorBuilder_ != null) {
1326           redactionColorBuilder_.dispose();
1327           redactionColorBuilder_ = null;
1328         }
1329         onChanged();
1330         return this;
1331       }
1332       /**
1333        *
1334        *
1335        * <pre>
1336        * The color to use when redacting content from an image. If not specified,
1337        * the default is black.
1338        * </pre>
1339        *
1340        * <code>.google.privacy.dlp.v2.Color redaction_color = 3;</code>
1341        */
getRedactionColorBuilder()1342       public com.google.privacy.dlp.v2.Color.Builder getRedactionColorBuilder() {
1343         bitField0_ |= 0x00000004;
1344         onChanged();
1345         return getRedactionColorFieldBuilder().getBuilder();
1346       }
1347       /**
1348        *
1349        *
1350        * <pre>
1351        * The color to use when redacting content from an image. If not specified,
1352        * the default is black.
1353        * </pre>
1354        *
1355        * <code>.google.privacy.dlp.v2.Color redaction_color = 3;</code>
1356        */
getRedactionColorOrBuilder()1357       public com.google.privacy.dlp.v2.ColorOrBuilder getRedactionColorOrBuilder() {
1358         if (redactionColorBuilder_ != null) {
1359           return redactionColorBuilder_.getMessageOrBuilder();
1360         } else {
1361           return redactionColor_ == null
1362               ? com.google.privacy.dlp.v2.Color.getDefaultInstance()
1363               : redactionColor_;
1364         }
1365       }
1366       /**
1367        *
1368        *
1369        * <pre>
1370        * The color to use when redacting content from an image. If not specified,
1371        * the default is black.
1372        * </pre>
1373        *
1374        * <code>.google.privacy.dlp.v2.Color redaction_color = 3;</code>
1375        */
1376       private com.google.protobuf.SingleFieldBuilderV3<
1377               com.google.privacy.dlp.v2.Color,
1378               com.google.privacy.dlp.v2.Color.Builder,
1379               com.google.privacy.dlp.v2.ColorOrBuilder>
getRedactionColorFieldBuilder()1380           getRedactionColorFieldBuilder() {
1381         if (redactionColorBuilder_ == null) {
1382           redactionColorBuilder_ =
1383               new com.google.protobuf.SingleFieldBuilderV3<
1384                   com.google.privacy.dlp.v2.Color,
1385                   com.google.privacy.dlp.v2.Color.Builder,
1386                   com.google.privacy.dlp.v2.ColorOrBuilder>(
1387                   getRedactionColor(), getParentForChildren(), isClean());
1388           redactionColor_ = null;
1389         }
1390         return redactionColorBuilder_;
1391       }
1392 
1393       @java.lang.Override
setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1394       public final Builder setUnknownFields(
1395           final com.google.protobuf.UnknownFieldSet unknownFields) {
1396         return super.setUnknownFields(unknownFields);
1397       }
1398 
1399       @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1400       public final Builder mergeUnknownFields(
1401           final com.google.protobuf.UnknownFieldSet unknownFields) {
1402         return super.mergeUnknownFields(unknownFields);
1403       }
1404 
1405       // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig)
1406     }
1407 
1408     // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig)
1409     private static final com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig
1410         DEFAULT_INSTANCE;
1411 
1412     static {
1413       DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig();
1414     }
1415 
1416     public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig
getDefaultInstance()1417         getDefaultInstance() {
1418       return DEFAULT_INSTANCE;
1419     }
1420 
1421     private static final com.google.protobuf.Parser<ImageRedactionConfig> PARSER =
1422         new com.google.protobuf.AbstractParser<ImageRedactionConfig>() {
1423           @java.lang.Override
1424           public ImageRedactionConfig parsePartialFrom(
1425               com.google.protobuf.CodedInputStream input,
1426               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1427               throws com.google.protobuf.InvalidProtocolBufferException {
1428             Builder builder = newBuilder();
1429             try {
1430               builder.mergeFrom(input, extensionRegistry);
1431             } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1432               throw e.setUnfinishedMessage(builder.buildPartial());
1433             } catch (com.google.protobuf.UninitializedMessageException e) {
1434               throw e.asInvalidProtocolBufferException()
1435                   .setUnfinishedMessage(builder.buildPartial());
1436             } catch (java.io.IOException e) {
1437               throw new com.google.protobuf.InvalidProtocolBufferException(e)
1438                   .setUnfinishedMessage(builder.buildPartial());
1439             }
1440             return builder.buildPartial();
1441           }
1442         };
1443 
parser()1444     public static com.google.protobuf.Parser<ImageRedactionConfig> parser() {
1445       return PARSER;
1446     }
1447 
1448     @java.lang.Override
getParserForType()1449     public com.google.protobuf.Parser<ImageRedactionConfig> getParserForType() {
1450       return PARSER;
1451     }
1452 
1453     @java.lang.Override
1454     public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig
getDefaultInstanceForType()1455         getDefaultInstanceForType() {
1456       return DEFAULT_INSTANCE;
1457     }
1458   }
1459 
1460   public static final int PARENT_FIELD_NUMBER = 1;
1461 
1462   @SuppressWarnings("serial")
1463   private volatile java.lang.Object parent_ = "";
1464   /**
1465    *
1466    *
1467    * <pre>
1468    * Parent resource name.
1469    * The format of this value varies depending on whether you have [specified a
1470    * processing
1471    * location](https://cloud.google.com/dlp/docs/specifying-location):
1472    * + Projects scope, location specified:&lt;br/&gt;
1473    *   `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
1474    * + Projects scope, no location specified (defaults to global):&lt;br/&gt;
1475    *   `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;
1476    * The following example `parent` string specifies a parent project with the
1477    * identifier `example-project`, and specifies the `europe-west3` location
1478    * for processing data:
1479    *     parent=projects/example-project/locations/europe-west3
1480    * </pre>
1481    *
1482    * <code>string parent = 1 [(.google.api.resource_reference) = { ... }</code>
1483    *
1484    * @return The parent.
1485    */
1486   @java.lang.Override
getParent()1487   public java.lang.String getParent() {
1488     java.lang.Object ref = parent_;
1489     if (ref instanceof java.lang.String) {
1490       return (java.lang.String) ref;
1491     } else {
1492       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1493       java.lang.String s = bs.toStringUtf8();
1494       parent_ = s;
1495       return s;
1496     }
1497   }
1498   /**
1499    *
1500    *
1501    * <pre>
1502    * Parent resource name.
1503    * The format of this value varies depending on whether you have [specified a
1504    * processing
1505    * location](https://cloud.google.com/dlp/docs/specifying-location):
1506    * + Projects scope, location specified:&lt;br/&gt;
1507    *   `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
1508    * + Projects scope, no location specified (defaults to global):&lt;br/&gt;
1509    *   `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;
1510    * The following example `parent` string specifies a parent project with the
1511    * identifier `example-project`, and specifies the `europe-west3` location
1512    * for processing data:
1513    *     parent=projects/example-project/locations/europe-west3
1514    * </pre>
1515    *
1516    * <code>string parent = 1 [(.google.api.resource_reference) = { ... }</code>
1517    *
1518    * @return The bytes for parent.
1519    */
1520   @java.lang.Override
getParentBytes()1521   public com.google.protobuf.ByteString getParentBytes() {
1522     java.lang.Object ref = parent_;
1523     if (ref instanceof java.lang.String) {
1524       com.google.protobuf.ByteString b =
1525           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1526       parent_ = b;
1527       return b;
1528     } else {
1529       return (com.google.protobuf.ByteString) ref;
1530     }
1531   }
1532 
1533   public static final int LOCATION_ID_FIELD_NUMBER = 8;
1534 
1535   @SuppressWarnings("serial")
1536   private volatile java.lang.Object locationId_ = "";
1537   /**
1538    *
1539    *
1540    * <pre>
1541    * Deprecated. This field has no effect.
1542    * </pre>
1543    *
1544    * <code>string location_id = 8;</code>
1545    *
1546    * @return The locationId.
1547    */
1548   @java.lang.Override
getLocationId()1549   public java.lang.String getLocationId() {
1550     java.lang.Object ref = locationId_;
1551     if (ref instanceof java.lang.String) {
1552       return (java.lang.String) ref;
1553     } else {
1554       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1555       java.lang.String s = bs.toStringUtf8();
1556       locationId_ = s;
1557       return s;
1558     }
1559   }
1560   /**
1561    *
1562    *
1563    * <pre>
1564    * Deprecated. This field has no effect.
1565    * </pre>
1566    *
1567    * <code>string location_id = 8;</code>
1568    *
1569    * @return The bytes for locationId.
1570    */
1571   @java.lang.Override
getLocationIdBytes()1572   public com.google.protobuf.ByteString getLocationIdBytes() {
1573     java.lang.Object ref = locationId_;
1574     if (ref instanceof java.lang.String) {
1575       com.google.protobuf.ByteString b =
1576           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1577       locationId_ = b;
1578       return b;
1579     } else {
1580       return (com.google.protobuf.ByteString) ref;
1581     }
1582   }
1583 
1584   public static final int INSPECT_CONFIG_FIELD_NUMBER = 2;
1585   private com.google.privacy.dlp.v2.InspectConfig inspectConfig_;
1586   /**
1587    *
1588    *
1589    * <pre>
1590    * Configuration for the inspector.
1591    * </pre>
1592    *
1593    * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 2;</code>
1594    *
1595    * @return Whether the inspectConfig field is set.
1596    */
1597   @java.lang.Override
hasInspectConfig()1598   public boolean hasInspectConfig() {
1599     return inspectConfig_ != null;
1600   }
1601   /**
1602    *
1603    *
1604    * <pre>
1605    * Configuration for the inspector.
1606    * </pre>
1607    *
1608    * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 2;</code>
1609    *
1610    * @return The inspectConfig.
1611    */
1612   @java.lang.Override
getInspectConfig()1613   public com.google.privacy.dlp.v2.InspectConfig getInspectConfig() {
1614     return inspectConfig_ == null
1615         ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance()
1616         : inspectConfig_;
1617   }
1618   /**
1619    *
1620    *
1621    * <pre>
1622    * Configuration for the inspector.
1623    * </pre>
1624    *
1625    * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 2;</code>
1626    */
1627   @java.lang.Override
getInspectConfigOrBuilder()1628   public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() {
1629     return inspectConfig_ == null
1630         ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance()
1631         : inspectConfig_;
1632   }
1633 
1634   public static final int IMAGE_REDACTION_CONFIGS_FIELD_NUMBER = 5;
1635 
1636   @SuppressWarnings("serial")
1637   private java.util.List<com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig>
1638       imageRedactionConfigs_;
1639   /**
1640    *
1641    *
1642    * <pre>
1643    * The configuration for specifying what content to redact from images.
1644    * </pre>
1645    *
1646    * <code>
1647    * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;
1648    * </code>
1649    */
1650   @java.lang.Override
1651   public java.util.List<com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig>
getImageRedactionConfigsList()1652       getImageRedactionConfigsList() {
1653     return imageRedactionConfigs_;
1654   }
1655   /**
1656    *
1657    *
1658    * <pre>
1659    * The configuration for specifying what content to redact from images.
1660    * </pre>
1661    *
1662    * <code>
1663    * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;
1664    * </code>
1665    */
1666   @java.lang.Override
1667   public java.util.List<
1668           ? extends com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfigOrBuilder>
getImageRedactionConfigsOrBuilderList()1669       getImageRedactionConfigsOrBuilderList() {
1670     return imageRedactionConfigs_;
1671   }
1672   /**
1673    *
1674    *
1675    * <pre>
1676    * The configuration for specifying what content to redact from images.
1677    * </pre>
1678    *
1679    * <code>
1680    * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;
1681    * </code>
1682    */
1683   @java.lang.Override
getImageRedactionConfigsCount()1684   public int getImageRedactionConfigsCount() {
1685     return imageRedactionConfigs_.size();
1686   }
1687   /**
1688    *
1689    *
1690    * <pre>
1691    * The configuration for specifying what content to redact from images.
1692    * </pre>
1693    *
1694    * <code>
1695    * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;
1696    * </code>
1697    */
1698   @java.lang.Override
getImageRedactionConfigs( int index)1699   public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig getImageRedactionConfigs(
1700       int index) {
1701     return imageRedactionConfigs_.get(index);
1702   }
1703   /**
1704    *
1705    *
1706    * <pre>
1707    * The configuration for specifying what content to redact from images.
1708    * </pre>
1709    *
1710    * <code>
1711    * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;
1712    * </code>
1713    */
1714   @java.lang.Override
1715   public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfigOrBuilder
getImageRedactionConfigsOrBuilder(int index)1716       getImageRedactionConfigsOrBuilder(int index) {
1717     return imageRedactionConfigs_.get(index);
1718   }
1719 
1720   public static final int INCLUDE_FINDINGS_FIELD_NUMBER = 6;
1721   private boolean includeFindings_ = false;
1722   /**
1723    *
1724    *
1725    * <pre>
1726    * Whether the response should include findings along with the redacted
1727    * image.
1728    * </pre>
1729    *
1730    * <code>bool include_findings = 6;</code>
1731    *
1732    * @return The includeFindings.
1733    */
1734   @java.lang.Override
getIncludeFindings()1735   public boolean getIncludeFindings() {
1736     return includeFindings_;
1737   }
1738 
1739   public static final int BYTE_ITEM_FIELD_NUMBER = 7;
1740   private com.google.privacy.dlp.v2.ByteContentItem byteItem_;
1741   /**
1742    *
1743    *
1744    * <pre>
1745    * The content must be PNG, JPEG, SVG or BMP.
1746    * </pre>
1747    *
1748    * <code>.google.privacy.dlp.v2.ByteContentItem byte_item = 7;</code>
1749    *
1750    * @return Whether the byteItem field is set.
1751    */
1752   @java.lang.Override
hasByteItem()1753   public boolean hasByteItem() {
1754     return byteItem_ != null;
1755   }
1756   /**
1757    *
1758    *
1759    * <pre>
1760    * The content must be PNG, JPEG, SVG or BMP.
1761    * </pre>
1762    *
1763    * <code>.google.privacy.dlp.v2.ByteContentItem byte_item = 7;</code>
1764    *
1765    * @return The byteItem.
1766    */
1767   @java.lang.Override
getByteItem()1768   public com.google.privacy.dlp.v2.ByteContentItem getByteItem() {
1769     return byteItem_ == null
1770         ? com.google.privacy.dlp.v2.ByteContentItem.getDefaultInstance()
1771         : byteItem_;
1772   }
1773   /**
1774    *
1775    *
1776    * <pre>
1777    * The content must be PNG, JPEG, SVG or BMP.
1778    * </pre>
1779    *
1780    * <code>.google.privacy.dlp.v2.ByteContentItem byte_item = 7;</code>
1781    */
1782   @java.lang.Override
getByteItemOrBuilder()1783   public com.google.privacy.dlp.v2.ByteContentItemOrBuilder getByteItemOrBuilder() {
1784     return byteItem_ == null
1785         ? com.google.privacy.dlp.v2.ByteContentItem.getDefaultInstance()
1786         : byteItem_;
1787   }
1788 
1789   private byte memoizedIsInitialized = -1;
1790 
1791   @java.lang.Override
isInitialized()1792   public final boolean isInitialized() {
1793     byte isInitialized = memoizedIsInitialized;
1794     if (isInitialized == 1) return true;
1795     if (isInitialized == 0) return false;
1796 
1797     memoizedIsInitialized = 1;
1798     return true;
1799   }
1800 
1801   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)1802   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
1803     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
1804       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
1805     }
1806     if (inspectConfig_ != null) {
1807       output.writeMessage(2, getInspectConfig());
1808     }
1809     for (int i = 0; i < imageRedactionConfigs_.size(); i++) {
1810       output.writeMessage(5, imageRedactionConfigs_.get(i));
1811     }
1812     if (includeFindings_ != false) {
1813       output.writeBool(6, includeFindings_);
1814     }
1815     if (byteItem_ != null) {
1816       output.writeMessage(7, getByteItem());
1817     }
1818     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) {
1819       com.google.protobuf.GeneratedMessageV3.writeString(output, 8, locationId_);
1820     }
1821     getUnknownFields().writeTo(output);
1822   }
1823 
1824   @java.lang.Override
getSerializedSize()1825   public int getSerializedSize() {
1826     int size = memoizedSize;
1827     if (size != -1) return size;
1828 
1829     size = 0;
1830     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
1831       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
1832     }
1833     if (inspectConfig_ != null) {
1834       size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getInspectConfig());
1835     }
1836     for (int i = 0; i < imageRedactionConfigs_.size(); i++) {
1837       size +=
1838           com.google.protobuf.CodedOutputStream.computeMessageSize(
1839               5, imageRedactionConfigs_.get(i));
1840     }
1841     if (includeFindings_ != false) {
1842       size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, includeFindings_);
1843     }
1844     if (byteItem_ != null) {
1845       size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getByteItem());
1846     }
1847     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) {
1848       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, locationId_);
1849     }
1850     size += getUnknownFields().getSerializedSize();
1851     memoizedSize = size;
1852     return size;
1853   }
1854 
1855   @java.lang.Override
equals(final java.lang.Object obj)1856   public boolean equals(final java.lang.Object obj) {
1857     if (obj == this) {
1858       return true;
1859     }
1860     if (!(obj instanceof com.google.privacy.dlp.v2.RedactImageRequest)) {
1861       return super.equals(obj);
1862     }
1863     com.google.privacy.dlp.v2.RedactImageRequest other =
1864         (com.google.privacy.dlp.v2.RedactImageRequest) obj;
1865 
1866     if (!getParent().equals(other.getParent())) return false;
1867     if (!getLocationId().equals(other.getLocationId())) return false;
1868     if (hasInspectConfig() != other.hasInspectConfig()) return false;
1869     if (hasInspectConfig()) {
1870       if (!getInspectConfig().equals(other.getInspectConfig())) return false;
1871     }
1872     if (!getImageRedactionConfigsList().equals(other.getImageRedactionConfigsList())) return false;
1873     if (getIncludeFindings() != other.getIncludeFindings()) return false;
1874     if (hasByteItem() != other.hasByteItem()) return false;
1875     if (hasByteItem()) {
1876       if (!getByteItem().equals(other.getByteItem())) return false;
1877     }
1878     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
1879     return true;
1880   }
1881 
1882   @java.lang.Override
hashCode()1883   public int hashCode() {
1884     if (memoizedHashCode != 0) {
1885       return memoizedHashCode;
1886     }
1887     int hash = 41;
1888     hash = (19 * hash) + getDescriptor().hashCode();
1889     hash = (37 * hash) + PARENT_FIELD_NUMBER;
1890     hash = (53 * hash) + getParent().hashCode();
1891     hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER;
1892     hash = (53 * hash) + getLocationId().hashCode();
1893     if (hasInspectConfig()) {
1894       hash = (37 * hash) + INSPECT_CONFIG_FIELD_NUMBER;
1895       hash = (53 * hash) + getInspectConfig().hashCode();
1896     }
1897     if (getImageRedactionConfigsCount() > 0) {
1898       hash = (37 * hash) + IMAGE_REDACTION_CONFIGS_FIELD_NUMBER;
1899       hash = (53 * hash) + getImageRedactionConfigsList().hashCode();
1900     }
1901     hash = (37 * hash) + INCLUDE_FINDINGS_FIELD_NUMBER;
1902     hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeFindings());
1903     if (hasByteItem()) {
1904       hash = (37 * hash) + BYTE_ITEM_FIELD_NUMBER;
1905       hash = (53 * hash) + getByteItem().hashCode();
1906     }
1907     hash = (29 * hash) + getUnknownFields().hashCode();
1908     memoizedHashCode = hash;
1909     return hash;
1910   }
1911 
parseFrom(java.nio.ByteBuffer data)1912   public static com.google.privacy.dlp.v2.RedactImageRequest parseFrom(java.nio.ByteBuffer data)
1913       throws com.google.protobuf.InvalidProtocolBufferException {
1914     return PARSER.parseFrom(data);
1915   }
1916 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1917   public static com.google.privacy.dlp.v2.RedactImageRequest parseFrom(
1918       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1919       throws com.google.protobuf.InvalidProtocolBufferException {
1920     return PARSER.parseFrom(data, extensionRegistry);
1921   }
1922 
parseFrom( com.google.protobuf.ByteString data)1923   public static com.google.privacy.dlp.v2.RedactImageRequest parseFrom(
1924       com.google.protobuf.ByteString data)
1925       throws com.google.protobuf.InvalidProtocolBufferException {
1926     return PARSER.parseFrom(data);
1927   }
1928 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1929   public static com.google.privacy.dlp.v2.RedactImageRequest parseFrom(
1930       com.google.protobuf.ByteString data,
1931       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1932       throws com.google.protobuf.InvalidProtocolBufferException {
1933     return PARSER.parseFrom(data, extensionRegistry);
1934   }
1935 
parseFrom(byte[] data)1936   public static com.google.privacy.dlp.v2.RedactImageRequest parseFrom(byte[] data)
1937       throws com.google.protobuf.InvalidProtocolBufferException {
1938     return PARSER.parseFrom(data);
1939   }
1940 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1941   public static com.google.privacy.dlp.v2.RedactImageRequest parseFrom(
1942       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1943       throws com.google.protobuf.InvalidProtocolBufferException {
1944     return PARSER.parseFrom(data, extensionRegistry);
1945   }
1946 
parseFrom(java.io.InputStream input)1947   public static com.google.privacy.dlp.v2.RedactImageRequest parseFrom(java.io.InputStream input)
1948       throws java.io.IOException {
1949     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1950   }
1951 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1952   public static com.google.privacy.dlp.v2.RedactImageRequest parseFrom(
1953       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1954       throws java.io.IOException {
1955     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1956         PARSER, input, extensionRegistry);
1957   }
1958 
parseDelimitedFrom( java.io.InputStream input)1959   public static com.google.privacy.dlp.v2.RedactImageRequest parseDelimitedFrom(
1960       java.io.InputStream input) throws java.io.IOException {
1961     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
1962   }
1963 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1964   public static com.google.privacy.dlp.v2.RedactImageRequest parseDelimitedFrom(
1965       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1966       throws java.io.IOException {
1967     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
1968         PARSER, input, extensionRegistry);
1969   }
1970 
parseFrom( com.google.protobuf.CodedInputStream input)1971   public static com.google.privacy.dlp.v2.RedactImageRequest parseFrom(
1972       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
1973     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1974   }
1975 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1976   public static com.google.privacy.dlp.v2.RedactImageRequest parseFrom(
1977       com.google.protobuf.CodedInputStream input,
1978       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1979       throws java.io.IOException {
1980     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1981         PARSER, input, extensionRegistry);
1982   }
1983 
1984   @java.lang.Override
newBuilderForType()1985   public Builder newBuilderForType() {
1986     return newBuilder();
1987   }
1988 
newBuilder()1989   public static Builder newBuilder() {
1990     return DEFAULT_INSTANCE.toBuilder();
1991   }
1992 
newBuilder(com.google.privacy.dlp.v2.RedactImageRequest prototype)1993   public static Builder newBuilder(com.google.privacy.dlp.v2.RedactImageRequest prototype) {
1994     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
1995   }
1996 
1997   @java.lang.Override
toBuilder()1998   public Builder toBuilder() {
1999     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
2000   }
2001 
2002   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)2003   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
2004     Builder builder = new Builder(parent);
2005     return builder;
2006   }
2007   /**
2008    *
2009    *
2010    * <pre>
2011    * Request to search for potentially sensitive info in an image and redact it
2012    * by covering it with a colored rectangle.
2013    * </pre>
2014    *
2015    * Protobuf type {@code google.privacy.dlp.v2.RedactImageRequest}
2016    */
2017   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
2018       implements
2019       // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.RedactImageRequest)
2020       com.google.privacy.dlp.v2.RedactImageRequestOrBuilder {
getDescriptor()2021     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
2022       return com.google.privacy.dlp.v2.DlpProto
2023           .internal_static_google_privacy_dlp_v2_RedactImageRequest_descriptor;
2024     }
2025 
2026     @java.lang.Override
2027     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()2028         internalGetFieldAccessorTable() {
2029       return com.google.privacy.dlp.v2.DlpProto
2030           .internal_static_google_privacy_dlp_v2_RedactImageRequest_fieldAccessorTable
2031           .ensureFieldAccessorsInitialized(
2032               com.google.privacy.dlp.v2.RedactImageRequest.class,
2033               com.google.privacy.dlp.v2.RedactImageRequest.Builder.class);
2034     }
2035 
2036     // Construct using com.google.privacy.dlp.v2.RedactImageRequest.newBuilder()
Builder()2037     private Builder() {}
2038 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)2039     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
2040       super(parent);
2041     }
2042 
2043     @java.lang.Override
clear()2044     public Builder clear() {
2045       super.clear();
2046       bitField0_ = 0;
2047       parent_ = "";
2048       locationId_ = "";
2049       inspectConfig_ = null;
2050       if (inspectConfigBuilder_ != null) {
2051         inspectConfigBuilder_.dispose();
2052         inspectConfigBuilder_ = null;
2053       }
2054       if (imageRedactionConfigsBuilder_ == null) {
2055         imageRedactionConfigs_ = java.util.Collections.emptyList();
2056       } else {
2057         imageRedactionConfigs_ = null;
2058         imageRedactionConfigsBuilder_.clear();
2059       }
2060       bitField0_ = (bitField0_ & ~0x00000008);
2061       includeFindings_ = false;
2062       byteItem_ = null;
2063       if (byteItemBuilder_ != null) {
2064         byteItemBuilder_.dispose();
2065         byteItemBuilder_ = null;
2066       }
2067       return this;
2068     }
2069 
2070     @java.lang.Override
getDescriptorForType()2071     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
2072       return com.google.privacy.dlp.v2.DlpProto
2073           .internal_static_google_privacy_dlp_v2_RedactImageRequest_descriptor;
2074     }
2075 
2076     @java.lang.Override
getDefaultInstanceForType()2077     public com.google.privacy.dlp.v2.RedactImageRequest getDefaultInstanceForType() {
2078       return com.google.privacy.dlp.v2.RedactImageRequest.getDefaultInstance();
2079     }
2080 
2081     @java.lang.Override
build()2082     public com.google.privacy.dlp.v2.RedactImageRequest build() {
2083       com.google.privacy.dlp.v2.RedactImageRequest result = buildPartial();
2084       if (!result.isInitialized()) {
2085         throw newUninitializedMessageException(result);
2086       }
2087       return result;
2088     }
2089 
2090     @java.lang.Override
buildPartial()2091     public com.google.privacy.dlp.v2.RedactImageRequest buildPartial() {
2092       com.google.privacy.dlp.v2.RedactImageRequest result =
2093           new com.google.privacy.dlp.v2.RedactImageRequest(this);
2094       buildPartialRepeatedFields(result);
2095       if (bitField0_ != 0) {
2096         buildPartial0(result);
2097       }
2098       onBuilt();
2099       return result;
2100     }
2101 
buildPartialRepeatedFields(com.google.privacy.dlp.v2.RedactImageRequest result)2102     private void buildPartialRepeatedFields(com.google.privacy.dlp.v2.RedactImageRequest result) {
2103       if (imageRedactionConfigsBuilder_ == null) {
2104         if (((bitField0_ & 0x00000008) != 0)) {
2105           imageRedactionConfigs_ = java.util.Collections.unmodifiableList(imageRedactionConfigs_);
2106           bitField0_ = (bitField0_ & ~0x00000008);
2107         }
2108         result.imageRedactionConfigs_ = imageRedactionConfigs_;
2109       } else {
2110         result.imageRedactionConfigs_ = imageRedactionConfigsBuilder_.build();
2111       }
2112     }
2113 
buildPartial0(com.google.privacy.dlp.v2.RedactImageRequest result)2114     private void buildPartial0(com.google.privacy.dlp.v2.RedactImageRequest result) {
2115       int from_bitField0_ = bitField0_;
2116       if (((from_bitField0_ & 0x00000001) != 0)) {
2117         result.parent_ = parent_;
2118       }
2119       if (((from_bitField0_ & 0x00000002) != 0)) {
2120         result.locationId_ = locationId_;
2121       }
2122       if (((from_bitField0_ & 0x00000004) != 0)) {
2123         result.inspectConfig_ =
2124             inspectConfigBuilder_ == null ? inspectConfig_ : inspectConfigBuilder_.build();
2125       }
2126       if (((from_bitField0_ & 0x00000010) != 0)) {
2127         result.includeFindings_ = includeFindings_;
2128       }
2129       if (((from_bitField0_ & 0x00000020) != 0)) {
2130         result.byteItem_ = byteItemBuilder_ == null ? byteItem_ : byteItemBuilder_.build();
2131       }
2132     }
2133 
2134     @java.lang.Override
clone()2135     public Builder clone() {
2136       return super.clone();
2137     }
2138 
2139     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)2140     public Builder setField(
2141         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
2142       return super.setField(field, value);
2143     }
2144 
2145     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)2146     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
2147       return super.clearField(field);
2148     }
2149 
2150     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)2151     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
2152       return super.clearOneof(oneof);
2153     }
2154 
2155     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)2156     public Builder setRepeatedField(
2157         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
2158       return super.setRepeatedField(field, index, value);
2159     }
2160 
2161     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)2162     public Builder addRepeatedField(
2163         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
2164       return super.addRepeatedField(field, value);
2165     }
2166 
2167     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)2168     public Builder mergeFrom(com.google.protobuf.Message other) {
2169       if (other instanceof com.google.privacy.dlp.v2.RedactImageRequest) {
2170         return mergeFrom((com.google.privacy.dlp.v2.RedactImageRequest) other);
2171       } else {
2172         super.mergeFrom(other);
2173         return this;
2174       }
2175     }
2176 
mergeFrom(com.google.privacy.dlp.v2.RedactImageRequest other)2177     public Builder mergeFrom(com.google.privacy.dlp.v2.RedactImageRequest other) {
2178       if (other == com.google.privacy.dlp.v2.RedactImageRequest.getDefaultInstance()) return this;
2179       if (!other.getParent().isEmpty()) {
2180         parent_ = other.parent_;
2181         bitField0_ |= 0x00000001;
2182         onChanged();
2183       }
2184       if (!other.getLocationId().isEmpty()) {
2185         locationId_ = other.locationId_;
2186         bitField0_ |= 0x00000002;
2187         onChanged();
2188       }
2189       if (other.hasInspectConfig()) {
2190         mergeInspectConfig(other.getInspectConfig());
2191       }
2192       if (imageRedactionConfigsBuilder_ == null) {
2193         if (!other.imageRedactionConfigs_.isEmpty()) {
2194           if (imageRedactionConfigs_.isEmpty()) {
2195             imageRedactionConfigs_ = other.imageRedactionConfigs_;
2196             bitField0_ = (bitField0_ & ~0x00000008);
2197           } else {
2198             ensureImageRedactionConfigsIsMutable();
2199             imageRedactionConfigs_.addAll(other.imageRedactionConfigs_);
2200           }
2201           onChanged();
2202         }
2203       } else {
2204         if (!other.imageRedactionConfigs_.isEmpty()) {
2205           if (imageRedactionConfigsBuilder_.isEmpty()) {
2206             imageRedactionConfigsBuilder_.dispose();
2207             imageRedactionConfigsBuilder_ = null;
2208             imageRedactionConfigs_ = other.imageRedactionConfigs_;
2209             bitField0_ = (bitField0_ & ~0x00000008);
2210             imageRedactionConfigsBuilder_ =
2211                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
2212                     ? getImageRedactionConfigsFieldBuilder()
2213                     : null;
2214           } else {
2215             imageRedactionConfigsBuilder_.addAllMessages(other.imageRedactionConfigs_);
2216           }
2217         }
2218       }
2219       if (other.getIncludeFindings() != false) {
2220         setIncludeFindings(other.getIncludeFindings());
2221       }
2222       if (other.hasByteItem()) {
2223         mergeByteItem(other.getByteItem());
2224       }
2225       this.mergeUnknownFields(other.getUnknownFields());
2226       onChanged();
2227       return this;
2228     }
2229 
2230     @java.lang.Override
isInitialized()2231     public final boolean isInitialized() {
2232       return true;
2233     }
2234 
2235     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2236     public Builder mergeFrom(
2237         com.google.protobuf.CodedInputStream input,
2238         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2239         throws java.io.IOException {
2240       if (extensionRegistry == null) {
2241         throw new java.lang.NullPointerException();
2242       }
2243       try {
2244         boolean done = false;
2245         while (!done) {
2246           int tag = input.readTag();
2247           switch (tag) {
2248             case 0:
2249               done = true;
2250               break;
2251             case 10:
2252               {
2253                 parent_ = input.readStringRequireUtf8();
2254                 bitField0_ |= 0x00000001;
2255                 break;
2256               } // case 10
2257             case 18:
2258               {
2259                 input.readMessage(getInspectConfigFieldBuilder().getBuilder(), extensionRegistry);
2260                 bitField0_ |= 0x00000004;
2261                 break;
2262               } // case 18
2263             case 42:
2264               {
2265                 com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig m =
2266                     input.readMessage(
2267                         com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.parser(),
2268                         extensionRegistry);
2269                 if (imageRedactionConfigsBuilder_ == null) {
2270                   ensureImageRedactionConfigsIsMutable();
2271                   imageRedactionConfigs_.add(m);
2272                 } else {
2273                   imageRedactionConfigsBuilder_.addMessage(m);
2274                 }
2275                 break;
2276               } // case 42
2277             case 48:
2278               {
2279                 includeFindings_ = input.readBool();
2280                 bitField0_ |= 0x00000010;
2281                 break;
2282               } // case 48
2283             case 58:
2284               {
2285                 input.readMessage(getByteItemFieldBuilder().getBuilder(), extensionRegistry);
2286                 bitField0_ |= 0x00000020;
2287                 break;
2288               } // case 58
2289             case 66:
2290               {
2291                 locationId_ = input.readStringRequireUtf8();
2292                 bitField0_ |= 0x00000002;
2293                 break;
2294               } // case 66
2295             default:
2296               {
2297                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
2298                   done = true; // was an endgroup tag
2299                 }
2300                 break;
2301               } // default:
2302           } // switch (tag)
2303         } // while (!done)
2304       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2305         throw e.unwrapIOException();
2306       } finally {
2307         onChanged();
2308       } // finally
2309       return this;
2310     }
2311 
2312     private int bitField0_;
2313 
2314     private java.lang.Object parent_ = "";
2315     /**
2316      *
2317      *
2318      * <pre>
2319      * Parent resource name.
2320      * The format of this value varies depending on whether you have [specified a
2321      * processing
2322      * location](https://cloud.google.com/dlp/docs/specifying-location):
2323      * + Projects scope, location specified:&lt;br/&gt;
2324      *   `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
2325      * + Projects scope, no location specified (defaults to global):&lt;br/&gt;
2326      *   `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;
2327      * The following example `parent` string specifies a parent project with the
2328      * identifier `example-project`, and specifies the `europe-west3` location
2329      * for processing data:
2330      *     parent=projects/example-project/locations/europe-west3
2331      * </pre>
2332      *
2333      * <code>string parent = 1 [(.google.api.resource_reference) = { ... }</code>
2334      *
2335      * @return The parent.
2336      */
getParent()2337     public java.lang.String getParent() {
2338       java.lang.Object ref = parent_;
2339       if (!(ref instanceof java.lang.String)) {
2340         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2341         java.lang.String s = bs.toStringUtf8();
2342         parent_ = s;
2343         return s;
2344       } else {
2345         return (java.lang.String) ref;
2346       }
2347     }
2348     /**
2349      *
2350      *
2351      * <pre>
2352      * Parent resource name.
2353      * The format of this value varies depending on whether you have [specified a
2354      * processing
2355      * location](https://cloud.google.com/dlp/docs/specifying-location):
2356      * + Projects scope, location specified:&lt;br/&gt;
2357      *   `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
2358      * + Projects scope, no location specified (defaults to global):&lt;br/&gt;
2359      *   `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;
2360      * The following example `parent` string specifies a parent project with the
2361      * identifier `example-project`, and specifies the `europe-west3` location
2362      * for processing data:
2363      *     parent=projects/example-project/locations/europe-west3
2364      * </pre>
2365      *
2366      * <code>string parent = 1 [(.google.api.resource_reference) = { ... }</code>
2367      *
2368      * @return The bytes for parent.
2369      */
getParentBytes()2370     public com.google.protobuf.ByteString getParentBytes() {
2371       java.lang.Object ref = parent_;
2372       if (ref instanceof String) {
2373         com.google.protobuf.ByteString b =
2374             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2375         parent_ = b;
2376         return b;
2377       } else {
2378         return (com.google.protobuf.ByteString) ref;
2379       }
2380     }
2381     /**
2382      *
2383      *
2384      * <pre>
2385      * Parent resource name.
2386      * The format of this value varies depending on whether you have [specified a
2387      * processing
2388      * location](https://cloud.google.com/dlp/docs/specifying-location):
2389      * + Projects scope, location specified:&lt;br/&gt;
2390      *   `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
2391      * + Projects scope, no location specified (defaults to global):&lt;br/&gt;
2392      *   `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;
2393      * The following example `parent` string specifies a parent project with the
2394      * identifier `example-project`, and specifies the `europe-west3` location
2395      * for processing data:
2396      *     parent=projects/example-project/locations/europe-west3
2397      * </pre>
2398      *
2399      * <code>string parent = 1 [(.google.api.resource_reference) = { ... }</code>
2400      *
2401      * @param value The parent to set.
2402      * @return This builder for chaining.
2403      */
setParent(java.lang.String value)2404     public Builder setParent(java.lang.String value) {
2405       if (value == null) {
2406         throw new NullPointerException();
2407       }
2408       parent_ = value;
2409       bitField0_ |= 0x00000001;
2410       onChanged();
2411       return this;
2412     }
2413     /**
2414      *
2415      *
2416      * <pre>
2417      * Parent resource name.
2418      * The format of this value varies depending on whether you have [specified a
2419      * processing
2420      * location](https://cloud.google.com/dlp/docs/specifying-location):
2421      * + Projects scope, location specified:&lt;br/&gt;
2422      *   `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
2423      * + Projects scope, no location specified (defaults to global):&lt;br/&gt;
2424      *   `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;
2425      * The following example `parent` string specifies a parent project with the
2426      * identifier `example-project`, and specifies the `europe-west3` location
2427      * for processing data:
2428      *     parent=projects/example-project/locations/europe-west3
2429      * </pre>
2430      *
2431      * <code>string parent = 1 [(.google.api.resource_reference) = { ... }</code>
2432      *
2433      * @return This builder for chaining.
2434      */
clearParent()2435     public Builder clearParent() {
2436       parent_ = getDefaultInstance().getParent();
2437       bitField0_ = (bitField0_ & ~0x00000001);
2438       onChanged();
2439       return this;
2440     }
2441     /**
2442      *
2443      *
2444      * <pre>
2445      * Parent resource name.
2446      * The format of this value varies depending on whether you have [specified a
2447      * processing
2448      * location](https://cloud.google.com/dlp/docs/specifying-location):
2449      * + Projects scope, location specified:&lt;br/&gt;
2450      *   `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
2451      * + Projects scope, no location specified (defaults to global):&lt;br/&gt;
2452      *   `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;
2453      * The following example `parent` string specifies a parent project with the
2454      * identifier `example-project`, and specifies the `europe-west3` location
2455      * for processing data:
2456      *     parent=projects/example-project/locations/europe-west3
2457      * </pre>
2458      *
2459      * <code>string parent = 1 [(.google.api.resource_reference) = { ... }</code>
2460      *
2461      * @param value The bytes for parent to set.
2462      * @return This builder for chaining.
2463      */
setParentBytes(com.google.protobuf.ByteString value)2464     public Builder setParentBytes(com.google.protobuf.ByteString value) {
2465       if (value == null) {
2466         throw new NullPointerException();
2467       }
2468       checkByteStringIsUtf8(value);
2469       parent_ = value;
2470       bitField0_ |= 0x00000001;
2471       onChanged();
2472       return this;
2473     }
2474 
2475     private java.lang.Object locationId_ = "";
2476     /**
2477      *
2478      *
2479      * <pre>
2480      * Deprecated. This field has no effect.
2481      * </pre>
2482      *
2483      * <code>string location_id = 8;</code>
2484      *
2485      * @return The locationId.
2486      */
getLocationId()2487     public java.lang.String getLocationId() {
2488       java.lang.Object ref = locationId_;
2489       if (!(ref instanceof java.lang.String)) {
2490         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2491         java.lang.String s = bs.toStringUtf8();
2492         locationId_ = s;
2493         return s;
2494       } else {
2495         return (java.lang.String) ref;
2496       }
2497     }
2498     /**
2499      *
2500      *
2501      * <pre>
2502      * Deprecated. This field has no effect.
2503      * </pre>
2504      *
2505      * <code>string location_id = 8;</code>
2506      *
2507      * @return The bytes for locationId.
2508      */
getLocationIdBytes()2509     public com.google.protobuf.ByteString getLocationIdBytes() {
2510       java.lang.Object ref = locationId_;
2511       if (ref instanceof String) {
2512         com.google.protobuf.ByteString b =
2513             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2514         locationId_ = b;
2515         return b;
2516       } else {
2517         return (com.google.protobuf.ByteString) ref;
2518       }
2519     }
2520     /**
2521      *
2522      *
2523      * <pre>
2524      * Deprecated. This field has no effect.
2525      * </pre>
2526      *
2527      * <code>string location_id = 8;</code>
2528      *
2529      * @param value The locationId to set.
2530      * @return This builder for chaining.
2531      */
setLocationId(java.lang.String value)2532     public Builder setLocationId(java.lang.String value) {
2533       if (value == null) {
2534         throw new NullPointerException();
2535       }
2536       locationId_ = value;
2537       bitField0_ |= 0x00000002;
2538       onChanged();
2539       return this;
2540     }
2541     /**
2542      *
2543      *
2544      * <pre>
2545      * Deprecated. This field has no effect.
2546      * </pre>
2547      *
2548      * <code>string location_id = 8;</code>
2549      *
2550      * @return This builder for chaining.
2551      */
clearLocationId()2552     public Builder clearLocationId() {
2553       locationId_ = getDefaultInstance().getLocationId();
2554       bitField0_ = (bitField0_ & ~0x00000002);
2555       onChanged();
2556       return this;
2557     }
2558     /**
2559      *
2560      *
2561      * <pre>
2562      * Deprecated. This field has no effect.
2563      * </pre>
2564      *
2565      * <code>string location_id = 8;</code>
2566      *
2567      * @param value The bytes for locationId to set.
2568      * @return This builder for chaining.
2569      */
setLocationIdBytes(com.google.protobuf.ByteString value)2570     public Builder setLocationIdBytes(com.google.protobuf.ByteString value) {
2571       if (value == null) {
2572         throw new NullPointerException();
2573       }
2574       checkByteStringIsUtf8(value);
2575       locationId_ = value;
2576       bitField0_ |= 0x00000002;
2577       onChanged();
2578       return this;
2579     }
2580 
2581     private com.google.privacy.dlp.v2.InspectConfig inspectConfig_;
2582     private com.google.protobuf.SingleFieldBuilderV3<
2583             com.google.privacy.dlp.v2.InspectConfig,
2584             com.google.privacy.dlp.v2.InspectConfig.Builder,
2585             com.google.privacy.dlp.v2.InspectConfigOrBuilder>
2586         inspectConfigBuilder_;
2587     /**
2588      *
2589      *
2590      * <pre>
2591      * Configuration for the inspector.
2592      * </pre>
2593      *
2594      * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 2;</code>
2595      *
2596      * @return Whether the inspectConfig field is set.
2597      */
hasInspectConfig()2598     public boolean hasInspectConfig() {
2599       return ((bitField0_ & 0x00000004) != 0);
2600     }
2601     /**
2602      *
2603      *
2604      * <pre>
2605      * Configuration for the inspector.
2606      * </pre>
2607      *
2608      * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 2;</code>
2609      *
2610      * @return The inspectConfig.
2611      */
getInspectConfig()2612     public com.google.privacy.dlp.v2.InspectConfig getInspectConfig() {
2613       if (inspectConfigBuilder_ == null) {
2614         return inspectConfig_ == null
2615             ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance()
2616             : inspectConfig_;
2617       } else {
2618         return inspectConfigBuilder_.getMessage();
2619       }
2620     }
2621     /**
2622      *
2623      *
2624      * <pre>
2625      * Configuration for the inspector.
2626      * </pre>
2627      *
2628      * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 2;</code>
2629      */
setInspectConfig(com.google.privacy.dlp.v2.InspectConfig value)2630     public Builder setInspectConfig(com.google.privacy.dlp.v2.InspectConfig value) {
2631       if (inspectConfigBuilder_ == null) {
2632         if (value == null) {
2633           throw new NullPointerException();
2634         }
2635         inspectConfig_ = value;
2636       } else {
2637         inspectConfigBuilder_.setMessage(value);
2638       }
2639       bitField0_ |= 0x00000004;
2640       onChanged();
2641       return this;
2642     }
2643     /**
2644      *
2645      *
2646      * <pre>
2647      * Configuration for the inspector.
2648      * </pre>
2649      *
2650      * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 2;</code>
2651      */
setInspectConfig( com.google.privacy.dlp.v2.InspectConfig.Builder builderForValue)2652     public Builder setInspectConfig(
2653         com.google.privacy.dlp.v2.InspectConfig.Builder builderForValue) {
2654       if (inspectConfigBuilder_ == null) {
2655         inspectConfig_ = builderForValue.build();
2656       } else {
2657         inspectConfigBuilder_.setMessage(builderForValue.build());
2658       }
2659       bitField0_ |= 0x00000004;
2660       onChanged();
2661       return this;
2662     }
2663     /**
2664      *
2665      *
2666      * <pre>
2667      * Configuration for the inspector.
2668      * </pre>
2669      *
2670      * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 2;</code>
2671      */
mergeInspectConfig(com.google.privacy.dlp.v2.InspectConfig value)2672     public Builder mergeInspectConfig(com.google.privacy.dlp.v2.InspectConfig value) {
2673       if (inspectConfigBuilder_ == null) {
2674         if (((bitField0_ & 0x00000004) != 0)
2675             && inspectConfig_ != null
2676             && inspectConfig_ != com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance()) {
2677           getInspectConfigBuilder().mergeFrom(value);
2678         } else {
2679           inspectConfig_ = value;
2680         }
2681       } else {
2682         inspectConfigBuilder_.mergeFrom(value);
2683       }
2684       bitField0_ |= 0x00000004;
2685       onChanged();
2686       return this;
2687     }
2688     /**
2689      *
2690      *
2691      * <pre>
2692      * Configuration for the inspector.
2693      * </pre>
2694      *
2695      * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 2;</code>
2696      */
clearInspectConfig()2697     public Builder clearInspectConfig() {
2698       bitField0_ = (bitField0_ & ~0x00000004);
2699       inspectConfig_ = null;
2700       if (inspectConfigBuilder_ != null) {
2701         inspectConfigBuilder_.dispose();
2702         inspectConfigBuilder_ = null;
2703       }
2704       onChanged();
2705       return this;
2706     }
2707     /**
2708      *
2709      *
2710      * <pre>
2711      * Configuration for the inspector.
2712      * </pre>
2713      *
2714      * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 2;</code>
2715      */
getInspectConfigBuilder()2716     public com.google.privacy.dlp.v2.InspectConfig.Builder getInspectConfigBuilder() {
2717       bitField0_ |= 0x00000004;
2718       onChanged();
2719       return getInspectConfigFieldBuilder().getBuilder();
2720     }
2721     /**
2722      *
2723      *
2724      * <pre>
2725      * Configuration for the inspector.
2726      * </pre>
2727      *
2728      * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 2;</code>
2729      */
getInspectConfigOrBuilder()2730     public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() {
2731       if (inspectConfigBuilder_ != null) {
2732         return inspectConfigBuilder_.getMessageOrBuilder();
2733       } else {
2734         return inspectConfig_ == null
2735             ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance()
2736             : inspectConfig_;
2737       }
2738     }
2739     /**
2740      *
2741      *
2742      * <pre>
2743      * Configuration for the inspector.
2744      * </pre>
2745      *
2746      * <code>.google.privacy.dlp.v2.InspectConfig inspect_config = 2;</code>
2747      */
2748     private com.google.protobuf.SingleFieldBuilderV3<
2749             com.google.privacy.dlp.v2.InspectConfig,
2750             com.google.privacy.dlp.v2.InspectConfig.Builder,
2751             com.google.privacy.dlp.v2.InspectConfigOrBuilder>
getInspectConfigFieldBuilder()2752         getInspectConfigFieldBuilder() {
2753       if (inspectConfigBuilder_ == null) {
2754         inspectConfigBuilder_ =
2755             new com.google.protobuf.SingleFieldBuilderV3<
2756                 com.google.privacy.dlp.v2.InspectConfig,
2757                 com.google.privacy.dlp.v2.InspectConfig.Builder,
2758                 com.google.privacy.dlp.v2.InspectConfigOrBuilder>(
2759                 getInspectConfig(), getParentForChildren(), isClean());
2760         inspectConfig_ = null;
2761       }
2762       return inspectConfigBuilder_;
2763     }
2764 
2765     private java.util.List<com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig>
2766         imageRedactionConfigs_ = java.util.Collections.emptyList();
2767 
ensureImageRedactionConfigsIsMutable()2768     private void ensureImageRedactionConfigsIsMutable() {
2769       if (!((bitField0_ & 0x00000008) != 0)) {
2770         imageRedactionConfigs_ =
2771             new java.util.ArrayList<
2772                 com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig>(
2773                 imageRedactionConfigs_);
2774         bitField0_ |= 0x00000008;
2775       }
2776     }
2777 
2778     private com.google.protobuf.RepeatedFieldBuilderV3<
2779             com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig,
2780             com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder,
2781             com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfigOrBuilder>
2782         imageRedactionConfigsBuilder_;
2783 
2784     /**
2785      *
2786      *
2787      * <pre>
2788      * The configuration for specifying what content to redact from images.
2789      * </pre>
2790      *
2791      * <code>
2792      * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;
2793      * </code>
2794      */
2795     public java.util.List<com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig>
getImageRedactionConfigsList()2796         getImageRedactionConfigsList() {
2797       if (imageRedactionConfigsBuilder_ == null) {
2798         return java.util.Collections.unmodifiableList(imageRedactionConfigs_);
2799       } else {
2800         return imageRedactionConfigsBuilder_.getMessageList();
2801       }
2802     }
2803     /**
2804      *
2805      *
2806      * <pre>
2807      * The configuration for specifying what content to redact from images.
2808      * </pre>
2809      *
2810      * <code>
2811      * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;
2812      * </code>
2813      */
getImageRedactionConfigsCount()2814     public int getImageRedactionConfigsCount() {
2815       if (imageRedactionConfigsBuilder_ == null) {
2816         return imageRedactionConfigs_.size();
2817       } else {
2818         return imageRedactionConfigsBuilder_.getCount();
2819       }
2820     }
2821     /**
2822      *
2823      *
2824      * <pre>
2825      * The configuration for specifying what content to redact from images.
2826      * </pre>
2827      *
2828      * <code>
2829      * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;
2830      * </code>
2831      */
2832     public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig
getImageRedactionConfigs(int index)2833         getImageRedactionConfigs(int index) {
2834       if (imageRedactionConfigsBuilder_ == null) {
2835         return imageRedactionConfigs_.get(index);
2836       } else {
2837         return imageRedactionConfigsBuilder_.getMessage(index);
2838       }
2839     }
2840     /**
2841      *
2842      *
2843      * <pre>
2844      * The configuration for specifying what content to redact from images.
2845      * </pre>
2846      *
2847      * <code>
2848      * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;
2849      * </code>
2850      */
setImageRedactionConfigs( int index, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig value)2851     public Builder setImageRedactionConfigs(
2852         int index, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig value) {
2853       if (imageRedactionConfigsBuilder_ == null) {
2854         if (value == null) {
2855           throw new NullPointerException();
2856         }
2857         ensureImageRedactionConfigsIsMutable();
2858         imageRedactionConfigs_.set(index, value);
2859         onChanged();
2860       } else {
2861         imageRedactionConfigsBuilder_.setMessage(index, value);
2862       }
2863       return this;
2864     }
2865     /**
2866      *
2867      *
2868      * <pre>
2869      * The configuration for specifying what content to redact from images.
2870      * </pre>
2871      *
2872      * <code>
2873      * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;
2874      * </code>
2875      */
setImageRedactionConfigs( int index, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder builderForValue)2876     public Builder setImageRedactionConfigs(
2877         int index,
2878         com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder builderForValue) {
2879       if (imageRedactionConfigsBuilder_ == null) {
2880         ensureImageRedactionConfigsIsMutable();
2881         imageRedactionConfigs_.set(index, builderForValue.build());
2882         onChanged();
2883       } else {
2884         imageRedactionConfigsBuilder_.setMessage(index, builderForValue.build());
2885       }
2886       return this;
2887     }
2888     /**
2889      *
2890      *
2891      * <pre>
2892      * The configuration for specifying what content to redact from images.
2893      * </pre>
2894      *
2895      * <code>
2896      * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;
2897      * </code>
2898      */
addImageRedactionConfigs( com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig value)2899     public Builder addImageRedactionConfigs(
2900         com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig value) {
2901       if (imageRedactionConfigsBuilder_ == null) {
2902         if (value == null) {
2903           throw new NullPointerException();
2904         }
2905         ensureImageRedactionConfigsIsMutable();
2906         imageRedactionConfigs_.add(value);
2907         onChanged();
2908       } else {
2909         imageRedactionConfigsBuilder_.addMessage(value);
2910       }
2911       return this;
2912     }
2913     /**
2914      *
2915      *
2916      * <pre>
2917      * The configuration for specifying what content to redact from images.
2918      * </pre>
2919      *
2920      * <code>
2921      * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;
2922      * </code>
2923      */
addImageRedactionConfigs( int index, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig value)2924     public Builder addImageRedactionConfigs(
2925         int index, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig value) {
2926       if (imageRedactionConfigsBuilder_ == null) {
2927         if (value == null) {
2928           throw new NullPointerException();
2929         }
2930         ensureImageRedactionConfigsIsMutable();
2931         imageRedactionConfigs_.add(index, value);
2932         onChanged();
2933       } else {
2934         imageRedactionConfigsBuilder_.addMessage(index, value);
2935       }
2936       return this;
2937     }
2938     /**
2939      *
2940      *
2941      * <pre>
2942      * The configuration for specifying what content to redact from images.
2943      * </pre>
2944      *
2945      * <code>
2946      * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;
2947      * </code>
2948      */
addImageRedactionConfigs( com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder builderForValue)2949     public Builder addImageRedactionConfigs(
2950         com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder builderForValue) {
2951       if (imageRedactionConfigsBuilder_ == null) {
2952         ensureImageRedactionConfigsIsMutable();
2953         imageRedactionConfigs_.add(builderForValue.build());
2954         onChanged();
2955       } else {
2956         imageRedactionConfigsBuilder_.addMessage(builderForValue.build());
2957       }
2958       return this;
2959     }
2960     /**
2961      *
2962      *
2963      * <pre>
2964      * The configuration for specifying what content to redact from images.
2965      * </pre>
2966      *
2967      * <code>
2968      * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;
2969      * </code>
2970      */
addImageRedactionConfigs( int index, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder builderForValue)2971     public Builder addImageRedactionConfigs(
2972         int index,
2973         com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder builderForValue) {
2974       if (imageRedactionConfigsBuilder_ == null) {
2975         ensureImageRedactionConfigsIsMutable();
2976         imageRedactionConfigs_.add(index, builderForValue.build());
2977         onChanged();
2978       } else {
2979         imageRedactionConfigsBuilder_.addMessage(index, builderForValue.build());
2980       }
2981       return this;
2982     }
2983     /**
2984      *
2985      *
2986      * <pre>
2987      * The configuration for specifying what content to redact from images.
2988      * </pre>
2989      *
2990      * <code>
2991      * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;
2992      * </code>
2993      */
addAllImageRedactionConfigs( java.lang.Iterable< ? extends com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig> values)2994     public Builder addAllImageRedactionConfigs(
2995         java.lang.Iterable<
2996                 ? extends com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig>
2997             values) {
2998       if (imageRedactionConfigsBuilder_ == null) {
2999         ensureImageRedactionConfigsIsMutable();
3000         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, imageRedactionConfigs_);
3001         onChanged();
3002       } else {
3003         imageRedactionConfigsBuilder_.addAllMessages(values);
3004       }
3005       return this;
3006     }
3007     /**
3008      *
3009      *
3010      * <pre>
3011      * The configuration for specifying what content to redact from images.
3012      * </pre>
3013      *
3014      * <code>
3015      * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;
3016      * </code>
3017      */
clearImageRedactionConfigs()3018     public Builder clearImageRedactionConfigs() {
3019       if (imageRedactionConfigsBuilder_ == null) {
3020         imageRedactionConfigs_ = java.util.Collections.emptyList();
3021         bitField0_ = (bitField0_ & ~0x00000008);
3022         onChanged();
3023       } else {
3024         imageRedactionConfigsBuilder_.clear();
3025       }
3026       return this;
3027     }
3028     /**
3029      *
3030      *
3031      * <pre>
3032      * The configuration for specifying what content to redact from images.
3033      * </pre>
3034      *
3035      * <code>
3036      * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;
3037      * </code>
3038      */
removeImageRedactionConfigs(int index)3039     public Builder removeImageRedactionConfigs(int index) {
3040       if (imageRedactionConfigsBuilder_ == null) {
3041         ensureImageRedactionConfigsIsMutable();
3042         imageRedactionConfigs_.remove(index);
3043         onChanged();
3044       } else {
3045         imageRedactionConfigsBuilder_.remove(index);
3046       }
3047       return this;
3048     }
3049     /**
3050      *
3051      *
3052      * <pre>
3053      * The configuration for specifying what content to redact from images.
3054      * </pre>
3055      *
3056      * <code>
3057      * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;
3058      * </code>
3059      */
3060     public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder
getImageRedactionConfigsBuilder(int index)3061         getImageRedactionConfigsBuilder(int index) {
3062       return getImageRedactionConfigsFieldBuilder().getBuilder(index);
3063     }
3064     /**
3065      *
3066      *
3067      * <pre>
3068      * The configuration for specifying what content to redact from images.
3069      * </pre>
3070      *
3071      * <code>
3072      * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;
3073      * </code>
3074      */
3075     public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfigOrBuilder
getImageRedactionConfigsOrBuilder(int index)3076         getImageRedactionConfigsOrBuilder(int index) {
3077       if (imageRedactionConfigsBuilder_ == null) {
3078         return imageRedactionConfigs_.get(index);
3079       } else {
3080         return imageRedactionConfigsBuilder_.getMessageOrBuilder(index);
3081       }
3082     }
3083     /**
3084      *
3085      *
3086      * <pre>
3087      * The configuration for specifying what content to redact from images.
3088      * </pre>
3089      *
3090      * <code>
3091      * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;
3092      * </code>
3093      */
3094     public java.util.List<
3095             ? extends com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfigOrBuilder>
getImageRedactionConfigsOrBuilderList()3096         getImageRedactionConfigsOrBuilderList() {
3097       if (imageRedactionConfigsBuilder_ != null) {
3098         return imageRedactionConfigsBuilder_.getMessageOrBuilderList();
3099       } else {
3100         return java.util.Collections.unmodifiableList(imageRedactionConfigs_);
3101       }
3102     }
3103     /**
3104      *
3105      *
3106      * <pre>
3107      * The configuration for specifying what content to redact from images.
3108      * </pre>
3109      *
3110      * <code>
3111      * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;
3112      * </code>
3113      */
3114     public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder
addImageRedactionConfigsBuilder()3115         addImageRedactionConfigsBuilder() {
3116       return getImageRedactionConfigsFieldBuilder()
3117           .addBuilder(
3118               com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig
3119                   .getDefaultInstance());
3120     }
3121     /**
3122      *
3123      *
3124      * <pre>
3125      * The configuration for specifying what content to redact from images.
3126      * </pre>
3127      *
3128      * <code>
3129      * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;
3130      * </code>
3131      */
3132     public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder
addImageRedactionConfigsBuilder(int index)3133         addImageRedactionConfigsBuilder(int index) {
3134       return getImageRedactionConfigsFieldBuilder()
3135           .addBuilder(
3136               index,
3137               com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig
3138                   .getDefaultInstance());
3139     }
3140     /**
3141      *
3142      *
3143      * <pre>
3144      * The configuration for specifying what content to redact from images.
3145      * </pre>
3146      *
3147      * <code>
3148      * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5;
3149      * </code>
3150      */
3151     public java.util.List<com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder>
getImageRedactionConfigsBuilderList()3152         getImageRedactionConfigsBuilderList() {
3153       return getImageRedactionConfigsFieldBuilder().getBuilderList();
3154     }
3155 
3156     private com.google.protobuf.RepeatedFieldBuilderV3<
3157             com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig,
3158             com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder,
3159             com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfigOrBuilder>
getImageRedactionConfigsFieldBuilder()3160         getImageRedactionConfigsFieldBuilder() {
3161       if (imageRedactionConfigsBuilder_ == null) {
3162         imageRedactionConfigsBuilder_ =
3163             new com.google.protobuf.RepeatedFieldBuilderV3<
3164                 com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig,
3165                 com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder,
3166                 com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfigOrBuilder>(
3167                 imageRedactionConfigs_,
3168                 ((bitField0_ & 0x00000008) != 0),
3169                 getParentForChildren(),
3170                 isClean());
3171         imageRedactionConfigs_ = null;
3172       }
3173       return imageRedactionConfigsBuilder_;
3174     }
3175 
3176     private boolean includeFindings_;
3177     /**
3178      *
3179      *
3180      * <pre>
3181      * Whether the response should include findings along with the redacted
3182      * image.
3183      * </pre>
3184      *
3185      * <code>bool include_findings = 6;</code>
3186      *
3187      * @return The includeFindings.
3188      */
3189     @java.lang.Override
getIncludeFindings()3190     public boolean getIncludeFindings() {
3191       return includeFindings_;
3192     }
3193     /**
3194      *
3195      *
3196      * <pre>
3197      * Whether the response should include findings along with the redacted
3198      * image.
3199      * </pre>
3200      *
3201      * <code>bool include_findings = 6;</code>
3202      *
3203      * @param value The includeFindings to set.
3204      * @return This builder for chaining.
3205      */
setIncludeFindings(boolean value)3206     public Builder setIncludeFindings(boolean value) {
3207 
3208       includeFindings_ = value;
3209       bitField0_ |= 0x00000010;
3210       onChanged();
3211       return this;
3212     }
3213     /**
3214      *
3215      *
3216      * <pre>
3217      * Whether the response should include findings along with the redacted
3218      * image.
3219      * </pre>
3220      *
3221      * <code>bool include_findings = 6;</code>
3222      *
3223      * @return This builder for chaining.
3224      */
clearIncludeFindings()3225     public Builder clearIncludeFindings() {
3226       bitField0_ = (bitField0_ & ~0x00000010);
3227       includeFindings_ = false;
3228       onChanged();
3229       return this;
3230     }
3231 
3232     private com.google.privacy.dlp.v2.ByteContentItem byteItem_;
3233     private com.google.protobuf.SingleFieldBuilderV3<
3234             com.google.privacy.dlp.v2.ByteContentItem,
3235             com.google.privacy.dlp.v2.ByteContentItem.Builder,
3236             com.google.privacy.dlp.v2.ByteContentItemOrBuilder>
3237         byteItemBuilder_;
3238     /**
3239      *
3240      *
3241      * <pre>
3242      * The content must be PNG, JPEG, SVG or BMP.
3243      * </pre>
3244      *
3245      * <code>.google.privacy.dlp.v2.ByteContentItem byte_item = 7;</code>
3246      *
3247      * @return Whether the byteItem field is set.
3248      */
hasByteItem()3249     public boolean hasByteItem() {
3250       return ((bitField0_ & 0x00000020) != 0);
3251     }
3252     /**
3253      *
3254      *
3255      * <pre>
3256      * The content must be PNG, JPEG, SVG or BMP.
3257      * </pre>
3258      *
3259      * <code>.google.privacy.dlp.v2.ByteContentItem byte_item = 7;</code>
3260      *
3261      * @return The byteItem.
3262      */
getByteItem()3263     public com.google.privacy.dlp.v2.ByteContentItem getByteItem() {
3264       if (byteItemBuilder_ == null) {
3265         return byteItem_ == null
3266             ? com.google.privacy.dlp.v2.ByteContentItem.getDefaultInstance()
3267             : byteItem_;
3268       } else {
3269         return byteItemBuilder_.getMessage();
3270       }
3271     }
3272     /**
3273      *
3274      *
3275      * <pre>
3276      * The content must be PNG, JPEG, SVG or BMP.
3277      * </pre>
3278      *
3279      * <code>.google.privacy.dlp.v2.ByteContentItem byte_item = 7;</code>
3280      */
setByteItem(com.google.privacy.dlp.v2.ByteContentItem value)3281     public Builder setByteItem(com.google.privacy.dlp.v2.ByteContentItem value) {
3282       if (byteItemBuilder_ == null) {
3283         if (value == null) {
3284           throw new NullPointerException();
3285         }
3286         byteItem_ = value;
3287       } else {
3288         byteItemBuilder_.setMessage(value);
3289       }
3290       bitField0_ |= 0x00000020;
3291       onChanged();
3292       return this;
3293     }
3294     /**
3295      *
3296      *
3297      * <pre>
3298      * The content must be PNG, JPEG, SVG or BMP.
3299      * </pre>
3300      *
3301      * <code>.google.privacy.dlp.v2.ByteContentItem byte_item = 7;</code>
3302      */
setByteItem(com.google.privacy.dlp.v2.ByteContentItem.Builder builderForValue)3303     public Builder setByteItem(com.google.privacy.dlp.v2.ByteContentItem.Builder builderForValue) {
3304       if (byteItemBuilder_ == null) {
3305         byteItem_ = builderForValue.build();
3306       } else {
3307         byteItemBuilder_.setMessage(builderForValue.build());
3308       }
3309       bitField0_ |= 0x00000020;
3310       onChanged();
3311       return this;
3312     }
3313     /**
3314      *
3315      *
3316      * <pre>
3317      * The content must be PNG, JPEG, SVG or BMP.
3318      * </pre>
3319      *
3320      * <code>.google.privacy.dlp.v2.ByteContentItem byte_item = 7;</code>
3321      */
mergeByteItem(com.google.privacy.dlp.v2.ByteContentItem value)3322     public Builder mergeByteItem(com.google.privacy.dlp.v2.ByteContentItem value) {
3323       if (byteItemBuilder_ == null) {
3324         if (((bitField0_ & 0x00000020) != 0)
3325             && byteItem_ != null
3326             && byteItem_ != com.google.privacy.dlp.v2.ByteContentItem.getDefaultInstance()) {
3327           getByteItemBuilder().mergeFrom(value);
3328         } else {
3329           byteItem_ = value;
3330         }
3331       } else {
3332         byteItemBuilder_.mergeFrom(value);
3333       }
3334       bitField0_ |= 0x00000020;
3335       onChanged();
3336       return this;
3337     }
3338     /**
3339      *
3340      *
3341      * <pre>
3342      * The content must be PNG, JPEG, SVG or BMP.
3343      * </pre>
3344      *
3345      * <code>.google.privacy.dlp.v2.ByteContentItem byte_item = 7;</code>
3346      */
clearByteItem()3347     public Builder clearByteItem() {
3348       bitField0_ = (bitField0_ & ~0x00000020);
3349       byteItem_ = null;
3350       if (byteItemBuilder_ != null) {
3351         byteItemBuilder_.dispose();
3352         byteItemBuilder_ = null;
3353       }
3354       onChanged();
3355       return this;
3356     }
3357     /**
3358      *
3359      *
3360      * <pre>
3361      * The content must be PNG, JPEG, SVG or BMP.
3362      * </pre>
3363      *
3364      * <code>.google.privacy.dlp.v2.ByteContentItem byte_item = 7;</code>
3365      */
getByteItemBuilder()3366     public com.google.privacy.dlp.v2.ByteContentItem.Builder getByteItemBuilder() {
3367       bitField0_ |= 0x00000020;
3368       onChanged();
3369       return getByteItemFieldBuilder().getBuilder();
3370     }
3371     /**
3372      *
3373      *
3374      * <pre>
3375      * The content must be PNG, JPEG, SVG or BMP.
3376      * </pre>
3377      *
3378      * <code>.google.privacy.dlp.v2.ByteContentItem byte_item = 7;</code>
3379      */
getByteItemOrBuilder()3380     public com.google.privacy.dlp.v2.ByteContentItemOrBuilder getByteItemOrBuilder() {
3381       if (byteItemBuilder_ != null) {
3382         return byteItemBuilder_.getMessageOrBuilder();
3383       } else {
3384         return byteItem_ == null
3385             ? com.google.privacy.dlp.v2.ByteContentItem.getDefaultInstance()
3386             : byteItem_;
3387       }
3388     }
3389     /**
3390      *
3391      *
3392      * <pre>
3393      * The content must be PNG, JPEG, SVG or BMP.
3394      * </pre>
3395      *
3396      * <code>.google.privacy.dlp.v2.ByteContentItem byte_item = 7;</code>
3397      */
3398     private com.google.protobuf.SingleFieldBuilderV3<
3399             com.google.privacy.dlp.v2.ByteContentItem,
3400             com.google.privacy.dlp.v2.ByteContentItem.Builder,
3401             com.google.privacy.dlp.v2.ByteContentItemOrBuilder>
getByteItemFieldBuilder()3402         getByteItemFieldBuilder() {
3403       if (byteItemBuilder_ == null) {
3404         byteItemBuilder_ =
3405             new com.google.protobuf.SingleFieldBuilderV3<
3406                 com.google.privacy.dlp.v2.ByteContentItem,
3407                 com.google.privacy.dlp.v2.ByteContentItem.Builder,
3408                 com.google.privacy.dlp.v2.ByteContentItemOrBuilder>(
3409                 getByteItem(), getParentForChildren(), isClean());
3410         byteItem_ = null;
3411       }
3412       return byteItemBuilder_;
3413     }
3414 
3415     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)3416     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
3417       return super.setUnknownFields(unknownFields);
3418     }
3419 
3420     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)3421     public final Builder mergeUnknownFields(
3422         final com.google.protobuf.UnknownFieldSet unknownFields) {
3423       return super.mergeUnknownFields(unknownFields);
3424     }
3425 
3426     // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.RedactImageRequest)
3427   }
3428 
3429   // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.RedactImageRequest)
3430   private static final com.google.privacy.dlp.v2.RedactImageRequest DEFAULT_INSTANCE;
3431 
3432   static {
3433     DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.RedactImageRequest();
3434   }
3435 
getDefaultInstance()3436   public static com.google.privacy.dlp.v2.RedactImageRequest getDefaultInstance() {
3437     return DEFAULT_INSTANCE;
3438   }
3439 
3440   private static final com.google.protobuf.Parser<RedactImageRequest> PARSER =
3441       new com.google.protobuf.AbstractParser<RedactImageRequest>() {
3442         @java.lang.Override
3443         public RedactImageRequest parsePartialFrom(
3444             com.google.protobuf.CodedInputStream input,
3445             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3446             throws com.google.protobuf.InvalidProtocolBufferException {
3447           Builder builder = newBuilder();
3448           try {
3449             builder.mergeFrom(input, extensionRegistry);
3450           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3451             throw e.setUnfinishedMessage(builder.buildPartial());
3452           } catch (com.google.protobuf.UninitializedMessageException e) {
3453             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
3454           } catch (java.io.IOException e) {
3455             throw new com.google.protobuf.InvalidProtocolBufferException(e)
3456                 .setUnfinishedMessage(builder.buildPartial());
3457           }
3458           return builder.buildPartial();
3459         }
3460       };
3461 
parser()3462   public static com.google.protobuf.Parser<RedactImageRequest> parser() {
3463     return PARSER;
3464   }
3465 
3466   @java.lang.Override
getParserForType()3467   public com.google.protobuf.Parser<RedactImageRequest> getParserForType() {
3468     return PARSER;
3469   }
3470 
3471   @java.lang.Override
getDefaultInstanceForType()3472   public com.google.privacy.dlp.v2.RedactImageRequest getDefaultInstanceForType() {
3473     return DEFAULT_INSTANCE;
3474   }
3475 }
3476