Blueprint class

What a server should be.

A blueprint is composed from includes — presets that already exist and are shared across the fleet — plus resources of its own. A preset is a piece; a blueprint is a machine. Only a blueprint is assignable to a node, which is the distinction that justifies the two names.

Applying one transforms an unmanaged server into this state and keeps it there. Re-applying does nothing, because every resource declares what it should be rather than what to do to it.

Annotations
  • @immutable

Constructors

Blueprint({required BlueprintId id, required String name, String description = '', List<String> platforms = const [], List<PresetId> includes = const [], Map<String, String> vars = const {}, List<Resource> resources = const [], BlueprintSource? source})
Creates a blueprint.
const

Properties

description → String
A short description of what this kind of server is for.
final
hashCode → int
The hash code for this object.
no setterinherited
id → BlueprintId
The blueprint identity.
final
includes → List<PresetId>
Presets to fold in, in order, before resources.
final
name → String
A human-friendly name.
final
platforms → List<String>
The OS families this blueprint is written for. Empty means all.
final
resources → List<Resource>
This blueprint's own resources, applied on top of everything includes brought in.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
source → BlueprintSource?
The document as it was authored, when it came from a file.
final
vars → Map<String, String>
${name} substitutions applied to every string in resources.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
supportsPlatform(String platform) → bool
Whether this blueprint is written for platform (an osName).
toJson() → Map<String, dynamic>
JSON form.
toString() → String
A string representation of this object.
override
withSource(BlueprintSource source) → Blueprint
A copy carrying source.

Operators

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

Static Methods

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