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

namespace Google\Cloud\BeyondCorp\ClientConnectorServices\V1\ClientConnectorService\Ingress\Config;

use UnexpectedValueException;

/**
 * The protocol used to connect to the server.
 *
 * Protobuf type <code>google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorService.Ingress.Config.TransportProtocol</code>
 */
class TransportProtocol
{
    /**
     * Default value. This value is unused.
     *
     * Generated from protobuf enum <code>TRANSPORT_PROTOCOL_UNSPECIFIED = 0;</code>
     */
    const TRANSPORT_PROTOCOL_UNSPECIFIED = 0;
    /**
     * TCP protocol.
     *
     * Generated from protobuf enum <code>TCP = 1;</code>
     */
    const TCP = 1;

    private static $valueToName = [
        self::TRANSPORT_PROTOCOL_UNSPECIFIED => 'TRANSPORT_PROTOCOL_UNSPECIFIED',
        self::TCP => 'TCP',
    ];

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


