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

/**
 * Publication of this item will be temporarily
 * [paused](https://support.google.com/merchants/answer/11909930).
 *
 * Protobuf type <code>google.shopping.merchant.products.v1.Pause</code>
 */
class Pause
{
    /**
     * The pause is unspecified.
     *
     * Generated from protobuf enum <code>PAUSE_UNSPECIFIED = 0;</code>
     */
    const PAUSE_UNSPECIFIED = 0;
    /**
     * You’re currently pausing your product for all ads locations (including
     * Shopping Ads, Display Ads, and local inventory ads).
     *
     * Generated from protobuf enum <code>ADS = 1;</code>
     */
    const ADS = 1;
    /**
     * You’re currently pausing your product for all Shopping locations
     * (including Shopping Ads, Display Ads, local inventory ads, Buy on Google,
     * and free listings).
     *
     * Generated from protobuf enum <code>ALL = 2;</code>
     */
    const ALL = 2;

    private static $valueToName = [
        self::PAUSE_UNSPECIFIED => 'PAUSE_UNSPECIFIED',
        self::ADS => 'ADS',
        self::ALL => 'ALL',
    ];

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

