/**
 * Autogenerated by Thrift Compiler (0.9.1)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package org.apache.curator.generated;


import java.util.Map;
import java.util.HashMap;
import org.apache.thrift.TEnum;

public enum KeeperState implements org.apache.thrift.TEnum {
  Unknown(0),
  Disconnected(1),
  NoSyncConnected(2),
  SyncConnected(3),
  AuthFailed(4),
  ConnectedReadOnly(5),
  SaslAuthenticated(6),
  Expired(7);

  private final int value;

  private KeeperState(int value) {
    this.value = value;
  }

  /**
   * Get the integer value of this enum value, as defined in the Thrift IDL.
   */
  public int getValue() {
    return value;
  }

  /**
   * Find a the enum type by its integer value, as defined in the Thrift IDL.
   * @return null if the value is not found.
   */
  public static KeeperState findByValue(int value) { 
    switch (value) {
      case 0:
        return Unknown;
      case 1:
        return Disconnected;
      case 2:
        return NoSyncConnected;
      case 3:
        return SyncConnected;
      case 4:
        return AuthFailed;
      case 5:
        return ConnectedReadOnly;
      case 6:
        return SaslAuthenticated;
      case 7:
        return Expired;
      default:
        return null;
    }
  }
}
