<?php
/**
 * This class stands for XAlarmSeverity EnumType
 * @subpackage Enumerations
 */
class XAlarmSeverity
{
    /**
     * Constant for value 'Emergency'
     * @return string 'Emergency'
     */
    const VALUE_EMERGENCY = 'Emergency';
    /**
     * Constant for value 'Alert'
     * @return string 'Alert'
     */
    const VALUE_ALERT = 'Alert';
    /**
     * Constant for value 'Critical'
     * @return string 'Critical'
     */
    const VALUE_CRITICAL = 'Critical';
    /**
     * Constant for value 'Error'
     * @return string 'Error'
     */
    const VALUE_ERROR = 'Error';
    /**
     * Constant for value 'Warning'
     * @return string 'Warning'
     */
    const VALUE_WARNING = 'Warning';
    /**
     * Constant for value 'Notice'
     * @return string 'Notice'
     */
    const VALUE_NOTICE = 'Notice';
    /**
     * Constant for value 'Informational'
     * @return string 'Informational'
     */
    const VALUE_INFORMATIONAL = 'Informational';
    /**
     * Constant for value 'Debug'
     * @return string 'Debug'
     */
    const VALUE_DEBUG = 'Debug';
    /**
     * Return true if value is allowed
     * @uses self::getValidValues()
     * @param mixed $value value
     * @return bool true|false
     */
    public static function valueIsValid($value)
    {
        return ($value === null) || in_array($value, self::getValidValues(), true);
    }
    /**
     * Return allowed values
     * @uses self::VALUE_EMERGENCY
     * @uses self::VALUE_ALERT
     * @uses self::VALUE_CRITICAL
     * @uses self::VALUE_ERROR
     * @uses self::VALUE_WARNING
     * @uses self::VALUE_NOTICE
     * @uses self::VALUE_INFORMATIONAL
     * @uses self::VALUE_DEBUG
     * @return string[]
     */
    public static function getValidValues()
    {
        return array(
            self::VALUE_EMERGENCY,
            self::VALUE_ALERT,
            self::VALUE_CRITICAL,
            self::VALUE_ERROR,
            self::VALUE_WARNING,
            self::VALUE_NOTICE,
            self::VALUE_INFORMATIONAL,
            self::VALUE_DEBUG,
        );
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
