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

io.swagger.models.Scheme Maven / Gradle / Ivy

The newest version!
package io.swagger.models;

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

public enum Scheme {
    HTTP("http"),
    HTTPS("https"),
    WS("ws"),
    WSS("wss");

    private final String value;

    private Scheme(String value) {
        this.value = value;
    }

    @JsonCreator
    public static Scheme forValue(String value) {
        for (Scheme item : Scheme.values()) {
            if (item.toValue().equalsIgnoreCase(value)) {
                return item;
            }
        }
        return null;
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy