tembo_api_client/models/
search_params.rs

1/*
2 * Tembo Cloud
3 *
4 * Platform API for Tembo Cloud             </br>             </br>             To find a Tembo Data API, please find it here:             </br>             </br>             [AWS US East 1](https://api.data-1.use1.tembo.io/swagger-ui/)
5 *
6 * The version of the OpenAPI document: v1.0.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14pub struct SearchParams {
15    /// The number of results to return. Default is 10, max is 20.
16    #[serde(
17        rename = "limit",
18        default,
19        with = "::serde_with::rust::double_option",
20        skip_serializing_if = "Option::is_none"
21    )]
22    pub limit: Option<Option<i32>>,
23    /// The search query. For example, \"how to create a Tembo instance\"
24    #[serde(rename = "query")]
25    pub query: String,
26}
27
28impl SearchParams {
29    pub fn new(query: String) -> SearchParams {
30        SearchParams { limit: None, query }
31    }
32}