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

namespace Rv\Analytics\Startup\ScreenConfiguration\Output;

use UnexpectedValueException;

/**
 * Protobuf type <code>rv.analytics.Startup.ScreenConfiguration.Output.Alignment</code>
 */
class Alignment
{
    /**
     * Generated from protobuf enum <code>ALIGNMENT_UNKNOWN = 0;</code>
     */
    const ALIGNMENT_UNKNOWN = 0;
    /**
     * Generated from protobuf enum <code>ALIGNMENT_FULL = 1;</code>
     */
    const ALIGNMENT_FULL = 1;
    /**
     * Generated from protobuf enum <code>ALIGNMENT_2X1 = 2;</code>
     */
    const ALIGNMENT_2X1 = 2;
    /**
     * Generated from protobuf enum <code>ALIGNMENT_3X1 = 3;</code>
     */
    const ALIGNMENT_3X1 = 3;
    /**
     * Generated from protobuf enum <code>ALIGNMENT_2X2 = 4;</code>
     */
    const ALIGNMENT_2X2 = 4;
    /**
     * Generated from protobuf enum <code>ALIGNMENT_CUSTOM = 5;</code>
     */
    const ALIGNMENT_CUSTOM = 5;

    private static $valueToName = [
        self::ALIGNMENT_UNKNOWN => 'ALIGNMENT_UNKNOWN',
        self::ALIGNMENT_FULL => 'ALIGNMENT_FULL',
        self::ALIGNMENT_2X1 => 'ALIGNMENT_2X1',
        self::ALIGNMENT_3X1 => 'ALIGNMENT_3X1',
        self::ALIGNMENT_2X2 => 'ALIGNMENT_2X2',
        self::ALIGNMENT_CUSTOM => 'ALIGNMENT_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);
    }
}

