Skip to main content

nominal_api/conjure/objects/timeseries/metadata/api/
api_locator_template.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 ApiLocatorTemplate {
16    #[builder(into)]
17    #[serde(rename = "channel")]
18    channel: String,
19    #[serde(rename = "type")]
20    type_: super::super::super::logicalseries::api::ApiType,
21}
22impl ApiLocatorTemplate {
23    /// Constructs a new instance of the type.
24    #[inline]
25    pub fn new(
26        channel: impl Into<String>,
27        type_: super::super::super::logicalseries::api::ApiType,
28    ) -> Self {
29        Self::builder().channel(channel).type_(type_).build()
30    }
31    #[inline]
32    pub fn channel(&self) -> &str {
33        &*self.channel
34    }
35    #[inline]
36    pub fn type_(&self) -> &super::super::super::logicalseries::api::ApiType {
37        &self.type_
38    }
39}