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

namespace OS\PB;

use UnexpectedValueException;

/**
 * Protobuf type <code>OS.PB.DeviceEraseMethod</code>
 */
class DeviceEraseMethod
{
    /**
     * Generated from protobuf enum <code>EraseMethod_NotSet = 0;</code>
     */
    const EraseMethod_NotSet = 0;
    /**
     * Erases and defaults the Parameters Config without changing the mode
     *
     * Generated from protobuf enum <code>EraseMethod_Parameters = 1;</code>
     */
    const EraseMethod_Parameters = 1;
    /**
     * Generated from protobuf enum <code>EraseMethod_Interfaces = 10;</code>
     */
    const EraseMethod_Interfaces = 10;
    /**
     * Generated from protobuf enum <code>EraseMethod_Routing = 20;</code>
     */
    const EraseMethod_Routing = 20;
    /**
     * Generated from protobuf enum <code>EraseMethod_RoutingExceptCloud = 21;</code>
     */
    const EraseMethod_RoutingExceptCloud = 21;
    /**
     * Generated from protobuf enum <code>EraseMethod_Queuing = 30;</code>
     */
    const EraseMethod_Queuing = 30;
    /**
     * Generated from protobuf enum <code>EraseMethod_QueuingExceptCloud = 31;</code>
     */
    const EraseMethod_QueuingExceptCloud = 31;

    private static $valueToName = [
        self::EraseMethod_NotSet => 'EraseMethod_NotSet',
        self::EraseMethod_Parameters => 'EraseMethod_Parameters',
        self::EraseMethod_Interfaces => 'EraseMethod_Interfaces',
        self::EraseMethod_Routing => 'EraseMethod_Routing',
        self::EraseMethod_RoutingExceptCloud => 'EraseMethod_RoutingExceptCloud',
        self::EraseMethod_Queuing => 'EraseMethod_Queuing',
        self::EraseMethod_QueuingExceptCloud => 'EraseMethod_QueuingExceptCloud',
    ];

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

