<?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.HealthButtonRole</code>
 */
class HealthButtonRole
{
    /**
     * Generated from protobuf enum <code>HealthButtonRole_NotSet = 0;</code>
     */
    const HealthButtonRole_NotSet = 0;
    /**
     * A Patient button will send out an alert when either the button is pressed or when a fall is detected. 
     *
     * Generated from protobuf enum <code>HealthButton_Patient = 1;</code>
     */
    const HealthButton_Patient = 1;
    /**
     * A Staff button does not send out alerts but can listen for patient buttons advertisements and then advertise that they attending
     *
     * Generated from protobuf enum <code>HealthButton_Staff = 2;</code>
     */
    const HealthButton_Staff = 2;
    /**
     * Same as Patient button but will advertise out with Motion events for Monitored Care Link devices
     *
     * Generated from protobuf enum <code>HealthButton_Monitored = 3;</code>
     */
    const HealthButton_Monitored = 3;
    /**
     * Similar to patient button, but is used in Retirement Village scenario and advertises at a much . Cosmetically different.
     *
     * Generated from protobuf enum <code>HealthButton_Personal = 4;</code>
     */
    const HealthButton_Personal = 4;

    private static $valueToName = [
        self::HealthButtonRole_NotSet => 'HealthButtonRole_NotSet',
        self::HealthButton_Patient => 'HealthButton_Patient',
        self::HealthButton_Staff => 'HealthButton_Staff',
        self::HealthButton_Monitored => 'HealthButton_Monitored',
        self::HealthButton_Personal => 'HealthButton_Personal',
    ];

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

