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 SparkR](https://spark.apache.org/docs/latest/sparkr.html) 27 * applications on YARN. 28 * </pre> 29 * 30 * Protobuf type {@code google.cloud.dataproc.v1.SparkRJob} 31 */ 32 public final class SparkRJob extends com.google.protobuf.GeneratedMessageV3 33 implements 34 // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.SparkRJob) 35 SparkRJobOrBuilder { 36 private static final long serialVersionUID = 0L; 37 // Use SparkRJob.newBuilder() to construct. SparkRJob(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)38 private SparkRJob(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 39 super(builder); 40 } 41 SparkRJob()42 private SparkRJob() { 43 mainRFileUri_ = ""; 44 args_ = com.google.protobuf.LazyStringArrayList.EMPTY; 45 fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; 46 archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; 47 } 48 49 @java.lang.Override 50 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)51 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 52 return new SparkRJob(); 53 } 54 55 @java.lang.Override getUnknownFields()56 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 57 return this.unknownFields; 58 } 59 getDescriptor()60 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 61 return com.google.cloud.dataproc.v1.JobsProto 62 .internal_static_google_cloud_dataproc_v1_SparkRJob_descriptor; 63 } 64 65 @SuppressWarnings({"rawtypes"}) 66 @java.lang.Override internalGetMapField(int number)67 protected com.google.protobuf.MapField internalGetMapField(int number) { 68 switch (number) { 69 case 5: 70 return internalGetProperties(); 71 default: 72 throw new RuntimeException("Invalid map field number: " + number); 73 } 74 } 75 76 @java.lang.Override 77 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()78 internalGetFieldAccessorTable() { 79 return com.google.cloud.dataproc.v1.JobsProto 80 .internal_static_google_cloud_dataproc_v1_SparkRJob_fieldAccessorTable 81 .ensureFieldAccessorsInitialized( 82 com.google.cloud.dataproc.v1.SparkRJob.class, 83 com.google.cloud.dataproc.v1.SparkRJob.Builder.class); 84 } 85 86 public static final int MAIN_R_FILE_URI_FIELD_NUMBER = 1; 87 88 @SuppressWarnings("serial") 89 private volatile java.lang.Object mainRFileUri_ = ""; 90 /** 91 * 92 * 93 * <pre> 94 * Required. The HCFS URI of the main R file to use as the driver. 95 * Must be a .R file. 96 * </pre> 97 * 98 * <code>string main_r_file_uri = 1 [(.google.api.field_behavior) = REQUIRED];</code> 99 * 100 * @return The mainRFileUri. 101 */ 102 @java.lang.Override getMainRFileUri()103 public java.lang.String getMainRFileUri() { 104 java.lang.Object ref = mainRFileUri_; 105 if (ref instanceof java.lang.String) { 106 return (java.lang.String) ref; 107 } else { 108 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 109 java.lang.String s = bs.toStringUtf8(); 110 mainRFileUri_ = s; 111 return s; 112 } 113 } 114 /** 115 * 116 * 117 * <pre> 118 * Required. The HCFS URI of the main R file to use as the driver. 119 * Must be a .R file. 120 * </pre> 121 * 122 * <code>string main_r_file_uri = 1 [(.google.api.field_behavior) = REQUIRED];</code> 123 * 124 * @return The bytes for mainRFileUri. 125 */ 126 @java.lang.Override getMainRFileUriBytes()127 public com.google.protobuf.ByteString getMainRFileUriBytes() { 128 java.lang.Object ref = mainRFileUri_; 129 if (ref instanceof java.lang.String) { 130 com.google.protobuf.ByteString b = 131 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 132 mainRFileUri_ = b; 133 return b; 134 } else { 135 return (com.google.protobuf.ByteString) ref; 136 } 137 } 138 139 public static final int ARGS_FIELD_NUMBER = 2; 140 141 @SuppressWarnings("serial") 142 private com.google.protobuf.LazyStringList args_; 143 /** 144 * 145 * 146 * <pre> 147 * Optional. The arguments to pass to the driver. Do not include arguments, 148 * such as `--conf`, that can be set as job properties, since a collision may 149 * occur that causes an incorrect job submission. 150 * </pre> 151 * 152 * <code>repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 153 * 154 * @return A list containing the args. 155 */ getArgsList()156 public com.google.protobuf.ProtocolStringList getArgsList() { 157 return args_; 158 } 159 /** 160 * 161 * 162 * <pre> 163 * Optional. The arguments to pass to the driver. Do not include arguments, 164 * such as `--conf`, that can be set as job properties, since a collision may 165 * occur that causes an incorrect job submission. 166 * </pre> 167 * 168 * <code>repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 169 * 170 * @return The count of args. 171 */ getArgsCount()172 public int getArgsCount() { 173 return args_.size(); 174 } 175 /** 176 * 177 * 178 * <pre> 179 * Optional. The arguments to pass to the driver. Do not include arguments, 180 * such as `--conf`, that can be set as job properties, since a collision may 181 * occur that causes an incorrect job submission. 182 * </pre> 183 * 184 * <code>repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 185 * 186 * @param index The index of the element to return. 187 * @return The args at the given index. 188 */ getArgs(int index)189 public java.lang.String getArgs(int index) { 190 return args_.get(index); 191 } 192 /** 193 * 194 * 195 * <pre> 196 * Optional. The arguments to pass to the driver. Do not include arguments, 197 * such as `--conf`, that can be set as job properties, since a collision may 198 * occur that causes an incorrect job submission. 199 * </pre> 200 * 201 * <code>repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 202 * 203 * @param index The index of the value to return. 204 * @return The bytes of the args at the given index. 205 */ getArgsBytes(int index)206 public com.google.protobuf.ByteString getArgsBytes(int index) { 207 return args_.getByteString(index); 208 } 209 210 public static final int FILE_URIS_FIELD_NUMBER = 3; 211 212 @SuppressWarnings("serial") 213 private com.google.protobuf.LazyStringList fileUris_; 214 /** 215 * 216 * 217 * <pre> 218 * Optional. HCFS URIs of files to be placed in the working directory of 219 * each executor. Useful for naively parallel tasks. 220 * </pre> 221 * 222 * <code>repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 223 * 224 * @return A list containing the fileUris. 225 */ getFileUrisList()226 public com.google.protobuf.ProtocolStringList getFileUrisList() { 227 return fileUris_; 228 } 229 /** 230 * 231 * 232 * <pre> 233 * Optional. HCFS URIs of files to be placed in the working directory of 234 * each executor. Useful for naively parallel tasks. 235 * </pre> 236 * 237 * <code>repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 238 * 239 * @return The count of fileUris. 240 */ getFileUrisCount()241 public int getFileUrisCount() { 242 return fileUris_.size(); 243 } 244 /** 245 * 246 * 247 * <pre> 248 * Optional. HCFS URIs of files to be placed in the working directory of 249 * each executor. Useful for naively parallel tasks. 250 * </pre> 251 * 252 * <code>repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 253 * 254 * @param index The index of the element to return. 255 * @return The fileUris at the given index. 256 */ getFileUris(int index)257 public java.lang.String getFileUris(int index) { 258 return fileUris_.get(index); 259 } 260 /** 261 * 262 * 263 * <pre> 264 * Optional. HCFS URIs of files to be placed in the working directory of 265 * each executor. Useful for naively parallel tasks. 266 * </pre> 267 * 268 * <code>repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 269 * 270 * @param index The index of the value to return. 271 * @return The bytes of the fileUris at the given index. 272 */ getFileUrisBytes(int index)273 public com.google.protobuf.ByteString getFileUrisBytes(int index) { 274 return fileUris_.getByteString(index); 275 } 276 277 public static final int ARCHIVE_URIS_FIELD_NUMBER = 4; 278 279 @SuppressWarnings("serial") 280 private com.google.protobuf.LazyStringList archiveUris_; 281 /** 282 * 283 * 284 * <pre> 285 * Optional. HCFS URIs of archives to be extracted into the working directory 286 * of each executor. Supported file types: 287 * .jar, .tar, .tar.gz, .tgz, and .zip. 288 * </pre> 289 * 290 * <code>repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL];</code> 291 * 292 * @return A list containing the archiveUris. 293 */ getArchiveUrisList()294 public com.google.protobuf.ProtocolStringList getArchiveUrisList() { 295 return archiveUris_; 296 } 297 /** 298 * 299 * 300 * <pre> 301 * Optional. HCFS URIs of archives to be extracted into the working directory 302 * of each executor. Supported file types: 303 * .jar, .tar, .tar.gz, .tgz, and .zip. 304 * </pre> 305 * 306 * <code>repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL];</code> 307 * 308 * @return The count of archiveUris. 309 */ getArchiveUrisCount()310 public int getArchiveUrisCount() { 311 return archiveUris_.size(); 312 } 313 /** 314 * 315 * 316 * <pre> 317 * Optional. HCFS URIs of archives to be extracted into the working directory 318 * of each executor. Supported file types: 319 * .jar, .tar, .tar.gz, .tgz, and .zip. 320 * </pre> 321 * 322 * <code>repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL];</code> 323 * 324 * @param index The index of the element to return. 325 * @return The archiveUris at the given index. 326 */ getArchiveUris(int index)327 public java.lang.String getArchiveUris(int index) { 328 return archiveUris_.get(index); 329 } 330 /** 331 * 332 * 333 * <pre> 334 * Optional. HCFS URIs of archives to be extracted into the working directory 335 * of each executor. Supported file types: 336 * .jar, .tar, .tar.gz, .tgz, and .zip. 337 * </pre> 338 * 339 * <code>repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL];</code> 340 * 341 * @param index The index of the value to return. 342 * @return The bytes of the archiveUris at the given index. 343 */ getArchiveUrisBytes(int index)344 public com.google.protobuf.ByteString getArchiveUrisBytes(int index) { 345 return archiveUris_.getByteString(index); 346 } 347 348 public static final int PROPERTIES_FIELD_NUMBER = 5; 349 350 private static final class PropertiesDefaultEntryHolder { 351 static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry = 352 com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance( 353 com.google.cloud.dataproc.v1.JobsProto 354 .internal_static_google_cloud_dataproc_v1_SparkRJob_PropertiesEntry_descriptor, 355 com.google.protobuf.WireFormat.FieldType.STRING, 356 "", 357 com.google.protobuf.WireFormat.FieldType.STRING, 358 ""); 359 } 360 361 @SuppressWarnings("serial") 362 private com.google.protobuf.MapField<java.lang.String, java.lang.String> properties_; 363 internalGetProperties()364 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetProperties() { 365 if (properties_ == null) { 366 return com.google.protobuf.MapField.emptyMapField(PropertiesDefaultEntryHolder.defaultEntry); 367 } 368 return properties_; 369 } 370 getPropertiesCount()371 public int getPropertiesCount() { 372 return internalGetProperties().getMap().size(); 373 } 374 /** 375 * 376 * 377 * <pre> 378 * Optional. A mapping of property names to values, used to configure SparkR. 379 * Properties that conflict with values set by the Dataproc API may be 380 * overwritten. Can include properties set in 381 * /etc/spark/conf/spark-defaults.conf and classes in user code. 382 * </pre> 383 * 384 * <code>map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; 385 * </code> 386 */ 387 @java.lang.Override containsProperties(java.lang.String key)388 public boolean containsProperties(java.lang.String key) { 389 if (key == null) { 390 throw new NullPointerException("map key"); 391 } 392 return internalGetProperties().getMap().containsKey(key); 393 } 394 /** Use {@link #getPropertiesMap()} instead. */ 395 @java.lang.Override 396 @java.lang.Deprecated getProperties()397 public java.util.Map<java.lang.String, java.lang.String> getProperties() { 398 return getPropertiesMap(); 399 } 400 /** 401 * 402 * 403 * <pre> 404 * Optional. A mapping of property names to values, used to configure SparkR. 405 * Properties that conflict with values set by the Dataproc API may be 406 * overwritten. Can include properties set in 407 * /etc/spark/conf/spark-defaults.conf and classes in user code. 408 * </pre> 409 * 410 * <code>map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; 411 * </code> 412 */ 413 @java.lang.Override getPropertiesMap()414 public java.util.Map<java.lang.String, java.lang.String> getPropertiesMap() { 415 return internalGetProperties().getMap(); 416 } 417 /** 418 * 419 * 420 * <pre> 421 * Optional. A mapping of property names to values, used to configure SparkR. 422 * Properties that conflict with values set by the Dataproc API may be 423 * overwritten. Can include properties set in 424 * /etc/spark/conf/spark-defaults.conf and classes in user code. 425 * </pre> 426 * 427 * <code>map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; 428 * </code> 429 */ 430 @java.lang.Override getPropertiesOrDefault( java.lang.String key, java.lang.String defaultValue)431 public /* nullable */ java.lang.String getPropertiesOrDefault( 432 java.lang.String key, 433 /* nullable */ 434 java.lang.String defaultValue) { 435 if (key == null) { 436 throw new NullPointerException("map key"); 437 } 438 java.util.Map<java.lang.String, java.lang.String> map = internalGetProperties().getMap(); 439 return map.containsKey(key) ? map.get(key) : defaultValue; 440 } 441 /** 442 * 443 * 444 * <pre> 445 * Optional. A mapping of property names to values, used to configure SparkR. 446 * Properties that conflict with values set by the Dataproc API may be 447 * overwritten. Can include properties set in 448 * /etc/spark/conf/spark-defaults.conf and classes in user code. 449 * </pre> 450 * 451 * <code>map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; 452 * </code> 453 */ 454 @java.lang.Override getPropertiesOrThrow(java.lang.String key)455 public java.lang.String getPropertiesOrThrow(java.lang.String key) { 456 if (key == null) { 457 throw new NullPointerException("map key"); 458 } 459 java.util.Map<java.lang.String, java.lang.String> map = internalGetProperties().getMap(); 460 if (!map.containsKey(key)) { 461 throw new java.lang.IllegalArgumentException(); 462 } 463 return map.get(key); 464 } 465 466 public static final int LOGGING_CONFIG_FIELD_NUMBER = 6; 467 private com.google.cloud.dataproc.v1.LoggingConfig loggingConfig_; 468 /** 469 * 470 * 471 * <pre> 472 * Optional. The runtime log config for job execution. 473 * </pre> 474 * 475 * <code> 476 * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; 477 * </code> 478 * 479 * @return Whether the loggingConfig field is set. 480 */ 481 @java.lang.Override hasLoggingConfig()482 public boolean hasLoggingConfig() { 483 return loggingConfig_ != null; 484 } 485 /** 486 * 487 * 488 * <pre> 489 * Optional. The runtime log config for job execution. 490 * </pre> 491 * 492 * <code> 493 * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; 494 * </code> 495 * 496 * @return The loggingConfig. 497 */ 498 @java.lang.Override getLoggingConfig()499 public com.google.cloud.dataproc.v1.LoggingConfig getLoggingConfig() { 500 return loggingConfig_ == null 501 ? com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance() 502 : loggingConfig_; 503 } 504 /** 505 * 506 * 507 * <pre> 508 * Optional. The runtime log config for job execution. 509 * </pre> 510 * 511 * <code> 512 * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; 513 * </code> 514 */ 515 @java.lang.Override getLoggingConfigOrBuilder()516 public com.google.cloud.dataproc.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder() { 517 return loggingConfig_ == null 518 ? com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance() 519 : loggingConfig_; 520 } 521 522 private byte memoizedIsInitialized = -1; 523 524 @java.lang.Override isInitialized()525 public final boolean isInitialized() { 526 byte isInitialized = memoizedIsInitialized; 527 if (isInitialized == 1) return true; 528 if (isInitialized == 0) return false; 529 530 memoizedIsInitialized = 1; 531 return true; 532 } 533 534 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)535 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 536 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mainRFileUri_)) { 537 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mainRFileUri_); 538 } 539 for (int i = 0; i < args_.size(); i++) { 540 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, args_.getRaw(i)); 541 } 542 for (int i = 0; i < fileUris_.size(); i++) { 543 com.google.protobuf.GeneratedMessageV3.writeString(output, 3, fileUris_.getRaw(i)); 544 } 545 for (int i = 0; i < archiveUris_.size(); i++) { 546 com.google.protobuf.GeneratedMessageV3.writeString(output, 4, archiveUris_.getRaw(i)); 547 } 548 com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( 549 output, internalGetProperties(), PropertiesDefaultEntryHolder.defaultEntry, 5); 550 if (loggingConfig_ != null) { 551 output.writeMessage(6, getLoggingConfig()); 552 } 553 getUnknownFields().writeTo(output); 554 } 555 556 @java.lang.Override getSerializedSize()557 public int getSerializedSize() { 558 int size = memoizedSize; 559 if (size != -1) return size; 560 561 size = 0; 562 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mainRFileUri_)) { 563 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mainRFileUri_); 564 } 565 { 566 int dataSize = 0; 567 for (int i = 0; i < args_.size(); i++) { 568 dataSize += computeStringSizeNoTag(args_.getRaw(i)); 569 } 570 size += dataSize; 571 size += 1 * getArgsList().size(); 572 } 573 { 574 int dataSize = 0; 575 for (int i = 0; i < fileUris_.size(); i++) { 576 dataSize += computeStringSizeNoTag(fileUris_.getRaw(i)); 577 } 578 size += dataSize; 579 size += 1 * getFileUrisList().size(); 580 } 581 { 582 int dataSize = 0; 583 for (int i = 0; i < archiveUris_.size(); i++) { 584 dataSize += computeStringSizeNoTag(archiveUris_.getRaw(i)); 585 } 586 size += dataSize; 587 size += 1 * getArchiveUrisList().size(); 588 } 589 for (java.util.Map.Entry<java.lang.String, java.lang.String> entry : 590 internalGetProperties().getMap().entrySet()) { 591 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> properties__ = 592 PropertiesDefaultEntryHolder.defaultEntry 593 .newBuilderForType() 594 .setKey(entry.getKey()) 595 .setValue(entry.getValue()) 596 .build(); 597 size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, properties__); 598 } 599 if (loggingConfig_ != null) { 600 size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getLoggingConfig()); 601 } 602 size += getUnknownFields().getSerializedSize(); 603 memoizedSize = size; 604 return size; 605 } 606 607 @java.lang.Override equals(final java.lang.Object obj)608 public boolean equals(final java.lang.Object obj) { 609 if (obj == this) { 610 return true; 611 } 612 if (!(obj instanceof com.google.cloud.dataproc.v1.SparkRJob)) { 613 return super.equals(obj); 614 } 615 com.google.cloud.dataproc.v1.SparkRJob other = (com.google.cloud.dataproc.v1.SparkRJob) obj; 616 617 if (!getMainRFileUri().equals(other.getMainRFileUri())) return false; 618 if (!getArgsList().equals(other.getArgsList())) return false; 619 if (!getFileUrisList().equals(other.getFileUrisList())) return false; 620 if (!getArchiveUrisList().equals(other.getArchiveUrisList())) return false; 621 if (!internalGetProperties().equals(other.internalGetProperties())) return false; 622 if (hasLoggingConfig() != other.hasLoggingConfig()) return false; 623 if (hasLoggingConfig()) { 624 if (!getLoggingConfig().equals(other.getLoggingConfig())) return false; 625 } 626 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 627 return true; 628 } 629 630 @java.lang.Override hashCode()631 public int hashCode() { 632 if (memoizedHashCode != 0) { 633 return memoizedHashCode; 634 } 635 int hash = 41; 636 hash = (19 * hash) + getDescriptor().hashCode(); 637 hash = (37 * hash) + MAIN_R_FILE_URI_FIELD_NUMBER; 638 hash = (53 * hash) + getMainRFileUri().hashCode(); 639 if (getArgsCount() > 0) { 640 hash = (37 * hash) + ARGS_FIELD_NUMBER; 641 hash = (53 * hash) + getArgsList().hashCode(); 642 } 643 if (getFileUrisCount() > 0) { 644 hash = (37 * hash) + FILE_URIS_FIELD_NUMBER; 645 hash = (53 * hash) + getFileUrisList().hashCode(); 646 } 647 if (getArchiveUrisCount() > 0) { 648 hash = (37 * hash) + ARCHIVE_URIS_FIELD_NUMBER; 649 hash = (53 * hash) + getArchiveUrisList().hashCode(); 650 } 651 if (!internalGetProperties().getMap().isEmpty()) { 652 hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; 653 hash = (53 * hash) + internalGetProperties().hashCode(); 654 } 655 if (hasLoggingConfig()) { 656 hash = (37 * hash) + LOGGING_CONFIG_FIELD_NUMBER; 657 hash = (53 * hash) + getLoggingConfig().hashCode(); 658 } 659 hash = (29 * hash) + getUnknownFields().hashCode(); 660 memoizedHashCode = hash; 661 return hash; 662 } 663 parseFrom(java.nio.ByteBuffer data)664 public static com.google.cloud.dataproc.v1.SparkRJob parseFrom(java.nio.ByteBuffer data) 665 throws com.google.protobuf.InvalidProtocolBufferException { 666 return PARSER.parseFrom(data); 667 } 668 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)669 public static com.google.cloud.dataproc.v1.SparkRJob parseFrom( 670 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 671 throws com.google.protobuf.InvalidProtocolBufferException { 672 return PARSER.parseFrom(data, extensionRegistry); 673 } 674 parseFrom( com.google.protobuf.ByteString data)675 public static com.google.cloud.dataproc.v1.SparkRJob parseFrom( 676 com.google.protobuf.ByteString data) 677 throws com.google.protobuf.InvalidProtocolBufferException { 678 return PARSER.parseFrom(data); 679 } 680 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)681 public static com.google.cloud.dataproc.v1.SparkRJob parseFrom( 682 com.google.protobuf.ByteString data, 683 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 684 throws com.google.protobuf.InvalidProtocolBufferException { 685 return PARSER.parseFrom(data, extensionRegistry); 686 } 687 parseFrom(byte[] data)688 public static com.google.cloud.dataproc.v1.SparkRJob parseFrom(byte[] data) 689 throws com.google.protobuf.InvalidProtocolBufferException { 690 return PARSER.parseFrom(data); 691 } 692 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)693 public static com.google.cloud.dataproc.v1.SparkRJob parseFrom( 694 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 695 throws com.google.protobuf.InvalidProtocolBufferException { 696 return PARSER.parseFrom(data, extensionRegistry); 697 } 698 parseFrom(java.io.InputStream input)699 public static com.google.cloud.dataproc.v1.SparkRJob parseFrom(java.io.InputStream input) 700 throws java.io.IOException { 701 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 702 } 703 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)704 public static com.google.cloud.dataproc.v1.SparkRJob parseFrom( 705 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 706 throws java.io.IOException { 707 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 708 PARSER, input, extensionRegistry); 709 } 710 parseDelimitedFrom(java.io.InputStream input)711 public static com.google.cloud.dataproc.v1.SparkRJob parseDelimitedFrom(java.io.InputStream input) 712 throws java.io.IOException { 713 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 714 } 715 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)716 public static com.google.cloud.dataproc.v1.SparkRJob parseDelimitedFrom( 717 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 718 throws java.io.IOException { 719 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 720 PARSER, input, extensionRegistry); 721 } 722 parseFrom( com.google.protobuf.CodedInputStream input)723 public static com.google.cloud.dataproc.v1.SparkRJob parseFrom( 724 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 725 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 726 } 727 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)728 public static com.google.cloud.dataproc.v1.SparkRJob parseFrom( 729 com.google.protobuf.CodedInputStream input, 730 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 731 throws java.io.IOException { 732 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 733 PARSER, input, extensionRegistry); 734 } 735 736 @java.lang.Override newBuilderForType()737 public Builder newBuilderForType() { 738 return newBuilder(); 739 } 740 newBuilder()741 public static Builder newBuilder() { 742 return DEFAULT_INSTANCE.toBuilder(); 743 } 744 newBuilder(com.google.cloud.dataproc.v1.SparkRJob prototype)745 public static Builder newBuilder(com.google.cloud.dataproc.v1.SparkRJob prototype) { 746 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 747 } 748 749 @java.lang.Override toBuilder()750 public Builder toBuilder() { 751 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 752 } 753 754 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)755 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 756 Builder builder = new Builder(parent); 757 return builder; 758 } 759 /** 760 * 761 * 762 * <pre> 763 * A Dataproc job for running 764 * [Apache SparkR](https://spark.apache.org/docs/latest/sparkr.html) 765 * applications on YARN. 766 * </pre> 767 * 768 * Protobuf type {@code google.cloud.dataproc.v1.SparkRJob} 769 */ 770 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 771 implements 772 // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.SparkRJob) 773 com.google.cloud.dataproc.v1.SparkRJobOrBuilder { getDescriptor()774 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 775 return com.google.cloud.dataproc.v1.JobsProto 776 .internal_static_google_cloud_dataproc_v1_SparkRJob_descriptor; 777 } 778 779 @SuppressWarnings({"rawtypes"}) internalGetMapField(int number)780 protected com.google.protobuf.MapField internalGetMapField(int number) { 781 switch (number) { 782 case 5: 783 return internalGetProperties(); 784 default: 785 throw new RuntimeException("Invalid map field number: " + number); 786 } 787 } 788 789 @SuppressWarnings({"rawtypes"}) internalGetMutableMapField(int number)790 protected com.google.protobuf.MapField internalGetMutableMapField(int number) { 791 switch (number) { 792 case 5: 793 return internalGetMutableProperties(); 794 default: 795 throw new RuntimeException("Invalid map field number: " + number); 796 } 797 } 798 799 @java.lang.Override 800 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()801 internalGetFieldAccessorTable() { 802 return com.google.cloud.dataproc.v1.JobsProto 803 .internal_static_google_cloud_dataproc_v1_SparkRJob_fieldAccessorTable 804 .ensureFieldAccessorsInitialized( 805 com.google.cloud.dataproc.v1.SparkRJob.class, 806 com.google.cloud.dataproc.v1.SparkRJob.Builder.class); 807 } 808 809 // Construct using com.google.cloud.dataproc.v1.SparkRJob.newBuilder() Builder()810 private Builder() {} 811 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)812 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 813 super(parent); 814 } 815 816 @java.lang.Override clear()817 public Builder clear() { 818 super.clear(); 819 bitField0_ = 0; 820 mainRFileUri_ = ""; 821 args_ = com.google.protobuf.LazyStringArrayList.EMPTY; 822 bitField0_ = (bitField0_ & ~0x00000002); 823 fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; 824 bitField0_ = (bitField0_ & ~0x00000004); 825 archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; 826 bitField0_ = (bitField0_ & ~0x00000008); 827 internalGetMutableProperties().clear(); 828 loggingConfig_ = null; 829 if (loggingConfigBuilder_ != null) { 830 loggingConfigBuilder_.dispose(); 831 loggingConfigBuilder_ = null; 832 } 833 return this; 834 } 835 836 @java.lang.Override getDescriptorForType()837 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 838 return com.google.cloud.dataproc.v1.JobsProto 839 .internal_static_google_cloud_dataproc_v1_SparkRJob_descriptor; 840 } 841 842 @java.lang.Override getDefaultInstanceForType()843 public com.google.cloud.dataproc.v1.SparkRJob getDefaultInstanceForType() { 844 return com.google.cloud.dataproc.v1.SparkRJob.getDefaultInstance(); 845 } 846 847 @java.lang.Override build()848 public com.google.cloud.dataproc.v1.SparkRJob build() { 849 com.google.cloud.dataproc.v1.SparkRJob result = buildPartial(); 850 if (!result.isInitialized()) { 851 throw newUninitializedMessageException(result); 852 } 853 return result; 854 } 855 856 @java.lang.Override buildPartial()857 public com.google.cloud.dataproc.v1.SparkRJob buildPartial() { 858 com.google.cloud.dataproc.v1.SparkRJob result = 859 new com.google.cloud.dataproc.v1.SparkRJob(this); 860 buildPartialRepeatedFields(result); 861 if (bitField0_ != 0) { 862 buildPartial0(result); 863 } 864 onBuilt(); 865 return result; 866 } 867 buildPartialRepeatedFields(com.google.cloud.dataproc.v1.SparkRJob result)868 private void buildPartialRepeatedFields(com.google.cloud.dataproc.v1.SparkRJob result) { 869 if (((bitField0_ & 0x00000002) != 0)) { 870 args_ = args_.getUnmodifiableView(); 871 bitField0_ = (bitField0_ & ~0x00000002); 872 } 873 result.args_ = args_; 874 if (((bitField0_ & 0x00000004) != 0)) { 875 fileUris_ = fileUris_.getUnmodifiableView(); 876 bitField0_ = (bitField0_ & ~0x00000004); 877 } 878 result.fileUris_ = fileUris_; 879 if (((bitField0_ & 0x00000008) != 0)) { 880 archiveUris_ = archiveUris_.getUnmodifiableView(); 881 bitField0_ = (bitField0_ & ~0x00000008); 882 } 883 result.archiveUris_ = archiveUris_; 884 } 885 buildPartial0(com.google.cloud.dataproc.v1.SparkRJob result)886 private void buildPartial0(com.google.cloud.dataproc.v1.SparkRJob result) { 887 int from_bitField0_ = bitField0_; 888 if (((from_bitField0_ & 0x00000001) != 0)) { 889 result.mainRFileUri_ = mainRFileUri_; 890 } 891 if (((from_bitField0_ & 0x00000010) != 0)) { 892 result.properties_ = internalGetProperties(); 893 result.properties_.makeImmutable(); 894 } 895 if (((from_bitField0_ & 0x00000020) != 0)) { 896 result.loggingConfig_ = 897 loggingConfigBuilder_ == null ? loggingConfig_ : loggingConfigBuilder_.build(); 898 } 899 } 900 901 @java.lang.Override clone()902 public Builder clone() { 903 return super.clone(); 904 } 905 906 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)907 public Builder setField( 908 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 909 return super.setField(field, value); 910 } 911 912 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)913 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 914 return super.clearField(field); 915 } 916 917 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)918 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 919 return super.clearOneof(oneof); 920 } 921 922 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)923 public Builder setRepeatedField( 924 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 925 return super.setRepeatedField(field, index, value); 926 } 927 928 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)929 public Builder addRepeatedField( 930 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 931 return super.addRepeatedField(field, value); 932 } 933 934 @java.lang.Override mergeFrom(com.google.protobuf.Message other)935 public Builder mergeFrom(com.google.protobuf.Message other) { 936 if (other instanceof com.google.cloud.dataproc.v1.SparkRJob) { 937 return mergeFrom((com.google.cloud.dataproc.v1.SparkRJob) other); 938 } else { 939 super.mergeFrom(other); 940 return this; 941 } 942 } 943 mergeFrom(com.google.cloud.dataproc.v1.SparkRJob other)944 public Builder mergeFrom(com.google.cloud.dataproc.v1.SparkRJob other) { 945 if (other == com.google.cloud.dataproc.v1.SparkRJob.getDefaultInstance()) return this; 946 if (!other.getMainRFileUri().isEmpty()) { 947 mainRFileUri_ = other.mainRFileUri_; 948 bitField0_ |= 0x00000001; 949 onChanged(); 950 } 951 if (!other.args_.isEmpty()) { 952 if (args_.isEmpty()) { 953 args_ = other.args_; 954 bitField0_ = (bitField0_ & ~0x00000002); 955 } else { 956 ensureArgsIsMutable(); 957 args_.addAll(other.args_); 958 } 959 onChanged(); 960 } 961 if (!other.fileUris_.isEmpty()) { 962 if (fileUris_.isEmpty()) { 963 fileUris_ = other.fileUris_; 964 bitField0_ = (bitField0_ & ~0x00000004); 965 } else { 966 ensureFileUrisIsMutable(); 967 fileUris_.addAll(other.fileUris_); 968 } 969 onChanged(); 970 } 971 if (!other.archiveUris_.isEmpty()) { 972 if (archiveUris_.isEmpty()) { 973 archiveUris_ = other.archiveUris_; 974 bitField0_ = (bitField0_ & ~0x00000008); 975 } else { 976 ensureArchiveUrisIsMutable(); 977 archiveUris_.addAll(other.archiveUris_); 978 } 979 onChanged(); 980 } 981 internalGetMutableProperties().mergeFrom(other.internalGetProperties()); 982 bitField0_ |= 0x00000010; 983 if (other.hasLoggingConfig()) { 984 mergeLoggingConfig(other.getLoggingConfig()); 985 } 986 this.mergeUnknownFields(other.getUnknownFields()); 987 onChanged(); 988 return this; 989 } 990 991 @java.lang.Override isInitialized()992 public final boolean isInitialized() { 993 return true; 994 } 995 996 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)997 public Builder mergeFrom( 998 com.google.protobuf.CodedInputStream input, 999 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1000 throws java.io.IOException { 1001 if (extensionRegistry == null) { 1002 throw new java.lang.NullPointerException(); 1003 } 1004 try { 1005 boolean done = false; 1006 while (!done) { 1007 int tag = input.readTag(); 1008 switch (tag) { 1009 case 0: 1010 done = true; 1011 break; 1012 case 10: 1013 { 1014 mainRFileUri_ = input.readStringRequireUtf8(); 1015 bitField0_ |= 0x00000001; 1016 break; 1017 } // case 10 1018 case 18: 1019 { 1020 java.lang.String s = input.readStringRequireUtf8(); 1021 ensureArgsIsMutable(); 1022 args_.add(s); 1023 break; 1024 } // case 18 1025 case 26: 1026 { 1027 java.lang.String s = input.readStringRequireUtf8(); 1028 ensureFileUrisIsMutable(); 1029 fileUris_.add(s); 1030 break; 1031 } // case 26 1032 case 34: 1033 { 1034 java.lang.String s = input.readStringRequireUtf8(); 1035 ensureArchiveUrisIsMutable(); 1036 archiveUris_.add(s); 1037 break; 1038 } // case 34 1039 case 42: 1040 { 1041 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> properties__ = 1042 input.readMessage( 1043 PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), 1044 extensionRegistry); 1045 internalGetMutableProperties() 1046 .getMutableMap() 1047 .put(properties__.getKey(), properties__.getValue()); 1048 bitField0_ |= 0x00000010; 1049 break; 1050 } // case 42 1051 case 50: 1052 { 1053 input.readMessage(getLoggingConfigFieldBuilder().getBuilder(), extensionRegistry); 1054 bitField0_ |= 0x00000020; 1055 break; 1056 } // case 50 1057 default: 1058 { 1059 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1060 done = true; // was an endgroup tag 1061 } 1062 break; 1063 } // default: 1064 } // switch (tag) 1065 } // while (!done) 1066 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1067 throw e.unwrapIOException(); 1068 } finally { 1069 onChanged(); 1070 } // finally 1071 return this; 1072 } 1073 1074 private int bitField0_; 1075 1076 private java.lang.Object mainRFileUri_ = ""; 1077 /** 1078 * 1079 * 1080 * <pre> 1081 * Required. The HCFS URI of the main R file to use as the driver. 1082 * Must be a .R file. 1083 * </pre> 1084 * 1085 * <code>string main_r_file_uri = 1 [(.google.api.field_behavior) = REQUIRED];</code> 1086 * 1087 * @return The mainRFileUri. 1088 */ getMainRFileUri()1089 public java.lang.String getMainRFileUri() { 1090 java.lang.Object ref = mainRFileUri_; 1091 if (!(ref instanceof java.lang.String)) { 1092 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1093 java.lang.String s = bs.toStringUtf8(); 1094 mainRFileUri_ = s; 1095 return s; 1096 } else { 1097 return (java.lang.String) ref; 1098 } 1099 } 1100 /** 1101 * 1102 * 1103 * <pre> 1104 * Required. The HCFS URI of the main R file to use as the driver. 1105 * Must be a .R file. 1106 * </pre> 1107 * 1108 * <code>string main_r_file_uri = 1 [(.google.api.field_behavior) = REQUIRED];</code> 1109 * 1110 * @return The bytes for mainRFileUri. 1111 */ getMainRFileUriBytes()1112 public com.google.protobuf.ByteString getMainRFileUriBytes() { 1113 java.lang.Object ref = mainRFileUri_; 1114 if (ref instanceof String) { 1115 com.google.protobuf.ByteString b = 1116 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1117 mainRFileUri_ = b; 1118 return b; 1119 } else { 1120 return (com.google.protobuf.ByteString) ref; 1121 } 1122 } 1123 /** 1124 * 1125 * 1126 * <pre> 1127 * Required. The HCFS URI of the main R file to use as the driver. 1128 * Must be a .R file. 1129 * </pre> 1130 * 1131 * <code>string main_r_file_uri = 1 [(.google.api.field_behavior) = REQUIRED];</code> 1132 * 1133 * @param value The mainRFileUri to set. 1134 * @return This builder for chaining. 1135 */ setMainRFileUri(java.lang.String value)1136 public Builder setMainRFileUri(java.lang.String value) { 1137 if (value == null) { 1138 throw new NullPointerException(); 1139 } 1140 mainRFileUri_ = value; 1141 bitField0_ |= 0x00000001; 1142 onChanged(); 1143 return this; 1144 } 1145 /** 1146 * 1147 * 1148 * <pre> 1149 * Required. The HCFS URI of the main R file to use as the driver. 1150 * Must be a .R file. 1151 * </pre> 1152 * 1153 * <code>string main_r_file_uri = 1 [(.google.api.field_behavior) = REQUIRED];</code> 1154 * 1155 * @return This builder for chaining. 1156 */ clearMainRFileUri()1157 public Builder clearMainRFileUri() { 1158 mainRFileUri_ = getDefaultInstance().getMainRFileUri(); 1159 bitField0_ = (bitField0_ & ~0x00000001); 1160 onChanged(); 1161 return this; 1162 } 1163 /** 1164 * 1165 * 1166 * <pre> 1167 * Required. The HCFS URI of the main R file to use as the driver. 1168 * Must be a .R file. 1169 * </pre> 1170 * 1171 * <code>string main_r_file_uri = 1 [(.google.api.field_behavior) = REQUIRED];</code> 1172 * 1173 * @param value The bytes for mainRFileUri to set. 1174 * @return This builder for chaining. 1175 */ setMainRFileUriBytes(com.google.protobuf.ByteString value)1176 public Builder setMainRFileUriBytes(com.google.protobuf.ByteString value) { 1177 if (value == null) { 1178 throw new NullPointerException(); 1179 } 1180 checkByteStringIsUtf8(value); 1181 mainRFileUri_ = value; 1182 bitField0_ |= 0x00000001; 1183 onChanged(); 1184 return this; 1185 } 1186 1187 private com.google.protobuf.LazyStringList args_ = 1188 com.google.protobuf.LazyStringArrayList.EMPTY; 1189 ensureArgsIsMutable()1190 private void ensureArgsIsMutable() { 1191 if (!((bitField0_ & 0x00000002) != 0)) { 1192 args_ = new com.google.protobuf.LazyStringArrayList(args_); 1193 bitField0_ |= 0x00000002; 1194 } 1195 } 1196 /** 1197 * 1198 * 1199 * <pre> 1200 * Optional. The arguments to pass to the driver. Do not include arguments, 1201 * such as `--conf`, that can be set as job properties, since a collision may 1202 * occur that causes an incorrect job submission. 1203 * </pre> 1204 * 1205 * <code>repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 1206 * 1207 * @return A list containing the args. 1208 */ getArgsList()1209 public com.google.protobuf.ProtocolStringList getArgsList() { 1210 return args_.getUnmodifiableView(); 1211 } 1212 /** 1213 * 1214 * 1215 * <pre> 1216 * Optional. The arguments to pass to the driver. Do not include arguments, 1217 * such as `--conf`, that can be set as job properties, since a collision may 1218 * occur that causes an incorrect job submission. 1219 * </pre> 1220 * 1221 * <code>repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 1222 * 1223 * @return The count of args. 1224 */ getArgsCount()1225 public int getArgsCount() { 1226 return args_.size(); 1227 } 1228 /** 1229 * 1230 * 1231 * <pre> 1232 * Optional. The arguments to pass to the driver. Do not include arguments, 1233 * such as `--conf`, that can be set as job properties, since a collision may 1234 * occur that causes an incorrect job submission. 1235 * </pre> 1236 * 1237 * <code>repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 1238 * 1239 * @param index The index of the element to return. 1240 * @return The args at the given index. 1241 */ getArgs(int index)1242 public java.lang.String getArgs(int index) { 1243 return args_.get(index); 1244 } 1245 /** 1246 * 1247 * 1248 * <pre> 1249 * Optional. The arguments to pass to the driver. Do not include arguments, 1250 * such as `--conf`, that can be set as job properties, since a collision may 1251 * occur that causes an incorrect job submission. 1252 * </pre> 1253 * 1254 * <code>repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 1255 * 1256 * @param index The index of the value to return. 1257 * @return The bytes of the args at the given index. 1258 */ getArgsBytes(int index)1259 public com.google.protobuf.ByteString getArgsBytes(int index) { 1260 return args_.getByteString(index); 1261 } 1262 /** 1263 * 1264 * 1265 * <pre> 1266 * Optional. The arguments to pass to the driver. Do not include arguments, 1267 * such as `--conf`, that can be set as job properties, since a collision may 1268 * occur that causes an incorrect job submission. 1269 * </pre> 1270 * 1271 * <code>repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 1272 * 1273 * @param index The index to set the value at. 1274 * @param value The args to set. 1275 * @return This builder for chaining. 1276 */ setArgs(int index, java.lang.String value)1277 public Builder setArgs(int index, java.lang.String value) { 1278 if (value == null) { 1279 throw new NullPointerException(); 1280 } 1281 ensureArgsIsMutable(); 1282 args_.set(index, value); 1283 onChanged(); 1284 return this; 1285 } 1286 /** 1287 * 1288 * 1289 * <pre> 1290 * Optional. The arguments to pass to the driver. Do not include arguments, 1291 * such as `--conf`, that can be set as job properties, since a collision may 1292 * occur that causes an incorrect job submission. 1293 * </pre> 1294 * 1295 * <code>repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 1296 * 1297 * @param value The args to add. 1298 * @return This builder for chaining. 1299 */ addArgs(java.lang.String value)1300 public Builder addArgs(java.lang.String value) { 1301 if (value == null) { 1302 throw new NullPointerException(); 1303 } 1304 ensureArgsIsMutable(); 1305 args_.add(value); 1306 onChanged(); 1307 return this; 1308 } 1309 /** 1310 * 1311 * 1312 * <pre> 1313 * Optional. The arguments to pass to the driver. Do not include arguments, 1314 * such as `--conf`, that can be set as job properties, since a collision may 1315 * occur that causes an incorrect job submission. 1316 * </pre> 1317 * 1318 * <code>repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 1319 * 1320 * @param values The args to add. 1321 * @return This builder for chaining. 1322 */ addAllArgs(java.lang.Iterable<java.lang.String> values)1323 public Builder addAllArgs(java.lang.Iterable<java.lang.String> values) { 1324 ensureArgsIsMutable(); 1325 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, args_); 1326 onChanged(); 1327 return this; 1328 } 1329 /** 1330 * 1331 * 1332 * <pre> 1333 * Optional. The arguments to pass to the driver. Do not include arguments, 1334 * such as `--conf`, that can be set as job properties, since a collision may 1335 * occur that causes an incorrect job submission. 1336 * </pre> 1337 * 1338 * <code>repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 1339 * 1340 * @return This builder for chaining. 1341 */ clearArgs()1342 public Builder clearArgs() { 1343 args_ = com.google.protobuf.LazyStringArrayList.EMPTY; 1344 bitField0_ = (bitField0_ & ~0x00000002); 1345 onChanged(); 1346 return this; 1347 } 1348 /** 1349 * 1350 * 1351 * <pre> 1352 * Optional. The arguments to pass to the driver. Do not include arguments, 1353 * such as `--conf`, that can be set as job properties, since a collision may 1354 * occur that causes an incorrect job submission. 1355 * </pre> 1356 * 1357 * <code>repeated string args = 2 [(.google.api.field_behavior) = OPTIONAL];</code> 1358 * 1359 * @param value The bytes of the args to add. 1360 * @return This builder for chaining. 1361 */ addArgsBytes(com.google.protobuf.ByteString value)1362 public Builder addArgsBytes(com.google.protobuf.ByteString value) { 1363 if (value == null) { 1364 throw new NullPointerException(); 1365 } 1366 checkByteStringIsUtf8(value); 1367 ensureArgsIsMutable(); 1368 args_.add(value); 1369 onChanged(); 1370 return this; 1371 } 1372 1373 private com.google.protobuf.LazyStringList fileUris_ = 1374 com.google.protobuf.LazyStringArrayList.EMPTY; 1375 ensureFileUrisIsMutable()1376 private void ensureFileUrisIsMutable() { 1377 if (!((bitField0_ & 0x00000004) != 0)) { 1378 fileUris_ = new com.google.protobuf.LazyStringArrayList(fileUris_); 1379 bitField0_ |= 0x00000004; 1380 } 1381 } 1382 /** 1383 * 1384 * 1385 * <pre> 1386 * Optional. HCFS URIs of files to be placed in the working directory of 1387 * each executor. Useful for naively parallel tasks. 1388 * </pre> 1389 * 1390 * <code>repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 1391 * 1392 * @return A list containing the fileUris. 1393 */ getFileUrisList()1394 public com.google.protobuf.ProtocolStringList getFileUrisList() { 1395 return fileUris_.getUnmodifiableView(); 1396 } 1397 /** 1398 * 1399 * 1400 * <pre> 1401 * Optional. HCFS URIs of files to be placed in the working directory of 1402 * each executor. Useful for naively parallel tasks. 1403 * </pre> 1404 * 1405 * <code>repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 1406 * 1407 * @return The count of fileUris. 1408 */ getFileUrisCount()1409 public int getFileUrisCount() { 1410 return fileUris_.size(); 1411 } 1412 /** 1413 * 1414 * 1415 * <pre> 1416 * Optional. HCFS URIs of files to be placed in the working directory of 1417 * each executor. Useful for naively parallel tasks. 1418 * </pre> 1419 * 1420 * <code>repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 1421 * 1422 * @param index The index of the element to return. 1423 * @return The fileUris at the given index. 1424 */ getFileUris(int index)1425 public java.lang.String getFileUris(int index) { 1426 return fileUris_.get(index); 1427 } 1428 /** 1429 * 1430 * 1431 * <pre> 1432 * Optional. HCFS URIs of files to be placed in the working directory of 1433 * each executor. Useful for naively parallel tasks. 1434 * </pre> 1435 * 1436 * <code>repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 1437 * 1438 * @param index The index of the value to return. 1439 * @return The bytes of the fileUris at the given index. 1440 */ getFileUrisBytes(int index)1441 public com.google.protobuf.ByteString getFileUrisBytes(int index) { 1442 return fileUris_.getByteString(index); 1443 } 1444 /** 1445 * 1446 * 1447 * <pre> 1448 * Optional. HCFS URIs of files to be placed in the working directory of 1449 * each executor. Useful for naively parallel tasks. 1450 * </pre> 1451 * 1452 * <code>repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 1453 * 1454 * @param index The index to set the value at. 1455 * @param value The fileUris to set. 1456 * @return This builder for chaining. 1457 */ setFileUris(int index, java.lang.String value)1458 public Builder setFileUris(int index, java.lang.String value) { 1459 if (value == null) { 1460 throw new NullPointerException(); 1461 } 1462 ensureFileUrisIsMutable(); 1463 fileUris_.set(index, value); 1464 onChanged(); 1465 return this; 1466 } 1467 /** 1468 * 1469 * 1470 * <pre> 1471 * Optional. HCFS URIs of files to be placed in the working directory of 1472 * each executor. Useful for naively parallel tasks. 1473 * </pre> 1474 * 1475 * <code>repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 1476 * 1477 * @param value The fileUris to add. 1478 * @return This builder for chaining. 1479 */ addFileUris(java.lang.String value)1480 public Builder addFileUris(java.lang.String value) { 1481 if (value == null) { 1482 throw new NullPointerException(); 1483 } 1484 ensureFileUrisIsMutable(); 1485 fileUris_.add(value); 1486 onChanged(); 1487 return this; 1488 } 1489 /** 1490 * 1491 * 1492 * <pre> 1493 * Optional. HCFS URIs of files to be placed in the working directory of 1494 * each executor. Useful for naively parallel tasks. 1495 * </pre> 1496 * 1497 * <code>repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 1498 * 1499 * @param values The fileUris to add. 1500 * @return This builder for chaining. 1501 */ addAllFileUris(java.lang.Iterable<java.lang.String> values)1502 public Builder addAllFileUris(java.lang.Iterable<java.lang.String> values) { 1503 ensureFileUrisIsMutable(); 1504 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fileUris_); 1505 onChanged(); 1506 return this; 1507 } 1508 /** 1509 * 1510 * 1511 * <pre> 1512 * Optional. HCFS URIs of files to be placed in the working directory of 1513 * each executor. Useful for naively parallel tasks. 1514 * </pre> 1515 * 1516 * <code>repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 1517 * 1518 * @return This builder for chaining. 1519 */ clearFileUris()1520 public Builder clearFileUris() { 1521 fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; 1522 bitField0_ = (bitField0_ & ~0x00000004); 1523 onChanged(); 1524 return this; 1525 } 1526 /** 1527 * 1528 * 1529 * <pre> 1530 * Optional. HCFS URIs of files to be placed in the working directory of 1531 * each executor. Useful for naively parallel tasks. 1532 * </pre> 1533 * 1534 * <code>repeated string file_uris = 3 [(.google.api.field_behavior) = OPTIONAL];</code> 1535 * 1536 * @param value The bytes of the fileUris to add. 1537 * @return This builder for chaining. 1538 */ addFileUrisBytes(com.google.protobuf.ByteString value)1539 public Builder addFileUrisBytes(com.google.protobuf.ByteString value) { 1540 if (value == null) { 1541 throw new NullPointerException(); 1542 } 1543 checkByteStringIsUtf8(value); 1544 ensureFileUrisIsMutable(); 1545 fileUris_.add(value); 1546 onChanged(); 1547 return this; 1548 } 1549 1550 private com.google.protobuf.LazyStringList archiveUris_ = 1551 com.google.protobuf.LazyStringArrayList.EMPTY; 1552 ensureArchiveUrisIsMutable()1553 private void ensureArchiveUrisIsMutable() { 1554 if (!((bitField0_ & 0x00000008) != 0)) { 1555 archiveUris_ = new com.google.protobuf.LazyStringArrayList(archiveUris_); 1556 bitField0_ |= 0x00000008; 1557 } 1558 } 1559 /** 1560 * 1561 * 1562 * <pre> 1563 * Optional. HCFS URIs of archives to be extracted into the working directory 1564 * of each executor. Supported file types: 1565 * .jar, .tar, .tar.gz, .tgz, and .zip. 1566 * </pre> 1567 * 1568 * <code>repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL];</code> 1569 * 1570 * @return A list containing the archiveUris. 1571 */ getArchiveUrisList()1572 public com.google.protobuf.ProtocolStringList getArchiveUrisList() { 1573 return archiveUris_.getUnmodifiableView(); 1574 } 1575 /** 1576 * 1577 * 1578 * <pre> 1579 * Optional. HCFS URIs of archives to be extracted into the working directory 1580 * of each executor. Supported file types: 1581 * .jar, .tar, .tar.gz, .tgz, and .zip. 1582 * </pre> 1583 * 1584 * <code>repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL];</code> 1585 * 1586 * @return The count of archiveUris. 1587 */ getArchiveUrisCount()1588 public int getArchiveUrisCount() { 1589 return archiveUris_.size(); 1590 } 1591 /** 1592 * 1593 * 1594 * <pre> 1595 * Optional. HCFS URIs of archives to be extracted into the working directory 1596 * of each executor. Supported file types: 1597 * .jar, .tar, .tar.gz, .tgz, and .zip. 1598 * </pre> 1599 * 1600 * <code>repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL];</code> 1601 * 1602 * @param index The index of the element to return. 1603 * @return The archiveUris at the given index. 1604 */ getArchiveUris(int index)1605 public java.lang.String getArchiveUris(int index) { 1606 return archiveUris_.get(index); 1607 } 1608 /** 1609 * 1610 * 1611 * <pre> 1612 * Optional. HCFS URIs of archives to be extracted into the working directory 1613 * of each executor. Supported file types: 1614 * .jar, .tar, .tar.gz, .tgz, and .zip. 1615 * </pre> 1616 * 1617 * <code>repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL];</code> 1618 * 1619 * @param index The index of the value to return. 1620 * @return The bytes of the archiveUris at the given index. 1621 */ getArchiveUrisBytes(int index)1622 public com.google.protobuf.ByteString getArchiveUrisBytes(int index) { 1623 return archiveUris_.getByteString(index); 1624 } 1625 /** 1626 * 1627 * 1628 * <pre> 1629 * Optional. HCFS URIs of archives to be extracted into the working directory 1630 * of each executor. Supported file types: 1631 * .jar, .tar, .tar.gz, .tgz, and .zip. 1632 * </pre> 1633 * 1634 * <code>repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL];</code> 1635 * 1636 * @param index The index to set the value at. 1637 * @param value The archiveUris to set. 1638 * @return This builder for chaining. 1639 */ setArchiveUris(int index, java.lang.String value)1640 public Builder setArchiveUris(int index, java.lang.String value) { 1641 if (value == null) { 1642 throw new NullPointerException(); 1643 } 1644 ensureArchiveUrisIsMutable(); 1645 archiveUris_.set(index, value); 1646 onChanged(); 1647 return this; 1648 } 1649 /** 1650 * 1651 * 1652 * <pre> 1653 * Optional. HCFS URIs of archives to be extracted into the working directory 1654 * of each executor. Supported file types: 1655 * .jar, .tar, .tar.gz, .tgz, and .zip. 1656 * </pre> 1657 * 1658 * <code>repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL];</code> 1659 * 1660 * @param value The archiveUris to add. 1661 * @return This builder for chaining. 1662 */ addArchiveUris(java.lang.String value)1663 public Builder addArchiveUris(java.lang.String value) { 1664 if (value == null) { 1665 throw new NullPointerException(); 1666 } 1667 ensureArchiveUrisIsMutable(); 1668 archiveUris_.add(value); 1669 onChanged(); 1670 return this; 1671 } 1672 /** 1673 * 1674 * 1675 * <pre> 1676 * Optional. HCFS URIs of archives to be extracted into the working directory 1677 * of each executor. Supported file types: 1678 * .jar, .tar, .tar.gz, .tgz, and .zip. 1679 * </pre> 1680 * 1681 * <code>repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL];</code> 1682 * 1683 * @param values The archiveUris to add. 1684 * @return This builder for chaining. 1685 */ addAllArchiveUris(java.lang.Iterable<java.lang.String> values)1686 public Builder addAllArchiveUris(java.lang.Iterable<java.lang.String> values) { 1687 ensureArchiveUrisIsMutable(); 1688 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, archiveUris_); 1689 onChanged(); 1690 return this; 1691 } 1692 /** 1693 * 1694 * 1695 * <pre> 1696 * Optional. HCFS URIs of archives to be extracted into the working directory 1697 * of each executor. Supported file types: 1698 * .jar, .tar, .tar.gz, .tgz, and .zip. 1699 * </pre> 1700 * 1701 * <code>repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL];</code> 1702 * 1703 * @return This builder for chaining. 1704 */ clearArchiveUris()1705 public Builder clearArchiveUris() { 1706 archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; 1707 bitField0_ = (bitField0_ & ~0x00000008); 1708 onChanged(); 1709 return this; 1710 } 1711 /** 1712 * 1713 * 1714 * <pre> 1715 * Optional. HCFS URIs of archives to be extracted into the working directory 1716 * of each executor. Supported file types: 1717 * .jar, .tar, .tar.gz, .tgz, and .zip. 1718 * </pre> 1719 * 1720 * <code>repeated string archive_uris = 4 [(.google.api.field_behavior) = OPTIONAL];</code> 1721 * 1722 * @param value The bytes of the archiveUris to add. 1723 * @return This builder for chaining. 1724 */ addArchiveUrisBytes(com.google.protobuf.ByteString value)1725 public Builder addArchiveUrisBytes(com.google.protobuf.ByteString value) { 1726 if (value == null) { 1727 throw new NullPointerException(); 1728 } 1729 checkByteStringIsUtf8(value); 1730 ensureArchiveUrisIsMutable(); 1731 archiveUris_.add(value); 1732 onChanged(); 1733 return this; 1734 } 1735 1736 private com.google.protobuf.MapField<java.lang.String, java.lang.String> properties_; 1737 1738 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetProperties()1739 internalGetProperties() { 1740 if (properties_ == null) { 1741 return com.google.protobuf.MapField.emptyMapField( 1742 PropertiesDefaultEntryHolder.defaultEntry); 1743 } 1744 return properties_; 1745 } 1746 1747 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMutableProperties()1748 internalGetMutableProperties() { 1749 if (properties_ == null) { 1750 properties_ = 1751 com.google.protobuf.MapField.newMapField(PropertiesDefaultEntryHolder.defaultEntry); 1752 } 1753 if (!properties_.isMutable()) { 1754 properties_ = properties_.copy(); 1755 } 1756 bitField0_ |= 0x00000010; 1757 onChanged(); 1758 return properties_; 1759 } 1760 getPropertiesCount()1761 public int getPropertiesCount() { 1762 return internalGetProperties().getMap().size(); 1763 } 1764 /** 1765 * 1766 * 1767 * <pre> 1768 * Optional. A mapping of property names to values, used to configure SparkR. 1769 * Properties that conflict with values set by the Dataproc API may be 1770 * overwritten. Can include properties set in 1771 * /etc/spark/conf/spark-defaults.conf and classes in user code. 1772 * </pre> 1773 * 1774 * <code>map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; 1775 * </code> 1776 */ 1777 @java.lang.Override containsProperties(java.lang.String key)1778 public boolean containsProperties(java.lang.String key) { 1779 if (key == null) { 1780 throw new NullPointerException("map key"); 1781 } 1782 return internalGetProperties().getMap().containsKey(key); 1783 } 1784 /** Use {@link #getPropertiesMap()} instead. */ 1785 @java.lang.Override 1786 @java.lang.Deprecated getProperties()1787 public java.util.Map<java.lang.String, java.lang.String> getProperties() { 1788 return getPropertiesMap(); 1789 } 1790 /** 1791 * 1792 * 1793 * <pre> 1794 * Optional. A mapping of property names to values, used to configure SparkR. 1795 * Properties that conflict with values set by the Dataproc API may be 1796 * overwritten. Can include properties set in 1797 * /etc/spark/conf/spark-defaults.conf and classes in user code. 1798 * </pre> 1799 * 1800 * <code>map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; 1801 * </code> 1802 */ 1803 @java.lang.Override getPropertiesMap()1804 public java.util.Map<java.lang.String, java.lang.String> getPropertiesMap() { 1805 return internalGetProperties().getMap(); 1806 } 1807 /** 1808 * 1809 * 1810 * <pre> 1811 * Optional. A mapping of property names to values, used to configure SparkR. 1812 * Properties that conflict with values set by the Dataproc API may be 1813 * overwritten. Can include properties set in 1814 * /etc/spark/conf/spark-defaults.conf and classes in user code. 1815 * </pre> 1816 * 1817 * <code>map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; 1818 * </code> 1819 */ 1820 @java.lang.Override getPropertiesOrDefault( java.lang.String key, java.lang.String defaultValue)1821 public /* nullable */ java.lang.String getPropertiesOrDefault( 1822 java.lang.String key, 1823 /* nullable */ 1824 java.lang.String defaultValue) { 1825 if (key == null) { 1826 throw new NullPointerException("map key"); 1827 } 1828 java.util.Map<java.lang.String, java.lang.String> map = internalGetProperties().getMap(); 1829 return map.containsKey(key) ? map.get(key) : defaultValue; 1830 } 1831 /** 1832 * 1833 * 1834 * <pre> 1835 * Optional. A mapping of property names to values, used to configure SparkR. 1836 * Properties that conflict with values set by the Dataproc API may be 1837 * overwritten. Can include properties set in 1838 * /etc/spark/conf/spark-defaults.conf and classes in user code. 1839 * </pre> 1840 * 1841 * <code>map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; 1842 * </code> 1843 */ 1844 @java.lang.Override getPropertiesOrThrow(java.lang.String key)1845 public java.lang.String getPropertiesOrThrow(java.lang.String key) { 1846 if (key == null) { 1847 throw new NullPointerException("map key"); 1848 } 1849 java.util.Map<java.lang.String, java.lang.String> map = internalGetProperties().getMap(); 1850 if (!map.containsKey(key)) { 1851 throw new java.lang.IllegalArgumentException(); 1852 } 1853 return map.get(key); 1854 } 1855 clearProperties()1856 public Builder clearProperties() { 1857 bitField0_ = (bitField0_ & ~0x00000010); 1858 internalGetMutableProperties().getMutableMap().clear(); 1859 return this; 1860 } 1861 /** 1862 * 1863 * 1864 * <pre> 1865 * Optional. A mapping of property names to values, used to configure SparkR. 1866 * Properties that conflict with values set by the Dataproc API may be 1867 * overwritten. Can include properties set in 1868 * /etc/spark/conf/spark-defaults.conf and classes in user code. 1869 * </pre> 1870 * 1871 * <code>map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; 1872 * </code> 1873 */ removeProperties(java.lang.String key)1874 public Builder removeProperties(java.lang.String key) { 1875 if (key == null) { 1876 throw new NullPointerException("map key"); 1877 } 1878 internalGetMutableProperties().getMutableMap().remove(key); 1879 return this; 1880 } 1881 /** Use alternate mutation accessors instead. */ 1882 @java.lang.Deprecated getMutableProperties()1883 public java.util.Map<java.lang.String, java.lang.String> getMutableProperties() { 1884 bitField0_ |= 0x00000010; 1885 return internalGetMutableProperties().getMutableMap(); 1886 } 1887 /** 1888 * 1889 * 1890 * <pre> 1891 * Optional. A mapping of property names to values, used to configure SparkR. 1892 * Properties that conflict with values set by the Dataproc API may be 1893 * overwritten. Can include properties set in 1894 * /etc/spark/conf/spark-defaults.conf and classes in user code. 1895 * </pre> 1896 * 1897 * <code>map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; 1898 * </code> 1899 */ putProperties(java.lang.String key, java.lang.String value)1900 public Builder putProperties(java.lang.String key, java.lang.String value) { 1901 if (key == null) { 1902 throw new NullPointerException("map key"); 1903 } 1904 if (value == null) { 1905 throw new NullPointerException("map value"); 1906 } 1907 internalGetMutableProperties().getMutableMap().put(key, value); 1908 bitField0_ |= 0x00000010; 1909 return this; 1910 } 1911 /** 1912 * 1913 * 1914 * <pre> 1915 * Optional. A mapping of property names to values, used to configure SparkR. 1916 * Properties that conflict with values set by the Dataproc API may be 1917 * overwritten. Can include properties set in 1918 * /etc/spark/conf/spark-defaults.conf and classes in user code. 1919 * </pre> 1920 * 1921 * <code>map<string, string> properties = 5 [(.google.api.field_behavior) = OPTIONAL]; 1922 * </code> 1923 */ putAllProperties(java.util.Map<java.lang.String, java.lang.String> values)1924 public Builder putAllProperties(java.util.Map<java.lang.String, java.lang.String> values) { 1925 internalGetMutableProperties().getMutableMap().putAll(values); 1926 bitField0_ |= 0x00000010; 1927 return this; 1928 } 1929 1930 private com.google.cloud.dataproc.v1.LoggingConfig loggingConfig_; 1931 private com.google.protobuf.SingleFieldBuilderV3< 1932 com.google.cloud.dataproc.v1.LoggingConfig, 1933 com.google.cloud.dataproc.v1.LoggingConfig.Builder, 1934 com.google.cloud.dataproc.v1.LoggingConfigOrBuilder> 1935 loggingConfigBuilder_; 1936 /** 1937 * 1938 * 1939 * <pre> 1940 * Optional. The runtime log config for job execution. 1941 * </pre> 1942 * 1943 * <code> 1944 * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; 1945 * </code> 1946 * 1947 * @return Whether the loggingConfig field is set. 1948 */ hasLoggingConfig()1949 public boolean hasLoggingConfig() { 1950 return ((bitField0_ & 0x00000020) != 0); 1951 } 1952 /** 1953 * 1954 * 1955 * <pre> 1956 * Optional. The runtime log config for job execution. 1957 * </pre> 1958 * 1959 * <code> 1960 * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; 1961 * </code> 1962 * 1963 * @return The loggingConfig. 1964 */ getLoggingConfig()1965 public com.google.cloud.dataproc.v1.LoggingConfig getLoggingConfig() { 1966 if (loggingConfigBuilder_ == null) { 1967 return loggingConfig_ == null 1968 ? com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance() 1969 : loggingConfig_; 1970 } else { 1971 return loggingConfigBuilder_.getMessage(); 1972 } 1973 } 1974 /** 1975 * 1976 * 1977 * <pre> 1978 * Optional. The runtime log config for job execution. 1979 * </pre> 1980 * 1981 * <code> 1982 * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; 1983 * </code> 1984 */ setLoggingConfig(com.google.cloud.dataproc.v1.LoggingConfig value)1985 public Builder setLoggingConfig(com.google.cloud.dataproc.v1.LoggingConfig value) { 1986 if (loggingConfigBuilder_ == null) { 1987 if (value == null) { 1988 throw new NullPointerException(); 1989 } 1990 loggingConfig_ = value; 1991 } else { 1992 loggingConfigBuilder_.setMessage(value); 1993 } 1994 bitField0_ |= 0x00000020; 1995 onChanged(); 1996 return this; 1997 } 1998 /** 1999 * 2000 * 2001 * <pre> 2002 * Optional. The runtime log config for job execution. 2003 * </pre> 2004 * 2005 * <code> 2006 * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; 2007 * </code> 2008 */ setLoggingConfig( com.google.cloud.dataproc.v1.LoggingConfig.Builder builderForValue)2009 public Builder setLoggingConfig( 2010 com.google.cloud.dataproc.v1.LoggingConfig.Builder builderForValue) { 2011 if (loggingConfigBuilder_ == null) { 2012 loggingConfig_ = builderForValue.build(); 2013 } else { 2014 loggingConfigBuilder_.setMessage(builderForValue.build()); 2015 } 2016 bitField0_ |= 0x00000020; 2017 onChanged(); 2018 return this; 2019 } 2020 /** 2021 * 2022 * 2023 * <pre> 2024 * Optional. The runtime log config for job execution. 2025 * </pre> 2026 * 2027 * <code> 2028 * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; 2029 * </code> 2030 */ mergeLoggingConfig(com.google.cloud.dataproc.v1.LoggingConfig value)2031 public Builder mergeLoggingConfig(com.google.cloud.dataproc.v1.LoggingConfig value) { 2032 if (loggingConfigBuilder_ == null) { 2033 if (((bitField0_ & 0x00000020) != 0) 2034 && loggingConfig_ != null 2035 && loggingConfig_ != com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance()) { 2036 getLoggingConfigBuilder().mergeFrom(value); 2037 } else { 2038 loggingConfig_ = value; 2039 } 2040 } else { 2041 loggingConfigBuilder_.mergeFrom(value); 2042 } 2043 bitField0_ |= 0x00000020; 2044 onChanged(); 2045 return this; 2046 } 2047 /** 2048 * 2049 * 2050 * <pre> 2051 * Optional. The runtime log config for job execution. 2052 * </pre> 2053 * 2054 * <code> 2055 * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; 2056 * </code> 2057 */ clearLoggingConfig()2058 public Builder clearLoggingConfig() { 2059 bitField0_ = (bitField0_ & ~0x00000020); 2060 loggingConfig_ = null; 2061 if (loggingConfigBuilder_ != null) { 2062 loggingConfigBuilder_.dispose(); 2063 loggingConfigBuilder_ = null; 2064 } 2065 onChanged(); 2066 return this; 2067 } 2068 /** 2069 * 2070 * 2071 * <pre> 2072 * Optional. The runtime log config for job execution. 2073 * </pre> 2074 * 2075 * <code> 2076 * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; 2077 * </code> 2078 */ getLoggingConfigBuilder()2079 public com.google.cloud.dataproc.v1.LoggingConfig.Builder getLoggingConfigBuilder() { 2080 bitField0_ |= 0x00000020; 2081 onChanged(); 2082 return getLoggingConfigFieldBuilder().getBuilder(); 2083 } 2084 /** 2085 * 2086 * 2087 * <pre> 2088 * Optional. The runtime log config for job execution. 2089 * </pre> 2090 * 2091 * <code> 2092 * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; 2093 * </code> 2094 */ getLoggingConfigOrBuilder()2095 public com.google.cloud.dataproc.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder() { 2096 if (loggingConfigBuilder_ != null) { 2097 return loggingConfigBuilder_.getMessageOrBuilder(); 2098 } else { 2099 return loggingConfig_ == null 2100 ? com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance() 2101 : loggingConfig_; 2102 } 2103 } 2104 /** 2105 * 2106 * 2107 * <pre> 2108 * Optional. The runtime log config for job execution. 2109 * </pre> 2110 * 2111 * <code> 2112 * .google.cloud.dataproc.v1.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; 2113 * </code> 2114 */ 2115 private com.google.protobuf.SingleFieldBuilderV3< 2116 com.google.cloud.dataproc.v1.LoggingConfig, 2117 com.google.cloud.dataproc.v1.LoggingConfig.Builder, 2118 com.google.cloud.dataproc.v1.LoggingConfigOrBuilder> getLoggingConfigFieldBuilder()2119 getLoggingConfigFieldBuilder() { 2120 if (loggingConfigBuilder_ == null) { 2121 loggingConfigBuilder_ = 2122 new com.google.protobuf.SingleFieldBuilderV3< 2123 com.google.cloud.dataproc.v1.LoggingConfig, 2124 com.google.cloud.dataproc.v1.LoggingConfig.Builder, 2125 com.google.cloud.dataproc.v1.LoggingConfigOrBuilder>( 2126 getLoggingConfig(), getParentForChildren(), isClean()); 2127 loggingConfig_ = null; 2128 } 2129 return loggingConfigBuilder_; 2130 } 2131 2132 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)2133 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 2134 return super.setUnknownFields(unknownFields); 2135 } 2136 2137 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2138 public final Builder mergeUnknownFields( 2139 final com.google.protobuf.UnknownFieldSet unknownFields) { 2140 return super.mergeUnknownFields(unknownFields); 2141 } 2142 2143 // @@protoc_insertion_point(builder_scope:google.cloud.dataproc.v1.SparkRJob) 2144 } 2145 2146 // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.SparkRJob) 2147 private static final com.google.cloud.dataproc.v1.SparkRJob DEFAULT_INSTANCE; 2148 2149 static { 2150 DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.SparkRJob(); 2151 } 2152 getDefaultInstance()2153 public static com.google.cloud.dataproc.v1.SparkRJob getDefaultInstance() { 2154 return DEFAULT_INSTANCE; 2155 } 2156 2157 private static final com.google.protobuf.Parser<SparkRJob> PARSER = 2158 new com.google.protobuf.AbstractParser<SparkRJob>() { 2159 @java.lang.Override 2160 public SparkRJob parsePartialFrom( 2161 com.google.protobuf.CodedInputStream input, 2162 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2163 throws com.google.protobuf.InvalidProtocolBufferException { 2164 Builder builder = newBuilder(); 2165 try { 2166 builder.mergeFrom(input, extensionRegistry); 2167 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 2168 throw e.setUnfinishedMessage(builder.buildPartial()); 2169 } catch (com.google.protobuf.UninitializedMessageException e) { 2170 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 2171 } catch (java.io.IOException e) { 2172 throw new com.google.protobuf.InvalidProtocolBufferException(e) 2173 .setUnfinishedMessage(builder.buildPartial()); 2174 } 2175 return builder.buildPartial(); 2176 } 2177 }; 2178 parser()2179 public static com.google.protobuf.Parser<SparkRJob> parser() { 2180 return PARSER; 2181 } 2182 2183 @java.lang.Override getParserForType()2184 public com.google.protobuf.Parser<SparkRJob> getParserForType() { 2185 return PARSER; 2186 } 2187 2188 @java.lang.Override getDefaultInstanceForType()2189 public com.google.cloud.dataproc.v1.SparkRJob getDefaultInstanceForType() { 2190 return DEFAULT_INSTANCE; 2191 } 2192 } 2193