trieve_client/models/
content_chunk_metadata.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 ContentChunkMetadata {
15    #[serde(rename = "chunk_html", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
16    pub chunk_html: Option<Option<String>>,
17    #[serde(rename = "id")]
18    pub id: uuid::Uuid,
19    #[serde(rename = "image_urls", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
20    pub image_urls: Option<Option<Vec<String>>>,
21    #[serde(rename = "num_value", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
22    pub num_value: Option<Option<f64>>,
23    #[serde(rename = "time_stamp", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
24    pub time_stamp: Option<Option<String>>,
25    #[serde(rename = "tracking_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
26    pub tracking_id: Option<Option<String>>,
27    #[serde(rename = "weight")]
28    pub weight: f64,
29}
30
31impl ContentChunkMetadata {
32    pub fn new(id: uuid::Uuid, weight: f64) -> ContentChunkMetadata {
33        ContentChunkMetadata {
34            chunk_html: None,
35            id,
36            image_urls: None,
37            num_value: None,
38            time_stamp: None,
39            tracking_id: None,
40            weight,
41        }
42    }
43}
44