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

package org.tensorflow.proto.util;

/**
 * <pre>
 * Indicates the behavior of the worker when an internal error or shutdown
 * signal is received.
 * </pre>
 *
 * Protobuf enum {@code tensorflow.WorkerShutdownMode}
 */
public enum WorkerShutdownMode
    implements com.google.protobuf.ProtocolMessageEnum {
  /**
   * <code>DEFAULT = 0;</code>
   */
  DEFAULT(0),
  /**
   * <code>NOT_CONFIGURED = 1;</code>
   */
  NOT_CONFIGURED(1),
  /**
   * <code>WAIT_FOR_COORDINATOR = 2;</code>
   */
  WAIT_FOR_COORDINATOR(2),
  /**
   * <code>SHUTDOWN_AFTER_TIMEOUT = 3;</code>
   */
  SHUTDOWN_AFTER_TIMEOUT(3),
  UNRECOGNIZED(-1),
  ;

  /**
   * <code>DEFAULT = 0;</code>
   */
  public static final int DEFAULT_VALUE = 0;
  /**
   * <code>NOT_CONFIGURED = 1;</code>
   */
  public static final int NOT_CONFIGURED_VALUE = 1;
  /**
   * <code>WAIT_FOR_COORDINATOR = 2;</code>
   */
  public static final int WAIT_FOR_COORDINATOR_VALUE = 2;
  /**
   * <code>SHUTDOWN_AFTER_TIMEOUT = 3;</code>
   */
  public static final int SHUTDOWN_AFTER_TIMEOUT_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 WorkerShutdownMode valueOf(int value) {
    return forNumber(value);
  }

  public static WorkerShutdownMode forNumber(int value) {
    switch (value) {
      case 0: return DEFAULT;
      case 1: return NOT_CONFIGURED;
      case 2: return WAIT_FOR_COORDINATOR;
      case 3: return SHUTDOWN_AFTER_TIMEOUT;
      default: return null;
    }
  }

  public static com.google.protobuf.Internal.EnumLiteMap<WorkerShutdownMode>
      internalGetValueMap() {
    return internalValueMap;
  }
  private static final com.google.protobuf.Internal.EnumLiteMap<
      WorkerShutdownMode> internalValueMap =
        new com.google.protobuf.Internal.EnumLiteMap<WorkerShutdownMode>() {
          public WorkerShutdownMode findValueByNumber(int number) {
            return WorkerShutdownMode.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(1);
  }

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

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

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

