toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      'timestamp': timestamp.toIso8601String(),
      'totalComponents': totalComponents,
      'usedComponents': usedComponents,
      'unusedComponentsCount': unusedComponents,
      'totalSizeBytes': totalSizeBytes,
      'usedSizeBytes': usedSizeBytes,
      'unusedSizeBytes': unusedSizeBytes,
      'usagePercentage': usagePercentage,
      'potentialSavingsPercent': potentialSavingsPercent,
      'allComponents': allComponents.map((c) => c.toJson()).toList(),
      'unusedComponentsList': unusedComponentsList.map((c) => c.toJson()).toList(),
      'recommendations': recommendations,
    };