trieve_client/models/
create_single_chunk_group_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 CreateSingleChunkGroupReqPayload {
15    /// Description to assign to the chunk_group. Convenience field for you to avoid having to remember what the group is for.
16    #[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
17    pub description: Option<Option<String>>,
18    /// Optional metadata to assign to the chunk_group. This is a JSON object that can store any additional information you want to associate with the chunks inside of the chunk_group.
19    #[serde(rename = "metadata", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
20    pub metadata: Option<Option<serde_json::Value>>,
21    /// Name to assign to the chunk_group. Does not need to be unique.
22    #[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
23    pub name: Option<Option<String>>,
24    /// Optional tags to assign to the chunk_group. This is a list of strings that can be used to categorize the chunks inside the chunk_group.
25    #[serde(rename = "tag_set", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
26    pub tag_set: Option<Option<Vec<String>>>,
27    /// Optional tracking id to assign to the chunk_group. This is a unique identifier for the chunk_group.
28    #[serde(rename = "tracking_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
29    pub tracking_id: Option<Option<String>>,
30    /// Upsert when a chunk_group with the same tracking_id exists. By default this is false, and the request will fail if a chunk_group with the same tracking_id exists. If this is true, the chunk_group will be updated if a chunk_group with the same tracking_id exists.
31    #[serde(rename = "upsert_by_tracking_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
32    pub upsert_by_tracking_id: Option<Option<bool>>,
33}
34
35impl CreateSingleChunkGroupReqPayload {
36    pub fn new() -> CreateSingleChunkGroupReqPayload {
37        CreateSingleChunkGroupReqPayload {
38            description: None,
39            metadata: None,
40            name: None,
41            tag_set: None,
42            tracking_id: None,
43            upsert_by_tracking_id: None,
44        }
45    }
46}
47