LambdaFunctionRecommendation.fromJson constructor
LambdaFunctionRecommendation.fromJson(
- Map<String, dynamic> json
)
Implementation
factory LambdaFunctionRecommendation.fromJson(Map<String, dynamic> json) {
return LambdaFunctionRecommendation(
accountId: json['accountId'] as String?,
currentMemorySize: json['currentMemorySize'] as int?,
finding:
(json['finding'] as String?)?.toLambdaFunctionRecommendationFinding(),
findingReasonCodes: (json['findingReasonCodes'] as List?)
?.whereNotNull()
.map((e) =>
(e as String).toLambdaFunctionRecommendationFindingReasonCode())
.toList(),
functionArn: json['functionArn'] as String?,
functionVersion: json['functionVersion'] as String?,
lastRefreshTimestamp: timeStampFromJson(json['lastRefreshTimestamp']),
lookbackPeriodInDays: json['lookbackPeriodInDays'] as double?,
memorySizeRecommendationOptions:
(json['memorySizeRecommendationOptions'] as List?)
?.whereNotNull()
.map((e) => LambdaFunctionMemoryRecommendationOption.fromJson(
e as Map<String, dynamic>))
.toList(),
numberOfInvocations: json['numberOfInvocations'] as int?,
utilizationMetrics: (json['utilizationMetrics'] as List?)
?.whereNotNull()
.map((e) => LambdaFunctionUtilizationMetric.fromJson(
e as Map<String, dynamic>))
.toList(),
);
}