PatchbayUiWaitRequestWire.fromJson constructor

PatchbayUiWaitRequestWire.fromJson(
  1. Map<String, Object?> json, {
  2. String path = r'$',
})

Decodes a strict JSON object at path.

Implementation

factory PatchbayUiWaitRequestWire.fromJson(
  Map<String, Object?> json, {
  String path = r'$',
}) {
  _wireKeys(json, const <String>{
    'condition',
    'timeoutMs',
    'semanticsIdentifier',
    'value',
    'destinationId',
    'revision',
  }, path);
  return PatchbayUiWaitRequestWire(
    condition: PatchbayUiWaitConditionWire.fromJson(
      json['condition'],
      path: '$path.condition',
    ),
    timeoutMs: _wireInt(json['timeoutMs'], '$path.timeoutMs'),
    semanticsIdentifier: json['semanticsIdentifier'] == null
        ? null
        : _wireString(
            json['semanticsIdentifier'],
            '$path.semanticsIdentifier',
          ),
    value: json['value'] == null
        ? null
        : _wireString(json['value'], '$path.value'),
    destinationId: json['destinationId'] == null
        ? null
        : _wireString(json['destinationId'], '$path.destinationId'),
    revision: json['revision'] == null
        ? null
        : _wireInt(json['revision'], '$path.revision'),
  );
}