nominal-api 0.1240.0

API bindings for the Nominal platform
Documentation
/// One expanded leaf of the data frame. Semantic fields (assetRid, runRid, dataScope)
/// carry the branch context from frame expansion.
#[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 Locator {
    #[builder(default, into)]
    #[serde(rename = "assetRid", skip_serializing_if = "Option::is_none", default)]
    asset_rid: Option<super::super::super::rids::api::AssetRid>,
    #[builder(default, into)]
    #[serde(rename = "runRid", skip_serializing_if = "Option::is_none", default)]
    run_rid: Option<super::super::super::run::api::RunRid>,
    #[builder(default, into)]
    #[serde(rename = "dataScope", skip_serializing_if = "Option::is_none", default)]
    data_scope: Option<String>,
    #[serde(rename = "dataSourceRid")]
    data_source_rid: super::super::super::super::api::rids::DataSourceRid,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::super::super::super::api::Range>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "timeRange", skip_serializing_if = "Option::is_none", default)]
    time_range: Option<Box<super::super::super::super::api::Range>>,
}
impl Locator {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        data_source_rid: super::super::super::super::api::rids::DataSourceRid,
    ) -> Self {
        Self::builder().data_source_rid(data_source_rid).build()
    }
    #[inline]
    pub fn asset_rid(&self) -> Option<&super::super::super::rids::api::AssetRid> {
        self.asset_rid.as_ref().map(|o| &*o)
    }
    #[inline]
    pub fn run_rid(&self) -> Option<&super::super::super::run::api::RunRid> {
        self.run_rid.as_ref().map(|o| &*o)
    }
    #[inline]
    pub fn data_scope(&self) -> Option<&str> {
        self.data_scope.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn data_source_rid(
        &self,
    ) -> &super::super::super::super::api::rids::DataSourceRid {
        &self.data_source_rid
    }
    /// Effective source time range used for this expanded locator. This can differ from the request time range
    /// when the frame includes transforms such as `DataFrame.timeShift`.
    #[inline]
    pub fn time_range(&self) -> Option<&super::super::super::super::api::Range> {
        self.time_range.as_ref().map(|o| &**o)
    }
}