@override Object toJson() { return { if (header != null) 'header': header!.toJson(), if (entityView != null) 'entityView': entityView!.toJson(), }; }