<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/shopping/merchant/products/v1/products_common.proto

namespace Google\Shopping\Merchant\Products\V1;

use UnexpectedValueException;

/**
 * The cut of the item. It can be used to represent combined size types for
 * apparel items. Maximum two of size types can be provided, see
 * [Size type](https://support.google.com/merchants/answer/6324497).
 *
 * Protobuf type <code>google.shopping.merchant.products.v1.SizeType</code>
 */
class SizeType
{
    /**
     * The size type is not specified.
     *
     * Generated from protobuf enum <code>SIZE_TYPE_UNSPECIFIED = 0;</code>
     */
    const SIZE_TYPE_UNSPECIFIED = 0;
    /**
     * Regular size.
     *
     * Generated from protobuf enum <code>REGULAR = 1;</code>
     */
    const REGULAR = 1;
    /**
     * Petite size.
     *
     * Generated from protobuf enum <code>PETITE = 2;</code>
     */
    const PETITE = 2;
    /**
     * Maternity size.
     *
     * Generated from protobuf enum <code>MATERNITY = 3;</code>
     */
    const MATERNITY = 3;
    /**
     * Big size.
     *
     * Generated from protobuf enum <code>BIG = 4;</code>
     */
    const BIG = 4;
    /**
     * Tall size.
     *
     * Generated from protobuf enum <code>TALL = 5;</code>
     */
    const TALL = 5;
    /**
     * Plus size.
     *
     * Generated from protobuf enum <code>PLUS = 6;</code>
     */
    const PLUS = 6;

    private static $valueToName = [
        self::SIZE_TYPE_UNSPECIFIED => 'SIZE_TYPE_UNSPECIFIED',
        self::REGULAR => 'REGULAR',
        self::PETITE => 'PETITE',
        self::MATERNITY => 'MATERNITY',
        self::BIG => 'BIG',
        self::TALL => 'TALL',
        self::PLUS => 'PLUS',
    ];

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

