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