langfuse-client-base 0.15.0

Auto-generated Langfuse API client from OpenAPI specification
Documentation
/*
 * server
 *
 * ## Real-time data  The only real-time path to get tracing data is to ingest via OpenTelemetry (`POST /api/public/otel/v1/traces`) and retrieve via Observations API v2 (`GET /api/public/v2/observations`) and Metrics API v2 (`GET /api/public/v2/metrics`). Other public API write and read endpoints can delay data by about 10 minutes. Direct OpenTelemetry exporters must send the `x-langfuse-ingestion-version: 4` header; current Python and JS SDKs already do. See the [Public API docs](https://langfuse.com/docs/api-and-data-platform/features/public-api) and [real-time ingestion](https://langfuse.com/integrations/native/opentelemetry.md#real-time-ingestion).  ## 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 - Self-hosted deployments: interactive API reference at `/api/docs` and OpenAPI spec at `/api/openapi.yaml`
 *
 * The version of the OpenAPI document:
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, bon::Builder)]
pub struct BlobStorageIntegrationResponse {
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "projectId")]
    pub project_id: String,
    #[serde(rename = "type")]
    pub r#type: models::BlobStorageIntegrationType,
    #[serde(rename = "bucketName")]
    pub bucket_name: String,
    #[serde(rename = "endpoint", deserialize_with = "Option::deserialize")]
    pub endpoint: Option<String>,
    #[serde(rename = "region")]
    pub region: String,
    #[serde(rename = "accessKeyId", deserialize_with = "Option::deserialize")]
    pub access_key_id: Option<String>,
    #[serde(rename = "prefix")]
    pub prefix: String,
    #[serde(rename = "exportFrequency")]
    pub export_frequency: models::BlobStorageExportFrequency,
    #[serde(rename = "enabled")]
    pub enabled: bool,
    #[serde(rename = "forcePathStyle")]
    pub force_path_style: bool,
    #[serde(rename = "fileType")]
    pub file_type: models::BlobStorageIntegrationFileTypeResponse,
    #[serde(rename = "exportMode")]
    pub export_mode: models::BlobStorageExportMode,
    #[serde(rename = "exportStartDate", deserialize_with = "Option::deserialize")]
    pub export_start_date: Option<chrono::DateTime<chrono::FixedOffset>>,
    #[serde(rename = "compressed")]
    pub compressed: bool,
    #[serde(rename = "exportSource")]
    pub export_source: models::BlobStorageExportSource,
    /// Field groups included in each exported observation row. An empty list is treated as all groups during export.
    #[serde(rename = "exportFieldGroups", deserialize_with = "Option::deserialize")]
    pub export_field_groups: Option<Vec<models::BlobStorageExportFieldGroup>>,
    #[serde(rename = "nextSyncAt", deserialize_with = "Option::deserialize")]
    pub next_sync_at: Option<chrono::DateTime<chrono::FixedOffset>>,
    #[serde(rename = "lastSyncAt", deserialize_with = "Option::deserialize")]
    pub last_sync_at: Option<chrono::DateTime<chrono::FixedOffset>>,
    #[serde(rename = "lastError", deserialize_with = "Option::deserialize")]
    pub last_error: Option<String>,
    #[serde(rename = "lastErrorAt", deserialize_with = "Option::deserialize")]
    pub last_error_at: Option<chrono::DateTime<chrono::FixedOffset>>,
    #[serde(rename = "createdAt")]
    pub created_at: chrono::DateTime<chrono::FixedOffset>,
    #[serde(rename = "updatedAt")]
    pub updated_at: chrono::DateTime<chrono::FixedOffset>,
}

impl BlobStorageIntegrationResponse {
    pub fn new(
        id: String,
        project_id: String,
        r#type: models::BlobStorageIntegrationType,
        bucket_name: String,
        endpoint: Option<String>,
        region: String,
        access_key_id: Option<String>,
        prefix: String,
        export_frequency: models::BlobStorageExportFrequency,
        enabled: bool,
        force_path_style: bool,
        file_type: models::BlobStorageIntegrationFileTypeResponse,
        export_mode: models::BlobStorageExportMode,
        export_start_date: Option<chrono::DateTime<chrono::FixedOffset>>,
        compressed: bool,
        export_source: models::BlobStorageExportSource,
        export_field_groups: Option<Vec<models::BlobStorageExportFieldGroup>>,
        next_sync_at: Option<chrono::DateTime<chrono::FixedOffset>>,
        last_sync_at: Option<chrono::DateTime<chrono::FixedOffset>>,
        last_error: Option<String>,
        last_error_at: Option<chrono::DateTime<chrono::FixedOffset>>,
        created_at: chrono::DateTime<chrono::FixedOffset>,
        updated_at: chrono::DateTime<chrono::FixedOffset>,
    ) -> BlobStorageIntegrationResponse {
        BlobStorageIntegrationResponse {
            id,
            project_id,
            r#type,
            bucket_name,
            endpoint,
            region,
            access_key_id,
            prefix,
            export_frequency,
            enabled,
            force_path_style,
            file_type,
            export_mode,
            export_start_date,
            compressed,
            export_source,
            export_field_groups,
            next_sync_at,
            last_sync_at,
            last_error,
            last_error_at,
            created_at,
            updated_at,
        }
    }
}