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