/*
 * 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>
 * CycleStep holds information about a step progress.
 * </pre>
 *
 * Protobuf type {@code google.cloud.vmmigration.v1.CycleStep}
 */
public final class CycleStep extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.vmmigration.v1.CycleStep)
    CycleStepOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use CycleStep.newBuilder() to construct.
  private CycleStep(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private CycleStep() {}

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

  @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_CycleStep_descriptor;
  }

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

  private int stepCase_ = 0;
  private java.lang.Object step_;

  public enum StepCase
      implements
          com.google.protobuf.Internal.EnumLite,
          com.google.protobuf.AbstractMessage.InternalOneOfEnum {
    INITIALIZING_REPLICATION(3),
    REPLICATING(4),
    POST_PROCESSING(5),
    STEP_NOT_SET(0);
    private final int value;

    private StepCase(int value) {
      this.value = value;
    }
    /**
     * @param value The number of the enum to look for.
     * @return The enum associated with the given number.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static StepCase valueOf(int value) {
      return forNumber(value);
    }

    public static StepCase forNumber(int value) {
      switch (value) {
        case 3:
          return INITIALIZING_REPLICATION;
        case 4:
          return REPLICATING;
        case 5:
          return POST_PROCESSING;
        case 0:
          return STEP_NOT_SET;
        default:
          return null;
      }
    }

    public int getNumber() {
      return this.value;
    }
  };

  public StepCase getStepCase() {
    return StepCase.forNumber(stepCase_);
  }

  public static final int INITIALIZING_REPLICATION_FIELD_NUMBER = 3;
  /**
   *
   *
   * <pre>
   * Initializing replication step.
   * </pre>
   *
   * <code>.google.cloud.vmmigration.v1.InitializingReplicationStep initializing_replication = 3;
   * </code>
   *
   * @return Whether the initializingReplication field is set.
   */
  @java.lang.Override
  public boolean hasInitializingReplication() {
    return stepCase_ == 3;
  }
  /**
   *
   *
   * <pre>
   * Initializing replication step.
   * </pre>
   *
   * <code>.google.cloud.vmmigration.v1.InitializingReplicationStep initializing_replication = 3;
   * </code>
   *
   * @return The initializingReplication.
   */
  @java.lang.Override
  public com.google.cloud.vmmigration.v1.InitializingReplicationStep getInitializingReplication() {
    if (stepCase_ == 3) {
      return (com.google.cloud.vmmigration.v1.InitializingReplicationStep) step_;
    }
    return com.google.cloud.vmmigration.v1.InitializingReplicationStep.getDefaultInstance();
  }
  /**
   *
   *
   * <pre>
   * Initializing replication step.
   * </pre>
   *
   * <code>.google.cloud.vmmigration.v1.InitializingReplicationStep initializing_replication = 3;
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.vmmigration.v1.InitializingReplicationStepOrBuilder
      getInitializingReplicationOrBuilder() {
    if (stepCase_ == 3) {
      return (com.google.cloud.vmmigration.v1.InitializingReplicationStep) step_;
    }
    return com.google.cloud.vmmigration.v1.InitializingReplicationStep.getDefaultInstance();
  }

  public static final int REPLICATING_FIELD_NUMBER = 4;
  /**
   *
   *
   * <pre>
   * Replicating step.
   * </pre>
   *
   * <code>.google.cloud.vmmigration.v1.ReplicatingStep replicating = 4;</code>
   *
   * @return Whether the replicating field is set.
   */
  @java.lang.Override
  public boolean hasReplicating() {
    return stepCase_ == 4;
  }
  /**
   *
   *
   * <pre>
   * Replicating step.
   * </pre>
   *
   * <code>.google.cloud.vmmigration.v1.ReplicatingStep replicating = 4;</code>
   *
   * @return The replicating.
   */
  @java.lang.Override
  public com.google.cloud.vmmigration.v1.ReplicatingStep getReplicating() {
    if (stepCase_ == 4) {
      return (com.google.cloud.vmmigration.v1.ReplicatingStep) step_;
    }
    return com.google.cloud.vmmigration.v1.ReplicatingStep.getDefaultInstance();
  }
  /**
   *
   *
   * <pre>
   * Replicating step.
   * </pre>
   *
   * <code>.google.cloud.vmmigration.v1.ReplicatingStep replicating = 4;</code>
   */
  @java.lang.Override
  public com.google.cloud.vmmigration.v1.ReplicatingStepOrBuilder getReplicatingOrBuilder() {
    if (stepCase_ == 4) {
      return (com.google.cloud.vmmigration.v1.ReplicatingStep) step_;
    }
    return com.google.cloud.vmmigration.v1.ReplicatingStep.getDefaultInstance();
  }

  public static final int POST_PROCESSING_FIELD_NUMBER = 5;
  /**
   *
   *
   * <pre>
   * Post processing step.
   * </pre>
   *
   * <code>.google.cloud.vmmigration.v1.PostProcessingStep post_processing = 5;</code>
   *
   * @return Whether the postProcessing field is set.
   */
  @java.lang.Override
  public boolean hasPostProcessing() {
    return stepCase_ == 5;
  }
  /**
   *
   *
   * <pre>
   * Post processing step.
   * </pre>
   *
   * <code>.google.cloud.vmmigration.v1.PostProcessingStep post_processing = 5;</code>
   *
   * @return The postProcessing.
   */
  @java.lang.Override
  public com.google.cloud.vmmigration.v1.PostProcessingStep getPostProcessing() {
    if (stepCase_ == 5) {
      return (com.google.cloud.vmmigration.v1.PostProcessingStep) step_;
    }
    return com.google.cloud.vmmigration.v1.PostProcessingStep.getDefaultInstance();
  }
  /**
   *
   *
   * <pre>
   * Post processing step.
   * </pre>
   *
   * <code>.google.cloud.vmmigration.v1.PostProcessingStep post_processing = 5;</code>
   */
  @java.lang.Override
  public com.google.cloud.vmmigration.v1.PostProcessingStepOrBuilder getPostProcessingOrBuilder() {
    if (stepCase_ == 5) {
      return (com.google.cloud.vmmigration.v1.PostProcessingStep) step_;
    }
    return com.google.cloud.vmmigration.v1.PostProcessingStep.getDefaultInstance();
  }

  public static final int START_TIME_FIELD_NUMBER = 1;
  private com.google.protobuf.Timestamp startTime_;
  /**
   *
   *
   * <pre>
   * The time the cycle step 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 cycle step 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 cycle step 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 = 2;
  private com.google.protobuf.Timestamp endTime_;
  /**
   *
   *
   * <pre>
   * The time the cycle step has ended.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp end_time = 2;</code>
   *
   * @return Whether the endTime field is set.
   */
  @java.lang.Override
  public boolean hasEndTime() {
    return endTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * The time the cycle step has ended.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp end_time = 2;</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 cycle step has ended.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp end_time = 2;</code>
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() {
    return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_;
  }

  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 (endTime_ != null) {
      output.writeMessage(2, getEndTime());
    }
    if (stepCase_ == 3) {
      output.writeMessage(3, (com.google.cloud.vmmigration.v1.InitializingReplicationStep) step_);
    }
    if (stepCase_ == 4) {
      output.writeMessage(4, (com.google.cloud.vmmigration.v1.ReplicatingStep) step_);
    }
    if (stepCase_ == 5) {
      output.writeMessage(5, (com.google.cloud.vmmigration.v1.PostProcessingStep) step_);
    }
    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 (endTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime());
    }
    if (stepCase_ == 3) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              3, (com.google.cloud.vmmigration.v1.InitializingReplicationStep) step_);
    }
    if (stepCase_ == 4) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              4, (com.google.cloud.vmmigration.v1.ReplicatingStep) step_);
    }
    if (stepCase_ == 5) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              5, (com.google.cloud.vmmigration.v1.PostProcessingStep) step_);
    }
    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.CycleStep)) {
      return super.equals(obj);
    }
    com.google.cloud.vmmigration.v1.CycleStep other =
        (com.google.cloud.vmmigration.v1.CycleStep) obj;

    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 (!getStepCase().equals(other.getStepCase())) return false;
    switch (stepCase_) {
      case 3:
        if (!getInitializingReplication().equals(other.getInitializingReplication())) return false;
        break;
      case 4:
        if (!getReplicating().equals(other.getReplicating())) return false;
        break;
      case 5:
        if (!getPostProcessing().equals(other.getPostProcessing())) return false;
        break;
      case 0:
      default:
    }
    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();
    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();
    }
    switch (stepCase_) {
      case 3:
        hash = (37 * hash) + INITIALIZING_REPLICATION_FIELD_NUMBER;
        hash = (53 * hash) + getInitializingReplication().hashCode();
        break;
      case 4:
        hash = (37 * hash) + REPLICATING_FIELD_NUMBER;
        hash = (53 * hash) + getReplicating().hashCode();
        break;
      case 5:
        hash = (37 * hash) + POST_PROCESSING_FIELD_NUMBER;
        hash = (53 * hash) + getPostProcessing().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

  public static com.google.cloud.vmmigration.v1.CycleStep 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.CycleStep parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.vmmigration.v1.CycleStep 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.CycleStep parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.vmmigration.v1.CycleStep 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.CycleStep parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.vmmigration.v1.CycleStep 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.CycleStep parseDelimitedFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.cloud.vmmigration.v1.CycleStep 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.CycleStep 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.CycleStep 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.CycleStep 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>
   * CycleStep holds information about a step progress.
   * </pre>
   *
   * Protobuf type {@code google.cloud.vmmigration.v1.CycleStep}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.vmmigration.v1.CycleStep)
      com.google.cloud.vmmigration.v1.CycleStepOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.vmmigration.v1.VmMigrationProto
          .internal_static_google_cloud_vmmigration_v1_CycleStep_descriptor;
    }

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

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

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      if (initializingReplicationBuilder_ != null) {
        initializingReplicationBuilder_.clear();
      }
      if (replicatingBuilder_ != null) {
        replicatingBuilder_.clear();
      }
      if (postProcessingBuilder_ != null) {
        postProcessingBuilder_.clear();
      }
      startTime_ = null;
      if (startTimeBuilder_ != null) {
        startTimeBuilder_.dispose();
        startTimeBuilder_ = null;
      }
      endTime_ = null;
      if (endTimeBuilder_ != null) {
        endTimeBuilder_.dispose();
        endTimeBuilder_ = null;
      }
      stepCase_ = 0;
      step_ = 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_CycleStep_descriptor;
    }

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

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

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

    private void buildPartial0(com.google.cloud.vmmigration.v1.CycleStep result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build();
      }
    }

    private void buildPartialOneofs(com.google.cloud.vmmigration.v1.CycleStep result) {
      result.stepCase_ = stepCase_;
      result.step_ = this.step_;
      if (stepCase_ == 3 && initializingReplicationBuilder_ != null) {
        result.step_ = initializingReplicationBuilder_.build();
      }
      if (stepCase_ == 4 && replicatingBuilder_ != null) {
        result.step_ = replicatingBuilder_.build();
      }
      if (stepCase_ == 5 && postProcessingBuilder_ != null) {
        result.step_ = postProcessingBuilder_.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.CycleStep) {
        return mergeFrom((com.google.cloud.vmmigration.v1.CycleStep) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.vmmigration.v1.CycleStep other) {
      if (other == com.google.cloud.vmmigration.v1.CycleStep.getDefaultInstance()) return this;
      if (other.hasStartTime()) {
        mergeStartTime(other.getStartTime());
      }
      if (other.hasEndTime()) {
        mergeEndTime(other.getEndTime());
      }
      switch (other.getStepCase()) {
        case INITIALIZING_REPLICATION:
          {
            mergeInitializingReplication(other.getInitializingReplication());
            break;
          }
        case REPLICATING:
          {
            mergeReplicating(other.getReplicating());
            break;
          }
        case POST_PROCESSING:
          {
            mergePostProcessing(other.getPostProcessing());
            break;
          }
        case STEP_NOT_SET:
          {
            break;
          }
      }
      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_ |= 0x00000008;
                break;
              } // case 10
            case 18:
              {
                input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000010;
                break;
              } // case 18
            case 26:
              {
                input.readMessage(
                    getInitializingReplicationFieldBuilder().getBuilder(), extensionRegistry);
                stepCase_ = 3;
                break;
              } // case 26
            case 34:
              {
                input.readMessage(getReplicatingFieldBuilder().getBuilder(), extensionRegistry);
                stepCase_ = 4;
                break;
              } // case 34
            case 42:
              {
                input.readMessage(getPostProcessingFieldBuilder().getBuilder(), extensionRegistry);
                stepCase_ = 5;
                break;
              } // case 42
            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 stepCase_ = 0;
    private java.lang.Object step_;

    public StepCase getStepCase() {
      return StepCase.forNumber(stepCase_);
    }

    public Builder clearStep() {
      stepCase_ = 0;
      step_ = null;
      onChanged();
      return this;
    }

    private int bitField0_;

    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.vmmigration.v1.InitializingReplicationStep,
            com.google.cloud.vmmigration.v1.InitializingReplicationStep.Builder,
            com.google.cloud.vmmigration.v1.InitializingReplicationStepOrBuilder>
        initializingReplicationBuilder_;
    /**
     *
     *
     * <pre>
     * Initializing replication step.
     * </pre>
     *
     * <code>.google.cloud.vmmigration.v1.InitializingReplicationStep initializing_replication = 3;
     * </code>
     *
     * @return Whether the initializingReplication field is set.
     */
    @java.lang.Override
    public boolean hasInitializingReplication() {
      return stepCase_ == 3;
    }
    /**
     *
     *
     * <pre>
     * Initializing replication step.
     * </pre>
     *
     * <code>.google.cloud.vmmigration.v1.InitializingReplicationStep initializing_replication = 3;
     * </code>
     *
     * @return The initializingReplication.
     */
    @java.lang.Override
    public com.google.cloud.vmmigration.v1.InitializingReplicationStep
        getInitializingReplication() {
      if (initializingReplicationBuilder_ == null) {
        if (stepCase_ == 3) {
          return (com.google.cloud.vmmigration.v1.InitializingReplicationStep) step_;
        }
        return com.google.cloud.vmmigration.v1.InitializingReplicationStep.getDefaultInstance();
      } else {
        if (stepCase_ == 3) {
          return initializingReplicationBuilder_.getMessage();
        }
        return com.google.cloud.vmmigration.v1.InitializingReplicationStep.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * Initializing replication step.
     * </pre>
     *
     * <code>.google.cloud.vmmigration.v1.InitializingReplicationStep initializing_replication = 3;
     * </code>
     */
    public Builder setInitializingReplication(
        com.google.cloud.vmmigration.v1.InitializingReplicationStep value) {
      if (initializingReplicationBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        step_ = value;
        onChanged();
      } else {
        initializingReplicationBuilder_.setMessage(value);
      }
      stepCase_ = 3;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Initializing replication step.
     * </pre>
     *
     * <code>.google.cloud.vmmigration.v1.InitializingReplicationStep initializing_replication = 3;
     * </code>
     */
    public Builder setInitializingReplication(
        com.google.cloud.vmmigration.v1.InitializingReplicationStep.Builder builderForValue) {
      if (initializingReplicationBuilder_ == null) {
        step_ = builderForValue.build();
        onChanged();
      } else {
        initializingReplicationBuilder_.setMessage(builderForValue.build());
      }
      stepCase_ = 3;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Initializing replication step.
     * </pre>
     *
     * <code>.google.cloud.vmmigration.v1.InitializingReplicationStep initializing_replication = 3;
     * </code>
     */
    public Builder mergeInitializingReplication(
        com.google.cloud.vmmigration.v1.InitializingReplicationStep value) {
      if (initializingReplicationBuilder_ == null) {
        if (stepCase_ == 3
            && step_
                != com.google.cloud.vmmigration.v1.InitializingReplicationStep
                    .getDefaultInstance()) {
          step_ =
              com.google.cloud.vmmigration.v1.InitializingReplicationStep.newBuilder(
                      (com.google.cloud.vmmigration.v1.InitializingReplicationStep) step_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          step_ = value;
        }
        onChanged();
      } else {
        if (stepCase_ == 3) {
          initializingReplicationBuilder_.mergeFrom(value);
        } else {
          initializingReplicationBuilder_.setMessage(value);
        }
      }
      stepCase_ = 3;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Initializing replication step.
     * </pre>
     *
     * <code>.google.cloud.vmmigration.v1.InitializingReplicationStep initializing_replication = 3;
     * </code>
     */
    public Builder clearInitializingReplication() {
      if (initializingReplicationBuilder_ == null) {
        if (stepCase_ == 3) {
          stepCase_ = 0;
          step_ = null;
          onChanged();
        }
      } else {
        if (stepCase_ == 3) {
          stepCase_ = 0;
          step_ = null;
        }
        initializingReplicationBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Initializing replication step.
     * </pre>
     *
     * <code>.google.cloud.vmmigration.v1.InitializingReplicationStep initializing_replication = 3;
     * </code>
     */
    public com.google.cloud.vmmigration.v1.InitializingReplicationStep.Builder
        getInitializingReplicationBuilder() {
      return getInitializingReplicationFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Initializing replication step.
     * </pre>
     *
     * <code>.google.cloud.vmmigration.v1.InitializingReplicationStep initializing_replication = 3;
     * </code>
     */
    @java.lang.Override
    public com.google.cloud.vmmigration.v1.InitializingReplicationStepOrBuilder
        getInitializingReplicationOrBuilder() {
      if ((stepCase_ == 3) && (initializingReplicationBuilder_ != null)) {
        return initializingReplicationBuilder_.getMessageOrBuilder();
      } else {
        if (stepCase_ == 3) {
          return (com.google.cloud.vmmigration.v1.InitializingReplicationStep) step_;
        }
        return com.google.cloud.vmmigration.v1.InitializingReplicationStep.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * Initializing replication step.
     * </pre>
     *
     * <code>.google.cloud.vmmigration.v1.InitializingReplicationStep initializing_replication = 3;
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.vmmigration.v1.InitializingReplicationStep,
            com.google.cloud.vmmigration.v1.InitializingReplicationStep.Builder,
            com.google.cloud.vmmigration.v1.InitializingReplicationStepOrBuilder>
        getInitializingReplicationFieldBuilder() {
      if (initializingReplicationBuilder_ == null) {
        if (!(stepCase_ == 3)) {
          step_ = com.google.cloud.vmmigration.v1.InitializingReplicationStep.getDefaultInstance();
        }
        initializingReplicationBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.vmmigration.v1.InitializingReplicationStep,
                com.google.cloud.vmmigration.v1.InitializingReplicationStep.Builder,
                com.google.cloud.vmmigration.v1.InitializingReplicationStepOrBuilder>(
                (com.google.cloud.vmmigration.v1.InitializingReplicationStep) step_,
                getParentForChildren(),
                isClean());
        step_ = null;
      }
      stepCase_ = 3;
      onChanged();
      return initializingReplicationBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.vmmigration.v1.ReplicatingStep,
            com.google.cloud.vmmigration.v1.ReplicatingStep.Builder,
            com.google.cloud.vmmigration.v1.ReplicatingStepOrBuilder>
        replicatingBuilder_;
    /**
     *
     *
     * <pre>
     * Replicating step.
     * </pre>
     *
     * <code>.google.cloud.vmmigration.v1.ReplicatingStep replicating = 4;</code>
     *
     * @return Whether the replicating field is set.
     */
    @java.lang.Override
    public boolean hasReplicating() {
      return stepCase_ == 4;
    }
    /**
     *
     *
     * <pre>
     * Replicating step.
     * </pre>
     *
     * <code>.google.cloud.vmmigration.v1.ReplicatingStep replicating = 4;</code>
     *
     * @return The replicating.
     */
    @java.lang.Override
    public com.google.cloud.vmmigration.v1.ReplicatingStep getReplicating() {
      if (replicatingBuilder_ == null) {
        if (stepCase_ == 4) {
          return (com.google.cloud.vmmigration.v1.ReplicatingStep) step_;
        }
        return com.google.cloud.vmmigration.v1.ReplicatingStep.getDefaultInstance();
      } else {
        if (stepCase_ == 4) {
          return replicatingBuilder_.getMessage();
        }
        return com.google.cloud.vmmigration.v1.ReplicatingStep.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * Replicating step.
     * </pre>
     *
     * <code>.google.cloud.vmmigration.v1.ReplicatingStep replicating = 4;</code>
     */
    public Builder setReplicating(com.google.cloud.vmmigration.v1.ReplicatingStep value) {
      if (replicatingBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        step_ = value;
        onChanged();
      } else {
        replicatingBuilder_.setMessage(value);
      }
      stepCase_ = 4;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Replicating step.
     * </pre>
     *
     * <code>.google.cloud.vmmigration.v1.ReplicatingStep replicating = 4;</code>
     */
    public Builder setReplicating(
        com.google.cloud.vmmigration.v1.ReplicatingStep.Builder builderForValue) {
      if (replicatingBuilder_ == null) {
        step_ = builderForValue.build();
        onChanged();
      } else {
        replicatingBuilder_.setMessage(builderForValue.build());
      }
      stepCase_ = 4;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Replicating step.
     * </pre>
     *
     * <code>.google.cloud.vmmigration.v1.ReplicatingStep replicating = 4;</code>
     */
    public Builder mergeReplicating(com.google.cloud.vmmigration.v1.ReplicatingStep value) {
      if (replicatingBuilder_ == null) {
        if (stepCase_ == 4
            && step_ != com.google.cloud.vmmigration.v1.ReplicatingStep.getDefaultInstance()) {
          step_ =
              com.google.cloud.vmmigration.v1.ReplicatingStep.newBuilder(
                      (com.google.cloud.vmmigration.v1.ReplicatingStep) step_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          step_ = value;
        }
        onChanged();
      } else {
        if (stepCase_ == 4) {
          replicatingBuilder_.mergeFrom(value);
        } else {
          replicatingBuilder_.setMessage(value);
        }
      }
      stepCase_ = 4;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Replicating step.
     * </pre>
     *
     * <code>.google.cloud.vmmigration.v1.ReplicatingStep replicating = 4;</code>
     */
    public Builder clearReplicating() {
      if (replicatingBuilder_ == null) {
        if (stepCase_ == 4) {
          stepCase_ = 0;
          step_ = null;
          onChanged();
        }
      } else {
        if (stepCase_ == 4) {
          stepCase_ = 0;
          step_ = null;
        }
        replicatingBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Replicating step.
     * </pre>
     *
     * <code>.google.cloud.vmmigration.v1.ReplicatingStep replicating = 4;</code>
     */
    public com.google.cloud.vmmigration.v1.ReplicatingStep.Builder getReplicatingBuilder() {
      return getReplicatingFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Replicating step.
     * </pre>
     *
     * <code>.google.cloud.vmmigration.v1.ReplicatingStep replicating = 4;</code>
     */
    @java.lang.Override
    public com.google.cloud.vmmigration.v1.ReplicatingStepOrBuilder getReplicatingOrBuilder() {
      if ((stepCase_ == 4) && (replicatingBuilder_ != null)) {
        return replicatingBuilder_.getMessageOrBuilder();
      } else {
        if (stepCase_ == 4) {
          return (com.google.cloud.vmmigration.v1.ReplicatingStep) step_;
        }
        return com.google.cloud.vmmigration.v1.ReplicatingStep.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * Replicating step.
     * </pre>
     *
     * <code>.google.cloud.vmmigration.v1.ReplicatingStep replicating = 4;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.vmmigration.v1.ReplicatingStep,
            com.google.cloud.vmmigration.v1.ReplicatingStep.Builder,
            com.google.cloud.vmmigration.v1.ReplicatingStepOrBuilder>
        getReplicatingFieldBuilder() {
      if (replicatingBuilder_ == null) {
        if (!(stepCase_ == 4)) {
          step_ = com.google.cloud.vmmigration.v1.ReplicatingStep.getDefaultInstance();
        }
        replicatingBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.vmmigration.v1.ReplicatingStep,
                com.google.cloud.vmmigration.v1.ReplicatingStep.Builder,
                com.google.cloud.vmmigration.v1.ReplicatingStepOrBuilder>(
                (com.google.cloud.vmmigration.v1.ReplicatingStep) step_,
                getParentForChildren(),
                isClean());
        step_ = null;
      }
      stepCase_ = 4;
      onChanged();
      return replicatingBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.vmmigration.v1.PostProcessingStep,
            com.google.cloud.vmmigration.v1.PostProcessingStep.Builder,
            com.google.cloud.vmmigration.v1.PostProcessingStepOrBuilder>
        postProcessingBuilder_;
    /**
     *
     *
     * <pre>
     * Post processing step.
     * </pre>
     *
     * <code>.google.cloud.vmmigration.v1.PostProcessingStep post_processing = 5;</code>
     *
     * @return Whether the postProcessing field is set.
     */
    @java.lang.Override
    public boolean hasPostProcessing() {
      return stepCase_ == 5;
    }
    /**
     *
     *
     * <pre>
     * Post processing step.
     * </pre>
     *
     * <code>.google.cloud.vmmigration.v1.PostProcessingStep post_processing = 5;</code>
     *
     * @return The postProcessing.
     */
    @java.lang.Override
    public com.google.cloud.vmmigration.v1.PostProcessingStep getPostProcessing() {
      if (postProcessingBuilder_ == null) {
        if (stepCase_ == 5) {
          return (com.google.cloud.vmmigration.v1.PostProcessingStep) step_;
        }
        return com.google.cloud.vmmigration.v1.PostProcessingStep.getDefaultInstance();
      } else {
        if (stepCase_ == 5) {
          return postProcessingBuilder_.getMessage();
        }
        return com.google.cloud.vmmigration.v1.PostProcessingStep.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * Post processing step.
     * </pre>
     *
     * <code>.google.cloud.vmmigration.v1.PostProcessingStep post_processing = 5;</code>
     */
    public Builder setPostProcessing(com.google.cloud.vmmigration.v1.PostProcessingStep value) {
      if (postProcessingBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        step_ = value;
        onChanged();
      } else {
        postProcessingBuilder_.setMessage(value);
      }
      stepCase_ = 5;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Post processing step.
     * </pre>
     *
     * <code>.google.cloud.vmmigration.v1.PostProcessingStep post_processing = 5;</code>
     */
    public Builder setPostProcessing(
        com.google.cloud.vmmigration.v1.PostProcessingStep.Builder builderForValue) {
      if (postProcessingBuilder_ == null) {
        step_ = builderForValue.build();
        onChanged();
      } else {
        postProcessingBuilder_.setMessage(builderForValue.build());
      }
      stepCase_ = 5;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Post processing step.
     * </pre>
     *
     * <code>.google.cloud.vmmigration.v1.PostProcessingStep post_processing = 5;</code>
     */
    public Builder mergePostProcessing(com.google.cloud.vmmigration.v1.PostProcessingStep value) {
      if (postProcessingBuilder_ == null) {
        if (stepCase_ == 5
            && step_ != com.google.cloud.vmmigration.v1.PostProcessingStep.getDefaultInstance()) {
          step_ =
              com.google.cloud.vmmigration.v1.PostProcessingStep.newBuilder(
                      (com.google.cloud.vmmigration.v1.PostProcessingStep) step_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          step_ = value;
        }
        onChanged();
      } else {
        if (stepCase_ == 5) {
          postProcessingBuilder_.mergeFrom(value);
        } else {
          postProcessingBuilder_.setMessage(value);
        }
      }
      stepCase_ = 5;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Post processing step.
     * </pre>
     *
     * <code>.google.cloud.vmmigration.v1.PostProcessingStep post_processing = 5;</code>
     */
    public Builder clearPostProcessing() {
      if (postProcessingBuilder_ == null) {
        if (stepCase_ == 5) {
          stepCase_ = 0;
          step_ = null;
          onChanged();
        }
      } else {
        if (stepCase_ == 5) {
          stepCase_ = 0;
          step_ = null;
        }
        postProcessingBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Post processing step.
     * </pre>
     *
     * <code>.google.cloud.vmmigration.v1.PostProcessingStep post_processing = 5;</code>
     */
    public com.google.cloud.vmmigration.v1.PostProcessingStep.Builder getPostProcessingBuilder() {
      return getPostProcessingFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Post processing step.
     * </pre>
     *
     * <code>.google.cloud.vmmigration.v1.PostProcessingStep post_processing = 5;</code>
     */
    @java.lang.Override
    public com.google.cloud.vmmigration.v1.PostProcessingStepOrBuilder
        getPostProcessingOrBuilder() {
      if ((stepCase_ == 5) && (postProcessingBuilder_ != null)) {
        return postProcessingBuilder_.getMessageOrBuilder();
      } else {
        if (stepCase_ == 5) {
          return (com.google.cloud.vmmigration.v1.PostProcessingStep) step_;
        }
        return com.google.cloud.vmmigration.v1.PostProcessingStep.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * Post processing step.
     * </pre>
     *
     * <code>.google.cloud.vmmigration.v1.PostProcessingStep post_processing = 5;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.vmmigration.v1.PostProcessingStep,
            com.google.cloud.vmmigration.v1.PostProcessingStep.Builder,
            com.google.cloud.vmmigration.v1.PostProcessingStepOrBuilder>
        getPostProcessingFieldBuilder() {
      if (postProcessingBuilder_ == null) {
        if (!(stepCase_ == 5)) {
          step_ = com.google.cloud.vmmigration.v1.PostProcessingStep.getDefaultInstance();
        }
        postProcessingBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.vmmigration.v1.PostProcessingStep,
                com.google.cloud.vmmigration.v1.PostProcessingStep.Builder,
                com.google.cloud.vmmigration.v1.PostProcessingStepOrBuilder>(
                (com.google.cloud.vmmigration.v1.PostProcessingStep) step_,
                getParentForChildren(),
                isClean());
        step_ = null;
      }
      stepCase_ = 5;
      onChanged();
      return postProcessingBuilder_;
    }

    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 cycle step has started.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp start_time = 1;</code>
     *
     * @return Whether the startTime field is set.
     */
    public boolean hasStartTime() {
      return ((bitField0_ & 0x00000008) != 0);
    }
    /**
     *
     *
     * <pre>
     * The time the cycle step 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 cycle step 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_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The time the cycle step 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_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The time the cycle step has started.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp start_time = 1;</code>
     */
    public Builder mergeStartTime(com.google.protobuf.Timestamp value) {
      if (startTimeBuilder_ == null) {
        if (((bitField0_ & 0x00000008) != 0)
            && startTime_ != null
            && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
          getStartTimeBuilder().mergeFrom(value);
        } else {
          startTime_ = value;
        }
      } else {
        startTimeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The time the cycle step has started.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp start_time = 1;</code>
     */
    public Builder clearStartTime() {
      bitField0_ = (bitField0_ & ~0x00000008);
      startTime_ = null;
      if (startTimeBuilder_ != null) {
        startTimeBuilder_.dispose();
        startTimeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The time the cycle step has started.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp start_time = 1;</code>
     */
    public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() {
      bitField0_ |= 0x00000008;
      onChanged();
      return getStartTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * The time the cycle step 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 cycle step 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 cycle step has ended.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp end_time = 2;</code>
     *
     * @return Whether the endTime field is set.
     */
    public boolean hasEndTime() {
      return ((bitField0_ & 0x00000010) != 0);
    }
    /**
     *
     *
     * <pre>
     * The time the cycle step has ended.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp end_time = 2;</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 cycle step has ended.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp end_time = 2;</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_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The time the cycle step has ended.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp end_time = 2;</code>
     */
    public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (endTimeBuilder_ == null) {
        endTime_ = builderForValue.build();
      } else {
        endTimeBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The time the cycle step has ended.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp end_time = 2;</code>
     */
    public Builder mergeEndTime(com.google.protobuf.Timestamp value) {
      if (endTimeBuilder_ == null) {
        if (((bitField0_ & 0x00000010) != 0)
            && endTime_ != null
            && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
          getEndTimeBuilder().mergeFrom(value);
        } else {
          endTime_ = value;
        }
      } else {
        endTimeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The time the cycle step has ended.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp end_time = 2;</code>
     */
    public Builder clearEndTime() {
      bitField0_ = (bitField0_ & ~0x00000010);
      endTime_ = null;
      if (endTimeBuilder_ != null) {
        endTimeBuilder_.dispose();
        endTimeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The time the cycle step has ended.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp end_time = 2;</code>
     */
    public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() {
      bitField0_ |= 0x00000010;
      onChanged();
      return getEndTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * The time the cycle step has ended.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp end_time = 2;</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 cycle step has ended.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp end_time = 2;</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_;
    }

    @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.CycleStep)
  }

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

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

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

  private static final com.google.protobuf.Parser<CycleStep> PARSER =
      new com.google.protobuf.AbstractParser<CycleStep>() {
        @java.lang.Override
        public CycleStep 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<CycleStep> parser() {
    return PARSER;
  }

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

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