langfuse_client_base/models/
annotation_queue_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, 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<String>>,
33    #[serde(rename = "createdAt")]
34    pub created_at: String,
35    #[serde(rename = "updatedAt")]
36    pub updated_at: String,
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: String,
47        updated_at: String,
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}