AnalyzedResource.fromJson constructor

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

Implementation

factory AnalyzedResource.fromJson(Map<String, dynamic> json) {
  return AnalyzedResource(
    analyzedAt: nonNullableTimeStampFromJson(json['analyzedAt'] as Object),
    createdAt: nonNullableTimeStampFromJson(json['createdAt'] as Object),
    isPublic: json['isPublic'] as bool,
    resourceArn: json['resourceArn'] as String,
    resourceOwnerAccount: json['resourceOwnerAccount'] as String,
    resourceType: (json['resourceType'] as String).toResourceType(),
    updatedAt: nonNullableTimeStampFromJson(json['updatedAt'] as Object),
    actions: (json['actions'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    error: json['error'] as String?,
    sharedVia: (json['sharedVia'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    status: (json['status'] as String?)?.toFindingStatus(),
  );
}