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

namespace Google\Cloud\Container\V1\ManagedOpenTelemetryConfig;

use UnexpectedValueException;

/**
 * Scope is the scope of the Managed OpenTelemetry pipeline.
 *
 * Protobuf type <code>google.container.v1.ManagedOpenTelemetryConfig.Scope</code>
 */
class Scope
{
    /**
     * SCOPE_UNSPECIFIED is when the scope is not set.
     *
     * Generated from protobuf enum <code>SCOPE_UNSPECIFIED = 0;</code>
     */
    const SCOPE_UNSPECIFIED = 0;
    /**
     * NONE is used to disable the Managed OpenTelemetry pipeline.
     *
     * Generated from protobuf enum <code>NONE = 1;</code>
     */
    const NONE = 1;
    /**
     * COLLECTION_AND_INSTRUMENTATION_COMPONENTS is used to enable the Managed
     * OpenTelemetry pipeline for collection and instrumentation components.
     *
     * Generated from protobuf enum <code>COLLECTION_AND_INSTRUMENTATION_COMPONENTS = 2;</code>
     */
    const COLLECTION_AND_INSTRUMENTATION_COMPONENTS = 2;

    private static $valueToName = [
        self::SCOPE_UNSPECIFIED => 'SCOPE_UNSPECIFIED',
        self::NONE => 'NONE',
        self::COLLECTION_AND_INSTRUMENTATION_COMPONENTS => 'COLLECTION_AND_INSTRUMENTATION_COMPONENTS',
    ];

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


