UsageReportSubscription.fromJson constructor

UsageReportSubscription.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory UsageReportSubscription.fromJson(Map<String, dynamic> json) {
  return UsageReportSubscription(
    lastGeneratedReportDate:
        timeStampFromJson(json['LastGeneratedReportDate']),
    s3BucketName: json['S3BucketName'] as String?,
    schedule: (json['Schedule'] as String?)?.toUsageReportSchedule(),
    subscriptionErrors: (json['SubscriptionErrors'] as List?)
        ?.whereNotNull()
        .map((e) => LastReportGenerationExecutionError.fromJson(
            e as Map<String, dynamic>))
        .toList(),
  );
}