package net.siegeln.cameleer.saas.provisioning;

public record ServerStatus(
    State state,
    String containerId,
    String error
) {
    public enum State { RUNNING, STOPPED, NOT_FOUND, ERROR }

    public static ServerStatus running(String containerId) {
        return new ServerStatus(State.RUNNING, containerId, null);
    }
    public static ServerStatus stopped(String containerId) {
        return new ServerStatus(State.STOPPED, containerId, null);
    }
    public static ServerStatus notFound() {
        return new ServerStatus(State.NOT_FOUND, null, null);
    }
    public static ServerStatus error(String error) {
        return new ServerStatus(State.ERROR, null, error);
    }
}
