toJson method
Converts a StorageOSPersistentVolumeSource instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
if (fsType != null) {
jsonData['fsType'] = fsType!;
}
if (readOnly != null) {
jsonData['readOnly'] = readOnly!;
}
if (secretRef != null) {
jsonData['secretRef'] = secretRef!.toJson();
}
if (volumeName != null) {
jsonData['volumeName'] = volumeName!;
}
if (volumeNamespace != null) {
jsonData['volumeNamespace'] = volumeNamespace!;
}
return jsonData;
}