AwsEc2SecurityGroupDetails.fromJson constructor

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

Implementation

factory AwsEc2SecurityGroupDetails.fromJson(Map<String, dynamic> json) {
  return AwsEc2SecurityGroupDetails(
    groupId: json['GroupId'] as String?,
    groupName: json['GroupName'] as String?,
    ipPermissions: (json['IpPermissions'] as List?)
        ?.whereNotNull()
        .map((e) => AwsEc2SecurityGroupIpPermission.fromJson(
            e as Map<String, dynamic>))
        .toList(),
    ipPermissionsEgress: (json['IpPermissionsEgress'] as List?)
        ?.whereNotNull()
        .map((e) => AwsEc2SecurityGroupIpPermission.fromJson(
            e as Map<String, dynamic>))
        .toList(),
    ownerId: json['OwnerId'] as String?,
    vpcId: json['VpcId'] as String?,
  );
}