<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/dataflow/v1beta3/jobs.proto

namespace Google\Cloud\Dataflow\V1beta3\SdkVersion;

use UnexpectedValueException;

/**
 * The support status of the SDK used to run the job.
 *
 * Protobuf type <code>google.dataflow.v1beta3.SdkVersion.SdkSupportStatus</code>
 */
class SdkSupportStatus
{
    /**
     * Cloud Dataflow is unaware of this version.
     *
     * Generated from protobuf enum <code>UNKNOWN = 0;</code>
     */
    const UNKNOWN = 0;
    /**
     * This is a known version of an SDK, and is supported.
     *
     * Generated from protobuf enum <code>SUPPORTED = 1;</code>
     */
    const SUPPORTED = 1;
    /**
     * A newer version of the SDK family exists, and an update is recommended.
     *
     * Generated from protobuf enum <code>STALE = 2;</code>
     */
    const STALE = 2;
    /**
     * This version of the SDK is deprecated and will eventually be
     * unsupported.
     *
     * Generated from protobuf enum <code>DEPRECATED = 3;</code>
     */
    const DEPRECATED = 3;
    /**
     * Support for this SDK version has ended and it should no longer be used.
     *
     * Generated from protobuf enum <code>UNSUPPORTED = 4;</code>
     */
    const UNSUPPORTED = 4;

    private static $valueToName = [
        self::UNKNOWN => 'UNKNOWN',
        self::SUPPORTED => 'SUPPORTED',
        self::STALE => 'STALE',
        self::DEPRECATED => 'DEPRECATED',
        self::UNSUPPORTED => '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);
    }
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SdkSupportStatus::class, \Google\Cloud\Dataflow\V1beta3\SdkVersion_SdkSupportStatus::class);

