Skip to main content

nominal_api/conjure/objects/scout/datasource/connection/api/
timescale_connection_details.rs

1#[derive(
2    Debug,
3    Clone,
4    conjure_object::serde::Serialize,
5    conjure_object::serde::Deserialize,
6    PartialEq,
7    Eq,
8    PartialOrd,
9    Ord,
10    Hash
11)]
12#[serde(crate = "conjure_object::serde")]
13#[conjure_object::private::staged_builder::staged_builder]
14#[builder(crate = conjure_object::private::staged_builder, update, inline)]
15pub struct TimescaleConnectionDetails {
16    #[builder(into)]
17    #[serde(rename = "database")]
18    database: String,
19    #[builder(into)]
20    #[serde(rename = "host")]
21    host: String,
22    #[serde(rename = "port")]
23    port: i32,
24    #[builder(into)]
25    #[serde(rename = "username")]
26    username: String,
27    #[serde(rename = "passwordSecretRid")]
28    password_secret_rid: super::SecretRid,
29}
30impl TimescaleConnectionDetails {
31    #[inline]
32    pub fn database(&self) -> &str {
33        &*self.database
34    }
35    #[inline]
36    pub fn host(&self) -> &str {
37        &*self.host
38    }
39    #[inline]
40    pub fn port(&self) -> i32 {
41        self.port
42    }
43    /// This is also the reference to the secret containing the password
44    #[inline]
45    pub fn username(&self) -> &str {
46        &*self.username
47    }
48    /// Secret Rid of password secret stored in Secrets Service.
49    #[inline]
50    pub fn password_secret_rid(&self) -> &super::SecretRid {
51        &self.password_secret_rid
52    }
53}