toDocument method

Map<String, dynamic> toDocument()

Implementation

Map<String, dynamic> toDocument() => {
  'schema': schema,
  'spec': spec,
  'scenario': scenario,
  'feature': feature,
  'version': version,
  'description': description,
  'time': {'seed': seed},
  'touchpoints': [for (final t in touchpoints) t.toJson()],
  'latency': {for (final e in latency.entries) e.key: e.value.toJson()},
  'failureSchedule': {
    'storms': [for (final s in storms) s.toJson()],
  },
  'corpus': corpus,
  'behaviors': [for (final b in behaviors) b.toJson()],
};