/*
* 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};
/// AddManagedTableRequest : Request body for adding a table to an existing schema: `POST /v1/connections/{id}/schemas/{schema}/tables` and `POST /v1/databases/{id}/schemas/{schema}/tables`.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AddManagedTableRequest {
/// 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 AddManagedTableRequest {
/// Request body for adding a table to an existing schema: `POST /v1/connections/{id}/schemas/{schema}/tables` and `POST /v1/databases/{id}/schemas/{schema}/tables`.
pub fn new(name: String) -> AddManagedTableRequest {
AddManagedTableRequest { key: None, name }
}
}