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

namespace Google\Cloud\NetworkConnectivity\V1\ServiceConfig;

use UnexpectedValueException;

/**
 * The eligibility information for the service.
 *
 * Protobuf type <code>google.cloud.networkconnectivity.v1.ServiceConfig.EligibilityCriteria</code>
 */
class EligibilityCriteria
{
    /**
     * The service is not eligible for Data Transfer Essentials configuration.
     * This is the default case.
     *
     * Generated from protobuf enum <code>ELIGIBILITY_CRITERIA_UNSPECIFIED = 0;</code>
     */
    const ELIGIBILITY_CRITERIA_UNSPECIFIED = 0;
    /**
     * The service is eligible for Data Transfer Essentials configuration only
     * for Premium Tier.
     *
     * Generated from protobuf enum <code>NETWORK_SERVICE_TIER_PREMIUM_ONLY = 1;</code>
     */
    const NETWORK_SERVICE_TIER_PREMIUM_ONLY = 1;
    /**
     * The service is eligible for Data Transfer Essentials configuration only
     * for Standard Tier.
     *
     * Generated from protobuf enum <code>NETWORK_SERVICE_TIER_STANDARD_ONLY = 2;</code>
     */
    const NETWORK_SERVICE_TIER_STANDARD_ONLY = 2;
    /**
     * The service is eligible for Data Transfer Essentials configuration only
     * for the regional endpoint.
     *
     * Generated from protobuf enum <code>REQUEST_ENDPOINT_REGIONAL_ENDPOINT_ONLY = 3;</code>
     */
    const REQUEST_ENDPOINT_REGIONAL_ENDPOINT_ONLY = 3;

    private static $valueToName = [
        self::ELIGIBILITY_CRITERIA_UNSPECIFIED => 'ELIGIBILITY_CRITERIA_UNSPECIFIED',
        self::NETWORK_SERVICE_TIER_PREMIUM_ONLY => 'NETWORK_SERVICE_TIER_PREMIUM_ONLY',
        self::NETWORK_SERVICE_TIER_STANDARD_ONLY => 'NETWORK_SERVICE_TIER_STANDARD_ONLY',
        self::REQUEST_ENDPOINT_REGIONAL_ENDPOINT_ONLY => 'REQUEST_ENDPOINT_REGIONAL_ENDPOINT_ONLY',
    ];

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


