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

/// GetConnectionResponse : Response body for GET /connections/{connection_id}
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetConnectionResponse {
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "source_type")]
    pub source_type: String,
    #[serde(rename = "synced_table_count")]
    pub synced_table_count: i32,
    #[serde(rename = "table_count")]
    pub table_count: i32,
}

impl GetConnectionResponse {
    /// Response body for GET /connections/{connection_id}
    pub fn new(
        id: String,
        name: String,
        source_type: String,
        synced_table_count: i32,
        table_count: i32,
    ) -> GetConnectionResponse {
        GetConnectionResponse {
            id,
            name,
            source_type,
            synced_table_count,
            table_count,
        }
    }
}
