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
/*
* 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};
/// ManagedTableConstantPerKeyResponse : The declaration as it now stands after a `constant-per-key` write. Echoed back rather than returning `204` so a caller can confirm what actually took effect instead of assuming its request applied — the same reason `/v1/information_schema` reports the field.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ManagedTableConstantPerKeyResponse {
/// Connection backing the catalog the table belongs to. For a database default catalog this is the database's `default_connection_id`, so it is the value that addresses the table through the connection-scoped endpoints — not the database id the request may have used.
#[serde(rename = "connection_id")]
pub connection_id: String,
/// The columns now declared constant per key. Empty means no declaration, i.e. the unrestricted search.
#[serde(rename = "constant_per_key")]
pub constant_per_key: Vec<String>,
/// Schema the table belongs to, as stored: lowercased, which may differ from the spelling in the request path.
#[serde(rename = "schema")]
pub schema: String,
/// Table the declaration was written to, as stored: lowercased, which may differ from the spelling in the request path.
#[serde(rename = "table")]
pub table: String,
}
impl ManagedTableConstantPerKeyResponse {
/// The declaration as it now stands after a `constant-per-key` write. Echoed back rather than returning `204` so a caller can confirm what actually took effect instead of assuming its request applied — the same reason `/v1/information_schema` reports the field.
pub fn new(
connection_id: String,
constant_per_key: Vec<String>,
schema: String,
table: String,
) -> ManagedTableConstantPerKeyResponse {
ManagedTableConstantPerKeyResponse {
connection_id,
constant_per_key,
schema,
table,
}
}
}