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

namespace Google\Cloud\ApiHub\V1;

use UnexpectedValueException;

/**
 * Enum for the gateway type.
 *
 * Protobuf type <code>google.cloud.apihub.v1.GatewayType</code>
 */
class GatewayType
{
    /**
     * The gateway type is not specified.
     *
     * Generated from protobuf enum <code>GATEWAY_TYPE_UNSPECIFIED = 0;</code>
     */
    const GATEWAY_TYPE_UNSPECIFIED = 0;
    /**
     * The gateway type is Apigee X and Hybrid.
     *
     * Generated from protobuf enum <code>APIGEE_X_AND_HYBRID = 1;</code>
     */
    const APIGEE_X_AND_HYBRID = 1;
    /**
     * The gateway type is Apigee Edge Public Cloud.
     *
     * Generated from protobuf enum <code>APIGEE_EDGE_PUBLIC_CLOUD = 2;</code>
     */
    const APIGEE_EDGE_PUBLIC_CLOUD = 2;
    /**
     * The gateway type is Apigee Edge Private Cloud.
     *
     * Generated from protobuf enum <code>APIGEE_EDGE_PRIVATE_CLOUD = 3;</code>
     */
    const APIGEE_EDGE_PRIVATE_CLOUD = 3;
    /**
     * The gateway type is Cloud API Gateway.
     *
     * Generated from protobuf enum <code>CLOUD_API_GATEWAY = 4;</code>
     */
    const CLOUD_API_GATEWAY = 4;
    /**
     * The gateway type is Cloud Endpoints.
     *
     * Generated from protobuf enum <code>CLOUD_ENDPOINTS = 5;</code>
     */
    const CLOUD_ENDPOINTS = 5;
    /**
     * The gateway type is API Discovery.
     *
     * Generated from protobuf enum <code>API_DISCOVERY = 6;</code>
     */
    const API_DISCOVERY = 6;
    /**
     * The gateway type for any other types of gateways.
     *
     * Generated from protobuf enum <code>OTHERS = 7;</code>
     */
    const OTHERS = 7;

    private static $valueToName = [
        self::GATEWAY_TYPE_UNSPECIFIED => 'GATEWAY_TYPE_UNSPECIFIED',
        self::APIGEE_X_AND_HYBRID => 'APIGEE_X_AND_HYBRID',
        self::APIGEE_EDGE_PUBLIC_CLOUD => 'APIGEE_EDGE_PUBLIC_CLOUD',
        self::APIGEE_EDGE_PRIVATE_CLOUD => 'APIGEE_EDGE_PRIVATE_CLOUD',
        self::CLOUD_API_GATEWAY => 'CLOUD_API_GATEWAY',
        self::CLOUD_ENDPOINTS => 'CLOUD_ENDPOINTS',
        self::API_DISCOVERY => 'API_DISCOVERY',
        self::OTHERS => 'OTHERS',
    ];

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

