langfuse-client-base 0.21.0

Auto-generated Langfuse API client from OpenAPI specification
Documentation
#![allow(deprecated)]
/*
 * 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, 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 = "authType")]
    pub auth_type: models::BlobStorageIntegrationAuthType,
    #[serde(rename = "accessKeyId", deserialize_with = "Option::deserialize")]
    pub access_key_id: Option<String>,
    /// IAM role Langfuse assumes. May be set while `authType` is `ACCESS_KEYS` if the integration used `ROLE_ARN` before.
    #[serde(rename = "roleArn", deserialize_with = "Option::deserialize")]
    pub role_arn: Option<String>,
    /// External ID Langfuse passes when assuming `roleArn`. Require it in the role's trust policy with an `sts:ExternalId` condition. Null until the integration first uses `ROLE_ARN`.
    #[serde(rename = "externalId", deserialize_with = "Option::deserialize")]
    pub external_id: Option<String>,
    /// Langfuse role that must be trusted by `roleArn`. Null when the deployment does not support IAM role auth or the organization is not on an Enterprise plan.
    #[serde(
        rename = "crossAccountRoleArn",
        deserialize_with = "Option::deserialize"
    )]
    pub cross_account_role_arn: 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 and score row. An empty list is treated as all observation groups and no score groups during export. Core score columns are always exported.
    #[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,
        auth_type: models::BlobStorageIntegrationAuthType,
        access_key_id: Option<String>,
        role_arn: Option<String>,
        external_id: Option<String>,
        cross_account_role_arn: 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,
            auth_type,
            access_key_id,
            role_arn,
            external_id,
            cross_account_role_arn,
            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,
        }
    }
}

impl crate::models::validation::Validate for BlobStorageIntegrationResponse {
    fn validate_into(
        &self,
        _path: &crate::models::validation::Path<'_>,
        _errors: &mut Vec<crate::models::validation::ValidationError>,
    ) {
    }
}