Skip to main content

hanzo_client/models/
request.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 Request {
16    /// DocTypes restricts the semantic leg to a subset of indexed knowledge types.
17    #[serde(rename = "doctypes", skip_serializing_if = "Option::is_none")]
18    pub doctypes: Option<Vec<String>>,
19    /// Index names the lexical index to query. Defaults to \"kb\".
20    #[serde(rename = "index", skip_serializing_if = "Option::is_none")]
21    pub index: Option<String>,
22    /// Limit bounds the FUSED result set (default 10, max 50).
23    #[serde(rename = "limit", skip_serializing_if = "Option::is_none")]
24    pub limit: Option<i32>,
25    /// Mode selects the legs: auto (default) | text | semantic | hybrid.
26    #[serde(rename = "mode", skip_serializing_if = "Option::is_none")]
27    pub mode: Option<String>,
28    /// Offset pages the fused result set.
29    #[serde(rename = "offset", skip_serializing_if = "Option::is_none")]
30    pub offset: Option<i32>,
31    /// Project narrows to one project scope within the org.
32    #[serde(rename = "project", skip_serializing_if = "Option::is_none")]
33    pub project: Option<String>,
34    /// Query is the natural-language or keyword query. Required.
35    #[serde(rename = "query", skip_serializing_if = "Option::is_none")]
36    pub query: Option<String>,
37}
38
39impl Request {
40    pub fn new() -> Request {
41        Request {
42            doctypes: None,
43            index: None,
44            limit: None,
45            mode: None,
46            offset: None,
47            project: None,
48            query: None,
49        }
50    }
51}
52