Skip to main content

nominal_api/conjure/objects/scout/datasource/connection/api/
api_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 ApiConnectionDetails {
16    #[builder(into)]
17    #[serde(rename = "apiUri")]
18    api_uri: String,
19    #[serde(rename = "tokenSecretRid")]
20    token_secret_rid: super::SecretRid,
21}
22impl ApiConnectionDetails {
23    /// Constructs a new instance of the type.
24    #[inline]
25    pub fn new(api_uri: impl Into<String>, token_secret_rid: super::SecretRid) -> Self {
26        Self::builder().api_uri(api_uri).token_secret_rid(token_secret_rid).build()
27    }
28    /// The URI to connect to hit the endpoints specified in the spec.
29    #[inline]
30    pub fn api_uri(&self) -> &str {
31        &*self.api_uri
32    }
33    /// Secret Rid of token secret stored in Secrets Service.
34    #[inline]
35    pub fn token_secret_rid(&self) -> &super::SecretRid {
36        &self.token_secret_rid
37    }
38}