langfuse_client/models/
dataset_run_item.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)]
15#[cfg_attr(feature="bon", derive(bon::Builder))]
16pub struct DatasetRunItem {
17    #[serde(rename = "id")]
18    pub id: String,
19    #[serde(rename = "datasetRunId")]
20    pub dataset_run_id: String,
21    #[serde(rename = "datasetRunName")]
22    pub dataset_run_name: String,
23    #[serde(rename = "datasetItemId")]
24    pub dataset_item_id: String,
25    #[serde(rename = "traceId")]
26    pub trace_id: String,
27    #[serde(rename = "observationId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
28    pub observation_id: Option<Option<String>>,
29    #[serde(rename = "createdAt")]
30    pub created_at: String,
31    #[serde(rename = "updatedAt")]
32    pub updated_at: String,
33}
34
35impl DatasetRunItem {
36    pub fn new(id: String, dataset_run_id: String, dataset_run_name: String, dataset_item_id: String, trace_id: String, created_at: String, updated_at: String) -> DatasetRunItem {
37        DatasetRunItem {
38            id,
39            dataset_run_id,
40            dataset_run_name,
41            dataset_item_id,
42            trace_id,
43            observation_id: None,
44            created_at,
45            updated_at,
46        }
47    }
48}
49