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

namespace Google\Cloud\Container\V1\NetworkPolicy;

use UnexpectedValueException;

/**
 * Allowed Network Policy providers.
 *
 * Protobuf type <code>google.container.v1.NetworkPolicy.Provider</code>
 */
class Provider
{
    /**
     * Not set
     *
     * Generated from protobuf enum <code>PROVIDER_UNSPECIFIED = 0;</code>
     */
    const PROVIDER_UNSPECIFIED = 0;
    /**
     * Tigera (Calico Felix).
     *
     * Generated from protobuf enum <code>CALICO = 1;</code>
     */
    const CALICO = 1;

    private static $valueToName = [
        self::PROVIDER_UNSPECIFIED => 'PROVIDER_UNSPECIFIED',
        self::CALICO => 'CALICO',
    ];

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

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Provider::class, \Google\Cloud\Container\V1\NetworkPolicy_Provider::class);

