<?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;
    /**
     * Generated from protobuf enum <code>Health_Patient_Button = 1;</code>
     */
    const Health_Patient_Button = 1;
    /**
     * Generated from protobuf enum <code>Health_Staff_Button = 2;</code>
     */
    const Health_Staff_Button = 2;
    /**
     * Generated from protobuf enum <code>Health_Monitored_Button = 3;</code>
     */
    const Health_Monitored_Button = 3;
    /**
     * Generated from protobuf enum <code>Health_Personal_Button = 4;</code>
     */
    const Health_Personal_Button = 4;

    private static $valueToName = [
        self::HealthButtonRole_NotSet => 'HealthButtonRole_NotSet',
        self::Health_Patient_Button => 'Health_Patient_Button',
        self::Health_Staff_Button => 'Health_Staff_Button',
        self::Health_Monitored_Button => 'Health_Monitored_Button',
        self::Health_Personal_Button => 'Health_Personal_Button',
    ];

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

