<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/gaming/v1/game_server_clusters.proto

namespace Google\Cloud\Gaming\V1\KubernetesClusterState;

use UnexpectedValueException;

/**
 * The state of the installed versions of Agones/Kubernetes. See also
 * https://cloud.google.com/game-servers/docs/versions-and-upgrades.
 *
 * Protobuf type <code>google.cloud.gaming.v1.KubernetesClusterState.InstallationState</code>
 */
class InstallationState
{
    /**
     * The default value. This value is used if the state is omitted.
     *
     * Generated from protobuf enum <code>INSTALLATION_STATE_UNSPECIFIED = 0;</code>
     */
    const INSTALLATION_STATE_UNSPECIFIED = 0;
    /**
     * The combination of Agones and Kubernetes versions is supported by Google
     * Cloud Game Servers.
     *
     * Generated from protobuf enum <code>AGONES_KUBERNETES_VERSION_SUPPORTED = 1;</code>
     */
    const AGONES_KUBERNETES_VERSION_SUPPORTED = 1;
    /**
     * The installed version of Agones is not supported by Google Cloud Game
     * Servers.
     *
     * Generated from protobuf enum <code>AGONES_VERSION_UNSUPPORTED = 2;</code>
     */
    const AGONES_VERSION_UNSUPPORTED = 2;
    /**
     * The installed version of Agones is supported by Google Cloud Game
     * Servers, but the installed version of Kubernetes is not recommended or
     * supported by the version of Agones.
     *
     * Generated from protobuf enum <code>AGONES_KUBERNETES_VERSION_UNSUPPORTED = 3;</code>
     */
    const AGONES_KUBERNETES_VERSION_UNSUPPORTED = 3;
    /**
     * The installed version of Agones is not recognized because the Agones
     * controller's image name does not have a version string reported as
     * {major}.{minor}(.{patch}).
     *
     * Generated from protobuf enum <code>AGONES_VERSION_UNRECOGNIZED = 4;</code>
     */
    const AGONES_VERSION_UNRECOGNIZED = 4;
    /**
     * The server version of Kubernetes cluster is not recognized because the
     * API server didn't return parsable version info on path/version.
     *
     * Generated from protobuf enum <code>KUBERNETES_VERSION_UNRECOGNIZED = 5;</code>
     */
    const KUBERNETES_VERSION_UNRECOGNIZED = 5;
    /**
     * Failed to read or verify the version of Agones or Kubernetes. See
     * version_installed_error_message for details.
     *
     * Generated from protobuf enum <code>VERSION_VERIFICATION_FAILED = 6;</code>
     */
    const VERSION_VERIFICATION_FAILED = 6;
    /**
     * Agones is not installed.
     *
     * Generated from protobuf enum <code>AGONES_NOT_INSTALLED = 7;</code>
     */
    const AGONES_NOT_INSTALLED = 7;

    private static $valueToName = [
        self::INSTALLATION_STATE_UNSPECIFIED => 'INSTALLATION_STATE_UNSPECIFIED',
        self::AGONES_KUBERNETES_VERSION_SUPPORTED => 'AGONES_KUBERNETES_VERSION_SUPPORTED',
        self::AGONES_VERSION_UNSUPPORTED => 'AGONES_VERSION_UNSUPPORTED',
        self::AGONES_KUBERNETES_VERSION_UNSUPPORTED => 'AGONES_KUBERNETES_VERSION_UNSUPPORTED',
        self::AGONES_VERSION_UNRECOGNIZED => 'AGONES_VERSION_UNRECOGNIZED',
        self::KUBERNETES_VERSION_UNRECOGNIZED => 'KUBERNETES_VERSION_UNRECOGNIZED',
        self::VERSION_VERIFICATION_FAILED => 'VERSION_VERIFICATION_FAILED',
        self::AGONES_NOT_INSTALLED => 'AGONES_NOT_INSTALLED',
    ];

    public static function name($value)
    {
        if (!isset(self::$valueToName[$value])) {
            throw new UnexpectedValueException(sprintf(
                    'Enum %s has no name defined for value %s', __CLASS__, $value));
        }
        return self::$valueToName[$value];
    }


    public static function value($name)
    {
        $const = __CLASS__ . '::' . strtoupper($name);
        if (!defined($const)) {
            throw new UnexpectedValueException(sprintf(
                    'Enum %s has no value defined for name %s', __CLASS__, $name));
        }
        return constant($const);
    }
}


