Policy.UnifiedUpdatePolicy.Rule

public abstract class Policy.UnifiedUpdatePolicy.Rule


A rule as a part of the unified update policy. See `rules` for how this is used.

Summary

Nested types

Builder for Policy.UnifiedUpdatePolicy.Rule.

Determines how to proceed with the update.

Builder for Policy.UnifiedUpdatePolicy.Rule.Outcome.

Determines how to proceed with the update.

A predicate is something that can be evaluated on a device at any point of time, to return true or false.

Builder for Policy.UnifiedUpdatePolicy.Rule.Predicate.

A stage for an update at which a policy may be evaluated.

A software component that can be updated.

Builder for Policy.UnifiedUpdatePolicy.Rule.Target.

Details of an app on Google System services.

Builder for Policy.UnifiedUpdatePolicy.Rule.Target.SingleApp.

Additional details to specify a target.

The possible kind of Policy.UnifiedUpdatePolicy.Rule.Target.TargetDetailsCase.

The type of software component that can be updated.

Public methods

static Policy.UnifiedUpdatePolicy.Rule.Builder
static Policy.UnifiedUpdatePolicy.Rule
abstract String

Required.

Policy.UnifiedUpdatePolicy.Rule.Outcome

Determines how to proceed with the update.

Policy.UnifiedUpdatePolicy.Rule.Predicate

The predicate of the rule, which can evaluate to true or false.

abstract ImmutableList<Policy.UnifiedUpdatePolicy.Rule.Stage>

The stages at which the rule is evaluated.

abstract ImmutableList<Policy.UnifiedUpdatePolicy.Rule.Target>

Targets that this rule applies to.

boolean

Returns true if outcome is set.

boolean

Returns true if predicate is set.

abstract Policy.UnifiedUpdatePolicy.Rule.Builder

Public methods

getDefaultInstance

public static Policy.UnifiedUpdatePolicy.Rule getDefaultInstance()

getId

public abstract String getId()

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.

getOutcome

public Policy.UnifiedUpdatePolicy.Rule.Outcome getOutcome()

Determines how to proceed with the update.

getPredicate

public Policy.UnifiedUpdatePolicy.Rule.Predicate getPredicate()

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.

getStages

public abstract ImmutableList<Policy.UnifiedUpdatePolicy.Rule.Stage> getStages()

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.

getTargets

public abstract ImmutableList<Policy.UnifiedUpdatePolicy.Rule.Target> getTargets()

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.

hasOutcome

public boolean hasOutcome()

Returns true if outcome is set.

hasPredicate

public boolean hasPredicate()

Returns true if predicate is set.

toBuilder

public abstract Policy.UnifiedUpdatePolicy.Rule.Builder toBuilder()