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