/* 
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */

package dev.plexapi.sdk.models.operations;

import com.fasterxml.jackson.annotation.JsonValue;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;

/**
 * GetLibraryItemsDefaultDirection - The direction of the sort. Can be either `asc` or `desc`.
 * 
 */
public enum GetLibraryItemsDefaultDirection {
    Ascending("asc"),
    Descending("desc");

    @JsonValue
    private final String value;

    private GetLibraryItemsDefaultDirection(String value) {
        this.value = value;
    }
    
    public String value() {
        return value;
    }
    
    public static Optional<GetLibraryItemsDefaultDirection> fromValue(String value) {
        for (GetLibraryItemsDefaultDirection o: GetLibraryItemsDefaultDirection.values()) {
            if (Objects.deepEquals(o.value, value)) {
                return Optional.of(o);
            }
        }
        return Optional.empty();
    }
}
