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