langfuse_client_base/models/annotation_queue_item.rs
1/*
2 * server
3 *
4 * ## Real-time data The only real-time path to get tracing data is to ingest via OpenTelemetry (`POST /api/public/otel/v1/traces`) and retrieve via Observations API v2 (`GET /api/public/v2/observations`) and Metrics API v2 (`GET /api/public/v2/metrics`). Other public API write and read endpoints can delay data by about 10 minutes. Direct OpenTelemetry exporters must send the `x-langfuse-ingestion-version: 4` header; current Python and JS SDKs already do. See the [Public API docs](https://langfuse.com/docs/api-and-data-platform/features/public-api) and [real-time ingestion](https://langfuse.com/integrations/native/opentelemetry.md#real-time-ingestion). ## 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 - Self-hosted deployments: interactive API reference at `/api/docs` and OpenAPI spec at `/api/openapi.yaml`
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, bon::Builder)]
15pub struct AnnotationQueueItem {
16 #[serde(rename = "id")]
17 pub id: String,
18 #[serde(rename = "queueId")]
19 pub queue_id: String,
20 #[serde(rename = "objectId")]
21 pub object_id: String,
22 #[serde(rename = "objectType")]
23 pub object_type: models::AnnotationQueueObjectType,
24 #[serde(rename = "status")]
25 pub status: models::AnnotationQueueStatus,
26 #[serde(
27 rename = "completedAt",
28 default,
29 with = "::serde_with::rust::double_option",
30 skip_serializing_if = "Option::is_none"
31 )]
32 pub completed_at: Option<Option<chrono::DateTime<chrono::FixedOffset>>>,
33 #[serde(rename = "createdAt")]
34 pub created_at: chrono::DateTime<chrono::FixedOffset>,
35 #[serde(rename = "updatedAt")]
36 pub updated_at: chrono::DateTime<chrono::FixedOffset>,
37}
38
39impl AnnotationQueueItem {
40 pub fn new(
41 id: String,
42 queue_id: String,
43 object_id: String,
44 object_type: models::AnnotationQueueObjectType,
45 status: models::AnnotationQueueStatus,
46 created_at: chrono::DateTime<chrono::FixedOffset>,
47 updated_at: chrono::DateTime<chrono::FixedOffset>,
48 ) -> AnnotationQueueItem {
49 AnnotationQueueItem {
50 id,
51 queue_id,
52 object_id,
53 object_type,
54 status,
55 completed_at: None,
56 created_at,
57 updated_at,
58 }
59 }
60}