1.3.0 (latest) 1.2.4 1.1.3 1.0.4 0.5.5 0.4.5 0.3.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** ||
|---|---|
| **Name** | **Description** |
| `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` | `int[]` Allowed encryptions statuses, an empty list allows all statuses. |
| `↳ os_constraints` | `array<https://docs.cloud.google.com/php/docs/reference/access-context-manager/latest/V1.OsConstraint>` Allowed OS versions, an empty list allows all types and all versions. |
| `↳ allowed_device_management_levels` | `int[]` 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** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setRequireScreenlock

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

Defaults to `false`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAllowedEncryptionStatuses

Allowed encryptions statuses, an empty list allows all statuses.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<int>` |   |

### setAllowedEncryptionStatuses

Allowed encryptions statuses, an empty list allows all statuses.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getOsConstraints

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<https://docs.cloud.google.com/php/docs/reference/access-context-manager/latest/V1.OsConstraint>` |   |

### setOsConstraints

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/access-context-manager/latest/V1.OsConstraint>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAllowedDeviceManagementLevels

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<int>` |   |

### setAllowedDeviceManagementLevels

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRequireAdminApproval

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setRequireAdminApproval

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRequireCorpOwned

Whether the device needs to be corp owned.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setRequireCorpOwned

Whether the device needs to be corp owned.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |