# Access Context Manager V1 API - Class Google::Identity::AccessContextManager::V1::DevicePolicy (v0.15.0)

0.15.0 (latest) 0.14.1 0.13.1 0.12.0 0.11.0 0.10.1 0.9.0 0.8.2 0.7.2 0.6.0 0.5.2 0.4.0 0.3.0 0.2.0 0.1.2 Reference documentation and code samples for the Access Context Manager V1 API class Google::Identity::AccessContextManager::V1::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.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #allowed_device_management_levels

    def allowed_device_management_levels() -> ::Array<::Google::Identity::AccessContextManager::Type::DeviceManagementLevel>

**Returns**

- (::Array\<[::Google::Identity::AccessContextManager::Type::DeviceManagementLevel](https://docs.cloud.google.com/ruby/docs/reference/google-identity-access_context_manager-v1/latest/Google-Identity-AccessContextManager-Type-DeviceManagementLevel)\>) --- Allowed device management levels, an empty list allows all management levels.

### #allowed_device_management_levels=

    def allowed_device_management_levels=(value) -> ::Array<::Google::Identity::AccessContextManager::Type::DeviceManagementLevel>

**Parameter**

- **value** (::Array\<[::Google::Identity::AccessContextManager::Type::DeviceManagementLevel](https://docs.cloud.google.com/ruby/docs/reference/google-identity-access_context_manager-v1/latest/Google-Identity-AccessContextManager-Type-DeviceManagementLevel)\>) --- Allowed device management levels, an empty list allows all management levels.
**Returns**

- (::Array\<[::Google::Identity::AccessContextManager::Type::DeviceManagementLevel](https://docs.cloud.google.com/ruby/docs/reference/google-identity-access_context_manager-v1/latest/Google-Identity-AccessContextManager-Type-DeviceManagementLevel)\>) --- Allowed device management levels, an empty list allows all management levels.

### #allowed_encryption_statuses

    def allowed_encryption_statuses() -> ::Array<::Google::Identity::AccessContextManager::Type::DeviceEncryptionStatus>

**Returns**

- (::Array\<[::Google::Identity::AccessContextManager::Type::DeviceEncryptionStatus](https://docs.cloud.google.com/ruby/docs/reference/google-identity-access_context_manager-v1/latest/Google-Identity-AccessContextManager-Type-DeviceEncryptionStatus)\>) --- Allowed encryptions statuses, an empty list allows all statuses.

### #allowed_encryption_statuses=

    def allowed_encryption_statuses=(value) -> ::Array<::Google::Identity::AccessContextManager::Type::DeviceEncryptionStatus>

**Parameter**

- **value** (::Array\<[::Google::Identity::AccessContextManager::Type::DeviceEncryptionStatus](https://docs.cloud.google.com/ruby/docs/reference/google-identity-access_context_manager-v1/latest/Google-Identity-AccessContextManager-Type-DeviceEncryptionStatus)\>) --- Allowed encryptions statuses, an empty list allows all statuses.
**Returns**

- (::Array\<[::Google::Identity::AccessContextManager::Type::DeviceEncryptionStatus](https://docs.cloud.google.com/ruby/docs/reference/google-identity-access_context_manager-v1/latest/Google-Identity-AccessContextManager-Type-DeviceEncryptionStatus)\>) --- Allowed encryptions statuses, an empty list allows all statuses.

### #os_constraints

    def os_constraints() -> ::Array<::Google::Identity::AccessContextManager::V1::OsConstraint>

**Returns**

- (::Array\<[::Google::Identity::AccessContextManager::V1::OsConstraint](https://docs.cloud.google.com/ruby/docs/reference/google-identity-access_context_manager-v1/latest/Google-Identity-AccessContextManager-V1-OsConstraint)\>) --- Allowed OS versions, an empty list allows all types and all versions.

### #os_constraints=

    def os_constraints=(value) -> ::Array<::Google::Identity::AccessContextManager::V1::OsConstraint>

**Parameter**

- **value** (::Array\<[::Google::Identity::AccessContextManager::V1::OsConstraint](https://docs.cloud.google.com/ruby/docs/reference/google-identity-access_context_manager-v1/latest/Google-Identity-AccessContextManager-V1-OsConstraint)\>) --- Allowed OS versions, an empty list allows all types and all versions.
**Returns**

- (::Array\<[::Google::Identity::AccessContextManager::V1::OsConstraint](https://docs.cloud.google.com/ruby/docs/reference/google-identity-access_context_manager-v1/latest/Google-Identity-AccessContextManager-V1-OsConstraint)\>) --- Allowed OS versions, an empty list allows all types and all versions.

### #require_admin_approval

    def require_admin_approval() -> ::Boolean

**Returns**

- (::Boolean) --- Whether the device needs to be approved by the customer admin.

### #require_admin_approval=

    def require_admin_approval=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- Whether the device needs to be approved by the customer admin.
**Returns**

- (::Boolean) --- Whether the device needs to be approved by the customer admin.

### #require_corp_owned

    def require_corp_owned() -> ::Boolean

**Returns**

- (::Boolean) --- Whether the device needs to be corp owned.

### #require_corp_owned=

    def require_corp_owned=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- Whether the device needs to be corp owned.
**Returns**

- (::Boolean) --- Whether the device needs to be corp owned.

### #require_screenlock

    def require_screenlock() -> ::Boolean

**Returns**

- (::Boolean) --- Whether or not screenlock is required for the DevicePolicy to be true. Defaults to `false`.

### #require_screenlock=

    def require_screenlock=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- Whether or not screenlock is required for the DevicePolicy to be true. Defaults to `false`.
**Returns**

- (::Boolean) --- Whether or not screenlock is required for the DevicePolicy to be true. Defaults to `false`.