Policy.UnifiedUpdatePolicy.Rule.Builder

abstract class Policy.UnifiedUpdatePolicy.Rule.Builder


Builder for Policy.UnifiedUpdatePolicy.Rule.

Summary

Public functions

build

abstract fun build(): Policy.UnifiedUpdatePolicy.Rule!

clearOutcome

fun clearOutcome(): Policy.UnifiedUpdatePolicy.Rule.Builder!

Clears outcome.

clearPredicate

fun clearPredicate(): Policy.UnifiedUpdatePolicy.Rule.Builder!

Clears predicate.

setId

abstract fun setId(value: String!): Policy.UnifiedUpdatePolicy.Rule.Builder!

Required. An EMM-defined identifier for this rule, of length at most 64 characters. This must not be empty. Within a `UnifiedUpdatePolicy`, different `rules` must have different `id`s.

setOutcome

fun setOutcome(value: Policy.UnifiedUpdatePolicy.Rule.Outcome!): Policy.UnifiedUpdatePolicy.Rule.Builder!

Determines how to proceed with the update.

setPredicate

fun setPredicate(value: Policy.UnifiedUpdatePolicy.Rule.Predicate!): Policy.UnifiedUpdatePolicy.Rule.Builder!

The predicate of the rule, which can evaluate to true or false. See `rules` for how this is used. If not set, the predicate always evaluates to true.

setStages

fun setStages(
    value: (Mutable)Iterable<Policy.UnifiedUpdatePolicy.Rule.Stage!>!
): Policy.UnifiedUpdatePolicy.Rule.Builder!

The stages at which the rule is evaluated. If this list is empty, the rule is evaluated at all stages. Specifying stages is supported only for `OS_UPDATE_WITHOUT_API_LEVEL_CHANGE` and `OS_UPDATE_WITH_API_LEVEL_CHANGE`. For `SINGLE_APP`, `GOOGLE_SYSTEM_SERVICES`, and `GOOGLE_PLAY_SYSTEM_UPDATE`, this field is ignored and the rule is evaluated at all stages.

setTargets

fun setTargets(
    value: (Mutable)Iterable<Policy.UnifiedUpdatePolicy.Rule.Target!>!
): Policy.UnifiedUpdatePolicy.Rule.Builder!

Targets that this rule applies to. This can have multiple targets here for convenience, and that is equivalent to having multiple rules in sequence each having one target, in the same order in which targets are listed here. This list must not be empty and must not have duplicates.