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

namespace Google\Apps\Card\V1\BorderStyle;

use UnexpectedValueException;

/**
 * Represents the border types applied to widgets.
 * [Google Workspace Add-ons
 * and Chat apps](https://developers.google.com/workspace/extend):
 *
 * Protobuf type <code>google.apps.card.v1.BorderStyle.BorderType</code>
 */
class BorderType
{
    /**
     * Don't use. Unspecified.
     *
     * Generated from protobuf enum <code>BORDER_TYPE_UNSPECIFIED = 0;</code>
     */
    const BORDER_TYPE_UNSPECIFIED = 0;
    /**
     * Default value. No border.
     *
     * Generated from protobuf enum <code>NO_BORDER = 1;</code>
     */
    const NO_BORDER = 1;
    /**
     * Outline.
     *
     * Generated from protobuf enum <code>STROKE = 2;</code>
     */
    const STROKE = 2;

    private static $valueToName = [
        self::BORDER_TYPE_UNSPECIFIED => 'BORDER_TYPE_UNSPECIFIED',
        self::NO_BORDER => 'NO_BORDER',
        self::STROKE => 'STROKE',
    ];

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


