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

package com.azure.resourcemanager.storagecache.models;

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

/** This setting determines how the cache gets username and group names for clients. */
public final class UsernameSource extends ExpandableStringEnum<UsernameSource> {
    /** Static value AD for UsernameSource. */
    public static final UsernameSource AD = fromString("AD");

    /** Static value LDAP for UsernameSource. */
    public static final UsernameSource LDAP = fromString("LDAP");

    /** Static value File for UsernameSource. */
    public static final UsernameSource FILE = fromString("File");

    /** Static value None for UsernameSource. */
    public static final UsernameSource NONE = fromString("None");

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

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

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