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

package com.azure.resourcemanager.avs.models;

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

/** Placement policy affinity type. */
public final class AffinityType extends ExpandableStringEnum<AffinityType> {
    /** Static value Affinity for AffinityType. */
    public static final AffinityType AFFINITY = fromString("Affinity");

    /** Static value AntiAffinity for AffinityType. */
    public static final AffinityType ANTI_AFFINITY = fromString("AntiAffinity");

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

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

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