/*
 * ThingPark things management Devices API
 * REST interface for Devices management. 
 *
 * The version of the OpenAPI document: 7.3
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

package lora.ns.actility.api.model.device;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * Device health state: - INIT: The device has been created or resumed after
 * suspension, but has not yet communicated with the network server since then -
 * ACTIVE: The device is connected to the network, transmitting and receiving
 * packets - RF_CNX_ERROR: The device has lost its network connection -
 * SUSPENDED: The device has been suspended, all its packets are ignored by the
 * network server
 */
public enum DeviceHealthState {

  INIT("INIT"),

  ACTIVE("ACTIVE"),

  RF_CNX_ERROR("RF_CNX_ERROR"),

  SUSPENDED("SUSPENDED");

  private String value;

  DeviceHealthState(String value) {
    this.value = value;
  }

  @JsonValue
  public String getValue() {
    return value;
  }

  @Override
  public String toString() {
    return String.valueOf(value);
  }

  @JsonCreator
  public static DeviceHealthState fromValue(String value) {
    for (DeviceHealthState b : DeviceHealthState.values()) {
      if (b.value.equals(value)) {
        return b;
      }
    }
    throw new IllegalArgumentException("Unexpected value '" + value + "'");
  }
}
