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

package org.tensorflow.proto.data;

/**
 * <pre>
 * Represents how to handle external state during serialization.
 * </pre>
 *
 * Protobuf enum {@code tensorflow.data.ExternalStatePolicy}
 */
public enum ExternalStatePolicy
    implements com.google.protobuf.ProtocolMessageEnum {
  /**
   * <code>POLICY_WARN = 0;</code>
   */
  POLICY_WARN(0),
  /**
   * <code>POLICY_IGNORE = 1;</code>
   */
  POLICY_IGNORE(1),
  /**
   * <code>POLICY_FAIL = 2;</code>
   */
  POLICY_FAIL(2),
  UNRECOGNIZED(-1),
  ;

  /**
   * <code>POLICY_WARN = 0;</code>
   */
  public static final int POLICY_WARN_VALUE = 0;
  /**
   * <code>POLICY_IGNORE = 1;</code>
   */
  public static final int POLICY_IGNORE_VALUE = 1;
  /**
   * <code>POLICY_FAIL = 2;</code>
   */
  public static final int POLICY_FAIL_VALUE = 2;


  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 ExternalStatePolicy valueOf(int value) {
    return forNumber(value);
  }

  public static ExternalStatePolicy forNumber(int value) {
    switch (value) {
      case 0: return POLICY_WARN;
      case 1: return POLICY_IGNORE;
      case 2: return POLICY_FAIL;
      default: return null;
    }
  }

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

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

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

  // @@protoc_insertion_point(enum_scope:tensorflow.data.ExternalStatePolicy)
}

