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