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/jobs.proto 18 19 package com.google.cloud.dataproc.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * A Dataproc job for running 26 * [Apache Hadoop 27 * MapReduce](https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html) 28 * jobs on [Apache Hadoop 29 * YARN](https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html). 30 * </pre> 31 * 32 * Protobuf type {@code google.cloud.dataproc.v1.HadoopJob} 33 */ 34 public final class HadoopJob extends com.google.protobuf.GeneratedMessageV3 35 implements 36 // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.HadoopJob) 37 HadoopJobOrBuilder { 38 private static final long serialVersionUID = 0L; 39 // Use HadoopJob.newBuilder() to construct. HadoopJob(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)40 private HadoopJob(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 41 super(builder); 42 } 43 HadoopJob()44 private HadoopJob() { 45 args_ = com.google.protobuf.LazyStringArrayList.EMPTY; 46 jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; 47 fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; 48 archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; 49 } 50 51 @java.lang.Override 52 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)53 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 54 return new HadoopJob(); 55 } 56 57 @java.lang.Override getUnknownFields()58 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 59 return this.unknownFields; 60 } 61 getDescriptor()62 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 63 return com.google.cloud.dataproc.v1.JobsProto 64 .internal_static_google_cloud_dataproc_v1_HadoopJob_descriptor; 65 } 66 67 @SuppressWarnings({"rawtypes"}) 68 @java.lang.Override internalGetMapField(int number)69 protected com.google.protobuf.MapField internalGetMapField(int number) { 70 switch (number) { 71 case 7: 72 return internalGetProperties(); 73 default: 74 throw new RuntimeException("Invalid map field number: " + number); 75 } 76 } 77 78 @java.lang.Override 79 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()80 internalGetFieldAccessorTable() { 81 return com.google.cloud.dataproc.v1.JobsProto 82 .internal_static_google_cloud_dataproc_v1_HadoopJob_fieldAccessorTable 83 .ensureFieldAccessorsInitialized( 84 com.google.cloud.dataproc.v1.HadoopJob.class, 85 com.google.cloud.dataproc.v1.HadoopJob.Builder.class); 86 } 87 88 private int driverCase_ = 0; 89 private java.lang.Object driver_; 90 91 public enum DriverCase 92 implements 93 com.google.protobuf.Internal.EnumLite, 94 com.google.protobuf.AbstractMessage.InternalOneOfEnum { 95 MAIN_JAR_FILE_URI(1), 96 MAIN_CLASS(2), 97 DRIVER_NOT_SET(0); 98 private final int value; 99 DriverCase(int value)100 private DriverCase(int value) { 101 this.value = value; 102 } 103 /** 104 * @param value The number of the enum to look for. 105 * @return The enum associated with the given number. 106 * @deprecated Use {@link #forNumber(int)} instead. 107 */ 108 @java.lang.Deprecated valueOf(int value)109 public static DriverCase valueOf(int value) { 110 return forNumber(value); 111 } 112 forNumber(int value)113 public static DriverCase forNumber(int value) { 114 switch (value) { 115 case 1: 116 return MAIN_JAR_FILE_URI; 117 case 2: 118 return MAIN_CLASS; 119 case 0: 120 return DRIVER_NOT_SET; 121 default: 122 return null; 123 } 124 } 125 getNumber()126 public int getNumber() { 127 return this.value; 128 } 129 }; 130 getDriverCase()131 public DriverCase getDriverCase() { 132 return DriverCase.forNumber(driverCase_); 133 } 134 135 public static final int MAIN_JAR_FILE_URI_FIELD_NUMBER = 1; 136 /** 137 * 138 * 139 * <pre> 140 * The HCFS URI of the jar file containing the main class. 141 * Examples: 142 * 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar' 143 * 'hdfs:/tmp/test-samples/custom-wordcount.jar' 144 * 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar' 145 * </pre> 146 * 147 * <code>string main_jar_file_uri = 1;</code> 148 * 149 * @return Whether the mainJarFileUri field is set. 150 */ hasMainJarFileUri()151 public boolean hasMainJarFileUri() { 152 return driverCase_ == 1; 153 } 154 /** 155 * 156 * 157 * <pre> 158 * The HCFS URI of the jar file containing the main class. 159 * Examples: 160 * 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar' 161 * 'hdfs:/tmp/test-samples/custom-wordcount.jar' 162 * 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar' 163 * </pre> 164 * 165 * <code>string main_jar_file_uri = 1;</code> 166 * 167 * @return The mainJarFileUri. 168 */ getMainJarFileUri()169 public java.lang.String getMainJarFileUri() { 170 java.lang.Object ref = ""; 171 if (driverCase_ == 1) { 172 ref = driver_; 173 } 174 if (ref instanceof java.lang.String) { 175 return (java.lang.String) ref; 176 } else { 177 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 178 java.lang.String s = bs.toStringUtf8(); 179 if (driverCase_ == 1) { 180 driver_ = s; 181 } 182 return s; 183 } 184 } 185 /** 186 * 187 * 188 * <pre> 189 * The HCFS URI of the jar file containing the main class. 190 * Examples: 191 * 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar' 192 * 'hdfs:/tmp/test-samples/custom-wordcount.jar' 193 * 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar' 194 * </pre> 195 * 196 * <code>string main_jar_file_uri = 1;</code> 197 * 198 * @return The bytes for mainJarFileUri. 199 */ getMainJarFileUriBytes()200 public com.google.protobuf.ByteString getMainJarFileUriBytes() { 201 java.lang.Object ref = ""; 202 if (driverCase_ == 1) { 203 ref = driver_; 204 } 205 if (ref instanceof java.lang.String) { 206 com.google.protobuf.ByteString b = 207 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 208 if (driverCase_ == 1) { 209 driver_ = b; 210 } 211 return b; 212 } else { 213 return (com.google.protobuf.ByteString) ref; 214 } 215 } 216 217 public static final int MAIN_CLASS_FIELD_NUMBER = 2; 218 /** 219 * 220 * 221 * <pre> 222 * The name of the driver's main class. The jar file containing the class 223 * must be in the default CLASSPATH or specified in `jar_file_uris`. 224 * </pre> 225 * 226 * <code>string main_class = 2;</code> 227 * 228 * @return Whether the mainClass field is set. 229 */ hasMainClass()230 public boolean hasMainClass() { 231 return driverCase_ == 2; 232 } 233 /** 234 * 235 * 236 * <pre> 237 * The name of the driver's main class. The jar file containing the class 238 * must be in the default CLASSPATH or specified in `jar_file_uris`. 239 * </pre> 240 * 241 * <code>string main_class = 2;</code> 242 * 243 * @return The mainClass. 244 */ getMainClass()245 public java.lang.String getMainClass() { 246 java.lang.Object ref = ""; 247 if (driverCase_ == 2) { 248 ref = driver_; 249 } 250 if (ref instanceof java.lang.String) { 251 return (java.lang.String) ref; 252 } else { 253 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 254 java.lang.String s = bs.toStringUtf8(); 255 if (driverCase_ == 2) { 256 driver_ = s; 257 } 258 return s; 259 } 260 } 261 /** 262 * 263 * 264 * <pre> 265 * The name of the driver's main class. The jar file containing the class 266 * must be in the default CLASSPATH or specified in `jar_file_uris`. 267 * </pre> 268 * 269 * <code>string main_class = 2;</code> 270 * 271 * @return The bytes for mainClass. 272 */ getMainClassBytes()273 public com.google.protobuf.ByteString getMainClassBytes() { 274 java.lang.Object ref = ""; 275 if (driverCase_ == 2) { 276 ref = driver_; 277 } 278 if (ref instanceof java.lang.String) { 279 com.google.protobuf.ByteString b = 280 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 281 if (driverCase_ == 2) { 282 driver_ = b; 283 } 284 return b; 285 } else { 286 return (com.google.protobuf.ByteString) ref; 287 } 288 } 289 290 public static final int ARGS_FIELD_NUMBER = 3; 291 292 @SuppressWarnings("serial") 293 private com.google.protobuf.LazyStringList args_; 294 /** 295 * 296 * 297 * <pre> 298 * Optional. The arguments to pass to the driver. Do not 299 * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as 300 * job properties, since a collision may occur that causes an incorrect job 301 * submission. 302 * </pre> 303 * 304 * <code>repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 305 * 306 * @return A list containing the args. 307 */ getArgsList()308 public com.google.protobuf.ProtocolStringList getArgsList() { 309 return args_; 310 } 311 /** 312 * 313 * 314 * <pre> 315 * Optional. The arguments to pass to the driver. Do not 316 * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as 317 * job properties, since a collision may occur that causes an incorrect job 318 * submission. 319 * </pre> 320 * 321 * <code>repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 322 * 323 * @return The count of args. 324 */ getArgsCount()325 public int getArgsCount() { 326 return args_.size(); 327 } 328 /** 329 * 330 * 331 * <pre> 332 * Optional. The arguments to pass to the driver. Do not 333 * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as 334 * job properties, since a collision may occur that causes an incorrect job 335 * submission. 336 * </pre> 337 * 338 * <code>repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 339 * 340 * @param index The index of the element to return. 341 * @return The args at the given index. 342 */ getArgs(int index)343 public java.lang.String getArgs(int index) { 344 return args_.get(index); 345 } 346 /** 347 * 348 * 349 * <pre> 350 * Optional. The arguments to pass to the driver. Do not 351 * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as 352 * job properties, since a collision may occur that causes an incorrect job 353 * submission. 354 * </pre> 355 * 356 * <code>repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 357 * 358 * @param index The index of the value to return. 359 * @return The bytes of the args at the given index. 360 */ getArgsBytes(int index)361 public com.google.protobuf.ByteString getArgsBytes(int index) { 362 return args_.getByteString(index); 363 } 364 365 public static final int JAR_FILE_URIS_FIELD_NUMBER = 4; 366 367 @SuppressWarnings("serial") 368 private com.google.protobuf.LazyStringList jarFileUris_; 369 /** 370 * 371 * 372 * <pre> 373 * Optional. Jar file URIs to add to the CLASSPATHs of the 374 * Hadoop driver and tasks. 375 * </pre> 376 * 377 * <code>repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL];</code> 378 * 379 * @return A list containing the jarFileUris. 380 */ getJarFileUrisList()381 public com.google.protobuf.ProtocolStringList getJarFileUrisList() { 382 return jarFileUris_; 383 } 384 /** 385 * 386 * 387 * <pre> 388 * Optional. Jar file URIs to add to the CLASSPATHs of the 389 * Hadoop driver and tasks. 390 * </pre> 391 * 392 * <code>repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL];</code> 393 * 394 * @return The count of jarFileUris. 395 */ getJarFileUrisCount()396 public int getJarFileUrisCount() { 397 return jarFileUris_.size(); 398 } 399 /** 400 * 401 * 402 * <pre> 403 * Optional. Jar file URIs to add to the CLASSPATHs of the 404 * Hadoop driver and tasks. 405 * </pre> 406 * 407 * <code>repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL];</code> 408 * 409 * @param index The index of the element to return. 410 * @return The jarFileUris at the given index. 411 */ getJarFileUris(int index)412 public java.lang.String getJarFileUris(int index) { 413 return jarFileUris_.get(index); 414 } 415 /** 416 * 417 * 418 * <pre> 419 * Optional. Jar file URIs to add to the CLASSPATHs of the 420 * Hadoop driver and tasks. 421 * </pre> 422 * 423 * <code>repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL];</code> 424 * 425 * @param index The index of the value to return. 426 * @return The bytes of the jarFileUris at the given index. 427 */ getJarFileUrisBytes(int index)428 public com.google.protobuf.ByteString getJarFileUrisBytes(int index) { 429 return jarFileUris_.getByteString(index); 430 } 431 432 public static final int FILE_URIS_FIELD_NUMBER = 5; 433 434 @SuppressWarnings("serial") 435 private com.google.protobuf.LazyStringList fileUris_; 436 /** 437 * 438 * 439 * <pre> 440 * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied 441 * to the working directory of Hadoop drivers and distributed tasks. Useful 442 * for naively parallel tasks. 443 * </pre> 444 * 445 * <code>repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL];</code> 446 * 447 * @return A list containing the fileUris. 448 */ getFileUrisList()449 public com.google.protobuf.ProtocolStringList getFileUrisList() { 450 return fileUris_; 451 } 452 /** 453 * 454 * 455 * <pre> 456 * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied 457 * to the working directory of Hadoop drivers and distributed tasks. Useful 458 * for naively parallel tasks. 459 * </pre> 460 * 461 * <code>repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL];</code> 462 * 463 * @return The count of fileUris. 464 */ getFileUrisCount()465 public int getFileUrisCount() { 466 return fileUris_.size(); 467 } 468 /** 469 * 470 * 471 * <pre> 472 * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied 473 * to the working directory of Hadoop drivers and distributed tasks. Useful 474 * for naively parallel tasks. 475 * </pre> 476 * 477 * <code>repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL];</code> 478 * 479 * @param index The index of the element to return. 480 * @return The fileUris at the given index. 481 */ getFileUris(int index)482 public java.lang.String getFileUris(int index) { 483 return fileUris_.get(index); 484 } 485 /** 486 * 487 * 488 * <pre> 489 * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied 490 * to the working directory of Hadoop drivers and distributed tasks. Useful 491 * for naively parallel tasks. 492 * </pre> 493 * 494 * <code>repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL];</code> 495 * 496 * @param index The index of the value to return. 497 * @return The bytes of the fileUris at the given index. 498 */ getFileUrisBytes(int index)499 public com.google.protobuf.ByteString getFileUrisBytes(int index) { 500 return fileUris_.getByteString(index); 501 } 502 503 public static final int ARCHIVE_URIS_FIELD_NUMBER = 6; 504 505 @SuppressWarnings("serial") 506 private com.google.protobuf.LazyStringList archiveUris_; 507 /** 508 * 509 * 510 * <pre> 511 * Optional. HCFS URIs of archives to be extracted in the working directory of 512 * Hadoop drivers and tasks. Supported file types: 513 * .jar, .tar, .tar.gz, .tgz, or .zip. 514 * </pre> 515 * 516 * <code>repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 517 * 518 * @return A list containing the archiveUris. 519 */ getArchiveUrisList()520 public com.google.protobuf.ProtocolStringList getArchiveUrisList() { 521 return archiveUris_; 522 } 523 /** 524 * 525 * 526 * <pre> 527 * Optional. HCFS URIs of archives to be extracted in the working directory of 528 * Hadoop drivers and tasks. Supported file types: 529 * .jar, .tar, .tar.gz, .tgz, or .zip. 530 * </pre> 531 * 532 * <code>repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 533 * 534 * @return The count of archiveUris. 535 */ getArchiveUrisCount()536 public int getArchiveUrisCount() { 537 return archiveUris_.size(); 538 } 539 /** 540 * 541 * 542 * <pre> 543 * Optional. HCFS URIs of archives to be extracted in the working directory of 544 * Hadoop drivers and tasks. Supported file types: 545 * .jar, .tar, .tar.gz, .tgz, or .zip. 546 * </pre> 547 * 548 * <code>repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 549 * 550 * @param index The index of the element to return. 551 * @return The archiveUris at the given index. 552 */ getArchiveUris(int index)553 public java.lang.String getArchiveUris(int index) { 554 return archiveUris_.get(index); 555 } 556 /** 557 * 558 * 559 * <pre> 560 * Optional. HCFS URIs of archives to be extracted in the working directory of 561 * Hadoop drivers and tasks. Supported file types: 562 * .jar, .tar, .tar.gz, .tgz, or .zip. 563 * </pre> 564 * 565 * <code>repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 566 * 567 * @param index The index of the value to return. 568 * @return The bytes of the archiveUris at the given index. 569 */ getArchiveUrisBytes(int index)570 public com.google.protobuf.ByteString getArchiveUrisBytes(int index) { 571 return archiveUris_.getByteString(index); 572 } 573 574 public static final int PROPERTIES_FIELD_NUMBER = 7; 575 576 private static final class PropertiesDefaultEntryHolder { 577 static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry = 578 com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance( 579 com.google.cloud.dataproc.v1.JobsProto 580 .internal_static_google_cloud_dataproc_v1_HadoopJob_PropertiesEntry_descriptor, 581 com.google.protobuf.WireFormat.FieldType.STRING, 582 "", 583 com.google.protobuf.WireFormat.FieldType.STRING, 584 ""); 585 } 586 587 @SuppressWarnings("serial") 588 private com.google.protobuf.MapField<java.lang.String, java.lang.String> properties_; 589 internalGetProperties()590 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetProperties() { 591 if (properties_ == null) { 592 return com.google.protobuf.MapField.emptyMapField(PropertiesDefaultEntryHolder.defaultEntry); 593 } 594 return properties_; 595 } 596 getPropertiesCount()597 public int getPropertiesCount() { 598 return internalGetProperties().getMap().size(); 599 } 600 /** 601 * 602 * 603 * <pre> 604 * Optional. A mapping of property names to values, used to configure Hadoop. 605 * Properties that conflict with values set by the Dataproc API may be 606 * overwritten. Can include properties set in /etc/hadoop/conf/*-site and 607 * classes in user code. 608 * </pre> 609 * 610 * <code>map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; 611 * </code> 612 */ 613 @java.lang.Override containsProperties(java.lang.String key)614 public boolean containsProperties(java.lang.String key) { 615 if (key == null) { 616 throw new NullPointerException("map key"); 617 } 618 return internalGetProperties().getMap().containsKey(key); 619 } 620 /** Use {@link #getPropertiesMap()} instead. */ 621 @java.lang.Override 622 @java.lang.Deprecated getProperties()623 public java.util.Map<java.lang.String, java.lang.String> getProperties() { 624 return getPropertiesMap(); 625 } 626 /** 627 * 628 * 629 * <pre> 630 * Optional. A mapping of property names to values, used to configure Hadoop. 631 * Properties that conflict with values set by the Dataproc API may be 632 * overwritten. Can include properties set in /etc/hadoop/conf/*-site and 633 * classes in user code. 634 * </pre> 635 * 636 * <code>map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; 637 * </code> 638 */ 639 @java.lang.Override getPropertiesMap()640 public java.util.Map<java.lang.String, java.lang.String> getPropertiesMap() { 641 return internalGetProperties().getMap(); 642 } 643 /** 644 * 645 * 646 * <pre> 647 * Optional. A mapping of property names to values, used to configure Hadoop. 648 * Properties that conflict with values set by the Dataproc API may be 649 * overwritten. Can include properties set in /etc/hadoop/conf/*-site and 650 * classes in user code. 651 * </pre> 652 * 653 * <code>map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; 654 * </code> 655 */ 656 @java.lang.Override getPropertiesOrDefault( java.lang.String key, java.lang.String defaultValue)657 public /* nullable */ java.lang.String getPropertiesOrDefault( 658 java.lang.String key, 659 /* nullable */ 660 java.lang.String defaultValue) { 661 if (key == null) { 662 throw new NullPointerException("map key"); 663 } 664 java.util.Map<java.lang.String, java.lang.String> map = internalGetProperties().getMap(); 665 return map.containsKey(key) ? map.get(key) : defaultValue; 666 } 667 /** 668 * 669 * 670 * <pre> 671 * Optional. A mapping of property names to values, used to configure Hadoop. 672 * Properties that conflict with values set by the Dataproc API may be 673 * overwritten. Can include properties set in /etc/hadoop/conf/*-site and 674 * classes in user code. 675 * </pre> 676 * 677 * <code>map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; 678 * </code> 679 */ 680 @java.lang.Override getPropertiesOrThrow(java.lang.String key)681 public java.lang.String getPropertiesOrThrow(java.lang.String key) { 682 if (key == null) { 683 throw new NullPointerException("map key"); 684 } 685 java.util.Map<java.lang.String, java.lang.String> map = internalGetProperties().getMap(); 686 if (!map.containsKey(key)) { 687 throw new java.lang.IllegalArgumentException(); 688 } 689 return map.get(key); 690 } 691 692 public static final int LOGGING_CONFIG_FIELD_NUMBER = 8; 693 private com.google.cloud.dataproc.v1.LoggingConfig loggingConfig_; 694 /** 695 * 696 * 697 * <pre> 698 * Optional. The runtime log config for job execution. 699 * </pre> 700 * 701 * <code> 702 * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; 703 * </code> 704 * 705 * @return Whether the loggingConfig field is set. 706 */ 707 @java.lang.Override hasLoggingConfig()708 public boolean hasLoggingConfig() { 709 return loggingConfig_ != null; 710 } 711 /** 712 * 713 * 714 * <pre> 715 * Optional. The runtime log config for job execution. 716 * </pre> 717 * 718 * <code> 719 * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; 720 * </code> 721 * 722 * @return The loggingConfig. 723 */ 724 @java.lang.Override getLoggingConfig()725 public com.google.cloud.dataproc.v1.LoggingConfig getLoggingConfig() { 726 return loggingConfig_ == null 727 ? com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance() 728 : loggingConfig_; 729 } 730 /** 731 * 732 * 733 * <pre> 734 * Optional. The runtime log config for job execution. 735 * </pre> 736 * 737 * <code> 738 * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; 739 * </code> 740 */ 741 @java.lang.Override getLoggingConfigOrBuilder()742 public com.google.cloud.dataproc.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder() { 743 return loggingConfig_ == null 744 ? com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance() 745 : loggingConfig_; 746 } 747 748 private byte memoizedIsInitialized = -1; 749 750 @java.lang.Override isInitialized()751 public final boolean isInitialized() { 752 byte isInitialized = memoizedIsInitialized; 753 if (isInitialized == 1) return true; 754 if (isInitialized == 0) return false; 755 756 memoizedIsInitialized = 1; 757 return true; 758 } 759 760 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)761 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 762 if (driverCase_ == 1) { 763 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, driver_); 764 } 765 if (driverCase_ == 2) { 766 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, driver_); 767 } 768 for (int i = 0; i < args_.size(); i++) { 769 com.google.protobuf.GeneratedMessageV3.writeString(output, 3, args_.getRaw(i)); 770 } 771 for (int i = 0; i < jarFileUris_.size(); i++) { 772 com.google.protobuf.GeneratedMessageV3.writeString(output, 4, jarFileUris_.getRaw(i)); 773 } 774 for (int i = 0; i < fileUris_.size(); i++) { 775 com.google.protobuf.GeneratedMessageV3.writeString(output, 5, fileUris_.getRaw(i)); 776 } 777 for (int i = 0; i < archiveUris_.size(); i++) { 778 com.google.protobuf.GeneratedMessageV3.writeString(output, 6, archiveUris_.getRaw(i)); 779 } 780 com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( 781 output, internalGetProperties(), PropertiesDefaultEntryHolder.defaultEntry, 7); 782 if (loggingConfig_ != null) { 783 output.writeMessage(8, getLoggingConfig()); 784 } 785 getUnknownFields().writeTo(output); 786 } 787 788 @java.lang.Override getSerializedSize()789 public int getSerializedSize() { 790 int size = memoizedSize; 791 if (size != -1) return size; 792 793 size = 0; 794 if (driverCase_ == 1) { 795 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, driver_); 796 } 797 if (driverCase_ == 2) { 798 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, driver_); 799 } 800 { 801 int dataSize = 0; 802 for (int i = 0; i < args_.size(); i++) { 803 dataSize += computeStringSizeNoTag(args_.getRaw(i)); 804 } 805 size += dataSize; 806 size += 1 * getArgsList().size(); 807 } 808 { 809 int dataSize = 0; 810 for (int i = 0; i < jarFileUris_.size(); i++) { 811 dataSize += computeStringSizeNoTag(jarFileUris_.getRaw(i)); 812 } 813 size += dataSize; 814 size += 1 * getJarFileUrisList().size(); 815 } 816 { 817 int dataSize = 0; 818 for (int i = 0; i < fileUris_.size(); i++) { 819 dataSize += computeStringSizeNoTag(fileUris_.getRaw(i)); 820 } 821 size += dataSize; 822 size += 1 * getFileUrisList().size(); 823 } 824 { 825 int dataSize = 0; 826 for (int i = 0; i < archiveUris_.size(); i++) { 827 dataSize += computeStringSizeNoTag(archiveUris_.getRaw(i)); 828 } 829 size += dataSize; 830 size += 1 * getArchiveUrisList().size(); 831 } 832 for (java.util.Map.Entry<java.lang.String, java.lang.String> entry : 833 internalGetProperties().getMap().entrySet()) { 834 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> properties__ = 835 PropertiesDefaultEntryHolder.defaultEntry 836 .newBuilderForType() 837 .setKey(entry.getKey()) 838 .setValue(entry.getValue()) 839 .build(); 840 size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, properties__); 841 } 842 if (loggingConfig_ != null) { 843 size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getLoggingConfig()); 844 } 845 size += getUnknownFields().getSerializedSize(); 846 memoizedSize = size; 847 return size; 848 } 849 850 @java.lang.Override equals(final java.lang.Object obj)851 public boolean equals(final java.lang.Object obj) { 852 if (obj == this) { 853 return true; 854 } 855 if (!(obj instanceof com.google.cloud.dataproc.v1.HadoopJob)) { 856 return super.equals(obj); 857 } 858 com.google.cloud.dataproc.v1.HadoopJob other = (com.google.cloud.dataproc.v1.HadoopJob) obj; 859 860 if (!getArgsList().equals(other.getArgsList())) return false; 861 if (!getJarFileUrisList().equals(other.getJarFileUrisList())) return false; 862 if (!getFileUrisList().equals(other.getFileUrisList())) return false; 863 if (!getArchiveUrisList().equals(other.getArchiveUrisList())) return false; 864 if (!internalGetProperties().equals(other.internalGetProperties())) return false; 865 if (hasLoggingConfig() != other.hasLoggingConfig()) return false; 866 if (hasLoggingConfig()) { 867 if (!getLoggingConfig().equals(other.getLoggingConfig())) return false; 868 } 869 if (!getDriverCase().equals(other.getDriverCase())) return false; 870 switch (driverCase_) { 871 case 1: 872 if (!getMainJarFileUri().equals(other.getMainJarFileUri())) return false; 873 break; 874 case 2: 875 if (!getMainClass().equals(other.getMainClass())) return false; 876 break; 877 case 0: 878 default: 879 } 880 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 881 return true; 882 } 883 884 @java.lang.Override hashCode()885 public int hashCode() { 886 if (memoizedHashCode != 0) { 887 return memoizedHashCode; 888 } 889 int hash = 41; 890 hash = (19 * hash) + getDescriptor().hashCode(); 891 if (getArgsCount() > 0) { 892 hash = (37 * hash) + ARGS_FIELD_NUMBER; 893 hash = (53 * hash) + getArgsList().hashCode(); 894 } 895 if (getJarFileUrisCount() > 0) { 896 hash = (37 * hash) + JAR_FILE_URIS_FIELD_NUMBER; 897 hash = (53 * hash) + getJarFileUrisList().hashCode(); 898 } 899 if (getFileUrisCount() > 0) { 900 hash = (37 * hash) + FILE_URIS_FIELD_NUMBER; 901 hash = (53 * hash) + getFileUrisList().hashCode(); 902 } 903 if (getArchiveUrisCount() > 0) { 904 hash = (37 * hash) + ARCHIVE_URIS_FIELD_NUMBER; 905 hash = (53 * hash) + getArchiveUrisList().hashCode(); 906 } 907 if (!internalGetProperties().getMap().isEmpty()) { 908 hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; 909 hash = (53 * hash) + internalGetProperties().hashCode(); 910 } 911 if (hasLoggingConfig()) { 912 hash = (37 * hash) + LOGGING_CONFIG_FIELD_NUMBER; 913 hash = (53 * hash) + getLoggingConfig().hashCode(); 914 } 915 switch (driverCase_) { 916 case 1: 917 hash = (37 * hash) + MAIN_JAR_FILE_URI_FIELD_NUMBER; 918 hash = (53 * hash) + getMainJarFileUri().hashCode(); 919 break; 920 case 2: 921 hash = (37 * hash) + MAIN_CLASS_FIELD_NUMBER; 922 hash = (53 * hash) + getMainClass().hashCode(); 923 break; 924 case 0: 925 default: 926 } 927 hash = (29 * hash) + getUnknownFields().hashCode(); 928 memoizedHashCode = hash; 929 return hash; 930 } 931 parseFrom(java.nio.ByteBuffer data)932 public static com.google.cloud.dataproc.v1.HadoopJob parseFrom(java.nio.ByteBuffer data) 933 throws com.google.protobuf.InvalidProtocolBufferException { 934 return PARSER.parseFrom(data); 935 } 936 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)937 public static com.google.cloud.dataproc.v1.HadoopJob parseFrom( 938 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 939 throws com.google.protobuf.InvalidProtocolBufferException { 940 return PARSER.parseFrom(data, extensionRegistry); 941 } 942 parseFrom( com.google.protobuf.ByteString data)943 public static com.google.cloud.dataproc.v1.HadoopJob parseFrom( 944 com.google.protobuf.ByteString data) 945 throws com.google.protobuf.InvalidProtocolBufferException { 946 return PARSER.parseFrom(data); 947 } 948 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)949 public static com.google.cloud.dataproc.v1.HadoopJob parseFrom( 950 com.google.protobuf.ByteString data, 951 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 952 throws com.google.protobuf.InvalidProtocolBufferException { 953 return PARSER.parseFrom(data, extensionRegistry); 954 } 955 parseFrom(byte[] data)956 public static com.google.cloud.dataproc.v1.HadoopJob parseFrom(byte[] data) 957 throws com.google.protobuf.InvalidProtocolBufferException { 958 return PARSER.parseFrom(data); 959 } 960 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)961 public static com.google.cloud.dataproc.v1.HadoopJob parseFrom( 962 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 963 throws com.google.protobuf.InvalidProtocolBufferException { 964 return PARSER.parseFrom(data, extensionRegistry); 965 } 966 parseFrom(java.io.InputStream input)967 public static com.google.cloud.dataproc.v1.HadoopJob parseFrom(java.io.InputStream input) 968 throws java.io.IOException { 969 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 970 } 971 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)972 public static com.google.cloud.dataproc.v1.HadoopJob parseFrom( 973 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 974 throws java.io.IOException { 975 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 976 PARSER, input, extensionRegistry); 977 } 978 parseDelimitedFrom(java.io.InputStream input)979 public static com.google.cloud.dataproc.v1.HadoopJob parseDelimitedFrom(java.io.InputStream input) 980 throws java.io.IOException { 981 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 982 } 983 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)984 public static com.google.cloud.dataproc.v1.HadoopJob parseDelimitedFrom( 985 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 986 throws java.io.IOException { 987 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 988 PARSER, input, extensionRegistry); 989 } 990 parseFrom( com.google.protobuf.CodedInputStream input)991 public static com.google.cloud.dataproc.v1.HadoopJob parseFrom( 992 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 993 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 994 } 995 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)996 public static com.google.cloud.dataproc.v1.HadoopJob parseFrom( 997 com.google.protobuf.CodedInputStream input, 998 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 999 throws java.io.IOException { 1000 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1001 PARSER, input, extensionRegistry); 1002 } 1003 1004 @java.lang.Override newBuilderForType()1005 public Builder newBuilderForType() { 1006 return newBuilder(); 1007 } 1008 newBuilder()1009 public static Builder newBuilder() { 1010 return DEFAULT_INSTANCE.toBuilder(); 1011 } 1012 newBuilder(com.google.cloud.dataproc.v1.HadoopJob prototype)1013 public static Builder newBuilder(com.google.cloud.dataproc.v1.HadoopJob prototype) { 1014 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 1015 } 1016 1017 @java.lang.Override toBuilder()1018 public Builder toBuilder() { 1019 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 1020 } 1021 1022 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1023 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1024 Builder builder = new Builder(parent); 1025 return builder; 1026 } 1027 /** 1028 * 1029 * 1030 * <pre> 1031 * A Dataproc job for running 1032 * [Apache Hadoop 1033 * MapReduce](https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html) 1034 * jobs on [Apache Hadoop 1035 * YARN](https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html). 1036 * </pre> 1037 * 1038 * Protobuf type {@code google.cloud.dataproc.v1.HadoopJob} 1039 */ 1040 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 1041 implements 1042 // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.HadoopJob) 1043 com.google.cloud.dataproc.v1.HadoopJobOrBuilder { getDescriptor()1044 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 1045 return com.google.cloud.dataproc.v1.JobsProto 1046 .internal_static_google_cloud_dataproc_v1_HadoopJob_descriptor; 1047 } 1048 1049 @SuppressWarnings({"rawtypes"}) internalGetMapField(int number)1050 protected com.google.protobuf.MapField internalGetMapField(int number) { 1051 switch (number) { 1052 case 7: 1053 return internalGetProperties(); 1054 default: 1055 throw new RuntimeException("Invalid map field number: " + number); 1056 } 1057 } 1058 1059 @SuppressWarnings({"rawtypes"}) internalGetMutableMapField(int number)1060 protected com.google.protobuf.MapField internalGetMutableMapField(int number) { 1061 switch (number) { 1062 case 7: 1063 return internalGetMutableProperties(); 1064 default: 1065 throw new RuntimeException("Invalid map field number: " + number); 1066 } 1067 } 1068 1069 @java.lang.Override 1070 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()1071 internalGetFieldAccessorTable() { 1072 return com.google.cloud.dataproc.v1.JobsProto 1073 .internal_static_google_cloud_dataproc_v1_HadoopJob_fieldAccessorTable 1074 .ensureFieldAccessorsInitialized( 1075 com.google.cloud.dataproc.v1.HadoopJob.class, 1076 com.google.cloud.dataproc.v1.HadoopJob.Builder.class); 1077 } 1078 1079 // Construct using com.google.cloud.dataproc.v1.HadoopJob.newBuilder() Builder()1080 private Builder() {} 1081 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1082 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1083 super(parent); 1084 } 1085 1086 @java.lang.Override clear()1087 public Builder clear() { 1088 super.clear(); 1089 bitField0_ = 0; 1090 args_ = com.google.protobuf.LazyStringArrayList.EMPTY; 1091 bitField0_ = (bitField0_ & ~0x00000004); 1092 jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; 1093 bitField0_ = (bitField0_ & ~0x00000008); 1094 fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; 1095 bitField0_ = (bitField0_ & ~0x00000010); 1096 archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; 1097 bitField0_ = (bitField0_ & ~0x00000020); 1098 internalGetMutableProperties().clear(); 1099 loggingConfig_ = null; 1100 if (loggingConfigBuilder_ != null) { 1101 loggingConfigBuilder_.dispose(); 1102 loggingConfigBuilder_ = null; 1103 } 1104 driverCase_ = 0; 1105 driver_ = null; 1106 return this; 1107 } 1108 1109 @java.lang.Override getDescriptorForType()1110 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 1111 return com.google.cloud.dataproc.v1.JobsProto 1112 .internal_static_google_cloud_dataproc_v1_HadoopJob_descriptor; 1113 } 1114 1115 @java.lang.Override getDefaultInstanceForType()1116 public com.google.cloud.dataproc.v1.HadoopJob getDefaultInstanceForType() { 1117 return com.google.cloud.dataproc.v1.HadoopJob.getDefaultInstance(); 1118 } 1119 1120 @java.lang.Override build()1121 public com.google.cloud.dataproc.v1.HadoopJob build() { 1122 com.google.cloud.dataproc.v1.HadoopJob result = buildPartial(); 1123 if (!result.isInitialized()) { 1124 throw newUninitializedMessageException(result); 1125 } 1126 return result; 1127 } 1128 1129 @java.lang.Override buildPartial()1130 public com.google.cloud.dataproc.v1.HadoopJob buildPartial() { 1131 com.google.cloud.dataproc.v1.HadoopJob result = 1132 new com.google.cloud.dataproc.v1.HadoopJob(this); 1133 buildPartialRepeatedFields(result); 1134 if (bitField0_ != 0) { 1135 buildPartial0(result); 1136 } 1137 buildPartialOneofs(result); 1138 onBuilt(); 1139 return result; 1140 } 1141 buildPartialRepeatedFields(com.google.cloud.dataproc.v1.HadoopJob result)1142 private void buildPartialRepeatedFields(com.google.cloud.dataproc.v1.HadoopJob result) { 1143 if (((bitField0_ & 0x00000004) != 0)) { 1144 args_ = args_.getUnmodifiableView(); 1145 bitField0_ = (bitField0_ & ~0x00000004); 1146 } 1147 result.args_ = args_; 1148 if (((bitField0_ & 0x00000008) != 0)) { 1149 jarFileUris_ = jarFileUris_.getUnmodifiableView(); 1150 bitField0_ = (bitField0_ & ~0x00000008); 1151 } 1152 result.jarFileUris_ = jarFileUris_; 1153 if (((bitField0_ & 0x00000010) != 0)) { 1154 fileUris_ = fileUris_.getUnmodifiableView(); 1155 bitField0_ = (bitField0_ & ~0x00000010); 1156 } 1157 result.fileUris_ = fileUris_; 1158 if (((bitField0_ & 0x00000020) != 0)) { 1159 archiveUris_ = archiveUris_.getUnmodifiableView(); 1160 bitField0_ = (bitField0_ & ~0x00000020); 1161 } 1162 result.archiveUris_ = archiveUris_; 1163 } 1164 buildPartial0(com.google.cloud.dataproc.v1.HadoopJob result)1165 private void buildPartial0(com.google.cloud.dataproc.v1.HadoopJob result) { 1166 int from_bitField0_ = bitField0_; 1167 if (((from_bitField0_ & 0x00000040) != 0)) { 1168 result.properties_ = internalGetProperties(); 1169 result.properties_.makeImmutable(); 1170 } 1171 if (((from_bitField0_ & 0x00000080) != 0)) { 1172 result.loggingConfig_ = 1173 loggingConfigBuilder_ == null ? loggingConfig_ : loggingConfigBuilder_.build(); 1174 } 1175 } 1176 buildPartialOneofs(com.google.cloud.dataproc.v1.HadoopJob result)1177 private void buildPartialOneofs(com.google.cloud.dataproc.v1.HadoopJob result) { 1178 result.driverCase_ = driverCase_; 1179 result.driver_ = this.driver_; 1180 } 1181 1182 @java.lang.Override clone()1183 public Builder clone() { 1184 return super.clone(); 1185 } 1186 1187 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1188 public Builder setField( 1189 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1190 return super.setField(field, value); 1191 } 1192 1193 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1194 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 1195 return super.clearField(field); 1196 } 1197 1198 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1199 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 1200 return super.clearOneof(oneof); 1201 } 1202 1203 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1204 public Builder setRepeatedField( 1205 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 1206 return super.setRepeatedField(field, index, value); 1207 } 1208 1209 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1210 public Builder addRepeatedField( 1211 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1212 return super.addRepeatedField(field, value); 1213 } 1214 1215 @java.lang.Override mergeFrom(com.google.protobuf.Message other)1216 public Builder mergeFrom(com.google.protobuf.Message other) { 1217 if (other instanceof com.google.cloud.dataproc.v1.HadoopJob) { 1218 return mergeFrom((com.google.cloud.dataproc.v1.HadoopJob) other); 1219 } else { 1220 super.mergeFrom(other); 1221 return this; 1222 } 1223 } 1224 mergeFrom(com.google.cloud.dataproc.v1.HadoopJob other)1225 public Builder mergeFrom(com.google.cloud.dataproc.v1.HadoopJob other) { 1226 if (other == com.google.cloud.dataproc.v1.HadoopJob.getDefaultInstance()) return this; 1227 if (!other.args_.isEmpty()) { 1228 if (args_.isEmpty()) { 1229 args_ = other.args_; 1230 bitField0_ = (bitField0_ & ~0x00000004); 1231 } else { 1232 ensureArgsIsMutable(); 1233 args_.addAll(other.args_); 1234 } 1235 onChanged(); 1236 } 1237 if (!other.jarFileUris_.isEmpty()) { 1238 if (jarFileUris_.isEmpty()) { 1239 jarFileUris_ = other.jarFileUris_; 1240 bitField0_ = (bitField0_ & ~0x00000008); 1241 } else { 1242 ensureJarFileUrisIsMutable(); 1243 jarFileUris_.addAll(other.jarFileUris_); 1244 } 1245 onChanged(); 1246 } 1247 if (!other.fileUris_.isEmpty()) { 1248 if (fileUris_.isEmpty()) { 1249 fileUris_ = other.fileUris_; 1250 bitField0_ = (bitField0_ & ~0x00000010); 1251 } else { 1252 ensureFileUrisIsMutable(); 1253 fileUris_.addAll(other.fileUris_); 1254 } 1255 onChanged(); 1256 } 1257 if (!other.archiveUris_.isEmpty()) { 1258 if (archiveUris_.isEmpty()) { 1259 archiveUris_ = other.archiveUris_; 1260 bitField0_ = (bitField0_ & ~0x00000020); 1261 } else { 1262 ensureArchiveUrisIsMutable(); 1263 archiveUris_.addAll(other.archiveUris_); 1264 } 1265 onChanged(); 1266 } 1267 internalGetMutableProperties().mergeFrom(other.internalGetProperties()); 1268 bitField0_ |= 0x00000040; 1269 if (other.hasLoggingConfig()) { 1270 mergeLoggingConfig(other.getLoggingConfig()); 1271 } 1272 switch (other.getDriverCase()) { 1273 case MAIN_JAR_FILE_URI: 1274 { 1275 driverCase_ = 1; 1276 driver_ = other.driver_; 1277 onChanged(); 1278 break; 1279 } 1280 case MAIN_CLASS: 1281 { 1282 driverCase_ = 2; 1283 driver_ = other.driver_; 1284 onChanged(); 1285 break; 1286 } 1287 case DRIVER_NOT_SET: 1288 { 1289 break; 1290 } 1291 } 1292 this.mergeUnknownFields(other.getUnknownFields()); 1293 onChanged(); 1294 return this; 1295 } 1296 1297 @java.lang.Override isInitialized()1298 public final boolean isInitialized() { 1299 return true; 1300 } 1301 1302 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1303 public Builder mergeFrom( 1304 com.google.protobuf.CodedInputStream input, 1305 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1306 throws java.io.IOException { 1307 if (extensionRegistry == null) { 1308 throw new java.lang.NullPointerException(); 1309 } 1310 try { 1311 boolean done = false; 1312 while (!done) { 1313 int tag = input.readTag(); 1314 switch (tag) { 1315 case 0: 1316 done = true; 1317 break; 1318 case 10: 1319 { 1320 java.lang.String s = input.readStringRequireUtf8(); 1321 driverCase_ = 1; 1322 driver_ = s; 1323 break; 1324 } // case 10 1325 case 18: 1326 { 1327 java.lang.String s = input.readStringRequireUtf8(); 1328 driverCase_ = 2; 1329 driver_ = s; 1330 break; 1331 } // case 18 1332 case 26: 1333 { 1334 java.lang.String s = input.readStringRequireUtf8(); 1335 ensureArgsIsMutable(); 1336 args_.add(s); 1337 break; 1338 } // case 26 1339 case 34: 1340 { 1341 java.lang.String s = input.readStringRequireUtf8(); 1342 ensureJarFileUrisIsMutable(); 1343 jarFileUris_.add(s); 1344 break; 1345 } // case 34 1346 case 42: 1347 { 1348 java.lang.String s = input.readStringRequireUtf8(); 1349 ensureFileUrisIsMutable(); 1350 fileUris_.add(s); 1351 break; 1352 } // case 42 1353 case 50: 1354 { 1355 java.lang.String s = input.readStringRequireUtf8(); 1356 ensureArchiveUrisIsMutable(); 1357 archiveUris_.add(s); 1358 break; 1359 } // case 50 1360 case 58: 1361 { 1362 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> properties__ = 1363 input.readMessage( 1364 PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), 1365 extensionRegistry); 1366 internalGetMutableProperties() 1367 .getMutableMap() 1368 .put(properties__.getKey(), properties__.getValue()); 1369 bitField0_ |= 0x00000040; 1370 break; 1371 } // case 58 1372 case 66: 1373 { 1374 input.readMessage(getLoggingConfigFieldBuilder().getBuilder(), extensionRegistry); 1375 bitField0_ |= 0x00000080; 1376 break; 1377 } // case 66 1378 default: 1379 { 1380 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1381 done = true; // was an endgroup tag 1382 } 1383 break; 1384 } // default: 1385 } // switch (tag) 1386 } // while (!done) 1387 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1388 throw e.unwrapIOException(); 1389 } finally { 1390 onChanged(); 1391 } // finally 1392 return this; 1393 } 1394 1395 private int driverCase_ = 0; 1396 private java.lang.Object driver_; 1397 getDriverCase()1398 public DriverCase getDriverCase() { 1399 return DriverCase.forNumber(driverCase_); 1400 } 1401 clearDriver()1402 public Builder clearDriver() { 1403 driverCase_ = 0; 1404 driver_ = null; 1405 onChanged(); 1406 return this; 1407 } 1408 1409 private int bitField0_; 1410 1411 /** 1412 * 1413 * 1414 * <pre> 1415 * The HCFS URI of the jar file containing the main class. 1416 * Examples: 1417 * 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar' 1418 * 'hdfs:/tmp/test-samples/custom-wordcount.jar' 1419 * 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar' 1420 * </pre> 1421 * 1422 * <code>string main_jar_file_uri = 1;</code> 1423 * 1424 * @return Whether the mainJarFileUri field is set. 1425 */ 1426 @java.lang.Override hasMainJarFileUri()1427 public boolean hasMainJarFileUri() { 1428 return driverCase_ == 1; 1429 } 1430 /** 1431 * 1432 * 1433 * <pre> 1434 * The HCFS URI of the jar file containing the main class. 1435 * Examples: 1436 * 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar' 1437 * 'hdfs:/tmp/test-samples/custom-wordcount.jar' 1438 * 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar' 1439 * </pre> 1440 * 1441 * <code>string main_jar_file_uri = 1;</code> 1442 * 1443 * @return The mainJarFileUri. 1444 */ 1445 @java.lang.Override getMainJarFileUri()1446 public java.lang.String getMainJarFileUri() { 1447 java.lang.Object ref = ""; 1448 if (driverCase_ == 1) { 1449 ref = driver_; 1450 } 1451 if (!(ref instanceof java.lang.String)) { 1452 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1453 java.lang.String s = bs.toStringUtf8(); 1454 if (driverCase_ == 1) { 1455 driver_ = s; 1456 } 1457 return s; 1458 } else { 1459 return (java.lang.String) ref; 1460 } 1461 } 1462 /** 1463 * 1464 * 1465 * <pre> 1466 * The HCFS URI of the jar file containing the main class. 1467 * Examples: 1468 * 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar' 1469 * 'hdfs:/tmp/test-samples/custom-wordcount.jar' 1470 * 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar' 1471 * </pre> 1472 * 1473 * <code>string main_jar_file_uri = 1;</code> 1474 * 1475 * @return The bytes for mainJarFileUri. 1476 */ 1477 @java.lang.Override getMainJarFileUriBytes()1478 public com.google.protobuf.ByteString getMainJarFileUriBytes() { 1479 java.lang.Object ref = ""; 1480 if (driverCase_ == 1) { 1481 ref = driver_; 1482 } 1483 if (ref instanceof String) { 1484 com.google.protobuf.ByteString b = 1485 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1486 if (driverCase_ == 1) { 1487 driver_ = b; 1488 } 1489 return b; 1490 } else { 1491 return (com.google.protobuf.ByteString) ref; 1492 } 1493 } 1494 /** 1495 * 1496 * 1497 * <pre> 1498 * The HCFS URI of the jar file containing the main class. 1499 * Examples: 1500 * 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar' 1501 * 'hdfs:/tmp/test-samples/custom-wordcount.jar' 1502 * 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar' 1503 * </pre> 1504 * 1505 * <code>string main_jar_file_uri = 1;</code> 1506 * 1507 * @param value The mainJarFileUri to set. 1508 * @return This builder for chaining. 1509 */ setMainJarFileUri(java.lang.String value)1510 public Builder setMainJarFileUri(java.lang.String value) { 1511 if (value == null) { 1512 throw new NullPointerException(); 1513 } 1514 driverCase_ = 1; 1515 driver_ = value; 1516 onChanged(); 1517 return this; 1518 } 1519 /** 1520 * 1521 * 1522 * <pre> 1523 * The HCFS URI of the jar file containing the main class. 1524 * Examples: 1525 * 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar' 1526 * 'hdfs:/tmp/test-samples/custom-wordcount.jar' 1527 * 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar' 1528 * </pre> 1529 * 1530 * <code>string main_jar_file_uri = 1;</code> 1531 * 1532 * @return This builder for chaining. 1533 */ clearMainJarFileUri()1534 public Builder clearMainJarFileUri() { 1535 if (driverCase_ == 1) { 1536 driverCase_ = 0; 1537 driver_ = null; 1538 onChanged(); 1539 } 1540 return this; 1541 } 1542 /** 1543 * 1544 * 1545 * <pre> 1546 * The HCFS URI of the jar file containing the main class. 1547 * Examples: 1548 * 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar' 1549 * 'hdfs:/tmp/test-samples/custom-wordcount.jar' 1550 * 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar' 1551 * </pre> 1552 * 1553 * <code>string main_jar_file_uri = 1;</code> 1554 * 1555 * @param value The bytes for mainJarFileUri to set. 1556 * @return This builder for chaining. 1557 */ setMainJarFileUriBytes(com.google.protobuf.ByteString value)1558 public Builder setMainJarFileUriBytes(com.google.protobuf.ByteString value) { 1559 if (value == null) { 1560 throw new NullPointerException(); 1561 } 1562 checkByteStringIsUtf8(value); 1563 driverCase_ = 1; 1564 driver_ = value; 1565 onChanged(); 1566 return this; 1567 } 1568 1569 /** 1570 * 1571 * 1572 * <pre> 1573 * The name of the driver's main class. The jar file containing the class 1574 * must be in the default CLASSPATH or specified in `jar_file_uris`. 1575 * </pre> 1576 * 1577 * <code>string main_class = 2;</code> 1578 * 1579 * @return Whether the mainClass field is set. 1580 */ 1581 @java.lang.Override hasMainClass()1582 public boolean hasMainClass() { 1583 return driverCase_ == 2; 1584 } 1585 /** 1586 * 1587 * 1588 * <pre> 1589 * The name of the driver's main class. The jar file containing the class 1590 * must be in the default CLASSPATH or specified in `jar_file_uris`. 1591 * </pre> 1592 * 1593 * <code>string main_class = 2;</code> 1594 * 1595 * @return The mainClass. 1596 */ 1597 @java.lang.Override getMainClass()1598 public java.lang.String getMainClass() { 1599 java.lang.Object ref = ""; 1600 if (driverCase_ == 2) { 1601 ref = driver_; 1602 } 1603 if (!(ref instanceof java.lang.String)) { 1604 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1605 java.lang.String s = bs.toStringUtf8(); 1606 if (driverCase_ == 2) { 1607 driver_ = s; 1608 } 1609 return s; 1610 } else { 1611 return (java.lang.String) ref; 1612 } 1613 } 1614 /** 1615 * 1616 * 1617 * <pre> 1618 * The name of the driver's main class. The jar file containing the class 1619 * must be in the default CLASSPATH or specified in `jar_file_uris`. 1620 * </pre> 1621 * 1622 * <code>string main_class = 2;</code> 1623 * 1624 * @return The bytes for mainClass. 1625 */ 1626 @java.lang.Override getMainClassBytes()1627 public com.google.protobuf.ByteString getMainClassBytes() { 1628 java.lang.Object ref = ""; 1629 if (driverCase_ == 2) { 1630 ref = driver_; 1631 } 1632 if (ref instanceof String) { 1633 com.google.protobuf.ByteString b = 1634 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1635 if (driverCase_ == 2) { 1636 driver_ = b; 1637 } 1638 return b; 1639 } else { 1640 return (com.google.protobuf.ByteString) ref; 1641 } 1642 } 1643 /** 1644 * 1645 * 1646 * <pre> 1647 * The name of the driver's main class. The jar file containing the class 1648 * must be in the default CLASSPATH or specified in `jar_file_uris`. 1649 * </pre> 1650 * 1651 * <code>string main_class = 2;</code> 1652 * 1653 * @param value The mainClass to set. 1654 * @return This builder for chaining. 1655 */ setMainClass(java.lang.String value)1656 public Builder setMainClass(java.lang.String value) { 1657 if (value == null) { 1658 throw new NullPointerException(); 1659 } 1660 driverCase_ = 2; 1661 driver_ = value; 1662 onChanged(); 1663 return this; 1664 } 1665 /** 1666 * 1667 * 1668 * <pre> 1669 * The name of the driver's main class. The jar file containing the class 1670 * must be in the default CLASSPATH or specified in `jar_file_uris`. 1671 * </pre> 1672 * 1673 * <code>string main_class = 2;</code> 1674 * 1675 * @return This builder for chaining. 1676 */ clearMainClass()1677 public Builder clearMainClass() { 1678 if (driverCase_ == 2) { 1679 driverCase_ = 0; 1680 driver_ = null; 1681 onChanged(); 1682 } 1683 return this; 1684 } 1685 /** 1686 * 1687 * 1688 * <pre> 1689 * The name of the driver's main class. The jar file containing the class 1690 * must be in the default CLASSPATH or specified in `jar_file_uris`. 1691 * </pre> 1692 * 1693 * <code>string main_class = 2;</code> 1694 * 1695 * @param value The bytes for mainClass to set. 1696 * @return This builder for chaining. 1697 */ setMainClassBytes(com.google.protobuf.ByteString value)1698 public Builder setMainClassBytes(com.google.protobuf.ByteString value) { 1699 if (value == null) { 1700 throw new NullPointerException(); 1701 } 1702 checkByteStringIsUtf8(value); 1703 driverCase_ = 2; 1704 driver_ = value; 1705 onChanged(); 1706 return this; 1707 } 1708 1709 private com.google.protobuf.LazyStringList args_ = 1710 com.google.protobuf.LazyStringArrayList.EMPTY; 1711 ensureArgsIsMutable()1712 private void ensureArgsIsMutable() { 1713 if (!((bitField0_ & 0x00000004) != 0)) { 1714 args_ = new com.google.protobuf.LazyStringArrayList(args_); 1715 bitField0_ |= 0x00000004; 1716 } 1717 } 1718 /** 1719 * 1720 * 1721 * <pre> 1722 * Optional. The arguments to pass to the driver. Do not 1723 * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as 1724 * job properties, since a collision may occur that causes an incorrect job 1725 * submission. 1726 * </pre> 1727 * 1728 * <code>repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 1729 * 1730 * @return A list containing the args. 1731 */ getArgsList()1732 public com.google.protobuf.ProtocolStringList getArgsList() { 1733 return args_.getUnmodifiableView(); 1734 } 1735 /** 1736 * 1737 * 1738 * <pre> 1739 * Optional. The arguments to pass to the driver. Do not 1740 * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as 1741 * job properties, since a collision may occur that causes an incorrect job 1742 * submission. 1743 * </pre> 1744 * 1745 * <code>repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 1746 * 1747 * @return The count of args. 1748 */ getArgsCount()1749 public int getArgsCount() { 1750 return args_.size(); 1751 } 1752 /** 1753 * 1754 * 1755 * <pre> 1756 * Optional. The arguments to pass to the driver. Do not 1757 * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as 1758 * job properties, since a collision may occur that causes an incorrect job 1759 * submission. 1760 * </pre> 1761 * 1762 * <code>repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 1763 * 1764 * @param index The index of the element to return. 1765 * @return The args at the given index. 1766 */ getArgs(int index)1767 public java.lang.String getArgs(int index) { 1768 return args_.get(index); 1769 } 1770 /** 1771 * 1772 * 1773 * <pre> 1774 * Optional. The arguments to pass to the driver. Do not 1775 * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as 1776 * job properties, since a collision may occur that causes an incorrect job 1777 * submission. 1778 * </pre> 1779 * 1780 * <code>repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 1781 * 1782 * @param index The index of the value to return. 1783 * @return The bytes of the args at the given index. 1784 */ getArgsBytes(int index)1785 public com.google.protobuf.ByteString getArgsBytes(int index) { 1786 return args_.getByteString(index); 1787 } 1788 /** 1789 * 1790 * 1791 * <pre> 1792 * Optional. The arguments to pass to the driver. Do not 1793 * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as 1794 * job properties, since a collision may occur that causes an incorrect job 1795 * submission. 1796 * </pre> 1797 * 1798 * <code>repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 1799 * 1800 * @param index The index to set the value at. 1801 * @param value The args to set. 1802 * @return This builder for chaining. 1803 */ setArgs(int index, java.lang.String value)1804 public Builder setArgs(int index, java.lang.String value) { 1805 if (value == null) { 1806 throw new NullPointerException(); 1807 } 1808 ensureArgsIsMutable(); 1809 args_.set(index, value); 1810 onChanged(); 1811 return this; 1812 } 1813 /** 1814 * 1815 * 1816 * <pre> 1817 * Optional. The arguments to pass to the driver. Do not 1818 * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as 1819 * job properties, since a collision may occur that causes an incorrect job 1820 * submission. 1821 * </pre> 1822 * 1823 * <code>repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 1824 * 1825 * @param value The args to add. 1826 * @return This builder for chaining. 1827 */ addArgs(java.lang.String value)1828 public Builder addArgs(java.lang.String value) { 1829 if (value == null) { 1830 throw new NullPointerException(); 1831 } 1832 ensureArgsIsMutable(); 1833 args_.add(value); 1834 onChanged(); 1835 return this; 1836 } 1837 /** 1838 * 1839 * 1840 * <pre> 1841 * Optional. The arguments to pass to the driver. Do not 1842 * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as 1843 * job properties, since a collision may occur that causes an incorrect job 1844 * submission. 1845 * </pre> 1846 * 1847 * <code>repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 1848 * 1849 * @param values The args to add. 1850 * @return This builder for chaining. 1851 */ addAllArgs(java.lang.Iterable<java.lang.String> values)1852 public Builder addAllArgs(java.lang.Iterable<java.lang.String> values) { 1853 ensureArgsIsMutable(); 1854 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, args_); 1855 onChanged(); 1856 return this; 1857 } 1858 /** 1859 * 1860 * 1861 * <pre> 1862 * Optional. The arguments to pass to the driver. Do not 1863 * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as 1864 * job properties, since a collision may occur that causes an incorrect job 1865 * submission. 1866 * </pre> 1867 * 1868 * <code>repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 1869 * 1870 * @return This builder for chaining. 1871 */ clearArgs()1872 public Builder clearArgs() { 1873 args_ = com.google.protobuf.LazyStringArrayList.EMPTY; 1874 bitField0_ = (bitField0_ & ~0x00000004); 1875 onChanged(); 1876 return this; 1877 } 1878 /** 1879 * 1880 * 1881 * <pre> 1882 * Optional. The arguments to pass to the driver. Do not 1883 * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as 1884 * job properties, since a collision may occur that causes an incorrect job 1885 * submission. 1886 * </pre> 1887 * 1888 * <code>repeated string args = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 1889 * 1890 * @param value The bytes of the args to add. 1891 * @return This builder for chaining. 1892 */ addArgsBytes(com.google.protobuf.ByteString value)1893 public Builder addArgsBytes(com.google.protobuf.ByteString value) { 1894 if (value == null) { 1895 throw new NullPointerException(); 1896 } 1897 checkByteStringIsUtf8(value); 1898 ensureArgsIsMutable(); 1899 args_.add(value); 1900 onChanged(); 1901 return this; 1902 } 1903 1904 private com.google.protobuf.LazyStringList jarFileUris_ = 1905 com.google.protobuf.LazyStringArrayList.EMPTY; 1906 ensureJarFileUrisIsMutable()1907 private void ensureJarFileUrisIsMutable() { 1908 if (!((bitField0_ & 0x00000008) != 0)) { 1909 jarFileUris_ = new com.google.protobuf.LazyStringArrayList(jarFileUris_); 1910 bitField0_ |= 0x00000008; 1911 } 1912 } 1913 /** 1914 * 1915 * 1916 * <pre> 1917 * Optional. Jar file URIs to add to the CLASSPATHs of the 1918 * Hadoop driver and tasks. 1919 * </pre> 1920 * 1921 * <code>repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL];</code> 1922 * 1923 * @return A list containing the jarFileUris. 1924 */ getJarFileUrisList()1925 public com.google.protobuf.ProtocolStringList getJarFileUrisList() { 1926 return jarFileUris_.getUnmodifiableView(); 1927 } 1928 /** 1929 * 1930 * 1931 * <pre> 1932 * Optional. Jar file URIs to add to the CLASSPATHs of the 1933 * Hadoop driver and tasks. 1934 * </pre> 1935 * 1936 * <code>repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL];</code> 1937 * 1938 * @return The count of jarFileUris. 1939 */ getJarFileUrisCount()1940 public int getJarFileUrisCount() { 1941 return jarFileUris_.size(); 1942 } 1943 /** 1944 * 1945 * 1946 * <pre> 1947 * Optional. Jar file URIs to add to the CLASSPATHs of the 1948 * Hadoop driver and tasks. 1949 * </pre> 1950 * 1951 * <code>repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL];</code> 1952 * 1953 * @param index The index of the element to return. 1954 * @return The jarFileUris at the given index. 1955 */ getJarFileUris(int index)1956 public java.lang.String getJarFileUris(int index) { 1957 return jarFileUris_.get(index); 1958 } 1959 /** 1960 * 1961 * 1962 * <pre> 1963 * Optional. Jar file URIs to add to the CLASSPATHs of the 1964 * Hadoop driver and tasks. 1965 * </pre> 1966 * 1967 * <code>repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL];</code> 1968 * 1969 * @param index The index of the value to return. 1970 * @return The bytes of the jarFileUris at the given index. 1971 */ getJarFileUrisBytes(int index)1972 public com.google.protobuf.ByteString getJarFileUrisBytes(int index) { 1973 return jarFileUris_.getByteString(index); 1974 } 1975 /** 1976 * 1977 * 1978 * <pre> 1979 * Optional. Jar file URIs to add to the CLASSPATHs of the 1980 * Hadoop driver and tasks. 1981 * </pre> 1982 * 1983 * <code>repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL];</code> 1984 * 1985 * @param index The index to set the value at. 1986 * @param value The jarFileUris to set. 1987 * @return This builder for chaining. 1988 */ setJarFileUris(int index, java.lang.String value)1989 public Builder setJarFileUris(int index, java.lang.String value) { 1990 if (value == null) { 1991 throw new NullPointerException(); 1992 } 1993 ensureJarFileUrisIsMutable(); 1994 jarFileUris_.set(index, value); 1995 onChanged(); 1996 return this; 1997 } 1998 /** 1999 * 2000 * 2001 * <pre> 2002 * Optional. Jar file URIs to add to the CLASSPATHs of the 2003 * Hadoop driver and tasks. 2004 * </pre> 2005 * 2006 * <code>repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL];</code> 2007 * 2008 * @param value The jarFileUris to add. 2009 * @return This builder for chaining. 2010 */ addJarFileUris(java.lang.String value)2011 public Builder addJarFileUris(java.lang.String value) { 2012 if (value == null) { 2013 throw new NullPointerException(); 2014 } 2015 ensureJarFileUrisIsMutable(); 2016 jarFileUris_.add(value); 2017 onChanged(); 2018 return this; 2019 } 2020 /** 2021 * 2022 * 2023 * <pre> 2024 * Optional. Jar file URIs to add to the CLASSPATHs of the 2025 * Hadoop driver and tasks. 2026 * </pre> 2027 * 2028 * <code>repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL];</code> 2029 * 2030 * @param values The jarFileUris to add. 2031 * @return This builder for chaining. 2032 */ addAllJarFileUris(java.lang.Iterable<java.lang.String> values)2033 public Builder addAllJarFileUris(java.lang.Iterable<java.lang.String> values) { 2034 ensureJarFileUrisIsMutable(); 2035 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, jarFileUris_); 2036 onChanged(); 2037 return this; 2038 } 2039 /** 2040 * 2041 * 2042 * <pre> 2043 * Optional. Jar file URIs to add to the CLASSPATHs of the 2044 * Hadoop driver and tasks. 2045 * </pre> 2046 * 2047 * <code>repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL];</code> 2048 * 2049 * @return This builder for chaining. 2050 */ clearJarFileUris()2051 public Builder clearJarFileUris() { 2052 jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; 2053 bitField0_ = (bitField0_ & ~0x00000008); 2054 onChanged(); 2055 return this; 2056 } 2057 /** 2058 * 2059 * 2060 * <pre> 2061 * Optional. Jar file URIs to add to the CLASSPATHs of the 2062 * Hadoop driver and tasks. 2063 * </pre> 2064 * 2065 * <code>repeated string jar_file_uris = 4 [(.google.api.field_behavior) = OPTIONAL];</code> 2066 * 2067 * @param value The bytes of the jarFileUris to add. 2068 * @return This builder for chaining. 2069 */ addJarFileUrisBytes(com.google.protobuf.ByteString value)2070 public Builder addJarFileUrisBytes(com.google.protobuf.ByteString value) { 2071 if (value == null) { 2072 throw new NullPointerException(); 2073 } 2074 checkByteStringIsUtf8(value); 2075 ensureJarFileUrisIsMutable(); 2076 jarFileUris_.add(value); 2077 onChanged(); 2078 return this; 2079 } 2080 2081 private com.google.protobuf.LazyStringList fileUris_ = 2082 com.google.protobuf.LazyStringArrayList.EMPTY; 2083 ensureFileUrisIsMutable()2084 private void ensureFileUrisIsMutable() { 2085 if (!((bitField0_ & 0x00000010) != 0)) { 2086 fileUris_ = new com.google.protobuf.LazyStringArrayList(fileUris_); 2087 bitField0_ |= 0x00000010; 2088 } 2089 } 2090 /** 2091 * 2092 * 2093 * <pre> 2094 * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied 2095 * to the working directory of Hadoop drivers and distributed tasks. Useful 2096 * for naively parallel tasks. 2097 * </pre> 2098 * 2099 * <code>repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL];</code> 2100 * 2101 * @return A list containing the fileUris. 2102 */ getFileUrisList()2103 public com.google.protobuf.ProtocolStringList getFileUrisList() { 2104 return fileUris_.getUnmodifiableView(); 2105 } 2106 /** 2107 * 2108 * 2109 * <pre> 2110 * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied 2111 * to the working directory of Hadoop drivers and distributed tasks. Useful 2112 * for naively parallel tasks. 2113 * </pre> 2114 * 2115 * <code>repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL];</code> 2116 * 2117 * @return The count of fileUris. 2118 */ getFileUrisCount()2119 public int getFileUrisCount() { 2120 return fileUris_.size(); 2121 } 2122 /** 2123 * 2124 * 2125 * <pre> 2126 * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied 2127 * to the working directory of Hadoop drivers and distributed tasks. Useful 2128 * for naively parallel tasks. 2129 * </pre> 2130 * 2131 * <code>repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL];</code> 2132 * 2133 * @param index The index of the element to return. 2134 * @return The fileUris at the given index. 2135 */ getFileUris(int index)2136 public java.lang.String getFileUris(int index) { 2137 return fileUris_.get(index); 2138 } 2139 /** 2140 * 2141 * 2142 * <pre> 2143 * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied 2144 * to the working directory of Hadoop drivers and distributed tasks. Useful 2145 * for naively parallel tasks. 2146 * </pre> 2147 * 2148 * <code>repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL];</code> 2149 * 2150 * @param index The index of the value to return. 2151 * @return The bytes of the fileUris at the given index. 2152 */ getFileUrisBytes(int index)2153 public com.google.protobuf.ByteString getFileUrisBytes(int index) { 2154 return fileUris_.getByteString(index); 2155 } 2156 /** 2157 * 2158 * 2159 * <pre> 2160 * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied 2161 * to the working directory of Hadoop drivers and distributed tasks. Useful 2162 * for naively parallel tasks. 2163 * </pre> 2164 * 2165 * <code>repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL];</code> 2166 * 2167 * @param index The index to set the value at. 2168 * @param value The fileUris to set. 2169 * @return This builder for chaining. 2170 */ setFileUris(int index, java.lang.String value)2171 public Builder setFileUris(int index, java.lang.String value) { 2172 if (value == null) { 2173 throw new NullPointerException(); 2174 } 2175 ensureFileUrisIsMutable(); 2176 fileUris_.set(index, value); 2177 onChanged(); 2178 return this; 2179 } 2180 /** 2181 * 2182 * 2183 * <pre> 2184 * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied 2185 * to the working directory of Hadoop drivers and distributed tasks. Useful 2186 * for naively parallel tasks. 2187 * </pre> 2188 * 2189 * <code>repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL];</code> 2190 * 2191 * @param value The fileUris to add. 2192 * @return This builder for chaining. 2193 */ addFileUris(java.lang.String value)2194 public Builder addFileUris(java.lang.String value) { 2195 if (value == null) { 2196 throw new NullPointerException(); 2197 } 2198 ensureFileUrisIsMutable(); 2199 fileUris_.add(value); 2200 onChanged(); 2201 return this; 2202 } 2203 /** 2204 * 2205 * 2206 * <pre> 2207 * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied 2208 * to the working directory of Hadoop drivers and distributed tasks. Useful 2209 * for naively parallel tasks. 2210 * </pre> 2211 * 2212 * <code>repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL];</code> 2213 * 2214 * @param values The fileUris to add. 2215 * @return This builder for chaining. 2216 */ addAllFileUris(java.lang.Iterable<java.lang.String> values)2217 public Builder addAllFileUris(java.lang.Iterable<java.lang.String> values) { 2218 ensureFileUrisIsMutable(); 2219 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fileUris_); 2220 onChanged(); 2221 return this; 2222 } 2223 /** 2224 * 2225 * 2226 * <pre> 2227 * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied 2228 * to the working directory of Hadoop drivers and distributed tasks. Useful 2229 * for naively parallel tasks. 2230 * </pre> 2231 * 2232 * <code>repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL];</code> 2233 * 2234 * @return This builder for chaining. 2235 */ clearFileUris()2236 public Builder clearFileUris() { 2237 fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; 2238 bitField0_ = (bitField0_ & ~0x00000010); 2239 onChanged(); 2240 return this; 2241 } 2242 /** 2243 * 2244 * 2245 * <pre> 2246 * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied 2247 * to the working directory of Hadoop drivers and distributed tasks. Useful 2248 * for naively parallel tasks. 2249 * </pre> 2250 * 2251 * <code>repeated string file_uris = 5 [(.google.api.field_behavior) = OPTIONAL];</code> 2252 * 2253 * @param value The bytes of the fileUris to add. 2254 * @return This builder for chaining. 2255 */ addFileUrisBytes(com.google.protobuf.ByteString value)2256 public Builder addFileUrisBytes(com.google.protobuf.ByteString value) { 2257 if (value == null) { 2258 throw new NullPointerException(); 2259 } 2260 checkByteStringIsUtf8(value); 2261 ensureFileUrisIsMutable(); 2262 fileUris_.add(value); 2263 onChanged(); 2264 return this; 2265 } 2266 2267 private com.google.protobuf.LazyStringList archiveUris_ = 2268 com.google.protobuf.LazyStringArrayList.EMPTY; 2269 ensureArchiveUrisIsMutable()2270 private void ensureArchiveUrisIsMutable() { 2271 if (!((bitField0_ & 0x00000020) != 0)) { 2272 archiveUris_ = new com.google.protobuf.LazyStringArrayList(archiveUris_); 2273 bitField0_ |= 0x00000020; 2274 } 2275 } 2276 /** 2277 * 2278 * 2279 * <pre> 2280 * Optional. HCFS URIs of archives to be extracted in the working directory of 2281 * Hadoop drivers and tasks. Supported file types: 2282 * .jar, .tar, .tar.gz, .tgz, or .zip. 2283 * </pre> 2284 * 2285 * <code>repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 2286 * 2287 * @return A list containing the archiveUris. 2288 */ getArchiveUrisList()2289 public com.google.protobuf.ProtocolStringList getArchiveUrisList() { 2290 return archiveUris_.getUnmodifiableView(); 2291 } 2292 /** 2293 * 2294 * 2295 * <pre> 2296 * Optional. HCFS URIs of archives to be extracted in the working directory of 2297 * Hadoop drivers and tasks. Supported file types: 2298 * .jar, .tar, .tar.gz, .tgz, or .zip. 2299 * </pre> 2300 * 2301 * <code>repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 2302 * 2303 * @return The count of archiveUris. 2304 */ getArchiveUrisCount()2305 public int getArchiveUrisCount() { 2306 return archiveUris_.size(); 2307 } 2308 /** 2309 * 2310 * 2311 * <pre> 2312 * Optional. HCFS URIs of archives to be extracted in the working directory of 2313 * Hadoop drivers and tasks. Supported file types: 2314 * .jar, .tar, .tar.gz, .tgz, or .zip. 2315 * </pre> 2316 * 2317 * <code>repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 2318 * 2319 * @param index The index of the element to return. 2320 * @return The archiveUris at the given index. 2321 */ getArchiveUris(int index)2322 public java.lang.String getArchiveUris(int index) { 2323 return archiveUris_.get(index); 2324 } 2325 /** 2326 * 2327 * 2328 * <pre> 2329 * Optional. HCFS URIs of archives to be extracted in the working directory of 2330 * Hadoop drivers and tasks. Supported file types: 2331 * .jar, .tar, .tar.gz, .tgz, or .zip. 2332 * </pre> 2333 * 2334 * <code>repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 2335 * 2336 * @param index The index of the value to return. 2337 * @return The bytes of the archiveUris at the given index. 2338 */ getArchiveUrisBytes(int index)2339 public com.google.protobuf.ByteString getArchiveUrisBytes(int index) { 2340 return archiveUris_.getByteString(index); 2341 } 2342 /** 2343 * 2344 * 2345 * <pre> 2346 * Optional. HCFS URIs of archives to be extracted in the working directory of 2347 * Hadoop drivers and tasks. Supported file types: 2348 * .jar, .tar, .tar.gz, .tgz, or .zip. 2349 * </pre> 2350 * 2351 * <code>repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 2352 * 2353 * @param index The index to set the value at. 2354 * @param value The archiveUris to set. 2355 * @return This builder for chaining. 2356 */ setArchiveUris(int index, java.lang.String value)2357 public Builder setArchiveUris(int index, java.lang.String value) { 2358 if (value == null) { 2359 throw new NullPointerException(); 2360 } 2361 ensureArchiveUrisIsMutable(); 2362 archiveUris_.set(index, value); 2363 onChanged(); 2364 return this; 2365 } 2366 /** 2367 * 2368 * 2369 * <pre> 2370 * Optional. HCFS URIs of archives to be extracted in the working directory of 2371 * Hadoop drivers and tasks. Supported file types: 2372 * .jar, .tar, .tar.gz, .tgz, or .zip. 2373 * </pre> 2374 * 2375 * <code>repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 2376 * 2377 * @param value The archiveUris to add. 2378 * @return This builder for chaining. 2379 */ addArchiveUris(java.lang.String value)2380 public Builder addArchiveUris(java.lang.String value) { 2381 if (value == null) { 2382 throw new NullPointerException(); 2383 } 2384 ensureArchiveUrisIsMutable(); 2385 archiveUris_.add(value); 2386 onChanged(); 2387 return this; 2388 } 2389 /** 2390 * 2391 * 2392 * <pre> 2393 * Optional. HCFS URIs of archives to be extracted in the working directory of 2394 * Hadoop drivers and tasks. Supported file types: 2395 * .jar, .tar, .tar.gz, .tgz, or .zip. 2396 * </pre> 2397 * 2398 * <code>repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 2399 * 2400 * @param values The archiveUris to add. 2401 * @return This builder for chaining. 2402 */ addAllArchiveUris(java.lang.Iterable<java.lang.String> values)2403 public Builder addAllArchiveUris(java.lang.Iterable<java.lang.String> values) { 2404 ensureArchiveUrisIsMutable(); 2405 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, archiveUris_); 2406 onChanged(); 2407 return this; 2408 } 2409 /** 2410 * 2411 * 2412 * <pre> 2413 * Optional. HCFS URIs of archives to be extracted in the working directory of 2414 * Hadoop drivers and tasks. Supported file types: 2415 * .jar, .tar, .tar.gz, .tgz, or .zip. 2416 * </pre> 2417 * 2418 * <code>repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 2419 * 2420 * @return This builder for chaining. 2421 */ clearArchiveUris()2422 public Builder clearArchiveUris() { 2423 archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; 2424 bitField0_ = (bitField0_ & ~0x00000020); 2425 onChanged(); 2426 return this; 2427 } 2428 /** 2429 * 2430 * 2431 * <pre> 2432 * Optional. HCFS URIs of archives to be extracted in the working directory of 2433 * Hadoop drivers and tasks. Supported file types: 2434 * .jar, .tar, .tar.gz, .tgz, or .zip. 2435 * </pre> 2436 * 2437 * <code>repeated string archive_uris = 6 [(.google.api.field_behavior) = OPTIONAL];</code> 2438 * 2439 * @param value The bytes of the archiveUris to add. 2440 * @return This builder for chaining. 2441 */ addArchiveUrisBytes(com.google.protobuf.ByteString value)2442 public Builder addArchiveUrisBytes(com.google.protobuf.ByteString value) { 2443 if (value == null) { 2444 throw new NullPointerException(); 2445 } 2446 checkByteStringIsUtf8(value); 2447 ensureArchiveUrisIsMutable(); 2448 archiveUris_.add(value); 2449 onChanged(); 2450 return this; 2451 } 2452 2453 private com.google.protobuf.MapField<java.lang.String, java.lang.String> properties_; 2454 2455 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetProperties()2456 internalGetProperties() { 2457 if (properties_ == null) { 2458 return com.google.protobuf.MapField.emptyMapField( 2459 PropertiesDefaultEntryHolder.defaultEntry); 2460 } 2461 return properties_; 2462 } 2463 2464 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMutableProperties()2465 internalGetMutableProperties() { 2466 if (properties_ == null) { 2467 properties_ = 2468 com.google.protobuf.MapField.newMapField(PropertiesDefaultEntryHolder.defaultEntry); 2469 } 2470 if (!properties_.isMutable()) { 2471 properties_ = properties_.copy(); 2472 } 2473 bitField0_ |= 0x00000040; 2474 onChanged(); 2475 return properties_; 2476 } 2477 getPropertiesCount()2478 public int getPropertiesCount() { 2479 return internalGetProperties().getMap().size(); 2480 } 2481 /** 2482 * 2483 * 2484 * <pre> 2485 * Optional. A mapping of property names to values, used to configure Hadoop. 2486 * Properties that conflict with values set by the Dataproc API may be 2487 * overwritten. Can include properties set in /etc/hadoop/conf/*-site and 2488 * classes in user code. 2489 * </pre> 2490 * 2491 * <code>map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; 2492 * </code> 2493 */ 2494 @java.lang.Override containsProperties(java.lang.String key)2495 public boolean containsProperties(java.lang.String key) { 2496 if (key == null) { 2497 throw new NullPointerException("map key"); 2498 } 2499 return internalGetProperties().getMap().containsKey(key); 2500 } 2501 /** Use {@link #getPropertiesMap()} instead. */ 2502 @java.lang.Override 2503 @java.lang.Deprecated getProperties()2504 public java.util.Map<java.lang.String, java.lang.String> getProperties() { 2505 return getPropertiesMap(); 2506 } 2507 /** 2508 * 2509 * 2510 * <pre> 2511 * Optional. A mapping of property names to values, used to configure Hadoop. 2512 * Properties that conflict with values set by the Dataproc API may be 2513 * overwritten. Can include properties set in /etc/hadoop/conf/*-site and 2514 * classes in user code. 2515 * </pre> 2516 * 2517 * <code>map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; 2518 * </code> 2519 */ 2520 @java.lang.Override getPropertiesMap()2521 public java.util.Map<java.lang.String, java.lang.String> getPropertiesMap() { 2522 return internalGetProperties().getMap(); 2523 } 2524 /** 2525 * 2526 * 2527 * <pre> 2528 * Optional. A mapping of property names to values, used to configure Hadoop. 2529 * Properties that conflict with values set by the Dataproc API may be 2530 * overwritten. Can include properties set in /etc/hadoop/conf/*-site and 2531 * classes in user code. 2532 * </pre> 2533 * 2534 * <code>map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; 2535 * </code> 2536 */ 2537 @java.lang.Override getPropertiesOrDefault( java.lang.String key, java.lang.String defaultValue)2538 public /* nullable */ java.lang.String getPropertiesOrDefault( 2539 java.lang.String key, 2540 /* nullable */ 2541 java.lang.String defaultValue) { 2542 if (key == null) { 2543 throw new NullPointerException("map key"); 2544 } 2545 java.util.Map<java.lang.String, java.lang.String> map = internalGetProperties().getMap(); 2546 return map.containsKey(key) ? map.get(key) : defaultValue; 2547 } 2548 /** 2549 * 2550 * 2551 * <pre> 2552 * Optional. A mapping of property names to values, used to configure Hadoop. 2553 * Properties that conflict with values set by the Dataproc API may be 2554 * overwritten. Can include properties set in /etc/hadoop/conf/*-site and 2555 * classes in user code. 2556 * </pre> 2557 * 2558 * <code>map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; 2559 * </code> 2560 */ 2561 @java.lang.Override getPropertiesOrThrow(java.lang.String key)2562 public java.lang.String getPropertiesOrThrow(java.lang.String key) { 2563 if (key == null) { 2564 throw new NullPointerException("map key"); 2565 } 2566 java.util.Map<java.lang.String, java.lang.String> map = internalGetProperties().getMap(); 2567 if (!map.containsKey(key)) { 2568 throw new java.lang.IllegalArgumentException(); 2569 } 2570 return map.get(key); 2571 } 2572 clearProperties()2573 public Builder clearProperties() { 2574 bitField0_ = (bitField0_ & ~0x00000040); 2575 internalGetMutableProperties().getMutableMap().clear(); 2576 return this; 2577 } 2578 /** 2579 * 2580 * 2581 * <pre> 2582 * Optional. A mapping of property names to values, used to configure Hadoop. 2583 * Properties that conflict with values set by the Dataproc API may be 2584 * overwritten. Can include properties set in /etc/hadoop/conf/*-site and 2585 * classes in user code. 2586 * </pre> 2587 * 2588 * <code>map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; 2589 * </code> 2590 */ removeProperties(java.lang.String key)2591 public Builder removeProperties(java.lang.String key) { 2592 if (key == null) { 2593 throw new NullPointerException("map key"); 2594 } 2595 internalGetMutableProperties().getMutableMap().remove(key); 2596 return this; 2597 } 2598 /** Use alternate mutation accessors instead. */ 2599 @java.lang.Deprecated getMutableProperties()2600 public java.util.Map<java.lang.String, java.lang.String> getMutableProperties() { 2601 bitField0_ |= 0x00000040; 2602 return internalGetMutableProperties().getMutableMap(); 2603 } 2604 /** 2605 * 2606 * 2607 * <pre> 2608 * Optional. A mapping of property names to values, used to configure Hadoop. 2609 * Properties that conflict with values set by the Dataproc API may be 2610 * overwritten. Can include properties set in /etc/hadoop/conf/*-site and 2611 * classes in user code. 2612 * </pre> 2613 * 2614 * <code>map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; 2615 * </code> 2616 */ putProperties(java.lang.String key, java.lang.String value)2617 public Builder putProperties(java.lang.String key, java.lang.String value) { 2618 if (key == null) { 2619 throw new NullPointerException("map key"); 2620 } 2621 if (value == null) { 2622 throw new NullPointerException("map value"); 2623 } 2624 internalGetMutableProperties().getMutableMap().put(key, value); 2625 bitField0_ |= 0x00000040; 2626 return this; 2627 } 2628 /** 2629 * 2630 * 2631 * <pre> 2632 * Optional. A mapping of property names to values, used to configure Hadoop. 2633 * Properties that conflict with values set by the Dataproc API may be 2634 * overwritten. Can include properties set in /etc/hadoop/conf/*-site and 2635 * classes in user code. 2636 * </pre> 2637 * 2638 * <code>map<string, string> properties = 7 [(.google.api.field_behavior) = OPTIONAL]; 2639 * </code> 2640 */ putAllProperties(java.util.Map<java.lang.String, java.lang.String> values)2641 public Builder putAllProperties(java.util.Map<java.lang.String, java.lang.String> values) { 2642 internalGetMutableProperties().getMutableMap().putAll(values); 2643 bitField0_ |= 0x00000040; 2644 return this; 2645 } 2646 2647 private com.google.cloud.dataproc.v1.LoggingConfig loggingConfig_; 2648 private com.google.protobuf.SingleFieldBuilderV3< 2649 com.google.cloud.dataproc.v1.LoggingConfig, 2650 com.google.cloud.dataproc.v1.LoggingConfig.Builder, 2651 com.google.cloud.dataproc.v1.LoggingConfigOrBuilder> 2652 loggingConfigBuilder_; 2653 /** 2654 * 2655 * 2656 * <pre> 2657 * Optional. The runtime log config for job execution. 2658 * </pre> 2659 * 2660 * <code> 2661 * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; 2662 * </code> 2663 * 2664 * @return Whether the loggingConfig field is set. 2665 */ hasLoggingConfig()2666 public boolean hasLoggingConfig() { 2667 return ((bitField0_ & 0x00000080) != 0); 2668 } 2669 /** 2670 * 2671 * 2672 * <pre> 2673 * Optional. The runtime log config for job execution. 2674 * </pre> 2675 * 2676 * <code> 2677 * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; 2678 * </code> 2679 * 2680 * @return The loggingConfig. 2681 */ getLoggingConfig()2682 public com.google.cloud.dataproc.v1.LoggingConfig getLoggingConfig() { 2683 if (loggingConfigBuilder_ == null) { 2684 return loggingConfig_ == null 2685 ? com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance() 2686 : loggingConfig_; 2687 } else { 2688 return loggingConfigBuilder_.getMessage(); 2689 } 2690 } 2691 /** 2692 * 2693 * 2694 * <pre> 2695 * Optional. The runtime log config for job execution. 2696 * </pre> 2697 * 2698 * <code> 2699 * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; 2700 * </code> 2701 */ setLoggingConfig(com.google.cloud.dataproc.v1.LoggingConfig value)2702 public Builder setLoggingConfig(com.google.cloud.dataproc.v1.LoggingConfig value) { 2703 if (loggingConfigBuilder_ == null) { 2704 if (value == null) { 2705 throw new NullPointerException(); 2706 } 2707 loggingConfig_ = value; 2708 } else { 2709 loggingConfigBuilder_.setMessage(value); 2710 } 2711 bitField0_ |= 0x00000080; 2712 onChanged(); 2713 return this; 2714 } 2715 /** 2716 * 2717 * 2718 * <pre> 2719 * Optional. The runtime log config for job execution. 2720 * </pre> 2721 * 2722 * <code> 2723 * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; 2724 * </code> 2725 */ setLoggingConfig( com.google.cloud.dataproc.v1.LoggingConfig.Builder builderForValue)2726 public Builder setLoggingConfig( 2727 com.google.cloud.dataproc.v1.LoggingConfig.Builder builderForValue) { 2728 if (loggingConfigBuilder_ == null) { 2729 loggingConfig_ = builderForValue.build(); 2730 } else { 2731 loggingConfigBuilder_.setMessage(builderForValue.build()); 2732 } 2733 bitField0_ |= 0x00000080; 2734 onChanged(); 2735 return this; 2736 } 2737 /** 2738 * 2739 * 2740 * <pre> 2741 * Optional. The runtime log config for job execution. 2742 * </pre> 2743 * 2744 * <code> 2745 * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; 2746 * </code> 2747 */ mergeLoggingConfig(com.google.cloud.dataproc.v1.LoggingConfig value)2748 public Builder mergeLoggingConfig(com.google.cloud.dataproc.v1.LoggingConfig value) { 2749 if (loggingConfigBuilder_ == null) { 2750 if (((bitField0_ & 0x00000080) != 0) 2751 && loggingConfig_ != null 2752 && loggingConfig_ != com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance()) { 2753 getLoggingConfigBuilder().mergeFrom(value); 2754 } else { 2755 loggingConfig_ = value; 2756 } 2757 } else { 2758 loggingConfigBuilder_.mergeFrom(value); 2759 } 2760 bitField0_ |= 0x00000080; 2761 onChanged(); 2762 return this; 2763 } 2764 /** 2765 * 2766 * 2767 * <pre> 2768 * Optional. The runtime log config for job execution. 2769 * </pre> 2770 * 2771 * <code> 2772 * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; 2773 * </code> 2774 */ clearLoggingConfig()2775 public Builder clearLoggingConfig() { 2776 bitField0_ = (bitField0_ & ~0x00000080); 2777 loggingConfig_ = null; 2778 if (loggingConfigBuilder_ != null) { 2779 loggingConfigBuilder_.dispose(); 2780 loggingConfigBuilder_ = null; 2781 } 2782 onChanged(); 2783 return this; 2784 } 2785 /** 2786 * 2787 * 2788 * <pre> 2789 * Optional. The runtime log config for job execution. 2790 * </pre> 2791 * 2792 * <code> 2793 * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; 2794 * </code> 2795 */ getLoggingConfigBuilder()2796 public com.google.cloud.dataproc.v1.LoggingConfig.Builder getLoggingConfigBuilder() { 2797 bitField0_ |= 0x00000080; 2798 onChanged(); 2799 return getLoggingConfigFieldBuilder().getBuilder(); 2800 } 2801 /** 2802 * 2803 * 2804 * <pre> 2805 * Optional. The runtime log config for job execution. 2806 * </pre> 2807 * 2808 * <code> 2809 * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; 2810 * </code> 2811 */ getLoggingConfigOrBuilder()2812 public com.google.cloud.dataproc.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder() { 2813 if (loggingConfigBuilder_ != null) { 2814 return loggingConfigBuilder_.getMessageOrBuilder(); 2815 } else { 2816 return loggingConfig_ == null 2817 ? com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance() 2818 : loggingConfig_; 2819 } 2820 } 2821 /** 2822 * 2823 * 2824 * <pre> 2825 * Optional. The runtime log config for job execution. 2826 * </pre> 2827 * 2828 * <code> 2829 * .google.cloud.dataproc.v1.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; 2830 * </code> 2831 */ 2832 private com.google.protobuf.SingleFieldBuilderV3< 2833 com.google.cloud.dataproc.v1.LoggingConfig, 2834 com.google.cloud.dataproc.v1.LoggingConfig.Builder, 2835 com.google.cloud.dataproc.v1.LoggingConfigOrBuilder> getLoggingConfigFieldBuilder()2836 getLoggingConfigFieldBuilder() { 2837 if (loggingConfigBuilder_ == null) { 2838 loggingConfigBuilder_ = 2839 new com.google.protobuf.SingleFieldBuilderV3< 2840 com.google.cloud.dataproc.v1.LoggingConfig, 2841 com.google.cloud.dataproc.v1.LoggingConfig.Builder, 2842 com.google.cloud.dataproc.v1.LoggingConfigOrBuilder>( 2843 getLoggingConfig(), getParentForChildren(), isClean()); 2844 loggingConfig_ = null; 2845 } 2846 return loggingConfigBuilder_; 2847 } 2848 2849 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)2850 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 2851 return super.setUnknownFields(unknownFields); 2852 } 2853 2854 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2855 public final Builder mergeUnknownFields( 2856 final com.google.protobuf.UnknownFieldSet unknownFields) { 2857 return super.mergeUnknownFields(unknownFields); 2858 } 2859 2860 // @@protoc_insertion_point(builder_scope:google.cloud.dataproc.v1.HadoopJob) 2861 } 2862 2863 // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.HadoopJob) 2864 private static final com.google.cloud.dataproc.v1.HadoopJob DEFAULT_INSTANCE; 2865 2866 static { 2867 DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.HadoopJob(); 2868 } 2869 getDefaultInstance()2870 public static com.google.cloud.dataproc.v1.HadoopJob getDefaultInstance() { 2871 return DEFAULT_INSTANCE; 2872 } 2873 2874 private static final com.google.protobuf.Parser<HadoopJob> PARSER = 2875 new com.google.protobuf.AbstractParser<HadoopJob>() { 2876 @java.lang.Override 2877 public HadoopJob parsePartialFrom( 2878 com.google.protobuf.CodedInputStream input, 2879 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2880 throws com.google.protobuf.InvalidProtocolBufferException { 2881 Builder builder = newBuilder(); 2882 try { 2883 builder.mergeFrom(input, extensionRegistry); 2884 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 2885 throw e.setUnfinishedMessage(builder.buildPartial()); 2886 } catch (com.google.protobuf.UninitializedMessageException e) { 2887 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 2888 } catch (java.io.IOException e) { 2889 throw new com.google.protobuf.InvalidProtocolBufferException(e) 2890 .setUnfinishedMessage(builder.buildPartial()); 2891 } 2892 return builder.buildPartial(); 2893 } 2894 }; 2895 parser()2896 public static com.google.protobuf.Parser<HadoopJob> parser() { 2897 return PARSER; 2898 } 2899 2900 @java.lang.Override getParserForType()2901 public com.google.protobuf.Parser<HadoopJob> getParserForType() { 2902 return PARSER; 2903 } 2904 2905 @java.lang.Override getDefaultInstanceForType()2906 public com.google.cloud.dataproc.v1.HadoopJob getDefaultInstanceForType() { 2907 return DEFAULT_INSTANCE; 2908 } 2909 } 2910