<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/oslogin/v1beta/oslogin.proto

namespace Google\Cloud\OsLogin\V1beta;

use UnexpectedValueException;

/**
 * The login profile view limits the user content retrieved.
 *
 * Protobuf type <code>google.cloud.oslogin.v1beta.LoginProfileView</code>
 */
class LoginProfileView
{
    /**
     * The default login profile view. The API defaults to the BASIC view.
     *
     * Generated from protobuf enum <code>LOGIN_PROFILE_VIEW_UNSPECIFIED = 0;</code>
     */
    const LOGIN_PROFILE_VIEW_UNSPECIFIED = 0;
    /**
     * Includes POSIX and SSH key information.
     *
     * Generated from protobuf enum <code>BASIC = 1;</code>
     */
    const BASIC = 1;
    /**
     * Include security key information for the user.
     *
     * Generated from protobuf enum <code>SECURITY_KEY = 2;</code>
     */
    const SECURITY_KEY = 2;

    private static $valueToName = [
        self::LOGIN_PROFILE_VIEW_UNSPECIFIED => 'LOGIN_PROFILE_VIEW_UNSPECIFIED',
        self::BASIC => 'BASIC',
        self::SECURITY_KEY => 'SECURITY_KEY',
    ];

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

