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

package com.azure.resourcemanager.sqlvirtualmachine.models;

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

/** Replica failover mode in availability group. */
public final class Failover extends ExpandableStringEnum<Failover> {
    /** Static value AUTOMATIC for Failover. */
    public static final Failover AUTOMATIC = fromString("AUTOMATIC");

    /** Static value MANUAL for Failover. */
    public static final Failover MANUAL = fromString("MANUAL");

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

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

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