ResourceChange.fromJson constructor

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

Implementation

factory ResourceChange.fromJson(Map<String, dynamic> json) {
  return ResourceChange(
    action: (json['Action'] as String?)?.toChangeAction(),
    details: (json['Details'] as List?)
        ?.whereNotNull()
        .map((e) => ResourceChangeDetail.fromJson(e as Map<String, dynamic>))
        .toList(),
    logicalResourceId: json['LogicalResourceId'] as String?,
    physicalResourceId: json['PhysicalResourceId'] as String?,
    replacement: (json['Replacement'] as String?)?.toReplacement(),
    resourceType: json['ResourceType'] as String?,
    scope: (json['Scope'] as List?)
        ?.whereNotNull()
        .map((e) => (e as String).toResourceAttribute())
        .toList(),
  );
}