Resource.fromJson constructor

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

Implementation

factory Resource.fromJson(Map<String, dynamic> json) {
  return Resource(
    accessKeyDetails: json['accessKeyDetails'] != null
        ? AccessKeyDetails.fromJson(
            json['accessKeyDetails'] as Map<String, dynamic>)
        : null,
    instanceDetails: json['instanceDetails'] != null
        ? InstanceDetails.fromJson(
            json['instanceDetails'] as Map<String, dynamic>)
        : null,
    resourceType: json['resourceType'] as String?,
    s3BucketDetails: (json['s3BucketDetails'] as List?)
        ?.whereNotNull()
        .map((e) => S3BucketDetail.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}