ReplicationControllerStatus.fromJson constructor
Creates a ReplicationControllerStatus from JSON data.
Implementation
factory ReplicationControllerStatus.fromJson(Map<String, dynamic> json) {
final tempAvailableReplicasJson = json['availableReplicas'];
final tempConditionsJson = json['conditions'];
final tempFullyLabeledReplicasJson = json['fullyLabeledReplicas'];
final tempObservedGenerationJson = json['observedGeneration'];
final tempReadyReplicasJson = json['readyReplicas'];
final tempReplicasJson = json['replicas'];
final int? tempAvailableReplicas = tempAvailableReplicasJson;
final List<ReplicationControllerCondition>? tempConditions =
tempConditionsJson != null
? List<dynamic>.from(tempConditionsJson)
.map(
(e) => ReplicationControllerCondition.fromJson(
Map<String, dynamic>.from(e),
),
)
.toList()
: null;
final int? tempFullyLabeledReplicas = tempFullyLabeledReplicasJson;
final int? tempObservedGeneration = tempObservedGenerationJson;
final int? tempReadyReplicas = tempReadyReplicasJson;
final int tempReplicas = tempReplicasJson;
return ReplicationControllerStatus(
availableReplicas: tempAvailableReplicas,
conditions: tempConditions,
fullyLabeledReplicas: tempFullyLabeledReplicas,
observedGeneration: tempObservedGeneration,
readyReplicas: tempReadyReplicas,
replicas: tempReplicas,
);
}