hanzo_client/models/web_question.rs
1/*
2 * Hanzo Cloud API
3 *
4 * The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
5 *
6 * The version of the OpenAPI document: v1
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct WebQuestion {
16 /// Language narrows the search to a locale, BCP-47-ish (\"en\", \"ja\"). Empty means no narrowing.
17 #[serde(rename = "language", skip_serializing_if = "Option::is_none")]
18 pub language: Option<String>,
19 /// MaxSources caps how many pages are read. Empty means the mode's own budget.
20 #[serde(rename = "max_sources", skip_serializing_if = "Option::is_none")]
21 pub max_sources: Option<i32>,
22 /// Mode is how much work to do: `search` (fast, one pass), `news` (recency biased), `research` (a plan and several rounds) or `deep` (the widest survey). Empty means research.
23 #[serde(rename = "mode", skip_serializing_if = "Option::is_none")]
24 pub mode: Option<String>,
25 /// Q is the question, in plain language. Required.
26 #[serde(rename = "q", skip_serializing_if = "Option::is_none")]
27 pub q: Option<String>,
28 /// Sources narrows where the evidence comes from: any of `web`, `news`, `academic`, `github`, `reddit`, `x`. Each becomes a site-scoped search, so `[\"x\"]` researches X/Twitter posts rather than the open web.
29 #[serde(rename = "sources", skip_serializing_if = "Option::is_none")]
30 pub sources: Option<Vec<String>>,
31}
32
33impl WebQuestion {
34 pub fn new() -> WebQuestion {
35 WebQuestion {
36 language: None,
37 max_sources: None,
38 mode: None,
39 q: None,
40 sources: None,
41 }
42 }
43}
44