Instance.fromJson constructor
Instance.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Instance.fromJson(Map<String, dynamic> json) {
return Instance(
ebsVolumes: (json['EbsVolumes'] as List?)
?.whereNotNull()
.map((e) => EbsVolume.fromJson(e as Map<String, dynamic>))
.toList(),
ec2InstanceId: json['Ec2InstanceId'] as String?,
id: json['Id'] as String?,
instanceFleetId: json['InstanceFleetId'] as String?,
instanceGroupId: json['InstanceGroupId'] as String?,
instanceType: json['InstanceType'] as String?,
market: (json['Market'] as String?)?.toMarketType(),
privateDnsName: json['PrivateDnsName'] as String?,
privateIpAddress: json['PrivateIpAddress'] as String?,
publicDnsName: json['PublicDnsName'] as String?,
publicIpAddress: json['PublicIpAddress'] as String?,
status: json['Status'] != null
? InstanceStatus.fromJson(json['Status'] as Map<String, dynamic>)
: null,
);
}