DownwardAPIVolumeSource.fromJson constructor
Creates a DownwardAPIVolumeSource from JSON data.
Implementation
factory DownwardAPIVolumeSource.fromJson(Map<String, dynamic> json) {
final tempDefaultModeJson = json['defaultMode'];
final tempItemsJson = json['items'];
final int? tempDefaultMode = tempDefaultModeJson;
final List<DownwardAPIVolumeFile>? tempItems = tempItemsJson != null
? List<dynamic>.from(tempItemsJson)
.map(
(e) => DownwardAPIVolumeFile.fromJson(
Map<String, dynamic>.from(e),
),
)
.toList()
: null;
return DownwardAPIVolumeSource(
defaultMode: tempDefaultMode,
items: tempItems,
);
}