muse_code_sdk/msp/view/item/object/web_search.rs
1// @generated from the MSP stable schema and protocol sources; do not edit by hand.
2
3use crate::msp::view::item_content::WebSearchHit;
4use serde::Deserialize;
5use serde::Serialize;
6
7/// `webSearch` members, flattened into [`Item`](super::Item).
8#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
9#[serde(rename_all = "camelCase")]
10#[non_exhaustive]
11pub struct WebSearchMembers {
12 /// `webSearch`: the search action as an open-enum string — `search` |
13 /// `openPage` | `findInPage`, else tolerated unknown. Absent while the call
14 /// is open (the action is not final until the item completes).
15 #[serde(skip_serializing_if = "Option::is_none")]
16 pub action: Option<String>,
17 /// `webSearch`: the search query, verbatim — present iff `action ==
18 /// "search"` with a query to carry.
19 #[serde(skip_serializing_if = "Option::is_none")]
20 pub query: Option<String>,
21 /// `webSearch`: the page URL, verbatim — present iff `action == "openPage"`
22 /// or `"findInPage"`.
23 #[serde(skip_serializing_if = "Option::is_none")]
24 pub url: Option<String>,
25 /// `webSearch`: the in-page pattern, verbatim — present iff `action ==
26 /// "findInPage"`.
27 #[serde(skip_serializing_if = "Option::is_none")]
28 pub pattern: Option<String>,
29 /// `webSearch`: the provider's terminal status, verbatim (`"completed"` |
30 /// `"failed"` | `"cancelled"` | other) — present on the completed item.
31 #[serde(skip_serializing_if = "Option::is_none")]
32 pub provider_status: Option<String>,
33 /// `webSearch`: the typed result hits, verbatim, never truncated — clients
34 /// read `results.length` for the count.
35 #[serde(skip_serializing_if = "Option::is_none")]
36 pub results: Option<Vec<WebSearchHit>>,
37 /// `webSearch`: the verbatim raw provider JSON frame under the 64 KiB
38 /// per-surface budget; past-budget frames cut here and ride whole behind
39 /// `outputRef`.
40 #[serde(skip_serializing_if = "Option::is_none")]
41 pub raw_item: Option<String>,
42}