DeploymentStatus.fromJson constructor
Creates a DeploymentStatus from JSON data.
Implementation
factory DeploymentStatus.fromJson(Map<String, dynamic> json) {
final tempAvailableReplicasJson = json['availableReplicas'];
final tempCollisionCountJson = json['collisionCount'];
final tempConditionsJson = json['conditions'];
final tempObservedGenerationJson = json['observedGeneration'];
final tempReadyReplicasJson = json['readyReplicas'];
final tempReplicasJson = json['replicas'];
final tempUnavailableReplicasJson = json['unavailableReplicas'];
final tempUpdatedReplicasJson = json['updatedReplicas'];
final int? tempAvailableReplicas = tempAvailableReplicasJson;
final int? tempCollisionCount = tempCollisionCountJson;
final List<DeploymentCondition>? tempConditions = tempConditionsJson != null
? List<dynamic>.from(tempConditionsJson)
.map(
(e) => DeploymentCondition.fromJson(
Map<String, dynamic>.from(e),
),
)
.toList()
: null;
final int? tempObservedGeneration = tempObservedGenerationJson;
final int? tempReadyReplicas = tempReadyReplicasJson;
final int? tempReplicas = tempReplicasJson;
final int? tempUnavailableReplicas = tempUnavailableReplicasJson;
final int? tempUpdatedReplicas = tempUpdatedReplicasJson;
return DeploymentStatus(
availableReplicas: tempAvailableReplicas,
collisionCount: tempCollisionCount,
conditions: tempConditions,
observedGeneration: tempObservedGeneration,
readyReplicas: tempReadyReplicas,
replicas: tempReplicas,
unavailableReplicas: tempUnavailableReplicas,
updatedReplicas: tempUpdatedReplicas,
);
}