<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/apps/card/v1/card.proto

namespace Google\Apps\Card\V1\Columns\Column;

use UnexpectedValueException;

/**
 * Specifies whether widgets align to the top, bottom, or center of a
 * column.
 * [Google Workspace Add-ons and Chat
 * apps](https://developers.google.com/workspace/extend):
 * Columns for Google Workspace Add-ons are in
 * Developer Preview.
 *
 * Protobuf type <code>google.apps.card.v1.Columns.Column.VerticalAlignment</code>
 */
class VerticalAlignment
{
    /**
     * Don't use. Unspecified.
     *
     * Generated from protobuf enum <code>VERTICAL_ALIGNMENT_UNSPECIFIED = 0;</code>
     */
    const VERTICAL_ALIGNMENT_UNSPECIFIED = 0;
    /**
     * Default value. Aligns widgets to the center of a column.
     *
     * Generated from protobuf enum <code>CENTER = 1;</code>
     */
    const CENTER = 1;
    /**
     * Aligns widgets to the top of a column.
     *
     * Generated from protobuf enum <code>TOP = 2;</code>
     */
    const TOP = 2;
    /**
     * Aligns widgets to the bottom of a column.
     *
     * Generated from protobuf enum <code>BOTTOM = 3;</code>
     */
    const BOTTOM = 3;

    private static $valueToName = [
        self::VERTICAL_ALIGNMENT_UNSPECIFIED => 'VERTICAL_ALIGNMENT_UNSPECIFIED',
        self::CENTER => 'CENTER',
        self::TOP => 'TOP',
        self::BOTTOM => 'BOTTOM',
    ];

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


