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

package com.azure.resourcemanager.redisenterprise.models;

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

/** Sets the frequency at which data is written to disk. */
public final class AofFrequency extends ExpandableStringEnum<AofFrequency> {
    /** Static value 1s for AofFrequency. */
    public static final AofFrequency ONES = fromString("1s");

    /** Static value always for AofFrequency. */
    public static final AofFrequency ALWAYS = fromString("always");

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

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

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