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

namespace Rv\Analytics\Trackedevents;

use UnexpectedValueException;

/**
 * Protobuf type <code>rv.analytics.trackedevents.Codec</code>
 */
class Codec
{
    /**
     * Generated from protobuf enum <code>H264 = 0;</code>
     */
    const H264 = 0;
    /**
     * Generated from protobuf enum <code>H264SOFTWARE = 1;</code>
     */
    const H264SOFTWARE = 1;
    /**
     * Generated from protobuf enum <code>H265 = 2;</code>
     */
    const H265 = 2;
    /**
     * Generated from protobuf enum <code>H265SOFTWARE = 3;</code>
     */
    const H265SOFTWARE = 3;
    /**
     * Generated from protobuf enum <code>PRORES422PROXY = 4;</code>
     */
    const PRORES422PROXY = 4;
    /**
     * Generated from protobuf enum <code>PRORES422LT = 5;</code>
     */
    const PRORES422LT = 5;
    /**
     * Generated from protobuf enum <code>PRORES422 = 6;</code>
     */
    const PRORES422 = 6;
    /**
     * Generated from protobuf enum <code>PRORES422HQ = 7;</code>
     */
    const PRORES422HQ = 7;
    /**
     * Generated from protobuf enum <code>PRORES4444 = 8;</code>
     */
    const PRORES4444 = 8;
    /**
     * Generated from protobuf enum <code>PRORES4444XQ = 9;</code>
     */
    const PRORES4444XQ = 9;
    /**
     * Generated from protobuf enum <code>HAP = 10;</code>
     */
    const HAP = 10;
    /**
     * Generated from protobuf enum <code>HAPALPHA = 11;</code>
     */
    const HAPALPHA = 11;
    /**
     * Generated from protobuf enum <code>NOTCH = 12;</code>
     */
    const NOTCH = 12;
    /**
     * Generated from protobuf enum <code>AUTOMATIC = 13;</code>
     */
    const AUTOMATIC = 13;
    /**
     * Generated from protobuf enum <code>HAPQ = 14;</code>
     */
    const HAPQ = 14;
    /**
     * Generated from protobuf enum <code>HAPQALPHA = 15;</code>
     */
    const HAPQALPHA = 15;

    private static $valueToName = [
        self::H264 => 'H264',
        self::H264SOFTWARE => 'H264SOFTWARE',
        self::H265 => 'H265',
        self::H265SOFTWARE => 'H265SOFTWARE',
        self::PRORES422PROXY => 'PRORES422PROXY',
        self::PRORES422LT => 'PRORES422LT',
        self::PRORES422 => 'PRORES422',
        self::PRORES422HQ => 'PRORES422HQ',
        self::PRORES4444 => 'PRORES4444',
        self::PRORES4444XQ => 'PRORES4444XQ',
        self::HAP => 'HAP',
        self::HAPALPHA => 'HAPALPHA',
        self::NOTCH => 'NOTCH',
        self::AUTOMATIC => 'AUTOMATIC',
        self::HAPQ => 'HAPQ',
        self::HAPQALPHA => 'HAPQALPHA',
    ];

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

