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

namespace Rv\Analytics\Startup\Output;

use UnexpectedValueException;

/**
 * Protobuf type <code>rv.analytics.startup.Output.Alignment</code>
 */
class Alignment
{
    /**
     * Generated from protobuf enum <code>ALIGNMENT_UNKNOWN = 0;</code>
     */
    const ALIGNMENT_UNKNOWN = 0;
    /**
     * Generated from protobuf enum <code>FULL = 1;</code>
     */
    const FULL = 1;
    /**
     * Generated from protobuf enum <code>_2X1 = 2;</code>
     */
    const _2X1 = 2;
    /**
     * Generated from protobuf enum <code>_3X1 = 3;</code>
     */
    const _3X1 = 3;
    /**
     * Generated from protobuf enum <code>_2X2 = 4;</code>
     */
    const _2X2 = 4;
    /**
     * Generated from protobuf enum <code>CUSTOM = 5;</code>
     */
    const CUSTOM = 5;

    private static $valueToName = [
        self::ALIGNMENT_UNKNOWN => 'ALIGNMENT_UNKNOWN',
        self::FULL => 'FULL',
        self::_2X1 => '_2X1',
        self::_3X1 => '_3X1',
        self::_2X2 => '_2X2',
        self::CUSTOM => 'CUSTOM',
    ];

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

