Payload class

The task-control request defined at SPEC.md §11: a producer withdrawing, pausing, or resuming work a consumer has already accepted. This is a REQUEST, not a response. A consumer that stops work on its own initiative does not send one of these — it returns a trust-task-error carrying cancelled, so that a withdrawal and a refusal remain distinguishable to every party and to any auditor reading the retained documents afterwards. The operation takes effect through SPEC.md §7.2 item 12: a valid, authorized control operation is one of the conditions a consumer re-evaluates immediately before each irreversible or externally visible effect. There is no separate race protocol.

Constructors

Payload({required Object? operation, required PayloadTarget target, String? reason, Map<String, dynamic>? ext})
const
Payload.fromJson(Map<String, dynamic> json)
Read this payload from a decoded JSON object.
factory

Properties

ext → Map<String, dynamic>?
Vendor-namespaced extension data per SPEC.md §4.5.1. Every immediate child key MUST be a reverse-DNS prefix the producer controls.
final
hashCode → int
The hash code for this object.
no setterinherited
operation → Object?
The control operation requested. cancel stops the task permanently: it is terminal, and a cancelled task MUST NOT be resumed, retried, or cancelled again (SPEC.md §11.3). suspend halts further effects while preserving the consumer's current execution state — it does not undo work already performed. resume continues a suspended task from the state the consumer holds; a consumer MUST NOT resume after the target document's expiresAt (SPEC.md §11.5). This is a discriminating field. A consumer that does not recognize a value MUST reject the document rather than apply a default — silently downgrading an unrecognized operation to a known one would let a producer's intent be replaced by the consumer's guess.
final
reason → String?
Human-readable explanation of why the operation was requested. Non-normative; intended for operator UI and audit records. A consumer MUST NOT condition its handling of the operation on this value.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
target → PayloadTarget
The specific Trust Task document this operation applies to. Per SPEC.md §11.2, threadId, parentThreadId and ceremony membership MUST NOT identify the target on their own: more than one document can occur in a single exchange or enactment.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Serialize to a JSON-encodable map, omitting absent members.
toString() → String
A string representation of this object.
inherited

Operators

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