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

package dev.plexapi.sdk.models.operations;

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

/**
 * Tonight - Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install
 */
public enum Tonight {
    ZERO(0L),
    ONE(1L);

    @JsonValue
    private final long value;

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