<?php
 
 
 

namespace PhpWA\Protocol\Proto\ContextInfo;

use UnexpectedValueException;




class PairedMediaType
{
    


    const NOT_PAIRED_MEDIA = 0;
    


    const SD_VIDEO_PARENT = 1;
    


    const HD_VIDEO_CHILD = 2;
    


    const SD_IMAGE_PARENT = 3;
    


    const HD_IMAGE_CHILD = 4;
    


    const MOTION_PHOTO_PARENT = 5;
    


    const MOTION_PHOTO_CHILD = 6;
    


    const HEVC_VIDEO_PARENT = 7;
    


    const HEVC_VIDEO_CHILD = 8;

    private static $valueToName = [
        self::NOT_PAIRED_MEDIA => 'NOT_PAIRED_MEDIA',
        self::SD_VIDEO_PARENT => 'SD_VIDEO_PARENT',
        self::HD_VIDEO_CHILD => 'HD_VIDEO_CHILD',
        self::SD_IMAGE_PARENT => 'SD_IMAGE_PARENT',
        self::HD_IMAGE_CHILD => 'HD_IMAGE_CHILD',
        self::MOTION_PHOTO_PARENT => 'MOTION_PHOTO_PARENT',
        self::MOTION_PHOTO_CHILD => 'MOTION_PHOTO_CHILD',
        self::HEVC_VIDEO_PARENT => 'HEVC_VIDEO_PARENT',
        self::HEVC_VIDEO_CHILD => 'HEVC_VIDEO_CHILD',
    ];

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

