<?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;
    /**
     * Generated from protobuf enum <code>Health_Care_Link = 16;</code>
     */
    const Health_Care_Link = 16;
    /**
     * Generated from protobuf enum <code>Health_Monitored_Care_Link = 32;</code>
     */
    const Health_Monitored_Care_Link = 32;
    /**
     * Generated from protobuf enum <code>Health_Home_Link = 48;</code>
     */
    const Health_Home_Link = 48;
    /**
     * Generated from protobuf enum <code>Health_Village_Link = 64;</code>
     */
    const Health_Village_Link = 64;

    private static $valueToName = [
        self::HealthLinkRole_NotSet => 'HealthLinkRole_NotSet',
        self::Health_Care_Link => 'Health_Care_Link',
        self::Health_Monitored_Care_Link => 'Health_Monitored_Care_Link',
        self::Health_Home_Link => 'Health_Home_Link',
        self::Health_Village_Link => 'Health_Village_Link',
    ];

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

