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

namespace Google\Cloud\Compute\V1\InterconnectLocation;

use UnexpectedValueException;

/**
 * [Output Only] Continent for this location, which can take one of the following values: - AFRICA - ASIA_PAC - EUROPE - NORTH_AMERICA - SOUTH_AMERICA 
 *
 * Protobuf type <code>google.cloud.compute.v1.InterconnectLocation.Continent</code>
 */
class Continent
{
    /**
     * A value indicating that the enum field is not set.
     *
     * Generated from protobuf enum <code>UNDEFINED_CONTINENT = 0;</code>
     */
    const UNDEFINED_CONTINENT = 0;
    /**
     * Generated from protobuf enum <code>AFRICA = 317443706;</code>
     */
    const AFRICA = 317443706;
    /**
     * Generated from protobuf enum <code>ASIA_PAC = 119782269;</code>
     */
    const ASIA_PAC = 119782269;
    /**
     * Generated from protobuf enum <code>C_AFRICA = 71993846;</code>
     */
    const C_AFRICA = 71993846;
    /**
     * Generated from protobuf enum <code>C_ASIA_PAC = 465668089;</code>
     */
    const C_ASIA_PAC = 465668089;
    /**
     * Generated from protobuf enum <code>C_EUROPE = 200369438;</code>
     */
    const C_EUROPE = 200369438;
    /**
     * Generated from protobuf enum <code>C_NORTH_AMERICA = 275697048;</code>
     */
    const C_NORTH_AMERICA = 275697048;
    /**
     * Generated from protobuf enum <code>C_SOUTH_AMERICA = 397149792;</code>
     */
    const C_SOUTH_AMERICA = 397149792;
    /**
     * Generated from protobuf enum <code>EUROPE = 445819298;</code>
     */
    const EUROPE = 445819298;
    /**
     * Generated from protobuf enum <code>NORTH_AMERICA = 448015508;</code>
     */
    const NORTH_AMERICA = 448015508;
    /**
     * Generated from protobuf enum <code>SOUTH_AMERICA = 32597340;</code>
     */
    const SOUTH_AMERICA = 32597340;

    private static $valueToName = [
        self::UNDEFINED_CONTINENT => 'UNDEFINED_CONTINENT',
        self::AFRICA => 'AFRICA',
        self::ASIA_PAC => 'ASIA_PAC',
        self::C_AFRICA => 'C_AFRICA',
        self::C_ASIA_PAC => 'C_ASIA_PAC',
        self::C_EUROPE => 'C_EUROPE',
        self::C_NORTH_AMERICA => 'C_NORTH_AMERICA',
        self::C_SOUTH_AMERICA => 'C_SOUTH_AMERICA',
        self::EUROPE => 'EUROPE',
        self::NORTH_AMERICA => 'NORTH_AMERICA',
        self::SOUTH_AMERICA => 'SOUTH_AMERICA',
    ];

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


