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

package com.azure.resourcemanager.appcontainers.models;

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

/** Sticky Session Affinity. */
public final class Affinity extends ExpandableStringEnum<Affinity> {
    /** Static value sticky for Affinity. */
    public static final Affinity STICKY = fromString("sticky");

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

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

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

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