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