PatchbayLogExportResultWire.fromJson constructor

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

Decodes a strict JSON object at path.

Implementation

factory PatchbayLogExportResultWire.fromJson(
  Map<String, Object?> json, {
  String path = r'$',
}) {
  _wireKeys(json, const <String>{
    'source',
    'blob',
    'recordCount',
    'truncated',
    'truncation',
  }, path);
  return PatchbayLogExportResultWire(
    source: PatchbayFactSourceWire.fromJson(
      json['source'],
      path: '$path.source',
    ),
    blob: PatchbayBlobMetadataWire.fromJson(
      _wireMap(json['blob'], '$path.blob'),
      path: '$path.blob',
    ),
    recordCount: _wireInt(json['recordCount'], '$path.recordCount'),
    truncated: _wireBool(json['truncated'], '$path.truncated'),
    truncation: json['truncation'] == null
        ? null
        : PatchbayLogTruncationWire.fromJson(
            json['truncation'],
            path: '$path.truncation',
          ),
  );
}