langfuse_client/models/
create_dataset_run_item_request.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 CreateDatasetRunItemRequest {
16    #[serde(rename = "runName")]
17    pub run_name: String,
18    /// Description of the run. If run exists, description will be updated.
19    #[serde(rename = "runDescription", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
20    pub run_description: Option<Option<String>>,
21    /// Metadata of the dataset run, updates run if run already exists
22    #[serde(rename = "metadata", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
23    pub metadata: Option<Option<serde_json::Value>>,
24    #[serde(rename = "datasetItemId")]
25    pub dataset_item_id: String,
26    #[serde(rename = "observationId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
27    pub observation_id: Option<Option<String>>,
28    /// traceId should always be provided. For compatibility with older SDK versions it can also be inferred from the provided observationId.
29    #[serde(rename = "traceId", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
30    pub trace_id: Option<Option<String>>,
31}
32
33impl CreateDatasetRunItemRequest {
34    pub fn new(run_name: String, dataset_item_id: String) -> CreateDatasetRunItemRequest {
35        CreateDatasetRunItemRequest {
36            run_name,
37            run_description: None,
38            metadata: None,
39            dataset_item_id,
40            observation_id: None,
41            trace_id: None,
42        }
43    }
44}
45