<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: analyticsCapture.proto

namespace Rv\Analytics\Capture;

use UnexpectedValueException;

/**
 * Protobuf type <code>rv.analytics.Capture.Codec</code>
 */
class Codec
{
    /**
     * Generated from protobuf enum <code>CODEC_UNKNOWN = 0;</code>
     */
    const CODEC_UNKNOWN = 0;
    /**
     * Generated from protobuf enum <code>CODEC_AUTOMATIC = 1;</code>
     */
    const CODEC_AUTOMATIC = 1;
    /**
     * Generated from protobuf enum <code>CODEC_H264 = 2;</code>
     */
    const CODEC_H264 = 2;
    /**
     * Generated from protobuf enum <code>CODEC_H264_SOFTWARE = 3;</code>
     */
    const CODEC_H264_SOFTWARE = 3;
    /**
     * Generated from protobuf enum <code>CODEC_H265 = 4;</code>
     */
    const CODEC_H265 = 4;
    /**
     * Generated from protobuf enum <code>CODEC_H265_SOFTWARE = 5;</code>
     */
    const CODEC_H265_SOFTWARE = 5;
    /**
     * Generated from protobuf enum <code>CODEC_PRORES_422_PROXY = 6;</code>
     */
    const CODEC_PRORES_422_PROXY = 6;
    /**
     * Generated from protobuf enum <code>CODEC_PRORES_422_LT = 7;</code>
     */
    const CODEC_PRORES_422_LT = 7;
    /**
     * Generated from protobuf enum <code>CODEC_PRORES_422 = 8;</code>
     */
    const CODEC_PRORES_422 = 8;
    /**
     * Generated from protobuf enum <code>CODEC_PRORES_422_HQ = 9;</code>
     */
    const CODEC_PRORES_422_HQ = 9;
    /**
     * Generated from protobuf enum <code>CODEC_PRORES_4444 = 10;</code>
     */
    const CODEC_PRORES_4444 = 10;
    /**
     * Generated from protobuf enum <code>CODEC_PRORES_4444_XQ = 11;</code>
     */
    const CODEC_PRORES_4444_XQ = 11;
    /**
     * Generated from protobuf enum <code>CODEC_HAP = 12;</code>
     */
    const CODEC_HAP = 12;
    /**
     * Generated from protobuf enum <code>CODEC_HAP_ALPHA = 13;</code>
     */
    const CODEC_HAP_ALPHA = 13;
    /**
     * Generated from protobuf enum <code>CODEC_HAP_Q = 14;</code>
     */
    const CODEC_HAP_Q = 14;
    /**
     * Generated from protobuf enum <code>CODEC_HAP_Q_ALPHA = 15;</code>
     */
    const CODEC_HAP_Q_ALPHA = 15;
    /**
     * Generated from protobuf enum <code>CODEC_NOTCH = 16;</code>
     */
    const CODEC_NOTCH = 16;

    private static $valueToName = [
        self::CODEC_UNKNOWN => 'CODEC_UNKNOWN',
        self::CODEC_AUTOMATIC => 'CODEC_AUTOMATIC',
        self::CODEC_H264 => 'CODEC_H264',
        self::CODEC_H264_SOFTWARE => 'CODEC_H264_SOFTWARE',
        self::CODEC_H265 => 'CODEC_H265',
        self::CODEC_H265_SOFTWARE => 'CODEC_H265_SOFTWARE',
        self::CODEC_PRORES_422_PROXY => 'CODEC_PRORES_422_PROXY',
        self::CODEC_PRORES_422_LT => 'CODEC_PRORES_422_LT',
        self::CODEC_PRORES_422 => 'CODEC_PRORES_422',
        self::CODEC_PRORES_422_HQ => 'CODEC_PRORES_422_HQ',
        self::CODEC_PRORES_4444 => 'CODEC_PRORES_4444',
        self::CODEC_PRORES_4444_XQ => 'CODEC_PRORES_4444_XQ',
        self::CODEC_HAP => 'CODEC_HAP',
        self::CODEC_HAP_ALPHA => 'CODEC_HAP_ALPHA',
        self::CODEC_HAP_Q => 'CODEC_HAP_Q',
        self::CODEC_HAP_Q_ALPHA => 'CODEC_HAP_Q_ALPHA',
        self::CODEC_NOTCH => 'CODEC_NOTCH',
    ];

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

