<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: livekit_cloud_agent.proto

namespace Livekit\PrivateLinkStatus;

use UnexpectedValueException;

/**
 * Protobuf type <code>livekit.PrivateLinkStatus.Status</code>
 */
class Status
{
    /**
     * Generated from protobuf enum <code>PRIVATE_LINK_STATUS_UNKNOWN = 0;</code>
     */
    const PRIVATE_LINK_STATUS_UNKNOWN = 0;
    /**
     * Generated from protobuf enum <code>PRIVATE_LINK_STATUS_PROVISIONING = 1;</code>
     */
    const PRIVATE_LINK_STATUS_PROVISIONING = 1;
    /**
     * Generated from protobuf enum <code>PRIVATE_LINK_STATUS_PENDING_APPROVAL = 2;</code>
     */
    const PRIVATE_LINK_STATUS_PENDING_APPROVAL = 2;
    /**
     * Generated from protobuf enum <code>PRIVATE_LINK_STATUS_HEALTHY = 3;</code>
     */
    const PRIVATE_LINK_STATUS_HEALTHY = 3;
    /**
     * Generated from protobuf enum <code>PRIVATE_LINK_STATUS_UNHEALTHY = 4;</code>
     */
    const PRIVATE_LINK_STATUS_UNHEALTHY = 4;
    /**
     * Generated from protobuf enum <code>PRIVATE_LINK_STATUS_APPROVED = 5;</code>
     */
    const PRIVATE_LINK_STATUS_APPROVED = 5;

    private static $valueToName = [
        self::PRIVATE_LINK_STATUS_UNKNOWN => 'PRIVATE_LINK_STATUS_UNKNOWN',
        self::PRIVATE_LINK_STATUS_PROVISIONING => 'PRIVATE_LINK_STATUS_PROVISIONING',
        self::PRIVATE_LINK_STATUS_PENDING_APPROVAL => 'PRIVATE_LINK_STATUS_PENDING_APPROVAL',
        self::PRIVATE_LINK_STATUS_HEALTHY => 'PRIVATE_LINK_STATUS_HEALTHY',
        self::PRIVATE_LINK_STATUS_UNHEALTHY => 'PRIVATE_LINK_STATUS_UNHEALTHY',
        self::PRIVATE_LINK_STATUS_APPROVED => 'PRIVATE_LINK_STATUS_APPROVED',
    ];

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

