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

namespace Google\Cloud\ApigeeConnect\V1;

use UnexpectedValueException;

/**
 * Endpoint indicates where the messages will be delivered.
 *
 * Protobuf type <code>google.cloud.apigeeconnect.v1.TetherEndpoint</code>
 */
class TetherEndpoint
{
    /**
     * Unspecified tether endpoint.
     *
     * Generated from protobuf enum <code>TETHER_ENDPOINT_UNSPECIFIED = 0;</code>
     */
    const TETHER_ENDPOINT_UNSPECIFIED = 0;
    /**
     * Apigee MART endpoint.
     *
     * Generated from protobuf enum <code>APIGEE_MART = 1;</code>
     */
    const APIGEE_MART = 1;
    /**
     * Apigee Runtime endpoint.
     *
     * Generated from protobuf enum <code>APIGEE_RUNTIME = 2;</code>
     */
    const APIGEE_RUNTIME = 2;
    /**
     * Apigee Mint Rating endpoint.
     *
     * Generated from protobuf enum <code>APIGEE_MINT_RATING = 3;</code>
     */
    const APIGEE_MINT_RATING = 3;

    private static $valueToName = [
        self::TETHER_ENDPOINT_UNSPECIFIED => 'TETHER_ENDPOINT_UNSPECIFIED',
        self::APIGEE_MART => 'APIGEE_MART',
        self::APIGEE_RUNTIME => 'APIGEE_RUNTIME',
        self::APIGEE_MINT_RATING => 'APIGEE_MINT_RATING',
    ];

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

