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

namespace OS\PB;

use UnexpectedValueException;

/**
 * Protobuf type <code>OS.PB.HealthLinkRole</code>
 */
class HealthLinkRole
{
    /**
     * Generated from protobuf enum <code>HealthLinkRole_NotSet = 0;</code>
     */
    const HealthLinkRole_NotSet = 0;
    /**
     * A generic Care Link Device in a health care facility
     *
     * Generated from protobuf enum <code>HealthLink_Care = 1;</code>
     */
    const HealthLink_Care = 1;
    /**
     * Same as a Care Link but will use MonitorRSSIThreshold for proximity alerts
     *
     * Generated from protobuf enum <code>HealthLink_Monitored = 3;</code>
     */
    const HealthLink_Monitored = 3;
    /**
     * Same as a Care Link but propagates events received to downstream Link devices
     *
     * Generated from protobuf enum <code>HealthLink_Station = 5;</code>
     */
    const HealthLink_Station = 5;
    /**
     * Used inside a home setting for extending range or mitigating dead spots
     *
     * Generated from protobuf enum <code>HealthLink_Home = 16;</code>
     */
    const HealthLink_Home = 16;
    /**
     * Used in a village environment, typically has multiple routes to cloud
     *
     * Generated from protobuf enum <code>HealthLink_Village = 17;</code>
     */
    const HealthLink_Village = 17;

    private static $valueToName = [
        self::HealthLinkRole_NotSet => 'HealthLinkRole_NotSet',
        self::HealthLink_Care => 'HealthLink_Care',
        self::HealthLink_Monitored => 'HealthLink_Monitored',
        self::HealthLink_Station => 'HealthLink_Station',
        self::HealthLink_Home => 'HealthLink_Home',
        self::HealthLink_Village => 'HealthLink_Village',
    ];

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

