UsageMetricReport.fromJson constructor
Implementation
factory UsageMetricReport.fromJson(Map<String, Object?> json) =>
UsageMetricReport(
metric: UsageMetric.fromWire(json['metric'] as String),
unit: json['unit'] as String,
consumed: (json['consumed'] as num).toDouble(),
reserved: (json['reserved'] as num).toDouble(),
unknown: (json['unknown'] as num).toDouble(),
limit: (json['limit'] as num?)?.toInt(),
remaining: (json['remaining'] as num?)?.toDouble(),
enforcement: UsageMetricReportEnforcement.fromWire(
json['enforcement'] as String,
),
);