All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ocpp.v20.ResetEnum Maven / Gradle / Ivy


package ocpp.v20;

import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;


/**
 * This contains the type of reset that the Charging Station or EVSE should perform.
 * 
 * 
 */
public enum ResetEnum {

    IMMEDIATE("Immediate"),
    ON_IDLE("OnIdle");
    private final String value;
    private final static Map CONSTANTS = new HashMap();

    static {
        for (ResetEnum c: values()) {
            CONSTANTS.put(c.value, c);
        }
    }

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

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

    @JsonValue
    public String value() {
        return this.value;
    }

    @JsonCreator
    public static ResetEnum fromValue(String value) {
        ResetEnum constant = CONSTANTS.get(value);
        if (constant == null) {
            throw new IllegalArgumentException(value);
        } else {
            return constant;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy