toJson method
Implementation
Map<String, dynamic> toJson() {
final hostPath = this.hostPath;
final containerPath = this.containerPath;
final permissions = this.permissions;
return {
'hostPath': hostPath,
if (containerPath != null) 'containerPath': containerPath,
if (permissions != null)
'permissions': permissions.map((e) => e.toValue()).toList(),
};
}