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

dev.fitko.fitconnect.api.domain.zbp.message.AuthenticationLevel Maven / Gradle / Ivy

Go to download

Library that provides client access to the FIT-Connect api-endpoints for sending, subscribing and routing

The newest version!
package dev.fitko.fitconnect.api.domain.zbp.message;

import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;

import java.util.Arrays;

/**
 * Representation of the STORK-QAA-Levels
 */
@Getter
public enum AuthenticationLevel {

    /**
     * Basisregistrierung
     */
    ONE(1),

    /**
     * Niedrig
     */
    TWO(2),

    /**
     * Substantiell
     */
    THREE(3),

    /**
     * Hoch
     */
    FOUR(4);

    @JsonValue
    private final int level;

    AuthenticationLevel(int level) {
        this.level = level;
    }

    public static AuthenticationLevel fromInt(int level){
        return Arrays.stream(values())
                .filter(a -> a.getLevel() == level)
                .findFirst()
                .orElseThrow(() -> new IllegalArgumentException("AuthenticationLevel not available"));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy