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