toJson method
Converts a VolumeMount instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
jsonData['mountPath'] = mountPath;
if (mountPropagation != null) {
jsonData['mountPropagation'] = mountPropagation!;
}
jsonData['name'] = name;
if (readOnly != null) {
jsonData['readOnly'] = readOnly!;
}
if (subPath != null) {
jsonData['subPath'] = subPath!;
}
if (subPathExpr != null) {
jsonData['subPathExpr'] = subPathExpr!;
}
return jsonData;
}