langfuse_client_base/models/
dataset.rs

1/*
2 * langfuse
3 *
4 * ## Authentication  Authenticate with the API using [Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication), get API keys in the project settings:  - username: Langfuse Public Key - password: Langfuse Secret Key  ## Exports  - OpenAPI spec: https://cloud.langfuse.com/generated/api/openapi.yml - Postman collection: https://cloud.langfuse.com/generated/postman/collection.json
5 *
6 * The version of the OpenAPI document:
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 Dataset {
16    #[serde(rename = "id")]
17    pub id: String,
18    #[serde(rename = "name")]
19    pub name: String,
20    #[serde(
21        rename = "description",
22        default,
23        with = "::serde_with::rust::double_option",
24        skip_serializing_if = "Option::is_none"
25    )]
26    pub description: Option<Option<String>>,
27    #[serde(
28        rename = "metadata",
29        default,
30        with = "::serde_with::rust::double_option",
31        skip_serializing_if = "Option::is_none"
32    )]
33    pub metadata: Option<Option<serde_json::Value>>,
34    #[serde(rename = "projectId")]
35    pub project_id: String,
36    #[serde(rename = "createdAt")]
37    pub created_at: String,
38    #[serde(rename = "updatedAt")]
39    pub updated_at: String,
40}
41
42impl Dataset {
43    pub fn new(
44        id: String,
45        name: String,
46        project_id: String,
47        created_at: String,
48        updated_at: String,
49    ) -> Dataset {
50        Dataset {
51            id,
52            name,
53            description: None,
54            metadata: None,
55            project_id,
56            created_at,
57            updated_at,
58        }
59    }
60}