toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() => {
  if (routeName != null) 'routeName': routeName,
  'interactiveElements': interactiveElements,
  if (phase != null) 'phase': phase!.name,
  if (diagnosticLevel != null) 'diagnosticLevel': diagnosticLevel!.jsonValue,
  'truncated': truncated,
  if (diagnosticsArtifactRef != null)
    'diagnosticsArtifactRef': diagnosticsArtifactRef!.toJson(),
  if (summary != null) 'summary': summary!.toJson(),
  if (targetKind != null) 'targetKind': targetKind!.name,
  if (executionPlane != null) 'executionPlane': executionPlane!.name,
  if (surfaceKind != null) 'surfaceKind': surfaceKind!.name,
  if (fallbackUsed) 'fallbackUsed': fallbackUsed,
};