Skip to main content

trieve_client/models/
scroll_chunks_req_payload.rs

1/*
2 * Trieve API
3 *
4 * Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
5 *
6 * The version of the OpenAPI document: 0.11.7
7 * Contact: developers@trieve.ai
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12
13#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14pub struct ScrollChunksReqPayload {
15    #[serde(rename = "filters", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
16    pub filters: Option<Option<Box<models::ChunkFilter>>>,
17    /// Offset chunk id is the id of the chunk to start the page from. If not specified, this defaults to the first chunk in the dataset sorted by id ascending.
18    #[serde(rename = "offset_chunk_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
19    pub offset_chunk_id: Option<Option<uuid::Uuid>>,
20    /// Page size is the number of chunks to fetch. This can be used to fetch more than 10 chunks at a time.
21    #[serde(rename = "page_size", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
22    pub page_size: Option<Option<i64>>,
23    #[serde(rename = "sort_by", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
24    pub sort_by: Option<Option<Box<models::SortByField>>>,
25}
26
27impl ScrollChunksReqPayload {
28    pub fn new() -> ScrollChunksReqPayload {
29        ScrollChunksReqPayload {
30            filters: None,
31            offset_chunk_id: None,
32            page_size: None,
33            sort_by: None,
34        }
35    }
36}
37