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

namespace Google\Cloud\Compute\V1\ExternalVpnGateway;

use UnexpectedValueException;

/**
 * Indicates the user-supplied redundancy type of this external VPN gateway.
 *
 * Protobuf type <code>google.cloud.compute.v1.ExternalVpnGateway.RedundancyType</code>
 */
class RedundancyType
{
    /**
     * A value indicating that the enum field is not set.
     *
     * Generated from protobuf enum <code>UNDEFINED_REDUNDANCY_TYPE = 0;</code>
     */
    const UNDEFINED_REDUNDANCY_TYPE = 0;
    /**
     * Generated from protobuf enum <code>FOUR_IPS_REDUNDANCY = 251652457;</code>
     */
    const FOUR_IPS_REDUNDANCY = 251652457;
    /**
     * Generated from protobuf enum <code>SINGLE_IP_INTERNALLY_REDUNDANT = 133914873;</code>
     */
    const SINGLE_IP_INTERNALLY_REDUNDANT = 133914873;
    /**
     * Generated from protobuf enum <code>TWO_IPS_REDUNDANCY = 98614179;</code>
     */
    const TWO_IPS_REDUNDANCY = 98614179;

    private static $valueToName = [
        self::UNDEFINED_REDUNDANCY_TYPE => 'UNDEFINED_REDUNDANCY_TYPE',
        self::FOUR_IPS_REDUNDANCY => 'FOUR_IPS_REDUNDANCY',
        self::SINGLE_IP_INTERNALLY_REDUNDANT => 'SINGLE_IP_INTERNALLY_REDUNDANT',
        self::TWO_IPS_REDUNDANCY => 'TWO_IPS_REDUNDANCY',
    ];

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


