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

package com.azure.resourcemanager.servicefabric.models;

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

/**
 * The current state of the cluster.
 *
 * <p>- WaitingForNodes - Indicates that the cluster resource is created and the resource provider is waiting for
 * Service Fabric VM extension to boot up and report to it. - Deploying - Indicates that the Service Fabric runtime is
 * being installed on the VMs. Cluster resource will be in this state until the cluster boots up and system services are
 * up. - BaselineUpgrade - Indicates that the cluster is upgrading to establishes the cluster version. This upgrade is
 * automatically initiated when the cluster boots up for the first time. - UpdatingUserConfiguration - Indicates that
 * the cluster is being upgraded with the user provided configuration. - UpdatingUserCertificate - Indicates that the
 * cluster is being upgraded with the user provided certificate. - UpdatingInfrastructure - Indicates that the cluster
 * is being upgraded with the latest Service Fabric runtime version. This happens only when the **upgradeMode** is set
 * to 'Automatic'. - EnforcingClusterVersion - Indicates that cluster is on a different version than expected and the
 * cluster is being upgraded to the expected version. - UpgradeServiceUnreachable - Indicates that the system service in
 * the cluster is no longer polling the Resource Provider. Clusters in this state cannot be managed by the Resource
 * Provider. - AutoScale - Indicates that the ReliabilityLevel of the cluster is being adjusted. - Ready - Indicates
 * that the cluster is in a stable state.
 */
public final class ClusterState extends ExpandableStringEnum<ClusterState> {
    /** Static value WaitingForNodes for ClusterState. */
    public static final ClusterState WAITING_FOR_NODES = fromString("WaitingForNodes");

    /** Static value Deploying for ClusterState. */
    public static final ClusterState DEPLOYING = fromString("Deploying");

    /** Static value BaselineUpgrade for ClusterState. */
    public static final ClusterState BASELINE_UPGRADE = fromString("BaselineUpgrade");

    /** Static value UpdatingUserConfiguration for ClusterState. */
    public static final ClusterState UPDATING_USER_CONFIGURATION = fromString("UpdatingUserConfiguration");

    /** Static value UpdatingUserCertificate for ClusterState. */
    public static final ClusterState UPDATING_USER_CERTIFICATE = fromString("UpdatingUserCertificate");

    /** Static value UpdatingInfrastructure for ClusterState. */
    public static final ClusterState UPDATING_INFRASTRUCTURE = fromString("UpdatingInfrastructure");

    /** Static value EnforcingClusterVersion for ClusterState. */
    public static final ClusterState ENFORCING_CLUSTER_VERSION = fromString("EnforcingClusterVersion");

    /** Static value UpgradeServiceUnreachable for ClusterState. */
    public static final ClusterState UPGRADE_SERVICE_UNREACHABLE = fromString("UpgradeServiceUnreachable");

    /** Static value AutoScale for ClusterState. */
    public static final ClusterState AUTO_SCALE = fromString("AutoScale");

    /** Static value Ready for ClusterState. */
    public static final ClusterState READY = fromString("Ready");

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

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

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