/*
 * Jellyfin API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 10.11.6
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

package org.openhab.binding.jellyfin.internal.gen.current.model;

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

/**
 * Enum PlaybackRequestType.
 */
public enum PlaybackRequestType {
    BUFFER("Buffer"),
    IGNORE_WAIT("IgnoreWait"),
    MOVE_PLAYLIST_ITEM("MovePlaylistItem"),
    NEXT_ITEM("NextItem"),
    PAUSE("Pause"),
    PING("Ping"),
    PLAY("Play"),
    PREVIOUS_ITEM("PreviousItem"),
    QUEUE("Queue"),
    READY("Ready"),
    REMOVE_FROM_PLAYLIST("RemoveFromPlaylist"),
    SEEK("Seek"),
    SET_PLAYLIST_ITEM("SetPlaylistItem"),
    SET_REPEAT_MODE("SetRepeatMode"),
    SET_SHUFFLE_MODE("SetShuffleMode"),
    STOP("Stop"),
    UNPAUSE("Unpause");

    private String value;

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

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

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

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

    /**
     * Convert the instance into URL query string.
     *
     * @param prefix prefix of the query string
     * @return URL query string
     */
    public String toUrlQueryString(String prefix) {
        if (prefix == null) {
            prefix = "";
        }

        return String.format(java.util.Locale.ROOT, "%s=%s", prefix, this.toString());
    }
}
