/*
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/vmmigration/v1/vmmigration.proto

package com.google.cloud.vmmigration.v1;

/**
 *
 *
 * <pre>
 * ReplicationCycle contains information about the current replication cycle
 * status.
 * </pre>
 *
 * Protobuf type {@code google.cloud.vmmigration.v1.ReplicationCycle}
 */
public final class ReplicationCycle extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.vmmigration.v1.ReplicationCycle)
    ReplicationCycleOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use ReplicationCycle.newBuilder() to construct.
  private ReplicationCycle(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private ReplicationCycle() {
    name_ = "";
    steps_ = java.util.Collections.emptyList();
    state_ = 0;
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
    return new ReplicationCycle();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
    return this.unknownFields;
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.cloud.vmmigration.v1.VmMigrationProto
        .internal_static_google_cloud_vmmigration_v1_ReplicationCycle_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.vmmigration.v1.VmMigrationProto
        .internal_static_google_cloud_vmmigration_v1_ReplicationCycle_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.vmmigration.v1.ReplicationCycle.class,
            com.google.cloud.vmmigration.v1.ReplicationCycle.Builder.class);
  }

  /**
   *
   *
   * <pre>
   * Possible states of a replication cycle.
   * </pre>
   *
   * Protobuf enum {@code google.cloud.vmmigration.v1.ReplicationCycle.State}
   */
  public enum State implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * The state is unknown. This is used for API compatibility only and is not
     * used by the system.
     * </pre>
     *
     * <code>STATE_UNSPECIFIED = 0;</code>
     */
    STATE_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * The replication cycle is running.
     * </pre>
     *
     * <code>RUNNING = 1;</code>
     */
    RUNNING(1),
    /**
     *
     *
     * <pre>
     * The replication cycle is paused.
     * </pre>
     *
     * <code>PAUSED = 2;</code>
     */
    PAUSED(2),
    /**
     *
     *
     * <pre>
     * The replication cycle finished with errors.
     * </pre>
     *
     * <code>FAILED = 3;</code>
     */
    FAILED(3),
    /**
     *
     *
     * <pre>
     * The replication cycle finished successfully.
     * </pre>
     *
     * <code>SUCCEEDED = 4;</code>
     */
    SUCCEEDED(4),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * The state is unknown. This is used for API compatibility only and is not
     * used by the system.
     * </pre>
     *
     * <code>STATE_UNSPECIFIED = 0;</code>
     */
    public static final int STATE_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * The replication cycle is running.
     * </pre>
     *
     * <code>RUNNING = 1;</code>
     */
    public static final int RUNNING_VALUE = 1;
    /**
     *
     *
     * <pre>
     * The replication cycle is paused.
     * </pre>
     *
     * <code>PAUSED = 2;</code>
     */
    public static final int PAUSED_VALUE = 2;
    /**
     *
     *
     * <pre>
     * The replication cycle finished with errors.
     * </pre>
     *
     * <code>FAILED = 3;</code>
     */
    public static final int FAILED_VALUE = 3;
    /**
     *
     *
     * <pre>
     * The replication cycle finished successfully.
     * </pre>
     *
     * <code>SUCCEEDED = 4;</code>
     */
    public static final int SUCCEEDED_VALUE = 4;

    public final int getNumber() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalArgumentException(
            "Can't get the number of an unknown enum value.");
      }
      return value;
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static State valueOf(int value) {
      return forNumber(value);
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     */
    public static State forNumber(int value) {
      switch (value) {
        case 0:
          return STATE_UNSPECIFIED;
        case 1:
          return RUNNING;
        case 2:
          return PAUSED;
        case 3:
          return FAILED;
        case 4:
          return SUCCEEDED;
        default:
          return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap<State> internalGetValueMap() {
      return internalValueMap;
    }

    private static final com.google.protobuf.Internal.EnumLiteMap<State> internalValueMap =
        new com.google.protobuf.Internal.EnumLiteMap<State>() {
          public State findValueByNumber(int number) {
            return State.forNumber(number);
          }
        };

    public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalStateException(
            "Can't get the descriptor of an unrecognized enum value.");
      }
      return getDescriptor().getValues().get(ordinal());
    }

    public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
      return getDescriptor();
    }

    public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
      return com.google.cloud.vmmigration.v1.ReplicationCycle.getDescriptor().getEnumTypes().get(0);
    }

    private static final State[] VALUES = values();

    public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
      if (desc.getType() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
      }
      if (desc.getIndex() == -1) {
        return UNRECOGNIZED;
      }
      return VALUES[desc.getIndex()];
    }

    private final int value;

    private State(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:google.cloud.vmmigration.v1.ReplicationCycle.State)
  }

  public static final int NAME_FIELD_NUMBER = 13;

  @SuppressWarnings("serial")
  private volatile java.lang.Object name_ = "";
  /**
   *
   *
   * <pre>
   * The identifier of the ReplicationCycle.
   * </pre>
   *
   * <code>string name = 13;</code>
   *
   * @return The name.
   */
  @java.lang.Override
  public java.lang.String getName() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      name_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The identifier of the ReplicationCycle.
   * </pre>
   *
   * <code>string name = 13;</code>
   *
   * @return The bytes for name.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getNameBytes() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      name_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int CYCLE_NUMBER_FIELD_NUMBER = 10;
  private int cycleNumber_ = 0;
  /**
   *
   *
   * <pre>
   * The cycle's ordinal number.
   * </pre>
   *
   * <code>int32 cycle_number = 10;</code>
   *
   * @return The cycleNumber.
   */
  @java.lang.Override
  public int getCycleNumber() {
    return cycleNumber_;
  }

  public static final int START_TIME_FIELD_NUMBER = 1;
  private com.google.protobuf.Timestamp startTime_;
  /**
   *
   *
   * <pre>
   * The time the replication cycle has started.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp start_time = 1;</code>
   *
   * @return Whether the startTime field is set.
   */
  @java.lang.Override
  public boolean hasStartTime() {
    return startTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * The time the replication cycle has started.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp start_time = 1;</code>
   *
   * @return The startTime.
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getStartTime() {
    return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_;
  }
  /**
   *
   *
   * <pre>
   * The time the replication cycle has started.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp start_time = 1;</code>
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() {
    return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_;
  }

  public static final int END_TIME_FIELD_NUMBER = 6;
  private com.google.protobuf.Timestamp endTime_;
  /**
   *
   *
   * <pre>
   * The time the replication cycle has ended.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp end_time = 6;</code>
   *
   * @return Whether the endTime field is set.
   */
  @java.lang.Override
  public boolean hasEndTime() {
    return endTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * The time the replication cycle has ended.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp end_time = 6;</code>
   *
   * @return The endTime.
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getEndTime() {
    return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_;
  }
  /**
   *
   *
   * <pre>
   * The time the replication cycle has ended.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp end_time = 6;</code>
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() {
    return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_;
  }

  public static final int TOTAL_PAUSE_DURATION_FIELD_NUMBER = 7;
  private com.google.protobuf.Duration totalPauseDuration_;
  /**
   *
   *
   * <pre>
   * The accumulated duration the replication cycle was paused.
   * </pre>
   *
   * <code>.google.protobuf.Duration total_pause_duration = 7;</code>
   *
   * @return Whether the totalPauseDuration field is set.
   */
  @java.lang.Override
  public boolean hasTotalPauseDuration() {
    return totalPauseDuration_ != null;
  }
  /**
   *
   *
   * <pre>
   * The accumulated duration the replication cycle was paused.
   * </pre>
   *
   * <code>.google.protobuf.Duration total_pause_duration = 7;</code>
   *
   * @return The totalPauseDuration.
   */
  @java.lang.Override
  public com.google.protobuf.Duration getTotalPauseDuration() {
    return totalPauseDuration_ == null
        ? com.google.protobuf.Duration.getDefaultInstance()
        : totalPauseDuration_;
  }
  /**
   *
   *
   * <pre>
   * The accumulated duration the replication cycle was paused.
   * </pre>
   *
   * <code>.google.protobuf.Duration total_pause_duration = 7;</code>
   */
  @java.lang.Override
  public com.google.protobuf.DurationOrBuilder getTotalPauseDurationOrBuilder() {
    return totalPauseDuration_ == null
        ? com.google.protobuf.Duration.getDefaultInstance()
        : totalPauseDuration_;
  }

  public static final int PROGRESS_PERCENT_FIELD_NUMBER = 5;
  private int progressPercent_ = 0;
  /**
   *
   *
   * <pre>
   * The current progress in percentage of this cycle.
   * Was replaced by 'steps' field, which breaks down the cycle progression more
   * accurately.
   * </pre>
   *
   * <code>int32 progress_percent = 5 [deprecated = true];</code>
   *
   * @deprecated google.cloud.vmmigration.v1.ReplicationCycle.progress_percent is deprecated. See
   *     google/cloud/vmmigration/v1/vmmigration.proto;l=715
   * @return The progressPercent.
   */
  @java.lang.Override
  @java.lang.Deprecated
  public int getProgressPercent() {
    return progressPercent_;
  }

  public static final int STEPS_FIELD_NUMBER = 9;

  @SuppressWarnings("serial")
  private java.util.List<com.google.cloud.vmmigration.v1.CycleStep> steps_;
  /**
   *
   *
   * <pre>
   * The cycle's steps list representing its progress.
   * </pre>
   *
   * <code>repeated .google.cloud.vmmigration.v1.CycleStep steps = 9;</code>
   */
  @java.lang.Override
  public java.util.List<com.google.cloud.vmmigration.v1.CycleStep> getStepsList() {
    return steps_;
  }
  /**
   *
   *
   * <pre>
   * The cycle's steps list representing its progress.
   * </pre>
   *
   * <code>repeated .google.cloud.vmmigration.v1.CycleStep steps = 9;</code>
   */
  @java.lang.Override
  public java.util.List<? extends com.google.cloud.vmmigration.v1.CycleStepOrBuilder>
      getStepsOrBuilderList() {
    return steps_;
  }
  /**
   *
   *
   * <pre>
   * The cycle's steps list representing its progress.
   * </pre>
   *
   * <code>repeated .google.cloud.vmmigration.v1.CycleStep steps = 9;</code>
   */
  @java.lang.Override
  public int getStepsCount() {
    return steps_.size();
  }
  /**
   *
   *
   * <pre>
   * The cycle's steps list representing its progress.
   * </pre>
   *
   * <code>repeated .google.cloud.vmmigration.v1.CycleStep steps = 9;</code>
   */
  @java.lang.Override
  public com.google.cloud.vmmigration.v1.CycleStep getSteps(int index) {
    return steps_.get(index);
  }
  /**
   *
   *
   * <pre>
   * The cycle's steps list representing its progress.
   * </pre>
   *
   * <code>repeated .google.cloud.vmmigration.v1.CycleStep steps = 9;</code>
   */
  @java.lang.Override
  public com.google.cloud.vmmigration.v1.CycleStepOrBuilder getStepsOrBuilder(int index) {
    return steps_.get(index);
  }

  public static final int STATE_FIELD_NUMBER = 11;
  private int state_ = 0;
  /**
   *
   *
   * <pre>
   * State of the ReplicationCycle.
   * </pre>
   *
   * <code>.google.cloud.vmmigration.v1.ReplicationCycle.State state = 11;</code>
   *
   * @return The enum numeric value on the wire for state.
   */
  @java.lang.Override
  public int getStateValue() {
    return state_;
  }
  /**
   *
   *
   * <pre>
   * State of the ReplicationCycle.
   * </pre>
   *
   * <code>.google.cloud.vmmigration.v1.ReplicationCycle.State state = 11;</code>
   *
   * @return The state.
   */
  @java.lang.Override
  public com.google.cloud.vmmigration.v1.ReplicationCycle.State getState() {
    com.google.cloud.vmmigration.v1.ReplicationCycle.State result =
        com.google.cloud.vmmigration.v1.ReplicationCycle.State.forNumber(state_);
    return result == null
        ? com.google.cloud.vmmigration.v1.ReplicationCycle.State.UNRECOGNIZED
        : result;
  }

  public static final int ERROR_FIELD_NUMBER = 12;
  private com.google.rpc.Status error_;
  /**
   *
   *
   * <pre>
   * Provides details on the state of the cycle in case of an error.
   * </pre>
   *
   * <code>.google.rpc.Status error = 12;</code>
   *
   * @return Whether the error field is set.
   */
  @java.lang.Override
  public boolean hasError() {
    return error_ != null;
  }
  /**
   *
   *
   * <pre>
   * Provides details on the state of the cycle in case of an error.
   * </pre>
   *
   * <code>.google.rpc.Status error = 12;</code>
   *
   * @return The error.
   */
  @java.lang.Override
  public com.google.rpc.Status getError() {
    return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_;
  }
  /**
   *
   *
   * <pre>
   * Provides details on the state of the cycle in case of an error.
   * </pre>
   *
   * <code>.google.rpc.Status error = 12;</code>
   */
  @java.lang.Override
  public com.google.rpc.StatusOrBuilder getErrorOrBuilder() {
    return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_;
  }

  private byte memoizedIsInitialized = -1;

  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (startTime_ != null) {
      output.writeMessage(1, getStartTime());
    }
    if (progressPercent_ != 0) {
      output.writeInt32(5, progressPercent_);
    }
    if (endTime_ != null) {
      output.writeMessage(6, getEndTime());
    }
    if (totalPauseDuration_ != null) {
      output.writeMessage(7, getTotalPauseDuration());
    }
    for (int i = 0; i < steps_.size(); i++) {
      output.writeMessage(9, steps_.get(i));
    }
    if (cycleNumber_ != 0) {
      output.writeInt32(10, cycleNumber_);
    }
    if (state_
        != com.google.cloud.vmmigration.v1.ReplicationCycle.State.STATE_UNSPECIFIED.getNumber()) {
      output.writeEnum(11, state_);
    }
    if (error_ != null) {
      output.writeMessage(12, getError());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 13, name_);
    }
    getUnknownFields().writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (startTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTime());
    }
    if (progressPercent_ != 0) {
      size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, progressPercent_);
    }
    if (endTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getEndTime());
    }
    if (totalPauseDuration_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getTotalPauseDuration());
    }
    for (int i = 0; i < steps_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, steps_.get(i));
    }
    if (cycleNumber_ != 0) {
      size += com.google.protobuf.CodedOutputStream.computeInt32Size(10, cycleNumber_);
    }
    if (state_
        != com.google.cloud.vmmigration.v1.ReplicationCycle.State.STATE_UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, state_);
    }
    if (error_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getError());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, name_);
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof com.google.cloud.vmmigration.v1.ReplicationCycle)) {
      return super.equals(obj);
    }
    com.google.cloud.vmmigration.v1.ReplicationCycle other =
        (com.google.cloud.vmmigration.v1.ReplicationCycle) obj;

    if (!getName().equals(other.getName())) return false;
    if (getCycleNumber() != other.getCycleNumber()) return false;
    if (hasStartTime() != other.hasStartTime()) return false;
    if (hasStartTime()) {
      if (!getStartTime().equals(other.getStartTime())) return false;
    }
    if (hasEndTime() != other.hasEndTime()) return false;
    if (hasEndTime()) {
      if (!getEndTime().equals(other.getEndTime())) return false;
    }
    if (hasTotalPauseDuration() != other.hasTotalPauseDuration()) return false;
    if (hasTotalPauseDuration()) {
      if (!getTotalPauseDuration().equals(other.getTotalPauseDuration())) return false;
    }
    if (getProgressPercent() != other.getProgressPercent()) return false;
    if (!getStepsList().equals(other.getStepsList())) return false;
    if (state_ != other.state_) return false;
    if (hasError() != other.hasError()) return false;
    if (hasError()) {
      if (!getError().equals(other.getError())) return false;
    }
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + NAME_FIELD_NUMBER;
    hash = (53 * hash) + getName().hashCode();
    hash = (37 * hash) + CYCLE_NUMBER_FIELD_NUMBER;
    hash = (53 * hash) + getCycleNumber();
    if (hasStartTime()) {
      hash = (37 * hash) + START_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getStartTime().hashCode();
    }
    if (hasEndTime()) {
      hash = (37 * hash) + END_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getEndTime().hashCode();
    }
    if (hasTotalPauseDuration()) {
      hash = (37 * hash) + TOTAL_PAUSE_DURATION_FIELD_NUMBER;
      hash = (53 * hash) + getTotalPauseDuration().hashCode();
    }
    hash = (37 * hash) + PROGRESS_PERCENT_FIELD_NUMBER;
    hash = (53 * hash) + getProgressPercent();
    if (getStepsCount() > 0) {
      hash = (37 * hash) + STEPS_FIELD_NUMBER;
      hash = (53 * hash) + getStepsList().hashCode();
    }
    hash = (37 * hash) + STATE_FIELD_NUMBER;
    hash = (53 * hash) + state_;
    if (hasError()) {
      hash = (37 * hash) + ERROR_FIELD_NUMBER;
      hash = (53 * hash) + getError().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.cloud.vmmigration.v1.ReplicationCycle parseFrom(java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.vmmigration.v1.ReplicationCycle parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.vmmigration.v1.ReplicationCycle parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.vmmigration.v1.ReplicationCycle parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.vmmigration.v1.ReplicationCycle parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.vmmigration.v1.ReplicationCycle parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.vmmigration.v1.ReplicationCycle parseFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.vmmigration.v1.ReplicationCycle parseFrom(
      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.cloud.vmmigration.v1.ReplicationCycle parseDelimitedFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.cloud.vmmigration.v1.ReplicationCycle parseDelimitedFrom(
      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.cloud.vmmigration.v1.ReplicationCycle parseFrom(
      com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.vmmigration.v1.ReplicationCycle parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() {
    return newBuilder();
  }

  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }

  public static Builder newBuilder(com.google.cloud.vmmigration.v1.ReplicationCycle prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }

  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   *
   *
   * <pre>
   * ReplicationCycle contains information about the current replication cycle
   * status.
   * </pre>
   *
   * Protobuf type {@code google.cloud.vmmigration.v1.ReplicationCycle}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.vmmigration.v1.ReplicationCycle)
      com.google.cloud.vmmigration.v1.ReplicationCycleOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.vmmigration.v1.VmMigrationProto
          .internal_static_google_cloud_vmmigration_v1_ReplicationCycle_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.vmmigration.v1.VmMigrationProto
          .internal_static_google_cloud_vmmigration_v1_ReplicationCycle_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.vmmigration.v1.ReplicationCycle.class,
              com.google.cloud.vmmigration.v1.ReplicationCycle.Builder.class);
    }

    // Construct using com.google.cloud.vmmigration.v1.ReplicationCycle.newBuilder()
    private Builder() {}

    private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
    }

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      name_ = "";
      cycleNumber_ = 0;
      startTime_ = null;
      if (startTimeBuilder_ != null) {
        startTimeBuilder_.dispose();
        startTimeBuilder_ = null;
      }
      endTime_ = null;
      if (endTimeBuilder_ != null) {
        endTimeBuilder_.dispose();
        endTimeBuilder_ = null;
      }
      totalPauseDuration_ = null;
      if (totalPauseDurationBuilder_ != null) {
        totalPauseDurationBuilder_.dispose();
        totalPauseDurationBuilder_ = null;
      }
      progressPercent_ = 0;
      if (stepsBuilder_ == null) {
        steps_ = java.util.Collections.emptyList();
      } else {
        steps_ = null;
        stepsBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000040);
      state_ = 0;
      error_ = null;
      if (errorBuilder_ != null) {
        errorBuilder_.dispose();
        errorBuilder_ = null;
      }
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.cloud.vmmigration.v1.VmMigrationProto
          .internal_static_google_cloud_vmmigration_v1_ReplicationCycle_descriptor;
    }

    @java.lang.Override
    public com.google.cloud.vmmigration.v1.ReplicationCycle getDefaultInstanceForType() {
      return com.google.cloud.vmmigration.v1.ReplicationCycle.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.cloud.vmmigration.v1.ReplicationCycle build() {
      com.google.cloud.vmmigration.v1.ReplicationCycle result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.cloud.vmmigration.v1.ReplicationCycle buildPartial() {
      com.google.cloud.vmmigration.v1.ReplicationCycle result =
          new com.google.cloud.vmmigration.v1.ReplicationCycle(this);
      buildPartialRepeatedFields(result);
      if (bitField0_ != 0) {
        buildPartial0(result);
      }
      onBuilt();
      return result;
    }

    private void buildPartialRepeatedFields(
        com.google.cloud.vmmigration.v1.ReplicationCycle result) {
      if (stepsBuilder_ == null) {
        if (((bitField0_ & 0x00000040) != 0)) {
          steps_ = java.util.Collections.unmodifiableList(steps_);
          bitField0_ = (bitField0_ & ~0x00000040);
        }
        result.steps_ = steps_;
      } else {
        result.steps_ = stepsBuilder_.build();
      }
    }

    private void buildPartial0(com.google.cloud.vmmigration.v1.ReplicationCycle result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.name_ = name_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.cycleNumber_ = cycleNumber_;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.totalPauseDuration_ =
            totalPauseDurationBuilder_ == null
                ? totalPauseDuration_
                : totalPauseDurationBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000020) != 0)) {
        result.progressPercent_ = progressPercent_;
      }
      if (((from_bitField0_ & 0x00000080) != 0)) {
        result.state_ = state_;
      }
      if (((from_bitField0_ & 0x00000100) != 0)) {
        result.error_ = errorBuilder_ == null ? error_ : errorBuilder_.build();
      }
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }

    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.setField(field, value);
    }

    @java.lang.Override
    public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }

    @java.lang.Override
    public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }

    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }

    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.cloud.vmmigration.v1.ReplicationCycle) {
        return mergeFrom((com.google.cloud.vmmigration.v1.ReplicationCycle) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.vmmigration.v1.ReplicationCycle other) {
      if (other == com.google.cloud.vmmigration.v1.ReplicationCycle.getDefaultInstance())
        return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        bitField0_ |= 0x00000001;
        onChanged();
      }
      if (other.getCycleNumber() != 0) {
        setCycleNumber(other.getCycleNumber());
      }
      if (other.hasStartTime()) {
        mergeStartTime(other.getStartTime());
      }
      if (other.hasEndTime()) {
        mergeEndTime(other.getEndTime());
      }
      if (other.hasTotalPauseDuration()) {
        mergeTotalPauseDuration(other.getTotalPauseDuration());
      }
      if (other.getProgressPercent() != 0) {
        setProgressPercent(other.getProgressPercent());
      }
      if (stepsBuilder_ == null) {
        if (!other.steps_.isEmpty()) {
          if (steps_.isEmpty()) {
            steps_ = other.steps_;
            bitField0_ = (bitField0_ & ~0x00000040);
          } else {
            ensureStepsIsMutable();
            steps_.addAll(other.steps_);
          }
          onChanged();
        }
      } else {
        if (!other.steps_.isEmpty()) {
          if (stepsBuilder_.isEmpty()) {
            stepsBuilder_.dispose();
            stepsBuilder_ = null;
            steps_ = other.steps_;
            bitField0_ = (bitField0_ & ~0x00000040);
            stepsBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getStepsFieldBuilder()
                    : null;
          } else {
            stepsBuilder_.addAllMessages(other.steps_);
          }
        }
      }
      if (other.state_ != 0) {
        setStateValue(other.getStateValue());
      }
      if (other.hasError()) {
        mergeError(other.getError());
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10:
              {
                input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000004;
                break;
              } // case 10
            case 40:
              {
                progressPercent_ = input.readInt32();
                bitField0_ |= 0x00000020;
                break;
              } // case 40
            case 50:
              {
                input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000008;
                break;
              } // case 50
            case 58:
              {
                input.readMessage(
                    getTotalPauseDurationFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000010;
                break;
              } // case 58
            case 74:
              {
                com.google.cloud.vmmigration.v1.CycleStep m =
                    input.readMessage(
                        com.google.cloud.vmmigration.v1.CycleStep.parser(), extensionRegistry);
                if (stepsBuilder_ == null) {
                  ensureStepsIsMutable();
                  steps_.add(m);
                } else {
                  stepsBuilder_.addMessage(m);
                }
                break;
              } // case 74
            case 80:
              {
                cycleNumber_ = input.readInt32();
                bitField0_ |= 0x00000002;
                break;
              } // case 80
            case 88:
              {
                state_ = input.readEnum();
                bitField0_ |= 0x00000080;
                break;
              } // case 88
            case 98:
              {
                input.readMessage(getErrorFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000100;
                break;
              } // case 98
            case 106:
              {
                name_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000001;
                break;
              } // case 106
            default:
              {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }

    private int bitField0_;

    private java.lang.Object name_ = "";
    /**
     *
     *
     * <pre>
     * The identifier of the ReplicationCycle.
     * </pre>
     *
     * <code>string name = 13;</code>
     *
     * @return The name.
     */
    public java.lang.String getName() {
      java.lang.Object ref = name_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        name_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The identifier of the ReplicationCycle.
     * </pre>
     *
     * <code>string name = 13;</code>
     *
     * @return The bytes for name.
     */
    public com.google.protobuf.ByteString getNameBytes() {
      java.lang.Object ref = name_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The identifier of the ReplicationCycle.
     * </pre>
     *
     * <code>string name = 13;</code>
     *
     * @param value The name to set.
     * @return This builder for chaining.
     */
    public Builder setName(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      name_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The identifier of the ReplicationCycle.
     * </pre>
     *
     * <code>string name = 13;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearName() {
      name_ = getDefaultInstance().getName();
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The identifier of the ReplicationCycle.
     * </pre>
     *
     * <code>string name = 13;</code>
     *
     * @param value The bytes for name to set.
     * @return This builder for chaining.
     */
    public Builder setNameBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      name_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }

    private int cycleNumber_;
    /**
     *
     *
     * <pre>
     * The cycle's ordinal number.
     * </pre>
     *
     * <code>int32 cycle_number = 10;</code>
     *
     * @return The cycleNumber.
     */
    @java.lang.Override
    public int getCycleNumber() {
      return cycleNumber_;
    }
    /**
     *
     *
     * <pre>
     * The cycle's ordinal number.
     * </pre>
     *
     * <code>int32 cycle_number = 10;</code>
     *
     * @param value The cycleNumber to set.
     * @return This builder for chaining.
     */
    public Builder setCycleNumber(int value) {

      cycleNumber_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The cycle's ordinal number.
     * </pre>
     *
     * <code>int32 cycle_number = 10;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearCycleNumber() {
      bitField0_ = (bitField0_ & ~0x00000002);
      cycleNumber_ = 0;
      onChanged();
      return this;
    }

    private com.google.protobuf.Timestamp startTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        startTimeBuilder_;
    /**
     *
     *
     * <pre>
     * The time the replication cycle has started.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp start_time = 1;</code>
     *
     * @return Whether the startTime field is set.
     */
    public boolean hasStartTime() {
      return ((bitField0_ & 0x00000004) != 0);
    }
    /**
     *
     *
     * <pre>
     * The time the replication cycle has started.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp start_time = 1;</code>
     *
     * @return The startTime.
     */
    public com.google.protobuf.Timestamp getStartTime() {
      if (startTimeBuilder_ == null) {
        return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_;
      } else {
        return startTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * The time the replication cycle has started.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp start_time = 1;</code>
     */
    public Builder setStartTime(com.google.protobuf.Timestamp value) {
      if (startTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        startTime_ = value;
      } else {
        startTimeBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The time the replication cycle has started.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp start_time = 1;</code>
     */
    public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (startTimeBuilder_ == null) {
        startTime_ = builderForValue.build();
      } else {
        startTimeBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The time the replication cycle has started.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp start_time = 1;</code>
     */
    public Builder mergeStartTime(com.google.protobuf.Timestamp value) {
      if (startTimeBuilder_ == null) {
        if (((bitField0_ & 0x00000004) != 0)
            && startTime_ != null
            && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
          getStartTimeBuilder().mergeFrom(value);
        } else {
          startTime_ = value;
        }
      } else {
        startTimeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The time the replication cycle has started.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp start_time = 1;</code>
     */
    public Builder clearStartTime() {
      bitField0_ = (bitField0_ & ~0x00000004);
      startTime_ = null;
      if (startTimeBuilder_ != null) {
        startTimeBuilder_.dispose();
        startTimeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The time the replication cycle has started.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp start_time = 1;</code>
     */
    public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() {
      bitField0_ |= 0x00000004;
      onChanged();
      return getStartTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * The time the replication cycle has started.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp start_time = 1;</code>
     */
    public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() {
      if (startTimeBuilder_ != null) {
        return startTimeBuilder_.getMessageOrBuilder();
      } else {
        return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_;
      }
    }
    /**
     *
     *
     * <pre>
     * The time the replication cycle has started.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp start_time = 1;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getStartTimeFieldBuilder() {
      if (startTimeBuilder_ == null) {
        startTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getStartTime(), getParentForChildren(), isClean());
        startTime_ = null;
      }
      return startTimeBuilder_;
    }

    private com.google.protobuf.Timestamp endTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        endTimeBuilder_;
    /**
     *
     *
     * <pre>
     * The time the replication cycle has ended.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp end_time = 6;</code>
     *
     * @return Whether the endTime field is set.
     */
    public boolean hasEndTime() {
      return ((bitField0_ & 0x00000008) != 0);
    }
    /**
     *
     *
     * <pre>
     * The time the replication cycle has ended.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp end_time = 6;</code>
     *
     * @return The endTime.
     */
    public com.google.protobuf.Timestamp getEndTime() {
      if (endTimeBuilder_ == null) {
        return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_;
      } else {
        return endTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * The time the replication cycle has ended.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp end_time = 6;</code>
     */
    public Builder setEndTime(com.google.protobuf.Timestamp value) {
      if (endTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        endTime_ = value;
      } else {
        endTimeBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The time the replication cycle has ended.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp end_time = 6;</code>
     */
    public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (endTimeBuilder_ == null) {
        endTime_ = builderForValue.build();
      } else {
        endTimeBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The time the replication cycle has ended.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp end_time = 6;</code>
     */
    public Builder mergeEndTime(com.google.protobuf.Timestamp value) {
      if (endTimeBuilder_ == null) {
        if (((bitField0_ & 0x00000008) != 0)
            && endTime_ != null
            && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
          getEndTimeBuilder().mergeFrom(value);
        } else {
          endTime_ = value;
        }
      } else {
        endTimeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The time the replication cycle has ended.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp end_time = 6;</code>
     */
    public Builder clearEndTime() {
      bitField0_ = (bitField0_ & ~0x00000008);
      endTime_ = null;
      if (endTimeBuilder_ != null) {
        endTimeBuilder_.dispose();
        endTimeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The time the replication cycle has ended.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp end_time = 6;</code>
     */
    public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() {
      bitField0_ |= 0x00000008;
      onChanged();
      return getEndTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * The time the replication cycle has ended.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp end_time = 6;</code>
     */
    public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() {
      if (endTimeBuilder_ != null) {
        return endTimeBuilder_.getMessageOrBuilder();
      } else {
        return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_;
      }
    }
    /**
     *
     *
     * <pre>
     * The time the replication cycle has ended.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp end_time = 6;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getEndTimeFieldBuilder() {
      if (endTimeBuilder_ == null) {
        endTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getEndTime(), getParentForChildren(), isClean());
        endTime_ = null;
      }
      return endTimeBuilder_;
    }

    private com.google.protobuf.Duration totalPauseDuration_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Duration,
            com.google.protobuf.Duration.Builder,
            com.google.protobuf.DurationOrBuilder>
        totalPauseDurationBuilder_;
    /**
     *
     *
     * <pre>
     * The accumulated duration the replication cycle was paused.
     * </pre>
     *
     * <code>.google.protobuf.Duration total_pause_duration = 7;</code>
     *
     * @return Whether the totalPauseDuration field is set.
     */
    public boolean hasTotalPauseDuration() {
      return ((bitField0_ & 0x00000010) != 0);
    }
    /**
     *
     *
     * <pre>
     * The accumulated duration the replication cycle was paused.
     * </pre>
     *
     * <code>.google.protobuf.Duration total_pause_duration = 7;</code>
     *
     * @return The totalPauseDuration.
     */
    public com.google.protobuf.Duration getTotalPauseDuration() {
      if (totalPauseDurationBuilder_ == null) {
        return totalPauseDuration_ == null
            ? com.google.protobuf.Duration.getDefaultInstance()
            : totalPauseDuration_;
      } else {
        return totalPauseDurationBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * The accumulated duration the replication cycle was paused.
     * </pre>
     *
     * <code>.google.protobuf.Duration total_pause_duration = 7;</code>
     */
    public Builder setTotalPauseDuration(com.google.protobuf.Duration value) {
      if (totalPauseDurationBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        totalPauseDuration_ = value;
      } else {
        totalPauseDurationBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The accumulated duration the replication cycle was paused.
     * </pre>
     *
     * <code>.google.protobuf.Duration total_pause_duration = 7;</code>
     */
    public Builder setTotalPauseDuration(com.google.protobuf.Duration.Builder builderForValue) {
      if (totalPauseDurationBuilder_ == null) {
        totalPauseDuration_ = builderForValue.build();
      } else {
        totalPauseDurationBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The accumulated duration the replication cycle was paused.
     * </pre>
     *
     * <code>.google.protobuf.Duration total_pause_duration = 7;</code>
     */
    public Builder mergeTotalPauseDuration(com.google.protobuf.Duration value) {
      if (totalPauseDurationBuilder_ == null) {
        if (((bitField0_ & 0x00000010) != 0)
            && totalPauseDuration_ != null
            && totalPauseDuration_ != com.google.protobuf.Duration.getDefaultInstance()) {
          getTotalPauseDurationBuilder().mergeFrom(value);
        } else {
          totalPauseDuration_ = value;
        }
      } else {
        totalPauseDurationBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The accumulated duration the replication cycle was paused.
     * </pre>
     *
     * <code>.google.protobuf.Duration total_pause_duration = 7;</code>
     */
    public Builder clearTotalPauseDuration() {
      bitField0_ = (bitField0_ & ~0x00000010);
      totalPauseDuration_ = null;
      if (totalPauseDurationBuilder_ != null) {
        totalPauseDurationBuilder_.dispose();
        totalPauseDurationBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The accumulated duration the replication cycle was paused.
     * </pre>
     *
     * <code>.google.protobuf.Duration total_pause_duration = 7;</code>
     */
    public com.google.protobuf.Duration.Builder getTotalPauseDurationBuilder() {
      bitField0_ |= 0x00000010;
      onChanged();
      return getTotalPauseDurationFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * The accumulated duration the replication cycle was paused.
     * </pre>
     *
     * <code>.google.protobuf.Duration total_pause_duration = 7;</code>
     */
    public com.google.protobuf.DurationOrBuilder getTotalPauseDurationOrBuilder() {
      if (totalPauseDurationBuilder_ != null) {
        return totalPauseDurationBuilder_.getMessageOrBuilder();
      } else {
        return totalPauseDuration_ == null
            ? com.google.protobuf.Duration.getDefaultInstance()
            : totalPauseDuration_;
      }
    }
    /**
     *
     *
     * <pre>
     * The accumulated duration the replication cycle was paused.
     * </pre>
     *
     * <code>.google.protobuf.Duration total_pause_duration = 7;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Duration,
            com.google.protobuf.Duration.Builder,
            com.google.protobuf.DurationOrBuilder>
        getTotalPauseDurationFieldBuilder() {
      if (totalPauseDurationBuilder_ == null) {
        totalPauseDurationBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Duration,
                com.google.protobuf.Duration.Builder,
                com.google.protobuf.DurationOrBuilder>(
                getTotalPauseDuration(), getParentForChildren(), isClean());
        totalPauseDuration_ = null;
      }
      return totalPauseDurationBuilder_;
    }

    private int progressPercent_;
    /**
     *
     *
     * <pre>
     * The current progress in percentage of this cycle.
     * Was replaced by 'steps' field, which breaks down the cycle progression more
     * accurately.
     * </pre>
     *
     * <code>int32 progress_percent = 5 [deprecated = true];</code>
     *
     * @deprecated google.cloud.vmmigration.v1.ReplicationCycle.progress_percent is deprecated. See
     *     google/cloud/vmmigration/v1/vmmigration.proto;l=715
     * @return The progressPercent.
     */
    @java.lang.Override
    @java.lang.Deprecated
    public int getProgressPercent() {
      return progressPercent_;
    }
    /**
     *
     *
     * <pre>
     * The current progress in percentage of this cycle.
     * Was replaced by 'steps' field, which breaks down the cycle progression more
     * accurately.
     * </pre>
     *
     * <code>int32 progress_percent = 5 [deprecated = true];</code>
     *
     * @deprecated google.cloud.vmmigration.v1.ReplicationCycle.progress_percent is deprecated. See
     *     google/cloud/vmmigration/v1/vmmigration.proto;l=715
     * @param value The progressPercent to set.
     * @return This builder for chaining.
     */
    @java.lang.Deprecated
    public Builder setProgressPercent(int value) {

      progressPercent_ = value;
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The current progress in percentage of this cycle.
     * Was replaced by 'steps' field, which breaks down the cycle progression more
     * accurately.
     * </pre>
     *
     * <code>int32 progress_percent = 5 [deprecated = true];</code>
     *
     * @deprecated google.cloud.vmmigration.v1.ReplicationCycle.progress_percent is deprecated. See
     *     google/cloud/vmmigration/v1/vmmigration.proto;l=715
     * @return This builder for chaining.
     */
    @java.lang.Deprecated
    public Builder clearProgressPercent() {
      bitField0_ = (bitField0_ & ~0x00000020);
      progressPercent_ = 0;
      onChanged();
      return this;
    }

    private java.util.List<com.google.cloud.vmmigration.v1.CycleStep> steps_ =
        java.util.Collections.emptyList();

    private void ensureStepsIsMutable() {
      if (!((bitField0_ & 0x00000040) != 0)) {
        steps_ = new java.util.ArrayList<com.google.cloud.vmmigration.v1.CycleStep>(steps_);
        bitField0_ |= 0x00000040;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.vmmigration.v1.CycleStep,
            com.google.cloud.vmmigration.v1.CycleStep.Builder,
            com.google.cloud.vmmigration.v1.CycleStepOrBuilder>
        stepsBuilder_;

    /**
     *
     *
     * <pre>
     * The cycle's steps list representing its progress.
     * </pre>
     *
     * <code>repeated .google.cloud.vmmigration.v1.CycleStep steps = 9;</code>
     */
    public java.util.List<com.google.cloud.vmmigration.v1.CycleStep> getStepsList() {
      if (stepsBuilder_ == null) {
        return java.util.Collections.unmodifiableList(steps_);
      } else {
        return stepsBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * The cycle's steps list representing its progress.
     * </pre>
     *
     * <code>repeated .google.cloud.vmmigration.v1.CycleStep steps = 9;</code>
     */
    public int getStepsCount() {
      if (stepsBuilder_ == null) {
        return steps_.size();
      } else {
        return stepsBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * The cycle's steps list representing its progress.
     * </pre>
     *
     * <code>repeated .google.cloud.vmmigration.v1.CycleStep steps = 9;</code>
     */
    public com.google.cloud.vmmigration.v1.CycleStep getSteps(int index) {
      if (stepsBuilder_ == null) {
        return steps_.get(index);
      } else {
        return stepsBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * The cycle's steps list representing its progress.
     * </pre>
     *
     * <code>repeated .google.cloud.vmmigration.v1.CycleStep steps = 9;</code>
     */
    public Builder setSteps(int index, com.google.cloud.vmmigration.v1.CycleStep value) {
      if (stepsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureStepsIsMutable();
        steps_.set(index, value);
        onChanged();
      } else {
        stepsBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The cycle's steps list representing its progress.
     * </pre>
     *
     * <code>repeated .google.cloud.vmmigration.v1.CycleStep steps = 9;</code>
     */
    public Builder setSteps(
        int index, com.google.cloud.vmmigration.v1.CycleStep.Builder builderForValue) {
      if (stepsBuilder_ == null) {
        ensureStepsIsMutable();
        steps_.set(index, builderForValue.build());
        onChanged();
      } else {
        stepsBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The cycle's steps list representing its progress.
     * </pre>
     *
     * <code>repeated .google.cloud.vmmigration.v1.CycleStep steps = 9;</code>
     */
    public Builder addSteps(com.google.cloud.vmmigration.v1.CycleStep value) {
      if (stepsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureStepsIsMutable();
        steps_.add(value);
        onChanged();
      } else {
        stepsBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The cycle's steps list representing its progress.
     * </pre>
     *
     * <code>repeated .google.cloud.vmmigration.v1.CycleStep steps = 9;</code>
     */
    public Builder addSteps(int index, com.google.cloud.vmmigration.v1.CycleStep value) {
      if (stepsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureStepsIsMutable();
        steps_.add(index, value);
        onChanged();
      } else {
        stepsBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The cycle's steps list representing its progress.
     * </pre>
     *
     * <code>repeated .google.cloud.vmmigration.v1.CycleStep steps = 9;</code>
     */
    public Builder addSteps(com.google.cloud.vmmigration.v1.CycleStep.Builder builderForValue) {
      if (stepsBuilder_ == null) {
        ensureStepsIsMutable();
        steps_.add(builderForValue.build());
        onChanged();
      } else {
        stepsBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The cycle's steps list representing its progress.
     * </pre>
     *
     * <code>repeated .google.cloud.vmmigration.v1.CycleStep steps = 9;</code>
     */
    public Builder addSteps(
        int index, com.google.cloud.vmmigration.v1.CycleStep.Builder builderForValue) {
      if (stepsBuilder_ == null) {
        ensureStepsIsMutable();
        steps_.add(index, builderForValue.build());
        onChanged();
      } else {
        stepsBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The cycle's steps list representing its progress.
     * </pre>
     *
     * <code>repeated .google.cloud.vmmigration.v1.CycleStep steps = 9;</code>
     */
    public Builder addAllSteps(
        java.lang.Iterable<? extends com.google.cloud.vmmigration.v1.CycleStep> values) {
      if (stepsBuilder_ == null) {
        ensureStepsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, steps_);
        onChanged();
      } else {
        stepsBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The cycle's steps list representing its progress.
     * </pre>
     *
     * <code>repeated .google.cloud.vmmigration.v1.CycleStep steps = 9;</code>
     */
    public Builder clearSteps() {
      if (stepsBuilder_ == null) {
        steps_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000040);
        onChanged();
      } else {
        stepsBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The cycle's steps list representing its progress.
     * </pre>
     *
     * <code>repeated .google.cloud.vmmigration.v1.CycleStep steps = 9;</code>
     */
    public Builder removeSteps(int index) {
      if (stepsBuilder_ == null) {
        ensureStepsIsMutable();
        steps_.remove(index);
        onChanged();
      } else {
        stepsBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * The cycle's steps list representing its progress.
     * </pre>
     *
     * <code>repeated .google.cloud.vmmigration.v1.CycleStep steps = 9;</code>
     */
    public com.google.cloud.vmmigration.v1.CycleStep.Builder getStepsBuilder(int index) {
      return getStepsFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * The cycle's steps list representing its progress.
     * </pre>
     *
     * <code>repeated .google.cloud.vmmigration.v1.CycleStep steps = 9;</code>
     */
    public com.google.cloud.vmmigration.v1.CycleStepOrBuilder getStepsOrBuilder(int index) {
      if (stepsBuilder_ == null) {
        return steps_.get(index);
      } else {
        return stepsBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * The cycle's steps list representing its progress.
     * </pre>
     *
     * <code>repeated .google.cloud.vmmigration.v1.CycleStep steps = 9;</code>
     */
    public java.util.List<? extends com.google.cloud.vmmigration.v1.CycleStepOrBuilder>
        getStepsOrBuilderList() {
      if (stepsBuilder_ != null) {
        return stepsBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(steps_);
      }
    }
    /**
     *
     *
     * <pre>
     * The cycle's steps list representing its progress.
     * </pre>
     *
     * <code>repeated .google.cloud.vmmigration.v1.CycleStep steps = 9;</code>
     */
    public com.google.cloud.vmmigration.v1.CycleStep.Builder addStepsBuilder() {
      return getStepsFieldBuilder()
          .addBuilder(com.google.cloud.vmmigration.v1.CycleStep.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * The cycle's steps list representing its progress.
     * </pre>
     *
     * <code>repeated .google.cloud.vmmigration.v1.CycleStep steps = 9;</code>
     */
    public com.google.cloud.vmmigration.v1.CycleStep.Builder addStepsBuilder(int index) {
      return getStepsFieldBuilder()
          .addBuilder(index, com.google.cloud.vmmigration.v1.CycleStep.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * The cycle's steps list representing its progress.
     * </pre>
     *
     * <code>repeated .google.cloud.vmmigration.v1.CycleStep steps = 9;</code>
     */
    public java.util.List<com.google.cloud.vmmigration.v1.CycleStep.Builder> getStepsBuilderList() {
      return getStepsFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.vmmigration.v1.CycleStep,
            com.google.cloud.vmmigration.v1.CycleStep.Builder,
            com.google.cloud.vmmigration.v1.CycleStepOrBuilder>
        getStepsFieldBuilder() {
      if (stepsBuilder_ == null) {
        stepsBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.cloud.vmmigration.v1.CycleStep,
                com.google.cloud.vmmigration.v1.CycleStep.Builder,
                com.google.cloud.vmmigration.v1.CycleStepOrBuilder>(
                steps_, ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean());
        steps_ = null;
      }
      return stepsBuilder_;
    }

    private int state_ = 0;
    /**
     *
     *
     * <pre>
     * State of the ReplicationCycle.
     * </pre>
     *
     * <code>.google.cloud.vmmigration.v1.ReplicationCycle.State state = 11;</code>
     *
     * @return The enum numeric value on the wire for state.
     */
    @java.lang.Override
    public int getStateValue() {
      return state_;
    }
    /**
     *
     *
     * <pre>
     * State of the ReplicationCycle.
     * </pre>
     *
     * <code>.google.cloud.vmmigration.v1.ReplicationCycle.State state = 11;</code>
     *
     * @param value The enum numeric value on the wire for state to set.
     * @return This builder for chaining.
     */
    public Builder setStateValue(int value) {
      state_ = value;
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * State of the ReplicationCycle.
     * </pre>
     *
     * <code>.google.cloud.vmmigration.v1.ReplicationCycle.State state = 11;</code>
     *
     * @return The state.
     */
    @java.lang.Override
    public com.google.cloud.vmmigration.v1.ReplicationCycle.State getState() {
      com.google.cloud.vmmigration.v1.ReplicationCycle.State result =
          com.google.cloud.vmmigration.v1.ReplicationCycle.State.forNumber(state_);
      return result == null
          ? com.google.cloud.vmmigration.v1.ReplicationCycle.State.UNRECOGNIZED
          : result;
    }
    /**
     *
     *
     * <pre>
     * State of the ReplicationCycle.
     * </pre>
     *
     * <code>.google.cloud.vmmigration.v1.ReplicationCycle.State state = 11;</code>
     *
     * @param value The state to set.
     * @return This builder for chaining.
     */
    public Builder setState(com.google.cloud.vmmigration.v1.ReplicationCycle.State value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000080;
      state_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * State of the ReplicationCycle.
     * </pre>
     *
     * <code>.google.cloud.vmmigration.v1.ReplicationCycle.State state = 11;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearState() {
      bitField0_ = (bitField0_ & ~0x00000080);
      state_ = 0;
      onChanged();
      return this;
    }

    private com.google.rpc.Status error_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>
        errorBuilder_;
    /**
     *
     *
     * <pre>
     * Provides details on the state of the cycle in case of an error.
     * </pre>
     *
     * <code>.google.rpc.Status error = 12;</code>
     *
     * @return Whether the error field is set.
     */
    public boolean hasError() {
      return ((bitField0_ & 0x00000100) != 0);
    }
    /**
     *
     *
     * <pre>
     * Provides details on the state of the cycle in case of an error.
     * </pre>
     *
     * <code>.google.rpc.Status error = 12;</code>
     *
     * @return The error.
     */
    public com.google.rpc.Status getError() {
      if (errorBuilder_ == null) {
        return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_;
      } else {
        return errorBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Provides details on the state of the cycle in case of an error.
     * </pre>
     *
     * <code>.google.rpc.Status error = 12;</code>
     */
    public Builder setError(com.google.rpc.Status value) {
      if (errorBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        error_ = value;
      } else {
        errorBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000100;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Provides details on the state of the cycle in case of an error.
     * </pre>
     *
     * <code>.google.rpc.Status error = 12;</code>
     */
    public Builder setError(com.google.rpc.Status.Builder builderForValue) {
      if (errorBuilder_ == null) {
        error_ = builderForValue.build();
      } else {
        errorBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000100;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Provides details on the state of the cycle in case of an error.
     * </pre>
     *
     * <code>.google.rpc.Status error = 12;</code>
     */
    public Builder mergeError(com.google.rpc.Status value) {
      if (errorBuilder_ == null) {
        if (((bitField0_ & 0x00000100) != 0)
            && error_ != null
            && error_ != com.google.rpc.Status.getDefaultInstance()) {
          getErrorBuilder().mergeFrom(value);
        } else {
          error_ = value;
        }
      } else {
        errorBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000100;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Provides details on the state of the cycle in case of an error.
     * </pre>
     *
     * <code>.google.rpc.Status error = 12;</code>
     */
    public Builder clearError() {
      bitField0_ = (bitField0_ & ~0x00000100);
      error_ = null;
      if (errorBuilder_ != null) {
        errorBuilder_.dispose();
        errorBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Provides details on the state of the cycle in case of an error.
     * </pre>
     *
     * <code>.google.rpc.Status error = 12;</code>
     */
    public com.google.rpc.Status.Builder getErrorBuilder() {
      bitField0_ |= 0x00000100;
      onChanged();
      return getErrorFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Provides details on the state of the cycle in case of an error.
     * </pre>
     *
     * <code>.google.rpc.Status error = 12;</code>
     */
    public com.google.rpc.StatusOrBuilder getErrorOrBuilder() {
      if (errorBuilder_ != null) {
        return errorBuilder_.getMessageOrBuilder();
      } else {
        return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_;
      }
    }
    /**
     *
     *
     * <pre>
     * Provides details on the state of the cycle in case of an error.
     * </pre>
     *
     * <code>.google.rpc.Status error = 12;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>
        getErrorFieldBuilder() {
      if (errorBuilder_ == null) {
        errorBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.rpc.Status,
                com.google.rpc.Status.Builder,
                com.google.rpc.StatusOrBuilder>(getError(), getParentForChildren(), isClean());
        error_ = null;
      }
      return errorBuilder_;
    }

    @java.lang.Override
    public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @java.lang.Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }

    // @@protoc_insertion_point(builder_scope:google.cloud.vmmigration.v1.ReplicationCycle)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.vmmigration.v1.ReplicationCycle)
  private static final com.google.cloud.vmmigration.v1.ReplicationCycle DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.cloud.vmmigration.v1.ReplicationCycle();
  }

  public static com.google.cloud.vmmigration.v1.ReplicationCycle getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<ReplicationCycle> PARSER =
      new com.google.protobuf.AbstractParser<ReplicationCycle>() {
        @java.lang.Override
        public ReplicationCycle parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          Builder builder = newBuilder();
          try {
            builder.mergeFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw e.setUnfinishedMessage(builder.buildPartial());
          } catch (com.google.protobuf.UninitializedMessageException e) {
            throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
          } catch (java.io.IOException e) {
            throw new com.google.protobuf.InvalidProtocolBufferException(e)
                .setUnfinishedMessage(builder.buildPartial());
          }
          return builder.buildPartial();
        }
      };

  public static com.google.protobuf.Parser<ReplicationCycle> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<ReplicationCycle> getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.cloud.vmmigration.v1.ReplicationCycle getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
