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

/// InformationSchemaResponse : Response body for GET /information_schema
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct InformationSchemaResponse {
    #[serde(rename = "count")]
    pub count: i32,
    #[serde(rename = "has_more")]
    pub has_more: bool,
    #[serde(rename = "limit")]
    pub limit: i32,
    #[serde(
        rename = "next_cursor",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub next_cursor: Option<Option<String>>,
    #[serde(rename = "tables")]
    pub tables: Vec<models::TableInfo>,
}

impl InformationSchemaResponse {
    /// Response body for GET /information_schema
    pub fn new(
        count: i32,
        has_more: bool,
        limit: i32,
        tables: Vec<models::TableInfo>,
    ) -> InformationSchemaResponse {
        InformationSchemaResponse {
            count,
            has_more,
            limit,
            next_cursor: None,
            tables,
        }
    }
}