<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/admanager/v1/site_enums.proto

namespace Google\Ads\AdManager\V1\SiteDisapprovalReasonEnum;

use UnexpectedValueException;

/**
 * The list of possible policy violation types for a Site.
 *
 * Protobuf type <code>google.ads.admanager.v1.SiteDisapprovalReasonEnum.SiteDisapprovalReason</code>
 */
class SiteDisapprovalReason
{
    /**
     * Default value. This value is unused.
     *
     * Generated from protobuf enum <code>SITE_DISAPPROVAL_REASON_UNSPECIFIED = 0;</code>
     */
    const SITE_DISAPPROVAL_REASON_UNSPECIFIED = 0;
    /**
     * The site has content that violates policy.
     *
     * Generated from protobuf enum <code>CONTENT = 1;</code>
     */
    const CONTENT = 1;
    /**
     * Generic error type.
     *
     * Generated from protobuf enum <code>OTHER = 2;</code>
     */
    const OTHER = 2;
    /**
     * The parent must be an authorized seller of the child network's inventory.
     *
     * Generated from protobuf enum <code>OWNERSHIP = 3;</code>
     */
    const OWNERSHIP = 3;

    private static $valueToName = [
        self::SITE_DISAPPROVAL_REASON_UNSPECIFIED => 'SITE_DISAPPROVAL_REASON_UNSPECIFIED',
        self::CONTENT => 'CONTENT',
        self::OTHER => 'OTHER',
        self::OWNERSHIP => 'OWNERSHIP',
    ];

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


