hotdata 0.10.0

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

/// AddManagedTableDecl : One table declaration inside an add-schema request body.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AddManagedTableDecl {
    /// Columns that uniquely identify a row, enabling the key-based load modes (`delete`, `update`, `upsert`) on this table: those loads match rows by these columns' values. Omit (the default) to declare no key; the table can still be loaded with `replace` and `append`, but key-based modes are then rejected.
    #[serde(rename = "key", skip_serializing_if = "Option::is_none")]
    pub key: Option<Vec<String>>,
    #[serde(rename = "name")]
    pub name: String,
}

impl AddManagedTableDecl {
    /// One table declaration inside an add-schema request body.
    pub fn new(name: String) -> AddManagedTableDecl {
        AddManagedTableDecl { key: None, name }
    }
}