toJson method
Converts a PersistentVolumeStatus instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
final tempMessage = message;
final tempPhase = phase;
final tempReason = reason;
if (tempMessage != null) {
jsonData['message'] = tempMessage;
}
if (tempPhase != null) {
jsonData['phase'] = tempPhase;
}
if (tempReason != null) {
jsonData['reason'] = tempReason;
}
return jsonData;
}