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

namespace Google\Cloud\Video\Transcoder\V1\Manifest;

use UnexpectedValueException;

/**
 * The manifest type can be either `HLS` or `DASH`.
 *
 * Protobuf type <code>google.cloud.video.transcoder.v1.Manifest.ManifestType</code>
 */
class ManifestType
{
    /**
     * The manifest type is not specified.
     *
     * Generated from protobuf enum <code>MANIFEST_TYPE_UNSPECIFIED = 0;</code>
     */
    const MANIFEST_TYPE_UNSPECIFIED = 0;
    /**
     * Create `HLS` manifest. The corresponding file extension is `.m3u8`.
     *
     * Generated from protobuf enum <code>HLS = 1;</code>
     */
    const HLS = 1;
    /**
     * Create `DASH` manifest. The corresponding file extension is `.mpd`.
     *
     * Generated from protobuf enum <code>DASH = 2;</code>
     */
    const DASH = 2;

    private static $valueToName = [
        self::MANIFEST_TYPE_UNSPECIFIED => 'MANIFEST_TYPE_UNSPECIFIED',
        self::HLS => 'HLS',
        self::DASH => 'DASH',
    ];

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


