/*
 * 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};

/// ConnectionTypeDetail : Detailed configuration and authentication schema for a single connection type.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ConnectionTypeDetail {
    #[serde(
        rename = "auth",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub auth: Option<Option<serde_json::Value>>,
    #[serde(
        rename = "config_schema",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub config_schema: Option<Option<serde_json::Value>>,
    #[serde(rename = "label")]
    pub label: String,
    #[serde(rename = "name")]
    pub name: String,
}

impl ConnectionTypeDetail {
    /// Detailed configuration and authentication schema for a single connection type.
    pub fn new(label: String, name: String) -> ConnectionTypeDetail {
        ConnectionTypeDetail {
            auth: None,
            config_schema: None,
            label,
            name,
        }
    }
}
