nominal-api 0.1239.0

API bindings for the Nominal platform
Documentation
#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct ChannelLocator {
    #[serde(rename = "dataSourceRef")]
    data_source_ref: super::DataSourceRefName,
    #[serde(rename = "channel")]
    channel: super::super::super::api::Channel,
    #[builder(
        default,
        map(
            key(type = super::super::super::api::TagName),
            value(type = super::super::super::api::TagValue)
        )
    )]
    #[serde(
        rename = "tags",
        skip_serializing_if = "std::collections::BTreeMap::is_empty",
        default
    )]
    tags: std::collections::BTreeMap<
        super::super::super::api::TagName,
        super::super::super::api::TagValue,
    >,
    #[builder(default, into)]
    #[serde(rename = "asset", skip_serializing_if = "Option::is_none", default)]
    asset: Option<super::super::rids::api::AssetRefName>,
    #[builder(default, into)]
    #[serde(rename = "run", skip_serializing_if = "Option::is_none", default)]
    run: Option<super::super::rids::api::RunRefName>,
}
impl ChannelLocator {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        data_source_ref: super::DataSourceRefName,
        channel: super::super::super::api::Channel,
    ) -> Self {
        Self::builder().data_source_ref(data_source_ref).channel(channel).build()
    }
    #[inline]
    pub fn data_source_ref(&self) -> &super::DataSourceRefName {
        &self.data_source_ref
    }
    #[inline]
    pub fn channel(&self) -> &super::super::super::api::Channel {
        &self.channel
    }
    #[inline]
    pub fn tags(
        &self,
    ) -> &std::collections::BTreeMap<
        super::super::super::api::TagName,
        super::super::super::api::TagValue,
    > {
        &self.tags
    }
    #[inline]
    pub fn asset(&self) -> Option<&super::super::rids::api::AssetRefName> {
        self.asset.as_ref().map(|o| &*o)
    }
    #[inline]
    pub fn run(&self) -> Option<&super::super::rids::api::RunRefName> {
        self.run.as_ref().map(|o| &*o)
    }
}