Map<String, dynamic> toJson() { final name = this.name; final args = this.args; return { 'Name': name.toValue(), if (args != null) 'Args': args, }; }