fromJson static method
Implementation
static RealtimeTool fromJson(Map<String, dynamic> j) {
return switch (j["type"]) {
"mcp" => RealtimeMcpTool.fromJson(j),
"function" => RealtimeFunctionTool.fromJson(j),
_ => throw ArgumentError("unexpected tool type ${j['type']}"),
};
}