trieve_client/models/
create_dataset_request.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 CreateDatasetRequest {
15    /// Name of the dataset.
16    #[serde(rename = "dataset_name")]
17    pub dataset_name: String,
18    /// Organization ID that the dataset will belong to.
19    #[serde(rename = "organization_id")]
20    pub organization_id: uuid::Uuid,
21    #[serde(rename = "server_configuration", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
22    pub server_configuration: Option<Option<Box<models::DatasetConfigurationDto>>>,
23    /// Optional tracking ID for the dataset. Can be used to track the dataset in external systems. Must be unique within the organization. Strongly recommended to not use a valid uuid value as that will not work with the TR-Dataset header.
24    #[serde(rename = "tracking_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
25    pub tracking_id: Option<Option<String>>,
26}
27
28impl CreateDatasetRequest {
29    pub fn new(dataset_name: String, organization_id: uuid::Uuid) -> CreateDatasetRequest {
30        CreateDatasetRequest {
31            dataset_name,
32            organization_id,
33            server_configuration: None,
34            tracking_id: None,
35        }
36    }
37}
38