langfuse_client_base/models/ingestion_batch_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 IngestionBatchRequest {
16 /// Batch of tracing events to be ingested. Discriminated by attribute `type`.
17 #[serde(rename = "batch")]
18 pub batch: Vec<models::IngestionEvent>,
19 /// Optional. Metadata field used by the Langfuse SDKs for debugging.
20 #[serde(
21 rename = "metadata",
22 default,
23 with = "::serde_with::rust::double_option",
24 skip_serializing_if = "Option::is_none"
25 )]
26 pub metadata: Option<Option<serde_json::Value>>,
27}
28
29impl IngestionBatchRequest {
30 pub fn new(batch: Vec<models::IngestionEvent>) -> IngestionBatchRequest {
31 IngestionBatchRequest {
32 batch,
33 metadata: None,
34 }
35 }
36}