toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    if (command != null) 'command': command,
    'image': image,
    if (environment.isNotEmpty) 'environment': environment,
    if (secrets.isNotEmpty) 'secrets': secrets,
    if (pullSecret != null) 'pull_secret': pullSecret,
    if (storage != null) 'storage': storage!.toJson(),
    if (apiKey != null) 'api_key': apiKey!.toJson(),
  };
}