Skip to main content

langfuse_client_base/models/
blob_storage_integration_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 BlobStorageIntegrationResponse {
16    #[serde(rename = "id")]
17    pub id: String,
18    #[serde(rename = "projectId")]
19    pub project_id: String,
20    #[serde(rename = "type")]
21    pub r#type: models::BlobStorageIntegrationType,
22    #[serde(rename = "bucketName")]
23    pub bucket_name: String,
24    #[serde(
25        rename = "endpoint",
26        default,
27        with = "::serde_with::rust::double_option",
28        skip_serializing_if = "Option::is_none"
29    )]
30    pub endpoint: Option<Option<String>>,
31    #[serde(rename = "region")]
32    pub region: String,
33    #[serde(
34        rename = "accessKeyId",
35        default,
36        with = "::serde_with::rust::double_option",
37        skip_serializing_if = "Option::is_none"
38    )]
39    pub access_key_id: Option<Option<String>>,
40    #[serde(rename = "prefix")]
41    pub prefix: String,
42    #[serde(rename = "exportFrequency")]
43    pub export_frequency: models::BlobStorageExportFrequency,
44    #[serde(rename = "enabled")]
45    pub enabled: bool,
46    #[serde(rename = "forcePathStyle")]
47    pub force_path_style: bool,
48    #[serde(rename = "fileType")]
49    pub file_type: models::BlobStorageIntegrationFileType,
50    #[serde(rename = "exportMode")]
51    pub export_mode: models::BlobStorageExportMode,
52    #[serde(
53        rename = "exportStartDate",
54        default,
55        with = "::serde_with::rust::double_option",
56        skip_serializing_if = "Option::is_none"
57    )]
58    pub export_start_date: Option<Option<chrono::DateTime<chrono::FixedOffset>>>,
59    #[serde(rename = "compressed")]
60    pub compressed: bool,
61    #[serde(rename = "exportSource")]
62    pub export_source: models::BlobStorageExportSource,
63    /// Field groups included in each exported row for `OBSERVATIONS_V2` / `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS` sources. Always `null` when exportSource is `LEGACY_TRACES_OBSERVATIONS` (the field does not apply to that source; any legacy DB value is hidden from the public surface).
64    #[serde(
65        rename = "exportFieldGroups",
66        default,
67        with = "::serde_with::rust::double_option",
68        skip_serializing_if = "Option::is_none"
69    )]
70    pub export_field_groups: Option<Option<Vec<models::BlobStorageExportFieldGroup>>>,
71    #[serde(
72        rename = "nextSyncAt",
73        default,
74        with = "::serde_with::rust::double_option",
75        skip_serializing_if = "Option::is_none"
76    )]
77    pub next_sync_at: Option<Option<chrono::DateTime<chrono::FixedOffset>>>,
78    #[serde(
79        rename = "lastSyncAt",
80        default,
81        with = "::serde_with::rust::double_option",
82        skip_serializing_if = "Option::is_none"
83    )]
84    pub last_sync_at: Option<Option<chrono::DateTime<chrono::FixedOffset>>>,
85    #[serde(
86        rename = "lastError",
87        default,
88        with = "::serde_with::rust::double_option",
89        skip_serializing_if = "Option::is_none"
90    )]
91    pub last_error: Option<Option<String>>,
92    #[serde(
93        rename = "lastErrorAt",
94        default,
95        with = "::serde_with::rust::double_option",
96        skip_serializing_if = "Option::is_none"
97    )]
98    pub last_error_at: Option<Option<chrono::DateTime<chrono::FixedOffset>>>,
99    #[serde(rename = "createdAt")]
100    pub created_at: chrono::DateTime<chrono::FixedOffset>,
101    #[serde(rename = "updatedAt")]
102    pub updated_at: chrono::DateTime<chrono::FixedOffset>,
103}
104
105impl BlobStorageIntegrationResponse {
106    pub fn new(
107        id: String,
108        project_id: String,
109        r#type: models::BlobStorageIntegrationType,
110        bucket_name: String,
111        region: String,
112        prefix: String,
113        export_frequency: models::BlobStorageExportFrequency,
114        enabled: bool,
115        force_path_style: bool,
116        file_type: models::BlobStorageIntegrationFileType,
117        export_mode: models::BlobStorageExportMode,
118        compressed: bool,
119        export_source: models::BlobStorageExportSource,
120        created_at: chrono::DateTime<chrono::FixedOffset>,
121        updated_at: chrono::DateTime<chrono::FixedOffset>,
122    ) -> BlobStorageIntegrationResponse {
123        BlobStorageIntegrationResponse {
124            id,
125            project_id,
126            r#type,
127            bucket_name,
128            endpoint: None,
129            region,
130            access_key_id: None,
131            prefix,
132            export_frequency,
133            enabled,
134            force_path_style,
135            file_type,
136            export_mode,
137            export_start_date: None,
138            compressed,
139            export_source,
140            export_field_groups: None,
141            next_sync_at: None,
142            last_sync_at: None,
143            last_error: None,
144            last_error_at: None,
145            created_at,
146            updated_at,
147        }
148    }
149}