package io.delphiplatform.api.v3.model.video;

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

/**
 * The slug name of a video DSP. This is a lowercase value that is the same as the `dsp_id`.
 */
public enum VideoDspSlug {

    YOUTUBE("youtube");

    private final String value;

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

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

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

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

