PersistentVolumeClaimCondition.fromJson constructor
Creates a PersistentVolumeClaimCondition from JSON data.
Implementation
factory PersistentVolumeClaimCondition.fromJson(Map<String, dynamic> json) {
final tempLastProbeTimeJson = json['lastProbeTime'];
final tempLastTransitionTimeJson = json['lastTransitionTime'];
final tempMessageJson = json['message'];
final tempReasonJson = json['reason'];
final tempStatusJson = json['status'];
final tempTypeJson = json['type'];
final DateTime? tempLastProbeTime = tempLastProbeTimeJson != null
? DateTime.tryParse(tempLastProbeTimeJson)
: null;
final DateTime? tempLastTransitionTime = tempLastTransitionTimeJson != null
? DateTime.tryParse(tempLastTransitionTimeJson)
: null;
final String? tempMessage = tempMessageJson;
final String? tempReason = tempReasonJson;
final String tempStatus = tempStatusJson;
final String tempType = tempTypeJson;
return PersistentVolumeClaimCondition(
lastProbeTime: tempLastProbeTime,
lastTransitionTime: tempLastTransitionTime,
message: tempMessage,
reason: tempReason,
status: tempStatus,
type: tempType,
);
}