toJson method
Converts a PersistentVolumeClaimCondition instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
final tempLastProbeTime = lastProbeTime;
final tempLastTransitionTime = lastTransitionTime;
final tempMessage = message;
final tempReason = reason;
final tempStatus = status;
final tempType = type;
if (tempLastProbeTime != null) {
jsonData['lastProbeTime'] = tempLastProbeTime;
}
if (tempLastTransitionTime != null) {
jsonData['lastTransitionTime'] = tempLastTransitionTime;
}
if (tempMessage != null) {
jsonData['message'] = tempMessage;
}
if (tempReason != null) {
jsonData['reason'] = tempReason;
}
jsonData['status'] = tempStatus;
jsonData['type'] = tempType;
return jsonData;
}