// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: tensorflow/core/util/event.proto

package org.tensorflow.proto.util;

/**
 * <pre>
 * Current health status of a worker.
 * </pre>
 *
 * Protobuf enum {@code tensorflow.WorkerHealth}
 */
public enum WorkerHealth
    implements com.google.protobuf.ProtocolMessageEnum {
  /**
   * <pre>
   * By default a worker is healthy.
   * </pre>
   *
   * <code>OK = 0;</code>
   */
  OK(0),
  /**
   * <code>RECEIVED_SHUTDOWN_SIGNAL = 1;</code>
   */
  RECEIVED_SHUTDOWN_SIGNAL(1),
  /**
   * <code>INTERNAL_ERROR = 2;</code>
   */
  INTERNAL_ERROR(2),
  /**
   * <pre>
   * Worker has been instructed to shutdown after a timeout.
   * </pre>
   *
   * <code>SHUTTING_DOWN = 3;</code>
   */
  SHUTTING_DOWN(3),
  UNRECOGNIZED(-1),
  ;

  /**
   * <pre>
   * By default a worker is healthy.
   * </pre>
   *
   * <code>OK = 0;</code>
   */
  public static final int OK_VALUE = 0;
  /**
   * <code>RECEIVED_SHUTDOWN_SIGNAL = 1;</code>
   */
  public static final int RECEIVED_SHUTDOWN_SIGNAL_VALUE = 1;
  /**
   * <code>INTERNAL_ERROR = 2;</code>
   */
  public static final int INTERNAL_ERROR_VALUE = 2;
  /**
   * <pre>
   * Worker has been instructed to shutdown after a timeout.
   * </pre>
   *
   * <code>SHUTTING_DOWN = 3;</code>
   */
  public static final int SHUTTING_DOWN_VALUE = 3;


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

  /**
   * @deprecated Use {@link #forNumber(int)} instead.
   */
  @java.lang.Deprecated
  public static WorkerHealth valueOf(int value) {
    return forNumber(value);
  }

  public static WorkerHealth forNumber(int value) {
    switch (value) {
      case 0: return OK;
      case 1: return RECEIVED_SHUTDOWN_SIGNAL;
      case 2: return INTERNAL_ERROR;
      case 3: return SHUTTING_DOWN;
      default: return null;
    }
  }

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

  public final com.google.protobuf.Descriptors.EnumValueDescriptor
      getValueDescriptor() {
    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 org.tensorflow.proto.util.EventProtos.getDescriptor().getEnumTypes().get(0);
  }

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

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

  // @@protoc_insertion_point(enum_scope:tensorflow.WorkerHealth)
}

