toJson method
Converts a ProjectedVolumeSource instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
final tempDefaultMode = defaultMode;
final tempSources = sources;
if (tempDefaultMode != null) {
jsonData['defaultMode'] = tempDefaultMode;
}
if (tempSources != null) {
jsonData['sources'] =
tempSources.map((e) => e.toJson()).toList(growable: false);
}
return jsonData;
}