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

package com.azure.resourcemanager.frontdoor.models;

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

/** Defines the action to take on rule match. */
public final class ActionType extends ExpandableStringEnum<ActionType> {
    /** Static value Allow for ActionType. */
    public static final ActionType ALLOW = fromString("Allow");

    /** Static value Block for ActionType. */
    public static final ActionType BLOCK = fromString("Block");

    /** Static value Log for ActionType. */
    public static final ActionType LOG = fromString("Log");

    /** Static value Redirect for ActionType. */
    public static final ActionType REDIRECT = fromString("Redirect");

    /** Static value AnomalyScoring for ActionType. */
    public static final ActionType ANOMALY_SCORING = fromString("AnomalyScoring");

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

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

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