Map<String, dynamic> toJson() { final json = <String, dynamic>{}; if (this.type != null) { json[r'type'] = this.type; } else { json[r'type'] = null; } json[r'data'] = this.data; return json; }