TemplateVersion.fromJson constructor

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

Implementation

factory TemplateVersion.fromJson(Map<String, dynamic> json) {
  return TemplateVersion(
    createdTime: timeStampFromJson(json['CreatedTime']),
    dataSetConfigurations: (json['DataSetConfigurations'] as List?)
        ?.whereNotNull()
        .map((e) => DataSetConfiguration.fromJson(e as Map<String, dynamic>))
        .toList(),
    description: json['Description'] as String?,
    errors: (json['Errors'] as List?)
        ?.whereNotNull()
        .map((e) => TemplateError.fromJson(e as Map<String, dynamic>))
        .toList(),
    sheets: (json['Sheets'] as List?)
        ?.whereNotNull()
        .map((e) => Sheet.fromJson(e as Map<String, dynamic>))
        .toList(),
    sourceEntityArn: json['SourceEntityArn'] as String?,
    status: (json['Status'] as String?)?.toResourceStatus(),
    themeArn: json['ThemeArn'] as String?,
    versionNumber: json['VersionNumber'] as int?,
  );
}