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

package com.azure.resourcemanager.desktopvirtualization.models;

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

/** Specifies when to stop hosts during ramp down period. */
public final class StopHostsWhen extends ExpandableStringEnum<StopHostsWhen> {
    /** Static value ZeroSessions for StopHostsWhen. */
    public static final StopHostsWhen ZERO_SESSIONS = fromString("ZeroSessions");

    /** Static value ZeroActiveSessions for StopHostsWhen. */
    public static final StopHostsWhen ZERO_ACTIVE_SESSIONS = fromString("ZeroActiveSessions");

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

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

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