// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.machinelearningservices.models;

import com.azure.core.util.ExpandableStringEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;

/** Defines values for NodeState. */
public final class NodeState extends ExpandableStringEnum<NodeState> {
    /** Static value idle for NodeState. */
    public static final NodeState IDLE = fromString("idle");

    /** Static value running for NodeState. */
    public static final NodeState RUNNING = fromString("running");

    /** Static value preparing for NodeState. */
    public static final NodeState PREPARING = fromString("preparing");

    /** Static value unusable for NodeState. */
    public static final NodeState UNUSABLE = fromString("unusable");

    /** Static value leaving for NodeState. */
    public static final NodeState LEAVING = fromString("leaving");

    /** Static value preempted for NodeState. */
    public static final NodeState PREEMPTED = fromString("preempted");

    /**
     * Creates or finds a NodeState from its string representation.
     *
     * @param name a name to look for.
     * @return the corresponding NodeState.
     */
    @JsonCreator
    public static NodeState fromString(String name) {
        return fromString(name, NodeState.class);
    }

    /** @return known NodeState values. */
    public static Collection<NodeState> values() {
        return values(NodeState.class);
    }
}
