<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/identity/accesscontextmanager/type/device_resources.proto

namespace Google\Identity\AccessContextManager\Type;

use UnexpectedValueException;

/**
 * The degree to which the device is managed by the Cloud organization.
 *
 * Protobuf type <code>google.identity.accesscontextmanager.type.DeviceManagementLevel</code>
 */
class DeviceManagementLevel
{
    /**
     * The device's management level is not specified or not known.
     *
     * Generated from protobuf enum <code>MANAGEMENT_UNSPECIFIED = 0;</code>
     */
    const MANAGEMENT_UNSPECIFIED = 0;
    /**
     * The device is not managed.
     *
     * Generated from protobuf enum <code>NONE = 1;</code>
     */
    const NONE = 1;
    /**
     * Basic management is enabled, which is generally limited to monitoring and
     * wiping the corporate account.
     *
     * Generated from protobuf enum <code>BASIC = 2;</code>
     */
    const BASIC = 2;
    /**
     * Complete device management. This includes more thorough monitoring and the
     * ability to directly manage the device (such as remote wiping). This can be
     * enabled through the Android Enterprise Platform.
     *
     * Generated from protobuf enum <code>COMPLETE = 3;</code>
     */
    const COMPLETE = 3;

    private static $valueToName = [
        self::MANAGEMENT_UNSPECIFIED => 'MANAGEMENT_UNSPECIFIED',
        self::NONE => 'NONE',
        self::BASIC => 'BASIC',
        self::COMPLETE => 'COMPLETE',
    ];

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

