AwsEc2InstanceDetails.fromJson constructor

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

Implementation

factory AwsEc2InstanceDetails.fromJson(Map<String, dynamic> json) {
  return AwsEc2InstanceDetails(
    iamInstanceProfileArn: json['IamInstanceProfileArn'] as String?,
    imageId: json['ImageId'] as String?,
    ipV4Addresses: (json['IpV4Addresses'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    ipV6Addresses: (json['IpV6Addresses'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    keyName: json['KeyName'] as String?,
    launchedAt: json['LaunchedAt'] as String?,
    subnetId: json['SubnetId'] as String?,
    type: json['Type'] as String?,
    vpcId: json['VpcId'] as String?,
  );
}