langfuse_client_base/models/
blob_storage_integration_status_response.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, bon::Builder)]
15pub struct BlobStorageIntegrationStatusResponse {
16 #[serde(rename = "id")]
17 pub id: String,
18 #[serde(rename = "projectId")]
19 pub project_id: String,
20 #[serde(rename = "syncStatus")]
21 pub sync_status: models::BlobStorageSyncStatus,
22 #[serde(rename = "enabled")]
23 pub enabled: bool,
24 #[serde(
26 rename = "lastSyncAt",
27 default,
28 with = "::serde_with::rust::double_option",
29 skip_serializing_if = "Option::is_none"
30 )]
31 pub last_sync_at: Option<Option<chrono::DateTime<chrono::FixedOffset>>>,
32 #[serde(
34 rename = "nextSyncAt",
35 default,
36 with = "::serde_with::rust::double_option",
37 skip_serializing_if = "Option::is_none"
38 )]
39 pub next_sync_at: Option<Option<chrono::DateTime<chrono::FixedOffset>>>,
40 #[serde(
42 rename = "lastError",
43 default,
44 with = "::serde_with::rust::double_option",
45 skip_serializing_if = "Option::is_none"
46 )]
47 pub last_error: Option<Option<String>>,
48 #[serde(
50 rename = "lastErrorAt",
51 default,
52 with = "::serde_with::rust::double_option",
53 skip_serializing_if = "Option::is_none"
54 )]
55 pub last_error_at: Option<Option<chrono::DateTime<chrono::FixedOffset>>>,
56}
57
58impl BlobStorageIntegrationStatusResponse {
59 pub fn new(
60 id: String,
61 project_id: String,
62 sync_status: models::BlobStorageSyncStatus,
63 enabled: bool,
64 ) -> BlobStorageIntegrationStatusResponse {
65 BlobStorageIntegrationStatusResponse {
66 id,
67 project_id,
68 sync_status,
69 enabled,
70 last_sync_at: None,
71 next_sync_at: None,
72 last_error: None,
73 last_error_at: None,
74 }
75 }
76}