hotdata 0.8.1

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

/// LoadManagedTableResponse : Result of a managed-table load: row count after the load plus the published table schema. Returned inline (`200`) for a synchronous load, and as the `GET /v1/jobs/{id}` result payload for a completed background load.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct LoadManagedTableResponse {
    /// Schema of the loaded table, as JSON.
    #[serde(rename = "arrow_schema_json")]
    pub arrow_schema_json: String,
    #[serde(rename = "connection_id")]
    pub connection_id: String,
    /// Total number of rows in the table after the load.
    #[serde(rename = "row_count")]
    pub row_count: i64,
    #[serde(rename = "schema_name")]
    pub schema_name: String,
    #[serde(rename = "table_name")]
    pub table_name: String,
}

impl LoadManagedTableResponse {
    /// Result of a managed-table load: row count after the load plus the published table schema. Returned inline (`200`) for a synchronous load, and as the `GET /v1/jobs/{id}` result payload for a completed background load.
    pub fn new(
        arrow_schema_json: String,
        connection_id: String,
        row_count: i64,
        schema_name: String,
        table_name: String,
    ) -> LoadManagedTableResponse {
        LoadManagedTableResponse {
            arrow_schema_json,
            connection_id,
            row_count,
            schema_name,
            table_name,
        }
    }
}