Skip to main content

langfuse_client_base/models/
blob_storage_integration_status_response.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
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 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    /// End of the last successfully exported time window. Compare against your ETL bookmark to determine if new data is available. Null if the integration has never synced.
25    #[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    /// When the next export is scheduled. Null if no sync has occurred yet.
33    #[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    /// Raw error message from the storage provider (S3/Azure/GCS) if the last export failed. Cleared on successful export.
41    #[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    /// When the last error occurred. Cleared on successful export.
49    #[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}