<?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;

/**
 * System in which the size is specified. Recommended for apparel items.
 * For more information, see
 * [Size system](https://support.google.com/merchants/answer/6324502).
 *
 * Protobuf type <code>google.shopping.merchant.products.v1.SizeSystem</code>
 */
class SizeSystem
{
    /**
     * Unspecified size system.
     *
     * Generated from protobuf enum <code>SIZE_SYSTEM_UNSPECIFIED = 0;</code>
     */
    const SIZE_SYSTEM_UNSPECIFIED = 0;
    /**
     * AU.
     *
     * Generated from protobuf enum <code>AU = 1;</code>
     */
    const AU = 1;
    /**
     * BR.
     *
     * Generated from protobuf enum <code>BR = 2;</code>
     */
    const BR = 2;
    /**
     * CN.
     *
     * Generated from protobuf enum <code>CN = 3;</code>
     */
    const CN = 3;
    /**
     * DE.
     *
     * Generated from protobuf enum <code>DE = 4;</code>
     */
    const DE = 4;
    /**
     * EU.
     *
     * Generated from protobuf enum <code>EU = 5;</code>
     */
    const EU = 5;
    /**
     * FR.
     *
     * Generated from protobuf enum <code>FR = 6;</code>
     */
    const FR = 6;
    /**
     * IT.
     *
     * Generated from protobuf enum <code>IT = 7;</code>
     */
    const IT = 7;
    /**
     * JP.
     *
     * Generated from protobuf enum <code>JP = 8;</code>
     */
    const JP = 8;
    /**
     * MEX.
     *
     * Generated from protobuf enum <code>MEX = 9;</code>
     */
    const MEX = 9;
    /**
     * UK.
     *
     * Generated from protobuf enum <code>UK = 10;</code>
     */
    const UK = 10;
    /**
     * US.
     *
     * Generated from protobuf enum <code>US = 11;</code>
     */
    const US = 11;

    private static $valueToName = [
        self::SIZE_SYSTEM_UNSPECIFIED => 'SIZE_SYSTEM_UNSPECIFIED',
        self::AU => 'AU',
        self::BR => 'BR',
        self::CN => 'CN',
        self::DE => 'DE',
        self::EU => 'EU',
        self::FR => 'FR',
        self::IT => 'IT',
        self::JP => 'JP',
        self::MEX => 'MEX',
        self::UK => 'UK',
        self::US => 'US',
    ];

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

