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

namespace Google\Analytics\Admin\V1alpha;

use UnexpectedValueException;

/**
 * Various levels of service for Google Analytics.
 *
 * Protobuf type <code>google.analytics.admin.v1alpha.ServiceLevel</code>
 */
class ServiceLevel
{
    /**
     * Service level not specified or invalid.
     *
     * Generated from protobuf enum <code>SERVICE_LEVEL_UNSPECIFIED = 0;</code>
     */
    const SERVICE_LEVEL_UNSPECIFIED = 0;
    /**
     * The standard version of Google Analytics.
     *
     * Generated from protobuf enum <code>GOOGLE_ANALYTICS_STANDARD = 1;</code>
     */
    const GOOGLE_ANALYTICS_STANDARD = 1;
    /**
     * The paid, premium version of Google Analytics.
     *
     * Generated from protobuf enum <code>GOOGLE_ANALYTICS_360 = 2;</code>
     */
    const GOOGLE_ANALYTICS_360 = 2;

    private static $valueToName = [
        self::SERVICE_LEVEL_UNSPECIFIED => 'SERVICE_LEVEL_UNSPECIFIED',
        self::GOOGLE_ANALYTICS_STANDARD => 'GOOGLE_ANALYTICS_STANDARD',
        self::GOOGLE_ANALYTICS_360 => 'GOOGLE_ANALYTICS_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);
    }
}

