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

namespace Google\Cloud\Container\V1\NodePoolUpgradeInfo;

use UnexpectedValueException;

/**
 * AutoUpgradePausedReason indicates the reason for auto upgrade paused
 * status.
 *
 * Protobuf type <code>google.container.v1.NodePoolUpgradeInfo.AutoUpgradePausedReason</code>
 */
class AutoUpgradePausedReason
{
    /**
     * AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED indicates an unspecified reason.
     *
     * Generated from protobuf enum <code>AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED = 0;</code>
     */
    const AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED = 0;
    /**
     * MAINTENANCE_WINDOW indicates the cluster is outside customer maintenance
     * window.
     *
     * Generated from protobuf enum <code>MAINTENANCE_WINDOW = 1;</code>
     */
    const MAINTENANCE_WINDOW = 1;
    /**
     * MAINTENANCE_EXCLUSION_NO_UPGRADES indicates the cluster is in a
     * maintenance exclusion with scope NO_UPGRADES.
     *
     * Generated from protobuf enum <code>MAINTENANCE_EXCLUSION_NO_UPGRADES = 2;</code>
     */
    const MAINTENANCE_EXCLUSION_NO_UPGRADES = 2;
    /**
     * MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES indicates the cluster is in a
     * maintenance exclusion with scope NO_MINOR_UPGRADES.
     *
     * Generated from protobuf enum <code>MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES = 3;</code>
     */
    const MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES = 3;
    /**
     * SYSTEM_CONFIG indicates the cluster upgrade is paused by system config.
     *
     * Generated from protobuf enum <code>SYSTEM_CONFIG = 4;</code>
     */
    const SYSTEM_CONFIG = 4;

    private static $valueToName = [
        self::AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED => 'AUTO_UPGRADE_PAUSED_REASON_UNSPECIFIED',
        self::MAINTENANCE_WINDOW => 'MAINTENANCE_WINDOW',
        self::MAINTENANCE_EXCLUSION_NO_UPGRADES => 'MAINTENANCE_EXCLUSION_NO_UPGRADES',
        self::MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES => 'MAINTENANCE_EXCLUSION_NO_MINOR_UPGRADES',
        self::SYSTEM_CONFIG => 'SYSTEM_CONFIG',
    ];

    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);
    }
}


