1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* 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};
/// UploadDatasetSource : Create dataset from a previously uploaded file
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UploadDatasetSource {
/// Optional explicit column definitions. Keys are column names, values are type specs. When provided, the schema is built from these definitions instead of being inferred.
#[serde(rename = "columns", skip_serializing_if = "Option::is_none")]
pub columns: Option<std::collections::HashMap<String, String>>,
#[serde(
rename = "format",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub format: Option<Option<String>>,
#[serde(rename = "upload_id")]
pub upload_id: String,
}
impl UploadDatasetSource {
/// Create dataset from a previously uploaded file
pub fn new(upload_id: String) -> UploadDatasetSource {
UploadDatasetSource {
columns: None,
format: None,
upload_id,
}
}
}