nominal-api 0.1256.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,
    #[builder(into)]
    #[serde(rename = "channel")]
    channel: String,
    #[builder(default, map(key(type = String, into), value(type = String, into)))]
    #[serde(
        rename = "tags",
        skip_serializing_if = "std::collections::BTreeMap::is_empty",
        default
    )]
    tags: std::collections::BTreeMap<String, String>,
    #[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: impl Into<String>,
    ) -> 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) -> &str {
        &*self.channel
    }
    #[inline]
    pub fn tags(&self) -> &std::collections::BTreeMap<String, String> {
        &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)
    }
}