toJson method
Converts a PortworxVolumeSource instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
final tempFsType = fsType;
final tempReadOnly = readOnly;
final tempVolumeID = volumeID;
if (tempFsType != null) {
jsonData['fsType'] = tempFsType;
}
if (tempReadOnly != null) {
jsonData['readOnly'] = tempReadOnly;
}
jsonData['volumeID'] = tempVolumeID;
return jsonData;
}