Access Context Manager V1 Client - Class DevicePolicy (0.4.5)

Reference documentation and code samples for the Access Context Manager V1 Client class DevicePolicy.

DevicePolicy specifies device specific restrictions necessary to acquire a given access level. A DevicePolicy specifies requirements for requests from devices to be granted access levels, it does not do any enforcement on the device. DevicePolicy acts as an AND over all specified fields, and each repeated field is an OR over its elements. Any unset fields are ignored. For example, if the proto is { os_type : DESKTOP_WINDOWS, os_type : DESKTOP_LINUX, encryption_status: ENCRYPTED}, then the DevicePolicy will be true for requests originating from encrypted Linux desktops and encrypted Windows desktops.

Generated from protobuf message google.identity.accesscontextmanager.v1.DevicePolicy

Namespace

Google \ Identity \ AccessContextManager \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ require_screenlock bool

Whether or not screenlock is required for the DevicePolicy to be true. Defaults to false.

↳ allowed_encryption_statuses array

Allowed encryptions statuses, an empty list allows all statuses.

↳ os_constraints array<Google\Identity\AccessContextManager\V1\OsConstraint>

Allowed OS versions, an empty list allows all types and all versions.

↳ allowed_device_management_levels array

Allowed device management levels, an empty list allows all management levels.

↳ require_admin_approval bool

Whether the device needs to be approved by the customer admin.

↳ require_corp_owned bool

Whether the device needs to be corp owned.

getRequireScreenlock

Whether or not screenlock is required for the DevicePolicy to be true.

Defaults to false.

Returns
TypeDescription
bool

setRequireScreenlock

Whether or not screenlock is required for the DevicePolicy to be true.

Defaults to false.

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getAllowedEncryptionStatuses

Allowed encryptions statuses, an empty list allows all statuses.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setAllowedEncryptionStatuses

Allowed encryptions statuses, an empty list allows all statuses.

Parameter
NameDescription
var int[]
Returns
TypeDescription
$this

getOsConstraints

Allowed OS versions, an empty list allows all types and all versions.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setOsConstraints

Allowed OS versions, an empty list allows all types and all versions.

Parameter
NameDescription
var array<Google\Identity\AccessContextManager\V1\OsConstraint>
Returns
TypeDescription
$this

getAllowedDeviceManagementLevels

Allowed device management levels, an empty list allows all management levels.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setAllowedDeviceManagementLevels

Allowed device management levels, an empty list allows all management levels.

Parameter
NameDescription
var int[]
Returns
TypeDescription
$this

getRequireAdminApproval

Whether the device needs to be approved by the customer admin.

Returns
TypeDescription
bool

setRequireAdminApproval

Whether the device needs to be approved by the customer admin.

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getRequireCorpOwned

Whether the device needs to be corp owned.

Returns
TypeDescription
bool

setRequireCorpOwned

Whether the device needs to be corp owned.

Parameter
NameDescription
var bool
Returns
TypeDescription
$this