PatchbayRevealResultWire.fromJson constructor
Decodes a strict JSON object at path.
Implementation
factory PatchbayRevealResultWire.fromJson(
Map<String, Object?> json, {
String path = r'$',
}) {
_wireKeys(json, const <String>{
'outcome',
'source',
'identifier',
'steps',
'elapsedMs',
'containers',
'nodeId',
'generation',
'reachability',
'beforeTreeRevision',
'afterTreeRevision',
'reason',
'failureType',
'gateId',
'gateCode',
}, path);
return PatchbayRevealResultWire(
outcome: _wireString(json['outcome'], '$path.outcome'),
source: PatchbayFactSourceWire.fromJson(
json['source'],
path: '$path.source',
),
identifier: _wireString(json['identifier'], '$path.identifier'),
steps: _wireInt(json['steps'], '$path.steps'),
elapsedMs: _wireInt(json['elapsedMs'], '$path.elapsedMs'),
containers: _wireList(json['containers'], '$path.containers')
.map(
(item) => PatchbayRevealContainerWire.fromJson(
_wireMap(item, '$path.containers[]'),
path: '$path.containers[]',
),
)
.toList(growable: false),
nodeId: json['nodeId'] == null
? null
: _wireInt(json['nodeId'], '$path.nodeId'),
generation: json['generation'] == null
? null
: _wireInt(json['generation'], '$path.generation'),
reachability: json['reachability'] == null
? null
: PatchbayRevealReachabilityWire.fromJson(
json['reachability'],
path: '$path.reachability',
),
beforeTreeRevision: _wireInt(
json['beforeTreeRevision'],
'$path.beforeTreeRevision',
),
afterTreeRevision: _wireInt(
json['afterTreeRevision'],
'$path.afterTreeRevision',
),
reason: json['reason'] == null
? null
: _wireString(json['reason'], '$path.reason'),
failureType: json['failureType'] == null
? null
: _wireString(json['failureType'], '$path.failureType'),
gateId: json['gateId'] == null
? null
: _wireString(json['gateId'], '$path.gateId'),
gateCode: json['gateCode'] == null
? null
: _wireString(json['gateCode'], '$path.gateCode'),
);
}