Skip to main content

hanzo_client/models/
index_query.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 IndexQuery {
16    #[serde(rename = "filter", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
17    pub filter: Option<Option<serde_json::Value>>,
18    /// Limit is how many hits to return. Absent means 20; the ceiling is 1000.
19    #[serde(rename = "limit", skip_serializing_if = "Option::is_none")]
20    pub limit: Option<i32>,
21    /// Offset is where to start. Absent means 0.
22    #[serde(rename = "offset", skip_serializing_if = "Option::is_none")]
23    pub offset: Option<i32>,
24    /// Q is the search text. Typos are forgiven. An empty Q matches everything, which is how a client lists an index by relevance rather than by insertion order.
25    #[serde(rename = "q", skip_serializing_if = "Option::is_none")]
26    pub q: Option<String>,
27}
28
29impl IndexQuery {
30    pub fn new() -> IndexQuery {
31        IndexQuery {
32            filter: None,
33            limit: None,
34            offset: None,
35            q: None,
36        }
37    }
38}
39