langfuse-client-base 0.12.0

Auto-generated Langfuse API client from OpenAPI specification
Documentation
/*
 * langfuse
 *
 * ## 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
 *
 * 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",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub endpoint: Option<Option<String>>,
    #[serde(rename = "region")]
    pub region: String,
    #[serde(
        rename = "accessKeyId",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub access_key_id: Option<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::BlobStorageIntegrationFileType,
    #[serde(rename = "exportMode")]
    pub export_mode: models::BlobStorageExportMode,
    #[serde(
        rename = "exportStartDate",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub export_start_date: Option<Option<String>>,
    #[serde(rename = "compressed")]
    pub compressed: bool,
    #[serde(
        rename = "nextSyncAt",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub next_sync_at: Option<Option<String>>,
    #[serde(
        rename = "lastSyncAt",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub last_sync_at: Option<Option<String>>,
    #[serde(
        rename = "lastError",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub last_error: Option<Option<String>>,
    #[serde(
        rename = "lastErrorAt",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub last_error_at: Option<Option<String>>,
    #[serde(rename = "createdAt")]
    pub created_at: String,
    #[serde(rename = "updatedAt")]
    pub updated_at: String,
}

impl BlobStorageIntegrationResponse {
    pub fn new(
        id: String,
        project_id: String,
        r#type: models::BlobStorageIntegrationType,
        bucket_name: String,
        region: String,
        prefix: String,
        export_frequency: models::BlobStorageExportFrequency,
        enabled: bool,
        force_path_style: bool,
        file_type: models::BlobStorageIntegrationFileType,
        export_mode: models::BlobStorageExportMode,
        compressed: bool,
        created_at: String,
        updated_at: String,
    ) -> BlobStorageIntegrationResponse {
        BlobStorageIntegrationResponse {
            id,
            project_id,
            r#type,
            bucket_name,
            endpoint: None,
            region,
            access_key_id: None,
            prefix,
            export_frequency,
            enabled,
            force_path_style,
            file_type,
            export_mode,
            export_start_date: None,
            compressed,
            next_sync_at: None,
            last_sync_at: None,
            last_error: None,
            last_error_at: None,
            created_at,
            updated_at,
        }
    }
}