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

use UnexpectedValueException;

/**
 * The emission standard of the vehicle.
 *
 * Protobuf type <code>google.shopping.merchant.products.v1.ProductAttributes.EmissionsStandard</code>
 */
class EmissionsStandard
{
    /**
     * Unspecified emission standard.
     *
     * Generated from protobuf enum <code>EMISSIONS_STANDARD_UNSPECIFIED = 0;</code>
     */
    const EMISSIONS_STANDARD_UNSPECIFIED = 0;
    /**
     * Zero emissions.
     *
     * Generated from protobuf enum <code>ZERO_EMISSIONS = 1;</code>
     */
    const ZERO_EMISSIONS = 1;
    /**
     * Euro 1.
     *
     * Generated from protobuf enum <code>EURO1 = 2;</code>
     */
    const EURO1 = 2;
    /**
     * Euro 2.
     *
     * Generated from protobuf enum <code>EURO2 = 3;</code>
     */
    const EURO2 = 3;
    /**
     * Euro 3.
     *
     * Generated from protobuf enum <code>EURO3 = 4;</code>
     */
    const EURO3 = 4;
    /**
     * Euro 4.
     *
     * Generated from protobuf enum <code>EURO4 = 5;</code>
     */
    const EURO4 = 5;
    /**
     * Euro 5.
     *
     * Generated from protobuf enum <code>EURO5 = 6;</code>
     */
    const EURO5 = 6;
    /**
     * Euro 5b.
     *
     * Generated from protobuf enum <code>EURO5B = 7;</code>
     */
    const EURO5B = 7;
    /**
     * Euro 6.
     *
     * Generated from protobuf enum <code>EURO6 = 8;</code>
     */
    const EURO6 = 8;
    /**
     * Euro 6c.
     *
     * Generated from protobuf enum <code>EURO6C = 9;</code>
     */
    const EURO6C = 9;
    /**
     * Euro 6d.
     *
     * Generated from protobuf enum <code>EURO6D = 10;</code>
     */
    const EURO6D = 10;
    /**
     * Euro 6d-TEMP.
     *
     * Generated from protobuf enum <code>EURO6D_TEMP = 11;</code>
     */
    const EURO6D_TEMP = 11;
    /**
     * Euro 6e.
     *
     * Generated from protobuf enum <code>EURO6E = 12;</code>
     */
    const EURO6E = 12;

    private static $valueToName = [
        self::EMISSIONS_STANDARD_UNSPECIFIED => 'EMISSIONS_STANDARD_UNSPECIFIED',
        self::ZERO_EMISSIONS => 'ZERO_EMISSIONS',
        self::EURO1 => 'EURO1',
        self::EURO2 => 'EURO2',
        self::EURO3 => 'EURO3',
        self::EURO4 => 'EURO4',
        self::EURO5 => 'EURO5',
        self::EURO5B => 'EURO5B',
        self::EURO6 => 'EURO6',
        self::EURO6C => 'EURO6C',
        self::EURO6D => 'EURO6D',
        self::EURO6D_TEMP => 'EURO6D_TEMP',
        self::EURO6E => 'EURO6E',
    ];

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

