// 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 readable secondary mode in availability group. */
public final class ReadableSecondary extends ExpandableStringEnum<ReadableSecondary> {
    /** Static value NO for ReadableSecondary. */
    public static final ReadableSecondary NO = fromString("NO");

    /** Static value ALL for ReadableSecondary. */
    public static final ReadableSecondary ALL = fromString("ALL");

    /** Static value READ_ONLY for ReadableSecondary. */
    public static final ReadableSecondary READ_ONLY = fromString("READ_ONLY");

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

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

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