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

namespace Google\Cloud\Compute\V1\Interconnect;

use UnexpectedValueException;

/**
 * [Output Only] The current status of this Interconnect's functionality,
 * which can take one of the following values:
 *    - OS_ACTIVE: A valid Interconnect, which is turned up and is ready to
 *    use. Attachments may be provisioned on this Interconnect.
 * - OS_UNPROVISIONED: An Interconnect that has not completed turnup. No
 * attachments may be provisioned on this Interconnect.
 * - OS_UNDER_MAINTENANCE: An Interconnect that is undergoing internal
 * maintenance. No attachments may be provisioned or updated on this
 * Interconnect.
 *
 * Protobuf type <code>google.cloud.compute.v1.Interconnect.OperationalStatus</code>
 */
class OperationalStatus
{
    /**
     * A value indicating that the enum field is not set.
     *
     * Generated from protobuf enum <code>UNDEFINED_OPERATIONAL_STATUS = 0;</code>
     */
    const UNDEFINED_OPERATIONAL_STATUS = 0;
    /**
     * The interconnect is valid, turned up, and ready to use. Attachments may
     * be provisioned on this interconnect.
     *
     * Generated from protobuf enum <code>OS_ACTIVE = 55721409;</code>
     */
    const OS_ACTIVE = 55721409;
    /**
     * The interconnect has not completed turnup. No attachments may be
     * provisioned on this interconnect.
     *
     * Generated from protobuf enum <code>OS_UNPROVISIONED = 239771840;</code>
     */
    const OS_UNPROVISIONED = 239771840;

    private static $valueToName = [
        self::UNDEFINED_OPERATIONAL_STATUS => 'UNDEFINED_OPERATIONAL_STATUS',
        self::OS_ACTIVE => 'OS_ACTIVE',
        self::OS_UNPROVISIONED => 'OS_UNPROVISIONED',
    ];

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


