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

package com.azure.resourcemanager.security.models;

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

/** The operation status code. */
public final class Code extends ExpandableStringEnum<Code> {
    /** Static value Succeeded for Code. */
    public static final Code SUCCEEDED = fromString("Succeeded");

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

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

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

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