ServiceStatus.fromJson constructor
Creates a ServiceStatus from JSON data.
Implementation
factory ServiceStatus.fromJson(Map<String, dynamic> json) {
final tempConditionsJson = json['conditions'];
final tempLoadBalancerJson = json['loadBalancer'];
final List<Condition>? tempConditions = tempConditionsJson != null
? List<dynamic>.from(tempConditionsJson)
.map(
(e) => Condition.fromJson(
Map<String, dynamic>.from(e),
),
)
.toList()
: null;
final LoadBalancerStatus? tempLoadBalancer = tempLoadBalancerJson != null
? LoadBalancerStatus.fromJson(tempLoadBalancerJson)
: null;
return ServiceStatus(
conditions: tempConditions,
loadBalancer: tempLoadBalancer,
);
}