toJson method
Implementation
Map<String, dynamic> toJson() {
return {
if (command != null) 'command': command,
if (workingDir != null) 'working_dir': workingDir,
'image': image,
if (runAs != null) 'run_as': runAs!.toJson(),
if (pullSecret != null) 'pull_secret': pullSecret!.toJson(),
if (environment.isNotEmpty) 'environment': environment.map((x) => x.toJson()).toList(),
if (storage != null) 'storage': storage!.toJson(),
if (onDemand != null) 'on_demand': onDemand,
if (writableRootFs != null) "writable_root_fs": writableRootFs,
if (private != null) 'private': private,
};
}