Class: Google::Apis::AndroidmanagementV1::ComplianceRule
- Inherits:
-
Object
- Object
- Google::Apis::AndroidmanagementV1::ComplianceRule
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/androidmanagement_v1/classes.rb,
lib/google/apis/androidmanagement_v1/representations.rb,
lib/google/apis/androidmanagement_v1/representations.rb
Overview
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.
Instance Attribute Summary collapse
-
#api_level_condition ⇒ Google::Apis::AndroidmanagementV1::ApiLevelCondition
A compliance rule condition which is satisfied if the Android Framework API level on the device doesn't meet a minimum requirement.
-
#disable_apps ⇒ Boolean
(also: #disable_apps?)
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.
-
#non_compliance_detail_condition ⇒ Google::Apis::AndroidmanagementV1::NonComplianceDetailCondition
A compliance rule condition which is satisfied if there exists any matching NonComplianceDetail for the device.
-
#package_names_to_disable ⇒ Array<String>
If set, the rule includes a mitigating action to disable apps specified in the list, but app data is preserved.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ComplianceRule
constructor
A new instance of ComplianceRule.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ComplianceRule
Returns a new instance of ComplianceRule.
1269 1270 1271 |
# File 'lib/google/apis/androidmanagement_v1/classes.rb', line 1269 def initialize(**args) update!(**args) end |
Instance Attribute Details
#api_level_condition ⇒ Google::Apis::AndroidmanagementV1::ApiLevelCondition
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
1243 1244 1245 |
# File 'lib/google/apis/androidmanagement_v1/classes.rb', line 1243 def api_level_condition @api_level_condition end |
#disable_apps ⇒ Boolean Also known as: disable_apps?
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
1251 1252 1253 |
# File 'lib/google/apis/androidmanagement_v1/classes.rb', line 1251 def disable_apps @disable_apps end |
#non_compliance_detail_condition ⇒ Google::Apis::AndroidmanagementV1::NonComplianceDetailCondition
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
1261 1262 1263 |
# File 'lib/google/apis/androidmanagement_v1/classes.rb', line 1261 def non_compliance_detail_condition @non_compliance_detail_condition end |
#package_names_to_disable ⇒ Array<String>
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
1267 1268 1269 |
# File 'lib/google/apis/androidmanagement_v1/classes.rb', line 1267 def package_names_to_disable @package_names_to_disable end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1274 1275 1276 1277 1278 1279 |
# File 'lib/google/apis/androidmanagement_v1/classes.rb', line 1274 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 |