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
/*
* 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};
/// InformationSchemaResponse : Response body for GET /information_schema
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct InformationSchemaResponse {
/// Number of tables in this response, the same meaning `count` carries on the results and databases listings. This is a page size, not a total for the whole filter. Page with `has_more` and `next_cursor`: an empty `tables` array on its own does not mean the listing is finished.
#[serde(rename = "count")]
pub count: i32,
/// True when more tables follow this page. Pass `next_cursor` to fetch them.
#[serde(rename = "has_more")]
pub has_more: bool,
/// The page size in effect for this response — the `limit` you asked for, clamped to the server's maximum, or the server default when you sent none.
#[serde(rename = "limit")]
pub limit: i32,
/// Cursor for the next page, present only when `has_more` is `true`. Send it back as the `cursor` query parameter.
#[serde(
rename = "next_cursor",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub next_cursor: Option<Option<String>>,
/// The tables on this page.
#[serde(rename = "tables")]
pub tables: Vec<models::TableInfo>,
}
impl InformationSchemaResponse {
/// Response body for GET /information_schema
pub fn new(
count: i32,
has_more: bool,
limit: i32,
tables: Vec<models::TableInfo>,
) -> InformationSchemaResponse {
InformationSchemaResponse {
count,
has_more,
limit,
next_cursor: None,
tables,
}
}
}