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

namespace Google\Cloud\Deploy\V1;

use UnexpectedValueException;

/**
 * The support state of a specific Skaffold version.
 *
 * Protobuf type <code>google.cloud.deploy.v1.SkaffoldSupportState</code>
 */
class SkaffoldSupportState
{
    /**
     * Default value. This value is unused.
     *
     * Generated from protobuf enum <code>SKAFFOLD_SUPPORT_STATE_UNSPECIFIED = 0;</code>
     */
    const SKAFFOLD_SUPPORT_STATE_UNSPECIFIED = 0;
    /**
     * This Skaffold version is currently supported.
     *
     * Generated from protobuf enum <code>SKAFFOLD_SUPPORT_STATE_SUPPORTED = 1;</code>
     */
    const SKAFFOLD_SUPPORT_STATE_SUPPORTED = 1;
    /**
     * This Skaffold version is in maintenance mode.
     *
     * Generated from protobuf enum <code>SKAFFOLD_SUPPORT_STATE_MAINTENANCE_MODE = 2;</code>
     */
    const SKAFFOLD_SUPPORT_STATE_MAINTENANCE_MODE = 2;
    /**
     * This Skaffold version is no longer supported.
     *
     * Generated from protobuf enum <code>SKAFFOLD_SUPPORT_STATE_UNSUPPORTED = 3;</code>
     */
    const SKAFFOLD_SUPPORT_STATE_UNSUPPORTED = 3;

    private static $valueToName = [
        self::SKAFFOLD_SUPPORT_STATE_UNSPECIFIED => 'SKAFFOLD_SUPPORT_STATE_UNSPECIFIED',
        self::SKAFFOLD_SUPPORT_STATE_SUPPORTED => 'SKAFFOLD_SUPPORT_STATE_SUPPORTED',
        self::SKAFFOLD_SUPPORT_STATE_MAINTENANCE_MODE => 'SKAFFOLD_SUPPORT_STATE_MAINTENANCE_MODE',
        self::SKAFFOLD_SUPPORT_STATE_UNSUPPORTED => 'SKAFFOLD_SUPPORT_STATE_UNSUPPORTED',
    ];

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

