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

package com.azure.resourcemanager.datamigration.models;

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

/** The state of the command. This is ignored if submitted. */
public final class CommandState extends ExpandableStringEnum<CommandState> {
    /** Static value Unknown for CommandState. */
    public static final CommandState UNKNOWN = fromString("Unknown");

    /** Static value Accepted for CommandState. */
    public static final CommandState ACCEPTED = fromString("Accepted");

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

    /** Static value Succeeded for CommandState. */
    public static final CommandState SUCCEEDED = fromString("Succeeded");

    /** Static value Failed for CommandState. */
    public static final CommandState FAILED = fromString("Failed");

    /**
     * Creates a new instance of CommandState value.
     *
     * @deprecated Use the {@link #fromString(String)} factory method.
     */
    @Deprecated
    public CommandState() {
    }

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

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