<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/marketingplatform/admin/v1alpha/resources.proto

namespace Google\Ads\MarketingPlatform\Admin\V1alpha;

use UnexpectedValueException;

/**
 * Various levels of service for Google Analytics.
 *
 * Protobuf type <code>google.marketingplatform.admin.v1alpha.AnalyticsServiceLevel</code>
 */
class AnalyticsServiceLevel
{
    /**
     * Service level unspecified.
     *
     * Generated from protobuf enum <code>ANALYTICS_SERVICE_LEVEL_UNSPECIFIED = 0;</code>
     */
    const ANALYTICS_SERVICE_LEVEL_UNSPECIFIED = 0;
    /**
     * The standard version of Google Analytics.
     *
     * Generated from protobuf enum <code>ANALYTICS_SERVICE_LEVEL_STANDARD = 1;</code>
     */
    const ANALYTICS_SERVICE_LEVEL_STANDARD = 1;
    /**
     * The premium version of Google Analytics.
     *
     * Generated from protobuf enum <code>ANALYTICS_SERVICE_LEVEL_360 = 2;</code>
     */
    const ANALYTICS_SERVICE_LEVEL_360 = 2;

    private static $valueToName = [
        self::ANALYTICS_SERVICE_LEVEL_UNSPECIFIED => 'ANALYTICS_SERVICE_LEVEL_UNSPECIFIED',
        self::ANALYTICS_SERVICE_LEVEL_STANDARD => 'ANALYTICS_SERVICE_LEVEL_STANDARD',
        self::ANALYTICS_SERVICE_LEVEL_360 => 'ANALYTICS_SERVICE_LEVEL_360',
    ];

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

