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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
* 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};
/// TableProfileResponse : Column-level statistics for a synced table. Profiles are computed at sync time and include per-column cardinality, null counts, and type-specific details.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TableProfileResponse {
/// Per-column profile statistics
#[serde(rename = "columns")]
pub columns: Vec<models::ColumnProfileInfo>,
/// Connection name
#[serde(rename = "connection")]
pub connection: String,
/// Total number of rows in the table
#[serde(rename = "row_count")]
pub row_count: i32,
/// Schema name
#[serde(rename = "schema")]
pub schema: String,
/// When the table was last synced
#[serde(
rename = "synced_at",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub synced_at: Option<Option<String>>,
/// Table name
#[serde(rename = "table")]
pub table: String,
}
impl TableProfileResponse {
/// Column-level statistics for a synced table. Profiles are computed at sync time and include per-column cardinality, null counts, and type-specific details.
pub fn new(
columns: Vec<models::ColumnProfileInfo>,
connection: String,
row_count: i32,
schema: String,
table: String,
) -> TableProfileResponse {
TableProfileResponse {
columns,
connection,
row_count,
schema,
synced_at: None,
table,
}
}
}