toJson method
Converts a DownwardAPIVolumeFile instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
final tempFieldRef = fieldRef;
final tempMode = mode;
final tempPath = path;
final tempResourceFieldRef = resourceFieldRef;
if (tempFieldRef != null) {
jsonData['fieldRef'] = tempFieldRef.toJson();
}
if (tempMode != null) {
jsonData['mode'] = tempMode;
}
jsonData['path'] = tempPath;
if (tempResourceFieldRef != null) {
jsonData['resourceFieldRef'] = tempResourceFieldRef.toJson();
}
return jsonData;
}