#[non_exhaustive]pub struct DevicePolicy {
pub require_screenlock: bool,
pub allowed_encryption_statuses: Vec<DeviceEncryptionStatus>,
pub os_constraints: Vec<OsConstraint>,
pub allowed_device_management_levels: Vec<DeviceManagementLevel>,
pub require_admin_approval: bool,
pub require_corp_owned: bool,
/* private fields */
}Expand description
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.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.require_screenlock: boolWhether or not screenlock is required for the DevicePolicy to be true.
Defaults to false.
allowed_encryption_statuses: Vec<DeviceEncryptionStatus>Allowed encryptions statuses, an empty list allows all statuses.
os_constraints: Vec<OsConstraint>Allowed OS versions, an empty list allows all types and all versions.
allowed_device_management_levels: Vec<DeviceManagementLevel>Allowed device management levels, an empty list allows all management levels.
require_admin_approval: boolWhether the device needs to be approved by the customer admin.
require_corp_owned: boolWhether the device needs to be corp owned.
Implementations§
Source§impl DevicePolicy
impl DevicePolicy
pub fn new() -> Self
Sourcepub fn set_require_screenlock<T: Into<bool>>(self, v: T) -> Self
pub fn set_require_screenlock<T: Into<bool>>(self, v: T) -> Self
Sets the value of require_screenlock.
Sourcepub fn set_allowed_encryption_statuses<T, V>(self, v: T) -> Self
pub fn set_allowed_encryption_statuses<T, V>(self, v: T) -> Self
Sets the value of allowed_encryption_statuses.
Sourcepub fn set_os_constraints<T, V>(self, v: T) -> Self
pub fn set_os_constraints<T, V>(self, v: T) -> Self
Sets the value of os_constraints.
Sourcepub fn set_allowed_device_management_levels<T, V>(self, v: T) -> Self
pub fn set_allowed_device_management_levels<T, V>(self, v: T) -> Self
Sets the value of allowed_device_management_levels.
Sourcepub fn set_require_admin_approval<T: Into<bool>>(self, v: T) -> Self
pub fn set_require_admin_approval<T: Into<bool>>(self, v: T) -> Self
Sets the value of require_admin_approval.
Sourcepub fn set_require_corp_owned<T: Into<bool>>(self, v: T) -> Self
pub fn set_require_corp_owned<T: Into<bool>>(self, v: T) -> Self
Sets the value of require_corp_owned.
Trait Implementations§
Source§impl Clone for DevicePolicy
impl Clone for DevicePolicy
Source§fn clone(&self) -> DevicePolicy
fn clone(&self) -> DevicePolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more