class Google::Apis::AndroidmanagementV1::ComplianceRule

A rule declaring which mitigating actions to take when a device is not compliant with its policy. For every rule, there is always an implicit mitigating action to set policy_compliant to false for the Device resource, and display a message on the device indicating that the device is not compliant with its policy. Other mitigating actions may optionally be taken as well, depending on the field values in the rule.

Attributes

api_level_condition[RW]

A compliance rule condition which is satisfied if the Android Framework API level on the device doesn't meet a minimum requirement. There can only be one rule with this type of condition per policy. Corresponds to the JSON property `apiLevelCondition` @return [Google::Apis::AndroidmanagementV1::ApiLevelCondition]

disable_apps[RW]

If set to true, the rule includes a mitigating action to disable apps so that the device is effectively disabled, but app data is preserved. If the device is running an app in locked task mode, the app will be closed and a UI showing the reason for non-compliance will be displayed. Corresponds to the JSON property `disableApps` @return [Boolean]

disable_apps?[RW]

If set to true, the rule includes a mitigating action to disable apps so that the device is effectively disabled, but app data is preserved. If the device is running an app in locked task mode, the app will be closed and a UI showing the reason for non-compliance will be displayed. Corresponds to the JSON property `disableApps` @return [Boolean]

non_compliance_detail_condition[RW]

A compliance rule condition which is satisfied if there exists any matching NonComplianceDetail for the device. A NonComplianceDetail matches a NonComplianceDetailCondition if all the fields which are set within the NonComplianceDetailCondition match the corresponding NonComplianceDetail fields. Corresponds to the JSON property `nonComplianceDetailCondition` @return [Google::Apis::AndroidmanagementV1::NonComplianceDetailCondition]

package_names_to_disable[RW]

If set, the rule includes a mitigating action to disable apps specified in the list, but app data is preserved. Corresponds to the JSON property `packageNamesToDisable` @return [Array<String>]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/androidmanagement_v1/classes.rb, line 693
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/androidmanagement_v1/classes.rb, line 698
def update!(**args)
  @api_level_condition = args[:api_level_condition] if args.key?(:api_level_condition)
  @disable_apps = args[:disable_apps] if args.key?(:disable_apps)
  @non_compliance_detail_condition = args[:non_compliance_detail_condition] if args.key?(:non_compliance_detail_condition)
  @package_names_to_disable = args[:package_names_to_disable] if args.key?(:package_names_to_disable)
end