DesiredState class

What the Hub wants a node to be.

Two ways of saying it, and a node has one or the other:

  • a blueprint, named here and resolved on demand — the richer answer, because a blueprint composes shared presets, declares states rather than actions, and can describe resources a formula step cannot;
  • a list of steps, the original form, kept working exactly as it was.

The blueprint is the direction of travel, but nothing forces a move: a node declared by steps keeps its DefaultStateReconciler path, unchanged.

Annotations
  • @immutable

Constructors

DesiredState(List<PresetStep> steps, {BlueprintId? blueprint})
Creates a desired state.
const
DesiredState.fromBlueprint(BlueprintId blueprint)
Assigns blueprint to a node.
factory
DesiredState.fromPresets(Iterable<Preset> presets)
Builds a desired state from presets (steps concatenated in order).
factory

Properties

blueprint → BlueprintId?
The blueprint this node is assigned, when it is assigned one.
final
hashCode → int
The hash code for this object.
no setterinherited
isBlueprint → bool
Whether this node is declared by a blueprint rather than by steps.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
steps → List<PresetStep>
The steps that, when all converged, satisfy the desired state.
final
summary → String
A one-line summary, for an audit entry or a CLI line.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
JSON form.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

fromJson(Map<String, dynamic> json) → DesiredState
Decodes from JSON.

Constants

empty → const DesiredState
An empty desired state.