windmill_api/models/
test_data_table_connection_200_response.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct TestDataTableConnection200Response {
16 #[serde(rename = "user")]
17 pub user: String,
18 #[serde(rename = "schema", deserialize_with = "Option::deserialize")]
19 pub schema: Option<String>,
20 #[serde(rename = "can_create_table")]
21 pub can_create_table: bool,
22 #[serde(rename = "can_create_schema")]
23 pub can_create_schema: bool,
24 #[serde(rename = "migrations_table_exists")]
25 pub migrations_table_exists: bool,
26 #[serde(rename = "suggested_grants")]
27 pub suggested_grants: Vec<String>,
28 #[serde(rename = "suggested_search_path", skip_serializing_if = "Option::is_none")]
29 pub suggested_search_path: Option<String>,
30}
31
32impl TestDataTableConnection200Response {
33 pub fn new(user: String, schema: Option<String>, can_create_table: bool, can_create_schema: bool, migrations_table_exists: bool, suggested_grants: Vec<String>) -> TestDataTableConnection200Response {
34 TestDataTableConnection200Response {
35 user,
36 schema,
37 can_create_table,
38 can_create_schema,
39 migrations_table_exists,
40 suggested_grants,
41 suggested_search_path: None,
42 }
43 }
44}
45