/*
 * Copyright 2023 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>
 * Represents migration resource error information that can be used with
 * google.rpc.Status message. MigrationError is used to present the user with
 * error information in migration operations.
 * </pre>
 *
 * Protobuf type {@code google.cloud.vmmigration.v1.MigrationError}
 */
public final class MigrationError extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.vmmigration.v1.MigrationError)
    MigrationErrorOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use MigrationError.newBuilder() to construct.
  private MigrationError(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private MigrationError() {
    code_ = 0;
    helpLinks_ = java.util.Collections.emptyList();
  }

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

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

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

  /**
   *
   *
   * <pre>
   * Represents resource error codes.
   * </pre>
   *
   * Protobuf enum {@code google.cloud.vmmigration.v1.MigrationError.ErrorCode}
   */
  public enum ErrorCode implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * Default value. This value is not used.
     * </pre>
     *
     * <code>ERROR_CODE_UNSPECIFIED = 0;</code>
     */
    ERROR_CODE_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * Migrate for Compute encountered an unknown error.
     * </pre>
     *
     * <code>UNKNOWN_ERROR = 1;</code>
     */
    UNKNOWN_ERROR(1),
    /**
     *
     *
     * <pre>
     * Migrate for Compute encountered an error while validating replication
     * source health.
     * </pre>
     *
     * <code>SOURCE_VALIDATION_ERROR = 2;</code>
     */
    SOURCE_VALIDATION_ERROR(2),
    /**
     *
     *
     * <pre>
     * Migrate for Compute encountered an error during source data operation.
     * </pre>
     *
     * <code>SOURCE_REPLICATION_ERROR = 3;</code>
     */
    SOURCE_REPLICATION_ERROR(3),
    /**
     *
     *
     * <pre>
     * Migrate for Compute encountered an error during target data operation.
     * </pre>
     *
     * <code>TARGET_REPLICATION_ERROR = 4;</code>
     */
    TARGET_REPLICATION_ERROR(4),
    /**
     *
     *
     * <pre>
     * Migrate for Compute encountered an error during OS adaptation.
     * </pre>
     *
     * <code>OS_ADAPTATION_ERROR = 5;</code>
     */
    OS_ADAPTATION_ERROR(5),
    /**
     *
     *
     * <pre>
     * Migrate for Compute encountered an error in clone operation.
     * </pre>
     *
     * <code>CLONE_ERROR = 6;</code>
     */
    CLONE_ERROR(6),
    /**
     *
     *
     * <pre>
     * Migrate for Compute encountered an error in cutover operation.
     * </pre>
     *
     * <code>CUTOVER_ERROR = 7;</code>
     */
    CUTOVER_ERROR(7),
    /**
     *
     *
     * <pre>
     * Migrate for Compute encountered an error during utilization report
     * creation.
     * </pre>
     *
     * <code>UTILIZATION_REPORT_ERROR = 8;</code>
     */
    UTILIZATION_REPORT_ERROR(8),
    /**
     *
     *
     * <pre>
     * Migrate for Compute encountered an error during appliance upgrade.
     * </pre>
     *
     * <code>APPLIANCE_UPGRADE_ERROR = 9;</code>
     */
    APPLIANCE_UPGRADE_ERROR(9),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * Default value. This value is not used.
     * </pre>
     *
     * <code>ERROR_CODE_UNSPECIFIED = 0;</code>
     */
    public static final int ERROR_CODE_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * Migrate for Compute encountered an unknown error.
     * </pre>
     *
     * <code>UNKNOWN_ERROR = 1;</code>
     */
    public static final int UNKNOWN_ERROR_VALUE = 1;
    /**
     *
     *
     * <pre>
     * Migrate for Compute encountered an error while validating replication
     * source health.
     * </pre>
     *
     * <code>SOURCE_VALIDATION_ERROR = 2;</code>
     */
    public static final int SOURCE_VALIDATION_ERROR_VALUE = 2;
    /**
     *
     *
     * <pre>
     * Migrate for Compute encountered an error during source data operation.
     * </pre>
     *
     * <code>SOURCE_REPLICATION_ERROR = 3;</code>
     */
    public static final int SOURCE_REPLICATION_ERROR_VALUE = 3;
    /**
     *
     *
     * <pre>
     * Migrate for Compute encountered an error during target data operation.
     * </pre>
     *
     * <code>TARGET_REPLICATION_ERROR = 4;</code>
     */
    public static final int TARGET_REPLICATION_ERROR_VALUE = 4;
    /**
     *
     *
     * <pre>
     * Migrate for Compute encountered an error during OS adaptation.
     * </pre>
     *
     * <code>OS_ADAPTATION_ERROR = 5;</code>
     */
    public static final int OS_ADAPTATION_ERROR_VALUE = 5;
    /**
     *
     *
     * <pre>
     * Migrate for Compute encountered an error in clone operation.
     * </pre>
     *
     * <code>CLONE_ERROR = 6;</code>
     */
    public static final int CLONE_ERROR_VALUE = 6;
    /**
     *
     *
     * <pre>
     * Migrate for Compute encountered an error in cutover operation.
     * </pre>
     *
     * <code>CUTOVER_ERROR = 7;</code>
     */
    public static final int CUTOVER_ERROR_VALUE = 7;
    /**
     *
     *
     * <pre>
     * Migrate for Compute encountered an error during utilization report
     * creation.
     * </pre>
     *
     * <code>UTILIZATION_REPORT_ERROR = 8;</code>
     */
    public static final int UTILIZATION_REPORT_ERROR_VALUE = 8;
    /**
     *
     *
     * <pre>
     * Migrate for Compute encountered an error during appliance upgrade.
     * </pre>
     *
     * <code>APPLIANCE_UPGRADE_ERROR = 9;</code>
     */
    public static final int APPLIANCE_UPGRADE_ERROR_VALUE = 9;

    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 ErrorCode 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 ErrorCode forNumber(int value) {
      switch (value) {
        case 0:
          return ERROR_CODE_UNSPECIFIED;
        case 1:
          return UNKNOWN_ERROR;
        case 2:
          return SOURCE_VALIDATION_ERROR;
        case 3:
          return SOURCE_REPLICATION_ERROR;
        case 4:
          return TARGET_REPLICATION_ERROR;
        case 5:
          return OS_ADAPTATION_ERROR;
        case 6:
          return CLONE_ERROR;
        case 7:
          return CUTOVER_ERROR;
        case 8:
          return UTILIZATION_REPORT_ERROR;
        case 9:
          return APPLIANCE_UPGRADE_ERROR;
        default:
          return null;
      }
    }

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

    private static final com.google.protobuf.Internal.EnumLiteMap<ErrorCode> internalValueMap =
        new com.google.protobuf.Internal.EnumLiteMap<ErrorCode>() {
          public ErrorCode findValueByNumber(int number) {
            return ErrorCode.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.MigrationError.getDescriptor().getEnumTypes().get(0);
    }

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

    public static ErrorCode 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 ErrorCode(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:google.cloud.vmmigration.v1.MigrationError.ErrorCode)
  }

  public static final int CODE_FIELD_NUMBER = 1;
  private int code_ = 0;
  /**
   *
   *
   * <pre>
   * Output only. The error code.
   * </pre>
   *
   * <code>
   * .google.cloud.vmmigration.v1.MigrationError.ErrorCode code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The enum numeric value on the wire for code.
   */
  @java.lang.Override
  public int getCodeValue() {
    return code_;
  }
  /**
   *
   *
   * <pre>
   * Output only. The error code.
   * </pre>
   *
   * <code>
   * .google.cloud.vmmigration.v1.MigrationError.ErrorCode code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The code.
   */
  @java.lang.Override
  public com.google.cloud.vmmigration.v1.MigrationError.ErrorCode getCode() {
    com.google.cloud.vmmigration.v1.MigrationError.ErrorCode result =
        com.google.cloud.vmmigration.v1.MigrationError.ErrorCode.forNumber(code_);
    return result == null
        ? com.google.cloud.vmmigration.v1.MigrationError.ErrorCode.UNRECOGNIZED
        : result;
  }

  public static final int ERROR_MESSAGE_FIELD_NUMBER = 2;
  private com.google.rpc.LocalizedMessage errorMessage_;
  /**
   *
   *
   * <pre>
   * Output only. The localized error message.
   * </pre>
   *
   * <code>
   * .google.rpc.LocalizedMessage error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return Whether the errorMessage field is set.
   */
  @java.lang.Override
  public boolean hasErrorMessage() {
    return errorMessage_ != null;
  }
  /**
   *
   *
   * <pre>
   * Output only. The localized error message.
   * </pre>
   *
   * <code>
   * .google.rpc.LocalizedMessage error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The errorMessage.
   */
  @java.lang.Override
  public com.google.rpc.LocalizedMessage getErrorMessage() {
    return errorMessage_ == null
        ? com.google.rpc.LocalizedMessage.getDefaultInstance()
        : errorMessage_;
  }
  /**
   *
   *
   * <pre>
   * Output only. The localized error message.
   * </pre>
   *
   * <code>
   * .google.rpc.LocalizedMessage error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.rpc.LocalizedMessageOrBuilder getErrorMessageOrBuilder() {
    return errorMessage_ == null
        ? com.google.rpc.LocalizedMessage.getDefaultInstance()
        : errorMessage_;
  }

  public static final int ACTION_ITEM_FIELD_NUMBER = 3;
  private com.google.rpc.LocalizedMessage actionItem_;
  /**
   *
   *
   * <pre>
   * Output only. Suggested action for solving the error.
   * </pre>
   *
   * <code>
   * .google.rpc.LocalizedMessage action_item = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return Whether the actionItem field is set.
   */
  @java.lang.Override
  public boolean hasActionItem() {
    return actionItem_ != null;
  }
  /**
   *
   *
   * <pre>
   * Output only. Suggested action for solving the error.
   * </pre>
   *
   * <code>
   * .google.rpc.LocalizedMessage action_item = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The actionItem.
   */
  @java.lang.Override
  public com.google.rpc.LocalizedMessage getActionItem() {
    return actionItem_ == null ? com.google.rpc.LocalizedMessage.getDefaultInstance() : actionItem_;
  }
  /**
   *
   *
   * <pre>
   * Output only. Suggested action for solving the error.
   * </pre>
   *
   * <code>
   * .google.rpc.LocalizedMessage action_item = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.rpc.LocalizedMessageOrBuilder getActionItemOrBuilder() {
    return actionItem_ == null ? com.google.rpc.LocalizedMessage.getDefaultInstance() : actionItem_;
  }

  public static final int HELP_LINKS_FIELD_NUMBER = 4;

  @SuppressWarnings("serial")
  private java.util.List<com.google.rpc.Help.Link> helpLinks_;
  /**
   *
   *
   * <pre>
   * Output only. URL(s) pointing to additional information on handling the
   * current error.
   * </pre>
   *
   * <code>
   * repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public java.util.List<com.google.rpc.Help.Link> getHelpLinksList() {
    return helpLinks_;
  }
  /**
   *
   *
   * <pre>
   * Output only. URL(s) pointing to additional information on handling the
   * current error.
   * </pre>
   *
   * <code>
   * repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public java.util.List<? extends com.google.rpc.Help.LinkOrBuilder> getHelpLinksOrBuilderList() {
    return helpLinks_;
  }
  /**
   *
   *
   * <pre>
   * Output only. URL(s) pointing to additional information on handling the
   * current error.
   * </pre>
   *
   * <code>
   * repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public int getHelpLinksCount() {
    return helpLinks_.size();
  }
  /**
   *
   *
   * <pre>
   * Output only. URL(s) pointing to additional information on handling the
   * current error.
   * </pre>
   *
   * <code>
   * repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.rpc.Help.Link getHelpLinks(int index) {
    return helpLinks_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Output only. URL(s) pointing to additional information on handling the
   * current error.
   * </pre>
   *
   * <code>
   * repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.rpc.Help.LinkOrBuilder getHelpLinksOrBuilder(int index) {
    return helpLinks_.get(index);
  }

  public static final int ERROR_TIME_FIELD_NUMBER = 5;
  private com.google.protobuf.Timestamp errorTime_;
  /**
   *
   *
   * <pre>
   * Output only. The time the error occurred.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp error_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return Whether the errorTime field is set.
   */
  @java.lang.Override
  public boolean hasErrorTime() {
    return errorTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * Output only. The time the error occurred.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp error_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The errorTime.
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getErrorTime() {
    return errorTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : errorTime_;
  }
  /**
   *
   *
   * <pre>
   * Output only. The time the error occurred.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp error_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getErrorTimeOrBuilder() {
    return errorTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : errorTime_;
  }

  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 (code_
        != com.google.cloud.vmmigration.v1.MigrationError.ErrorCode.ERROR_CODE_UNSPECIFIED
            .getNumber()) {
      output.writeEnum(1, code_);
    }
    if (errorMessage_ != null) {
      output.writeMessage(2, getErrorMessage());
    }
    if (actionItem_ != null) {
      output.writeMessage(3, getActionItem());
    }
    for (int i = 0; i < helpLinks_.size(); i++) {
      output.writeMessage(4, helpLinks_.get(i));
    }
    if (errorTime_ != null) {
      output.writeMessage(5, getErrorTime());
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (code_
        != com.google.cloud.vmmigration.v1.MigrationError.ErrorCode.ERROR_CODE_UNSPECIFIED
            .getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, code_);
    }
    if (errorMessage_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getErrorMessage());
    }
    if (actionItem_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getActionItem());
    }
    for (int i = 0; i < helpLinks_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, helpLinks_.get(i));
    }
    if (errorTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getErrorTime());
    }
    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.MigrationError)) {
      return super.equals(obj);
    }
    com.google.cloud.vmmigration.v1.MigrationError other =
        (com.google.cloud.vmmigration.v1.MigrationError) obj;

    if (code_ != other.code_) return false;
    if (hasErrorMessage() != other.hasErrorMessage()) return false;
    if (hasErrorMessage()) {
      if (!getErrorMessage().equals(other.getErrorMessage())) return false;
    }
    if (hasActionItem() != other.hasActionItem()) return false;
    if (hasActionItem()) {
      if (!getActionItem().equals(other.getActionItem())) return false;
    }
    if (!getHelpLinksList().equals(other.getHelpLinksList())) return false;
    if (hasErrorTime() != other.hasErrorTime()) return false;
    if (hasErrorTime()) {
      if (!getErrorTime().equals(other.getErrorTime())) 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) + CODE_FIELD_NUMBER;
    hash = (53 * hash) + code_;
    if (hasErrorMessage()) {
      hash = (37 * hash) + ERROR_MESSAGE_FIELD_NUMBER;
      hash = (53 * hash) + getErrorMessage().hashCode();
    }
    if (hasActionItem()) {
      hash = (37 * hash) + ACTION_ITEM_FIELD_NUMBER;
      hash = (53 * hash) + getActionItem().hashCode();
    }
    if (getHelpLinksCount() > 0) {
      hash = (37 * hash) + HELP_LINKS_FIELD_NUMBER;
      hash = (53 * hash) + getHelpLinksList().hashCode();
    }
    if (hasErrorTime()) {
      hash = (37 * hash) + ERROR_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getErrorTime().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

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

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

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

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

  public static com.google.cloud.vmmigration.v1.MigrationError 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.MigrationError 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.MigrationError 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.MigrationError 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>
   * Represents migration resource error information that can be used with
   * google.rpc.Status message. MigrationError is used to present the user with
   * error information in migration operations.
   * </pre>
   *
   * Protobuf type {@code google.cloud.vmmigration.v1.MigrationError}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.vmmigration.v1.MigrationError)
      com.google.cloud.vmmigration.v1.MigrationErrorOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.vmmigration.v1.VmMigrationProto
          .internal_static_google_cloud_vmmigration_v1_MigrationError_descriptor;
    }

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

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

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      code_ = 0;
      errorMessage_ = null;
      if (errorMessageBuilder_ != null) {
        errorMessageBuilder_.dispose();
        errorMessageBuilder_ = null;
      }
      actionItem_ = null;
      if (actionItemBuilder_ != null) {
        actionItemBuilder_.dispose();
        actionItemBuilder_ = null;
      }
      if (helpLinksBuilder_ == null) {
        helpLinks_ = java.util.Collections.emptyList();
      } else {
        helpLinks_ = null;
        helpLinksBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000008);
      errorTime_ = null;
      if (errorTimeBuilder_ != null) {
        errorTimeBuilder_.dispose();
        errorTimeBuilder_ = 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_MigrationError_descriptor;
    }

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

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

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

    private void buildPartialRepeatedFields(com.google.cloud.vmmigration.v1.MigrationError result) {
      if (helpLinksBuilder_ == null) {
        if (((bitField0_ & 0x00000008) != 0)) {
          helpLinks_ = java.util.Collections.unmodifiableList(helpLinks_);
          bitField0_ = (bitField0_ & ~0x00000008);
        }
        result.helpLinks_ = helpLinks_;
      } else {
        result.helpLinks_ = helpLinksBuilder_.build();
      }
    }

    private void buildPartial0(com.google.cloud.vmmigration.v1.MigrationError result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.code_ = code_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.errorMessage_ =
            errorMessageBuilder_ == null ? errorMessage_ : errorMessageBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.actionItem_ = actionItemBuilder_ == null ? actionItem_ : actionItemBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.errorTime_ = errorTimeBuilder_ == null ? errorTime_ : errorTimeBuilder_.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.MigrationError) {
        return mergeFrom((com.google.cloud.vmmigration.v1.MigrationError) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.vmmigration.v1.MigrationError other) {
      if (other == com.google.cloud.vmmigration.v1.MigrationError.getDefaultInstance()) return this;
      if (other.code_ != 0) {
        setCodeValue(other.getCodeValue());
      }
      if (other.hasErrorMessage()) {
        mergeErrorMessage(other.getErrorMessage());
      }
      if (other.hasActionItem()) {
        mergeActionItem(other.getActionItem());
      }
      if (helpLinksBuilder_ == null) {
        if (!other.helpLinks_.isEmpty()) {
          if (helpLinks_.isEmpty()) {
            helpLinks_ = other.helpLinks_;
            bitField0_ = (bitField0_ & ~0x00000008);
          } else {
            ensureHelpLinksIsMutable();
            helpLinks_.addAll(other.helpLinks_);
          }
          onChanged();
        }
      } else {
        if (!other.helpLinks_.isEmpty()) {
          if (helpLinksBuilder_.isEmpty()) {
            helpLinksBuilder_.dispose();
            helpLinksBuilder_ = null;
            helpLinks_ = other.helpLinks_;
            bitField0_ = (bitField0_ & ~0x00000008);
            helpLinksBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getHelpLinksFieldBuilder()
                    : null;
          } else {
            helpLinksBuilder_.addAllMessages(other.helpLinks_);
          }
        }
      }
      if (other.hasErrorTime()) {
        mergeErrorTime(other.getErrorTime());
      }
      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 8:
              {
                code_ = input.readEnum();
                bitField0_ |= 0x00000001;
                break;
              } // case 8
            case 18:
              {
                input.readMessage(getErrorMessageFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000002;
                break;
              } // case 18
            case 26:
              {
                input.readMessage(getActionItemFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000004;
                break;
              } // case 26
            case 34:
              {
                com.google.rpc.Help.Link m =
                    input.readMessage(com.google.rpc.Help.Link.parser(), extensionRegistry);
                if (helpLinksBuilder_ == null) {
                  ensureHelpLinksIsMutable();
                  helpLinks_.add(m);
                } else {
                  helpLinksBuilder_.addMessage(m);
                }
                break;
              } // case 34
            case 42:
              {
                input.readMessage(getErrorTimeFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000010;
                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 bitField0_;

    private int code_ = 0;
    /**
     *
     *
     * <pre>
     * Output only. The error code.
     * </pre>
     *
     * <code>
     * .google.cloud.vmmigration.v1.MigrationError.ErrorCode code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The enum numeric value on the wire for code.
     */
    @java.lang.Override
    public int getCodeValue() {
      return code_;
    }
    /**
     *
     *
     * <pre>
     * Output only. The error code.
     * </pre>
     *
     * <code>
     * .google.cloud.vmmigration.v1.MigrationError.ErrorCode code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @param value The enum numeric value on the wire for code to set.
     * @return This builder for chaining.
     */
    public Builder setCodeValue(int value) {
      code_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The error code.
     * </pre>
     *
     * <code>
     * .google.cloud.vmmigration.v1.MigrationError.ErrorCode code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The code.
     */
    @java.lang.Override
    public com.google.cloud.vmmigration.v1.MigrationError.ErrorCode getCode() {
      com.google.cloud.vmmigration.v1.MigrationError.ErrorCode result =
          com.google.cloud.vmmigration.v1.MigrationError.ErrorCode.forNumber(code_);
      return result == null
          ? com.google.cloud.vmmigration.v1.MigrationError.ErrorCode.UNRECOGNIZED
          : result;
    }
    /**
     *
     *
     * <pre>
     * Output only. The error code.
     * </pre>
     *
     * <code>
     * .google.cloud.vmmigration.v1.MigrationError.ErrorCode code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @param value The code to set.
     * @return This builder for chaining.
     */
    public Builder setCode(com.google.cloud.vmmigration.v1.MigrationError.ErrorCode value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000001;
      code_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The error code.
     * </pre>
     *
     * <code>
     * .google.cloud.vmmigration.v1.MigrationError.ErrorCode code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return This builder for chaining.
     */
    public Builder clearCode() {
      bitField0_ = (bitField0_ & ~0x00000001);
      code_ = 0;
      onChanged();
      return this;
    }

    private com.google.rpc.LocalizedMessage errorMessage_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.rpc.LocalizedMessage,
            com.google.rpc.LocalizedMessage.Builder,
            com.google.rpc.LocalizedMessageOrBuilder>
        errorMessageBuilder_;
    /**
     *
     *
     * <pre>
     * Output only. The localized error message.
     * </pre>
     *
     * <code>
     * .google.rpc.LocalizedMessage error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return Whether the errorMessage field is set.
     */
    public boolean hasErrorMessage() {
      return ((bitField0_ & 0x00000002) != 0);
    }
    /**
     *
     *
     * <pre>
     * Output only. The localized error message.
     * </pre>
     *
     * <code>
     * .google.rpc.LocalizedMessage error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The errorMessage.
     */
    public com.google.rpc.LocalizedMessage getErrorMessage() {
      if (errorMessageBuilder_ == null) {
        return errorMessage_ == null
            ? com.google.rpc.LocalizedMessage.getDefaultInstance()
            : errorMessage_;
      } else {
        return errorMessageBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The localized error message.
     * </pre>
     *
     * <code>
     * .google.rpc.LocalizedMessage error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setErrorMessage(com.google.rpc.LocalizedMessage value) {
      if (errorMessageBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        errorMessage_ = value;
      } else {
        errorMessageBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The localized error message.
     * </pre>
     *
     * <code>
     * .google.rpc.LocalizedMessage error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setErrorMessage(com.google.rpc.LocalizedMessage.Builder builderForValue) {
      if (errorMessageBuilder_ == null) {
        errorMessage_ = builderForValue.build();
      } else {
        errorMessageBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The localized error message.
     * </pre>
     *
     * <code>
     * .google.rpc.LocalizedMessage error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder mergeErrorMessage(com.google.rpc.LocalizedMessage value) {
      if (errorMessageBuilder_ == null) {
        if (((bitField0_ & 0x00000002) != 0)
            && errorMessage_ != null
            && errorMessage_ != com.google.rpc.LocalizedMessage.getDefaultInstance()) {
          getErrorMessageBuilder().mergeFrom(value);
        } else {
          errorMessage_ = value;
        }
      } else {
        errorMessageBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The localized error message.
     * </pre>
     *
     * <code>
     * .google.rpc.LocalizedMessage error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder clearErrorMessage() {
      bitField0_ = (bitField0_ & ~0x00000002);
      errorMessage_ = null;
      if (errorMessageBuilder_ != null) {
        errorMessageBuilder_.dispose();
        errorMessageBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The localized error message.
     * </pre>
     *
     * <code>
     * .google.rpc.LocalizedMessage error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.rpc.LocalizedMessage.Builder getErrorMessageBuilder() {
      bitField0_ |= 0x00000002;
      onChanged();
      return getErrorMessageFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Output only. The localized error message.
     * </pre>
     *
     * <code>
     * .google.rpc.LocalizedMessage error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.rpc.LocalizedMessageOrBuilder getErrorMessageOrBuilder() {
      if (errorMessageBuilder_ != null) {
        return errorMessageBuilder_.getMessageOrBuilder();
      } else {
        return errorMessage_ == null
            ? com.google.rpc.LocalizedMessage.getDefaultInstance()
            : errorMessage_;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The localized error message.
     * </pre>
     *
     * <code>
     * .google.rpc.LocalizedMessage error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.rpc.LocalizedMessage,
            com.google.rpc.LocalizedMessage.Builder,
            com.google.rpc.LocalizedMessageOrBuilder>
        getErrorMessageFieldBuilder() {
      if (errorMessageBuilder_ == null) {
        errorMessageBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.rpc.LocalizedMessage,
                com.google.rpc.LocalizedMessage.Builder,
                com.google.rpc.LocalizedMessageOrBuilder>(
                getErrorMessage(), getParentForChildren(), isClean());
        errorMessage_ = null;
      }
      return errorMessageBuilder_;
    }

    private com.google.rpc.LocalizedMessage actionItem_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.rpc.LocalizedMessage,
            com.google.rpc.LocalizedMessage.Builder,
            com.google.rpc.LocalizedMessageOrBuilder>
        actionItemBuilder_;
    /**
     *
     *
     * <pre>
     * Output only. Suggested action for solving the error.
     * </pre>
     *
     * <code>
     * .google.rpc.LocalizedMessage action_item = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return Whether the actionItem field is set.
     */
    public boolean hasActionItem() {
      return ((bitField0_ & 0x00000004) != 0);
    }
    /**
     *
     *
     * <pre>
     * Output only. Suggested action for solving the error.
     * </pre>
     *
     * <code>
     * .google.rpc.LocalizedMessage action_item = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The actionItem.
     */
    public com.google.rpc.LocalizedMessage getActionItem() {
      if (actionItemBuilder_ == null) {
        return actionItem_ == null
            ? com.google.rpc.LocalizedMessage.getDefaultInstance()
            : actionItem_;
      } else {
        return actionItemBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. Suggested action for solving the error.
     * </pre>
     *
     * <code>
     * .google.rpc.LocalizedMessage action_item = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setActionItem(com.google.rpc.LocalizedMessage value) {
      if (actionItemBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        actionItem_ = value;
      } else {
        actionItemBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Suggested action for solving the error.
     * </pre>
     *
     * <code>
     * .google.rpc.LocalizedMessage action_item = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setActionItem(com.google.rpc.LocalizedMessage.Builder builderForValue) {
      if (actionItemBuilder_ == null) {
        actionItem_ = builderForValue.build();
      } else {
        actionItemBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Suggested action for solving the error.
     * </pre>
     *
     * <code>
     * .google.rpc.LocalizedMessage action_item = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder mergeActionItem(com.google.rpc.LocalizedMessage value) {
      if (actionItemBuilder_ == null) {
        if (((bitField0_ & 0x00000004) != 0)
            && actionItem_ != null
            && actionItem_ != com.google.rpc.LocalizedMessage.getDefaultInstance()) {
          getActionItemBuilder().mergeFrom(value);
        } else {
          actionItem_ = value;
        }
      } else {
        actionItemBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Suggested action for solving the error.
     * </pre>
     *
     * <code>
     * .google.rpc.LocalizedMessage action_item = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder clearActionItem() {
      bitField0_ = (bitField0_ & ~0x00000004);
      actionItem_ = null;
      if (actionItemBuilder_ != null) {
        actionItemBuilder_.dispose();
        actionItemBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Suggested action for solving the error.
     * </pre>
     *
     * <code>
     * .google.rpc.LocalizedMessage action_item = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.rpc.LocalizedMessage.Builder getActionItemBuilder() {
      bitField0_ |= 0x00000004;
      onChanged();
      return getActionItemFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Output only. Suggested action for solving the error.
     * </pre>
     *
     * <code>
     * .google.rpc.LocalizedMessage action_item = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.rpc.LocalizedMessageOrBuilder getActionItemOrBuilder() {
      if (actionItemBuilder_ != null) {
        return actionItemBuilder_.getMessageOrBuilder();
      } else {
        return actionItem_ == null
            ? com.google.rpc.LocalizedMessage.getDefaultInstance()
            : actionItem_;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. Suggested action for solving the error.
     * </pre>
     *
     * <code>
     * .google.rpc.LocalizedMessage action_item = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.rpc.LocalizedMessage,
            com.google.rpc.LocalizedMessage.Builder,
            com.google.rpc.LocalizedMessageOrBuilder>
        getActionItemFieldBuilder() {
      if (actionItemBuilder_ == null) {
        actionItemBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.rpc.LocalizedMessage,
                com.google.rpc.LocalizedMessage.Builder,
                com.google.rpc.LocalizedMessageOrBuilder>(
                getActionItem(), getParentForChildren(), isClean());
        actionItem_ = null;
      }
      return actionItemBuilder_;
    }

    private java.util.List<com.google.rpc.Help.Link> helpLinks_ = java.util.Collections.emptyList();

    private void ensureHelpLinksIsMutable() {
      if (!((bitField0_ & 0x00000008) != 0)) {
        helpLinks_ = new java.util.ArrayList<com.google.rpc.Help.Link>(helpLinks_);
        bitField0_ |= 0x00000008;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.rpc.Help.Link,
            com.google.rpc.Help.Link.Builder,
            com.google.rpc.Help.LinkOrBuilder>
        helpLinksBuilder_;

    /**
     *
     *
     * <pre>
     * Output only. URL(s) pointing to additional information on handling the
     * current error.
     * </pre>
     *
     * <code>
     * repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public java.util.List<com.google.rpc.Help.Link> getHelpLinksList() {
      if (helpLinksBuilder_ == null) {
        return java.util.Collections.unmodifiableList(helpLinks_);
      } else {
        return helpLinksBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. URL(s) pointing to additional information on handling the
     * current error.
     * </pre>
     *
     * <code>
     * repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public int getHelpLinksCount() {
      if (helpLinksBuilder_ == null) {
        return helpLinks_.size();
      } else {
        return helpLinksBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. URL(s) pointing to additional information on handling the
     * current error.
     * </pre>
     *
     * <code>
     * repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.rpc.Help.Link getHelpLinks(int index) {
      if (helpLinksBuilder_ == null) {
        return helpLinks_.get(index);
      } else {
        return helpLinksBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. URL(s) pointing to additional information on handling the
     * current error.
     * </pre>
     *
     * <code>
     * repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setHelpLinks(int index, com.google.rpc.Help.Link value) {
      if (helpLinksBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureHelpLinksIsMutable();
        helpLinks_.set(index, value);
        onChanged();
      } else {
        helpLinksBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. URL(s) pointing to additional information on handling the
     * current error.
     * </pre>
     *
     * <code>
     * repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setHelpLinks(int index, com.google.rpc.Help.Link.Builder builderForValue) {
      if (helpLinksBuilder_ == null) {
        ensureHelpLinksIsMutable();
        helpLinks_.set(index, builderForValue.build());
        onChanged();
      } else {
        helpLinksBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. URL(s) pointing to additional information on handling the
     * current error.
     * </pre>
     *
     * <code>
     * repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder addHelpLinks(com.google.rpc.Help.Link value) {
      if (helpLinksBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureHelpLinksIsMutable();
        helpLinks_.add(value);
        onChanged();
      } else {
        helpLinksBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. URL(s) pointing to additional information on handling the
     * current error.
     * </pre>
     *
     * <code>
     * repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder addHelpLinks(int index, com.google.rpc.Help.Link value) {
      if (helpLinksBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureHelpLinksIsMutable();
        helpLinks_.add(index, value);
        onChanged();
      } else {
        helpLinksBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. URL(s) pointing to additional information on handling the
     * current error.
     * </pre>
     *
     * <code>
     * repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder addHelpLinks(com.google.rpc.Help.Link.Builder builderForValue) {
      if (helpLinksBuilder_ == null) {
        ensureHelpLinksIsMutable();
        helpLinks_.add(builderForValue.build());
        onChanged();
      } else {
        helpLinksBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. URL(s) pointing to additional information on handling the
     * current error.
     * </pre>
     *
     * <code>
     * repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder addHelpLinks(int index, com.google.rpc.Help.Link.Builder builderForValue) {
      if (helpLinksBuilder_ == null) {
        ensureHelpLinksIsMutable();
        helpLinks_.add(index, builderForValue.build());
        onChanged();
      } else {
        helpLinksBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. URL(s) pointing to additional information on handling the
     * current error.
     * </pre>
     *
     * <code>
     * repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder addAllHelpLinks(java.lang.Iterable<? extends com.google.rpc.Help.Link> values) {
      if (helpLinksBuilder_ == null) {
        ensureHelpLinksIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, helpLinks_);
        onChanged();
      } else {
        helpLinksBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. URL(s) pointing to additional information on handling the
     * current error.
     * </pre>
     *
     * <code>
     * repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder clearHelpLinks() {
      if (helpLinksBuilder_ == null) {
        helpLinks_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000008);
        onChanged();
      } else {
        helpLinksBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. URL(s) pointing to additional information on handling the
     * current error.
     * </pre>
     *
     * <code>
     * repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder removeHelpLinks(int index) {
      if (helpLinksBuilder_ == null) {
        ensureHelpLinksIsMutable();
        helpLinks_.remove(index);
        onChanged();
      } else {
        helpLinksBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. URL(s) pointing to additional information on handling the
     * current error.
     * </pre>
     *
     * <code>
     * repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.rpc.Help.Link.Builder getHelpLinksBuilder(int index) {
      return getHelpLinksFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * Output only. URL(s) pointing to additional information on handling the
     * current error.
     * </pre>
     *
     * <code>
     * repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.rpc.Help.LinkOrBuilder getHelpLinksOrBuilder(int index) {
      if (helpLinksBuilder_ == null) {
        return helpLinks_.get(index);
      } else {
        return helpLinksBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. URL(s) pointing to additional information on handling the
     * current error.
     * </pre>
     *
     * <code>
     * repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public java.util.List<? extends com.google.rpc.Help.LinkOrBuilder> getHelpLinksOrBuilderList() {
      if (helpLinksBuilder_ != null) {
        return helpLinksBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(helpLinks_);
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. URL(s) pointing to additional information on handling the
     * current error.
     * </pre>
     *
     * <code>
     * repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.rpc.Help.Link.Builder addHelpLinksBuilder() {
      return getHelpLinksFieldBuilder().addBuilder(com.google.rpc.Help.Link.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Output only. URL(s) pointing to additional information on handling the
     * current error.
     * </pre>
     *
     * <code>
     * repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.rpc.Help.Link.Builder addHelpLinksBuilder(int index) {
      return getHelpLinksFieldBuilder()
          .addBuilder(index, com.google.rpc.Help.Link.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Output only. URL(s) pointing to additional information on handling the
     * current error.
     * </pre>
     *
     * <code>
     * repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public java.util.List<com.google.rpc.Help.Link.Builder> getHelpLinksBuilderList() {
      return getHelpLinksFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.rpc.Help.Link,
            com.google.rpc.Help.Link.Builder,
            com.google.rpc.Help.LinkOrBuilder>
        getHelpLinksFieldBuilder() {
      if (helpLinksBuilder_ == null) {
        helpLinksBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.rpc.Help.Link,
                com.google.rpc.Help.Link.Builder,
                com.google.rpc.Help.LinkOrBuilder>(
                helpLinks_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean());
        helpLinks_ = null;
      }
      return helpLinksBuilder_;
    }

    private com.google.protobuf.Timestamp errorTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        errorTimeBuilder_;
    /**
     *
     *
     * <pre>
     * Output only. The time the error occurred.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp error_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return Whether the errorTime field is set.
     */
    public boolean hasErrorTime() {
      return ((bitField0_ & 0x00000010) != 0);
    }
    /**
     *
     *
     * <pre>
     * Output only. The time the error occurred.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp error_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The errorTime.
     */
    public com.google.protobuf.Timestamp getErrorTime() {
      if (errorTimeBuilder_ == null) {
        return errorTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : errorTime_;
      } else {
        return errorTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The time the error occurred.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp error_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setErrorTime(com.google.protobuf.Timestamp value) {
      if (errorTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        errorTime_ = value;
      } else {
        errorTimeBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time the error occurred.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp error_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setErrorTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (errorTimeBuilder_ == null) {
        errorTime_ = builderForValue.build();
      } else {
        errorTimeBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time the error occurred.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp error_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder mergeErrorTime(com.google.protobuf.Timestamp value) {
      if (errorTimeBuilder_ == null) {
        if (((bitField0_ & 0x00000010) != 0)
            && errorTime_ != null
            && errorTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
          getErrorTimeBuilder().mergeFrom(value);
        } else {
          errorTime_ = value;
        }
      } else {
        errorTimeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time the error occurred.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp error_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder clearErrorTime() {
      bitField0_ = (bitField0_ & ~0x00000010);
      errorTime_ = null;
      if (errorTimeBuilder_ != null) {
        errorTimeBuilder_.dispose();
        errorTimeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The time the error occurred.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp error_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.Timestamp.Builder getErrorTimeBuilder() {
      bitField0_ |= 0x00000010;
      onChanged();
      return getErrorTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Output only. The time the error occurred.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp error_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.TimestampOrBuilder getErrorTimeOrBuilder() {
      if (errorTimeBuilder_ != null) {
        return errorTimeBuilder_.getMessageOrBuilder();
      } else {
        return errorTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : errorTime_;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The time the error occurred.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp error_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getErrorTimeFieldBuilder() {
      if (errorTimeBuilder_ == null) {
        errorTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getErrorTime(), getParentForChildren(), isClean());
        errorTime_ = null;
      }
      return errorTimeBuilder_;
    }

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

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

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

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

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

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

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