Map<String, dynamic> toJson() { return {if (input != null) "input": input?.toJson(), if (output != null) "output": output?.toJson()}; }