hotdata 0.1.2

Powerful data platform API for datasets, queries, and analytics.
Documentation
/*
 * 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};

/// ManagedSchemaResponse : Response body for a successful add-schema request. Echoes the normalised (lowercased) names so callers see exactly what was persisted.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ManagedSchemaResponse {
    /// Connection backing the catalog the schema was added to. For a database default catalog this is the database's `default_connection_id`.
    #[serde(rename = "connection_id")]
    pub connection_id: String,
    #[serde(rename = "schema")]
    pub schema: String,
    #[serde(rename = "tables")]
    pub tables: Vec<String>,
}

impl ManagedSchemaResponse {
    /// Response body for a successful add-schema request. Echoes the normalised (lowercased) names so callers see exactly what was persisted.
    pub fn new(
        connection_id: String,
        schema: String,
        tables: Vec<String>,
    ) -> ManagedSchemaResponse {
        ManagedSchemaResponse {
            connection_id,
            schema,
            tables,
        }
    }
}