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

namespace OS\PB\CodeHopConfig;

use UnexpectedValueException;

/**
 * Protobuf type <code>OS.PB.CodeHopConfig.CodeHopModes</code>
 */
class CodeHopModes
{
    /**
     * No change to the mode the CodeHop interface is in
     *
     * Generated from protobuf enum <code>CodeHopMode_NotSet = 0;</code>
     */
    const CodeHopMode_NotSet = 0;
    /**
     * CodeHop Module Interface disabled
     *
     * Generated from protobuf enum <code>CodeHopMode_Disabled = 1;</code>
     */
    const CodeHopMode_Disabled = 1;
    /**
     * Sherlo RF 403MHz OOK 64 Bit Remote with Manchester encoding utilizing code mark inversion
     *
     * Generated from protobuf enum <code>CodeHopMode_Sherlo = 2;</code>
     */
    const CodeHopMode_Sherlo = 2;
    /**
     * Not implemented
     *
     * Generated from protobuf enum <code>CodeHopMode_Centurion = 3;</code>
     */
    const CodeHopMode_Centurion = 3;
    /**
     * Not implemented
     *
     * Generated from protobuf enum <code>CodeHopMode_Sentry = 4;</code>
     */
    const CodeHopMode_Sentry = 4;
    /**
     * Not implemented
     *
     * Generated from protobuf enum <code>CodeHopMode_ETSystems = 5;</code>
     */
    const CodeHopMode_ETSystems = 5;
    /**
     * Not implemented
     *
     * Generated from protobuf enum <code>CodeHopMode_NiceForYou = 6;</code>
     */
    const CodeHopMode_NiceForYou = 6;

    private static $valueToName = [
        self::CodeHopMode_NotSet => 'CodeHopMode_NotSet',
        self::CodeHopMode_Disabled => 'CodeHopMode_Disabled',
        self::CodeHopMode_Sherlo => 'CodeHopMode_Sherlo',
        self::CodeHopMode_Centurion => 'CodeHopMode_Centurion',
        self::CodeHopMode_Sentry => 'CodeHopMode_Sentry',
        self::CodeHopMode_ETSystems => 'CodeHopMode_ETSystems',
        self::CodeHopMode_NiceForYou => 'CodeHopMode_NiceForYou',
    ];

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

