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

namespace Google\Shopping\Merchant\Reports\V1beta\ProductView\ItemIssue;

use UnexpectedValueException;

/**
 * How to resolve the issue.
 *
 * Protobuf type <code>google.shopping.merchant.reports.v1beta.ProductView.ItemIssue.ItemIssueResolution</code>
 */
class ItemIssueResolution
{
    /**
     * Not specified.
     *
     * Generated from protobuf enum <code>ITEM_ISSUE_RESOLUTION_UNSPECIFIED = 0;</code>
     */
    const ITEM_ISSUE_RESOLUTION_UNSPECIFIED = 0;
    /**
     * The merchant has to fix the issue.
     *
     * Generated from protobuf enum <code>MERCHANT_ACTION = 1;</code>
     */
    const MERCHANT_ACTION = 1;
    /**
     * The issue will be resolved automatically (for example, image crawl) or
     * through a Google review. No merchant action is required now. Resolution
     * might lead to another issue (for example, if crawl fails).
     *
     * Generated from protobuf enum <code>PENDING_PROCESSING = 2;</code>
     */
    const PENDING_PROCESSING = 2;

    private static $valueToName = [
        self::ITEM_ISSUE_RESOLUTION_UNSPECIFIED => 'ITEM_ISSUE_RESOLUTION_UNSPECIFIED',
        self::MERCHANT_ACTION => 'MERCHANT_ACTION',
        self::PENDING_PROCESSING => 'PENDING_PROCESSING',
    ];

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


