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

package com.azure.resourcemanager.timeseriesinsights.models;

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

/** A role defining the data plane operations that a principal can perform on a Time Series Insights client. */
public final class AccessPolicyRole extends ExpandableStringEnum<AccessPolicyRole> {
    /** Static value Reader for AccessPolicyRole. */
    public static final AccessPolicyRole READER = fromString("Reader");

    /** Static value Contributor for AccessPolicyRole. */
    public static final AccessPolicyRole CONTRIBUTOR = fromString("Contributor");

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

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

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