Map<String, dynamic> toJson() { final action = this.action; final comment = this.comment; return { 'Action': action.toValue(), if (comment != null) 'Comment': comment, }; }