/*
* 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};
/// LoadManagedTableRequest : Request body for `POST /v1/connections/{connection_id}/schemas/{schema}/tables/{table}/loads`. Publishes a previously-uploaded parquet file as the new generation for the named managed table. `mode` is fixed to `\"replace\"` today; the field is kept in the request body so future modes (e.g. append) are an additive change.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct LoadManagedTableRequest {
/// Load mode. Only `\"replace\"` is supported in this release.
#[serde(rename = "mode")]
pub mode: String,
/// ID of a previously-staged upload (see `POST /v1/files`). The upload must reference a parquet file. The upload is claimed atomically; concurrent loads against the same `upload_id` return 409.
#[serde(rename = "upload_id")]
pub upload_id: String,
}
impl LoadManagedTableRequest {
/// Request body for `POST /v1/connections/{connection_id}/schemas/{schema}/tables/{table}/loads`. Publishes a previously-uploaded parquet file as the new generation for the named managed table. `mode` is fixed to `\"replace\"` today; the field is kept in the request body so future modes (e.g. append) are an additive change.
pub fn new(mode: String, upload_id: String) -> LoadManagedTableRequest {
LoadManagedTableRequest { mode, upload_id }
}
}