// 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 task. This is ignored if submitted. */
public final class TaskState extends ExpandableStringEnum<TaskState> {
    /** Static value Unknown for TaskState. */
    public static final TaskState UNKNOWN = fromString("Unknown");

    /** Static value Queued for TaskState. */
    public static final TaskState QUEUED = fromString("Queued");

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

    /** Static value Canceled for TaskState. */
    public static final TaskState CANCELED = fromString("Canceled");

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

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

    /** Static value FailedInputValidation for TaskState. */
    public static final TaskState FAILED_INPUT_VALIDATION = fromString("FailedInputValidation");

    /** Static value Faulted for TaskState. */
    public static final TaskState FAULTED = fromString("Faulted");

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

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

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