NetworkInterface.fromJson constructor

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

Implementation

factory NetworkInterface.fromJson(Map<String, dynamic> json) {
  return NetworkInterface(
    ipv6Addresses: (json['ipv6Addresses'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    networkInterfaceId: json['networkInterfaceId'] as String?,
    privateDnsName: json['privateDnsName'] as String?,
    privateIpAddress: json['privateIpAddress'] as String?,
    privateIpAddresses: (json['privateIpAddresses'] as List?)
        ?.whereNotNull()
        .map((e) => PrivateIp.fromJson(e as Map<String, dynamic>))
        .toList(),
    publicDnsName: json['publicDnsName'] as String?,
    publicIp: json['publicIp'] as String?,
    securityGroups: (json['securityGroups'] as List?)
        ?.whereNotNull()
        .map((e) => SecurityGroup.fromJson(e as Map<String, dynamic>))
        .toList(),
    subnetId: json['subnetId'] as String?,
    vpcId: json['vpcId'] as String?,
  );
}