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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/*
* Hotdata API
*
* Powerful data platform API for instant 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};
/// GetResultResponse : Response body for GET /results/{id} Returns status and optionally the result data
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetResultResponse {
#[serde(
rename = "columns",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub columns: Option<Option<Vec<String>>>,
#[serde(
rename = "error_message",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub error_message: Option<Option<String>>,
#[serde(
rename = "nullable",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub nullable: Option<Option<Vec<bool>>>,
#[serde(rename = "result_id")]
pub result_id: String,
#[serde(
rename = "row_count",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub row_count: Option<Option<i64>>,
/// Array of rows, where each row is an array of column values.
#[serde(
rename = "rows",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub rows: Option<Option<Vec<Vec<serde_json::Value>>>>,
#[serde(rename = "status")]
pub status: String,
/// Grand total rows in the full result, ignoring `offset` and `limit`. Present whenever the result is `ready`, and carrying the same value as the `X-Total-Row-Count` response header. Compare it against `row_count` to tell whether this body is the whole result: `row_count < total_row_count` means the rest is still there, one page further on. Without it a windowed fetch cannot tell a full result from a truncated one from the body alone.
#[serde(
rename = "total_row_count",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub total_row_count: Option<Option<i64>>,
}
impl GetResultResponse {
/// Response body for GET /results/{id} Returns status and optionally the result data
pub fn new(result_id: String, status: String) -> GetResultResponse {
GetResultResponse {
columns: None,
error_message: None,
nullable: None,
result_id,
row_count: None,
rows: None,
status,
total_row_count: None,
}
}
}