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