tembo_api_client/models/
connection_info.rs

1/*
2 * Tembo Cloud
3 *
4 * Platform API for Tembo Cloud             </br>             </br>             To find a Tembo Data API, please find it here:             </br>             </br>             [AWS US East 1](https://api.data-1.use1.tembo.io/swagger-ui/)
5 *
6 * The version of the OpenAPI document: v1.0.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14pub struct ConnectionInfo {
15    #[serde(rename = "host")]
16    pub host: String,
17    #[serde(
18        rename = "pooler_host",
19        default,
20        with = "::serde_with::rust::double_option",
21        skip_serializing_if = "Option::is_none"
22    )]
23    pub pooler_host: Option<Option<String>>,
24    #[serde(rename = "port")]
25    pub port: i32,
26    #[serde(rename = "user")]
27    pub user: String,
28}
29
30impl ConnectionInfo {
31    pub fn new(host: String, port: i32, user: String) -> ConnectionInfo {
32        ConnectionInfo {
33            host,
34            pooler_host: None,
35            port,
36            user,
37        }
38    }
39}