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

namespace Google\Ads\AdManager\V1\CustomTargetingValueStatusEnum;

use UnexpectedValueException;

/**
 * Status of the custom targeting value.
 *
 * Protobuf type <code>google.ads.admanager.v1.CustomTargetingValueStatusEnum.CustomTargetingValueStatus</code>
 */
class CustomTargetingValueStatus
{
    /**
     * Not specified value.
     *
     * Generated from protobuf enum <code>CUSTOM_TARGETING_VALUE_STATUS_UNSPECIFIED = 0;</code>
     */
    const CUSTOM_TARGETING_VALUE_STATUS_UNSPECIFIED = 0;
    /**
     * Custom targeting value is active.
     *
     * Generated from protobuf enum <code>ACTIVE = 1;</code>
     */
    const ACTIVE = 1;
    /**
     * Custom targeting value is inactive.
     *
     * Generated from protobuf enum <code>INACTIVE = 2;</code>
     */
    const INACTIVE = 2;

    private static $valueToName = [
        self::CUSTOM_TARGETING_VALUE_STATUS_UNSPECIFIED => 'CUSTOM_TARGETING_VALUE_STATUS_UNSPECIFIED',
        self::ACTIVE => 'ACTIVE',
        self::INACTIVE => 'INACTIVE',
    ];

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


