AssetAttributes.fromJson constructor
AssetAttributes.fromJson(
- Map<String, dynamic> json
)
Implementation
factory AssetAttributes.fromJson(Map<String, dynamic> json) {
return AssetAttributes(
schemaVersion: json['schemaVersion'] as int,
agentId: json['agentId'] as String?,
amiId: json['amiId'] as String?,
autoScalingGroup: json['autoScalingGroup'] as String?,
hostname: json['hostname'] as String?,
ipv4Addresses: (json['ipv4Addresses'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
networkInterfaces: (json['networkInterfaces'] as List?)
?.whereNotNull()
.map((e) => NetworkInterface.fromJson(e as Map<String, dynamic>))
.toList(),
tags: (json['tags'] as List?)
?.whereNotNull()
.map((e) => Tag.fromJson(e as Map<String, dynamic>))
.toList(),
);
}