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

package com.azure.resourcemanager.networkcloud.models;

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

/**
 * The IP allocation mechanism for the virtual machine. Dynamic and Static are only valid for l3Network which may also
 * specify Disabled. Otherwise, Disabled is the only permitted value.
 */
public final class VirtualMachineIpAllocationMethod extends ExpandableStringEnum<VirtualMachineIpAllocationMethod> {
    /** Static value Dynamic for VirtualMachineIpAllocationMethod. */
    public static final VirtualMachineIpAllocationMethod DYNAMIC = fromString("Dynamic");

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

    /** Static value Disabled for VirtualMachineIpAllocationMethod. */
    public static final VirtualMachineIpAllocationMethod DISABLED = fromString("Disabled");

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

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

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