/**
   * Enum for value.
   *
   * @param value the value
   * @return the meter status enum
   */
  public static DeviceStateEnum enumForValue(Integer value) {
    for (DeviceStateEnum e : values()) {
      if (e.getValue().equals(value)) {
        return e;
      }
    }

    return null;
  }
  /**
   * Gets the valid values.
   *
   * @return the valid values
   */
  public static String getValidValues() {
    DeviceStateEnum[] enums = DeviceStateEnum.class.getEnumConstants();

    String comma = "";
    StringBuilder enumValue = new StringBuilder();
    for (DeviceStateEnum i : enums) {
      enumValue.append(comma + i.getValue());
      comma = ", ";
    }
    return enumValue.toString();
  }