/*
 * Hotdata API
 *
 * Powerful data platform API for datasets, queries, and analytics.
 *
 * The version of the OpenAPI document: 1.0.0
 * Contact: developers@hotdata.dev
 * Generated by: https://openapi-generator.tech
 */

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

/// EmbeddingProviderResponse : Single embedding provider for API responses
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct EmbeddingProviderResponse {
    #[serde(rename = "config", deserialize_with = "Option::deserialize")]
    pub config: Option<serde_json::Value>,
    #[serde(rename = "created_at")]
    pub created_at: String,
    #[serde(rename = "has_secret")]
    pub has_secret: bool,
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "provider_type")]
    pub provider_type: String,
    /// Provider source: \"system\" (from config) or \"user\" (created via API).
    #[serde(rename = "source")]
    pub source: String,
    #[serde(rename = "updated_at")]
    pub updated_at: String,
}

impl EmbeddingProviderResponse {
    /// Single embedding provider for API responses
    pub fn new(
        config: Option<serde_json::Value>,
        created_at: String,
        has_secret: bool,
        id: String,
        name: String,
        provider_type: String,
        source: String,
        updated_at: String,
    ) -> EmbeddingProviderResponse {
        EmbeddingProviderResponse {
            config,
            created_at,
            has_secret,
            id,
            name,
            provider_type,
            source,
            updated_at,
        }
    }
}
