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

package com.azure.resourcemanager.deviceprovisioningservices.models;

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

/** Defines values for AllocationPolicy. */
public final class AllocationPolicy extends ExpandableStringEnum<AllocationPolicy> {
    /** Static value Hashed for AllocationPolicy. */
    public static final AllocationPolicy HASHED = fromString("Hashed");

    /** Static value GeoLatency for AllocationPolicy. */
    public static final AllocationPolicy GEO_LATENCY = fromString("GeoLatency");

    /** Static value Static for AllocationPolicy. */
    public static final AllocationPolicy STATIC = fromString("Static");

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

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