LoadBalancerIngress.fromJson constructor
Creates a LoadBalancerIngress from JSON data.
Implementation
factory LoadBalancerIngress.fromJson(Map<String, dynamic> json) {
final tempHostnameJson = json['hostname'];
final tempIpJson = json['ip'];
final tempPortsJson = json['ports'];
final String? tempHostname = tempHostnameJson;
final String? tempIp = tempIpJson;
final List<PortStatus>? tempPorts = tempPortsJson != null
? List<dynamic>.from(tempPortsJson)
.map(
(e) => PortStatus.fromJson(
Map<String, dynamic>.from(e),
),
)
.toList()
: null;
return LoadBalancerIngress(
hostname: tempHostname,
ip: tempIp,
ports: tempPorts,
);
}