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

namespace Google\Ads\AdManager\V1\CmsMetadataValueStatusEnum;

use UnexpectedValueException;

/**
 * Status for CmsMetadataValue objects.
 *
 * Protobuf type <code>google.ads.admanager.v1.CmsMetadataValueStatusEnum.CmsMetadataValueStatus</code>
 */
class CmsMetadataValueStatus
{
    /**
     * Default value. This value is unused.
     *
     * Generated from protobuf enum <code>CMS_METADATA_VALUE_STATUS_UNSPECIFIED = 0;</code>
     */
    const CMS_METADATA_VALUE_STATUS_UNSPECIFIED = 0;
    /**
     * The value is active.
     *
     * Generated from protobuf enum <code>ACTIVE = 1;</code>
     */
    const ACTIVE = 1;
    /**
     * The value is archived.
     *
     * Generated from protobuf enum <code>ARCHIVED = 2;</code>
     */
    const ARCHIVED = 2;
    /**
     * The value is not active.
     *
     * Generated from protobuf enum <code>INACTIVE = 3;</code>
     */
    const INACTIVE = 3;

    private static $valueToName = [
        self::CMS_METADATA_VALUE_STATUS_UNSPECIFIED => 'CMS_METADATA_VALUE_STATUS_UNSPECIFIED',
        self::ACTIVE => 'ACTIVE',
        self::ARCHIVED => 'ARCHIVED',
        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);
    }
}


