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

/**
 * Item store pickup timeline. For more information, see
 * [Pickup SLA](https://support.google.com/merchants/answer/14635400).
 *
 * Protobuf type <code>google.shopping.merchant.products.v1.PickupSla</code>
 */
class PickupSla
{
    /**
     * Pickup SLA is not specified.
     *
     * Generated from protobuf enum <code>PICKUP_SLA_UNSPECIFIED = 0;</code>
     */
    const PICKUP_SLA_UNSPECIFIED = 0;
    /**
     * Indicates that the product is available for pickup the same day that the
     * order is placed, subject to cut off times.
     *
     * Generated from protobuf enum <code>SAME_DAY = 1;</code>
     */
    const SAME_DAY = 1;
    /**
     * Indicates that the product is available for pickup the following day that
     * the order is placed.
     *
     * Generated from protobuf enum <code>NEXT_DAY = 2;</code>
     */
    const NEXT_DAY = 2;
    /**
     * Indicates that the product will be shipped to a store for a customer to
     * pick up in 2 days.
     *
     * Generated from protobuf enum <code>TWO_DAY = 3;</code>
     */
    const TWO_DAY = 3;
    /**
     * Indicates that the product will be shipped to a store for a customer to
     * pick up in 3 days.
     *
     * Generated from protobuf enum <code>THREE_DAY = 4;</code>
     */
    const THREE_DAY = 4;
    /**
     * Indicates that the product will be shipped to a store for a customer to
     * pick up in 4 days
     *
     * Generated from protobuf enum <code>FOUR_DAY = 5;</code>
     */
    const FOUR_DAY = 5;
    /**
     * Indicates that the product will be shipped to a store for a customer to
     * pick up in 5 days.
     *
     * Generated from protobuf enum <code>FIVE_DAY = 6;</code>
     */
    const FIVE_DAY = 6;
    /**
     * Indicates that the product will be shipped to a store for a customer to
     * pick up in 6 days.
     *
     * Generated from protobuf enum <code>SIX_DAY = 7;</code>
     */
    const SIX_DAY = 7;
    /**
     * Indicates that the product will be shipped to a store for a customer to
     * pick up in one week or more.
     *
     * Generated from protobuf enum <code>MULTI_WEEK = 8;</code>
     */
    const MULTI_WEEK = 8;

    private static $valueToName = [
        self::PICKUP_SLA_UNSPECIFIED => 'PICKUP_SLA_UNSPECIFIED',
        self::SAME_DAY => 'SAME_DAY',
        self::NEXT_DAY => 'NEXT_DAY',
        self::TWO_DAY => 'TWO_DAY',
        self::THREE_DAY => 'THREE_DAY',
        self::FOUR_DAY => 'FOUR_DAY',
        self::FIVE_DAY => 'FIVE_DAY',
        self::SIX_DAY => 'SIX_DAY',
        self::MULTI_WEEK => 'MULTI_WEEK',
    ];

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

