use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TestDataTableConnection200Response {
#[serde(rename = "user")]
pub user: String,
#[serde(rename = "schema", deserialize_with = "Option::deserialize")]
pub schema: Option<String>,
#[serde(rename = "can_create_table")]
pub can_create_table: bool,
#[serde(rename = "can_create_schema")]
pub can_create_schema: bool,
#[serde(rename = "migrations_table_exists")]
pub migrations_table_exists: bool,
#[serde(rename = "suggested_grants")]
pub suggested_grants: Vec<String>,
#[serde(rename = "suggested_search_path", skip_serializing_if = "Option::is_none")]
pub suggested_search_path: Option<String>,
}
impl TestDataTableConnection200Response {
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 {
TestDataTableConnection200Response {
user,
schema,
can_create_table,
can_create_schema,
migrations_table_exists,
suggested_grants,
suggested_search_path: None,
}
}
}