toJson method
Implementation
@override
Object toJson() => {
'imageUri': imageUri,
if (command.isNotDefault) 'command': command,
if (args.isNotDefault) 'args': args,
if (env.isNotDefault) 'env': [for (final i in env) i.toJson()],
if (ports.isNotDefault) 'ports': [for (final i in ports) i.toJson()],
if (predictRoute.isNotDefault) 'predictRoute': predictRoute,
if (healthRoute.isNotDefault) 'healthRoute': healthRoute,
if (invokeRoutePrefix.isNotDefault) 'invokeRoutePrefix': invokeRoutePrefix,
if (grpcPorts.isNotDefault)
'grpcPorts': [for (final i in grpcPorts) i.toJson()],
if (deploymentTimeout case final deploymentTimeout?)
'deploymentTimeout': deploymentTimeout.toJson(),
if (sharedMemorySizeMb.isNotDefault)
'sharedMemorySizeMb': sharedMemorySizeMb.toString(),
if (startupProbe case final startupProbe?)
'startupProbe': startupProbe.toJson(),
if (healthProbe case final healthProbe?)
'healthProbe': healthProbe.toJson(),
if (livenessProbe case final livenessProbe?)
'livenessProbe': livenessProbe.toJson(),
};