Converts instance to a map.
Map<String, dynamic> toMap() { return { "isMainFrame": isMainFrame, "request": request?.toMap(), "securityOrigin": securityOrigin?.toMap(), }; }