langfuse_client/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)]
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(rename = "completedAt", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
27    pub completed_at: Option<Option<String>>,
28    #[serde(rename = "createdAt")]
29    pub created_at: String,
30    #[serde(rename = "updatedAt")]
31    pub updated_at: String,
32}
33
34impl AnnotationQueueItem {
35    pub fn new(id: String, queue_id: String, object_id: String, object_type: models::AnnotationQueueObjectType, status: models::AnnotationQueueStatus, created_at: String, updated_at: String) -> AnnotationQueueItem {
36        AnnotationQueueItem {
37            id,
38            queue_id,
39            object_id,
40            object_type,
41            status,
42            completed_at: None,
43            created_at,
44            updated_at,
45        }
46    }
47}
48