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