nominal-api 0.1239.0

API bindings for the Nominal platform
Documentation
/// A templatized version of `ComputeNodeRequest` where the end of the range will track the current time and
/// the start of the range tracks `windowWidth` time ago.
#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    conjure_object::private::DeriveWith
)]
#[serde(crate = "conjure_object::serde")]
#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct StreamingComputeNodeRequest {
    #[builder(
        custom(
            type = super::super::super::super::scout::compute::api::ComputableNode,
            convert = Box::new
        )
    )]
    #[serde(rename = "node")]
    node: Box<super::super::super::super::scout::compute::api::ComputableNode>,
    #[builder(
        custom(
            type = super::super::super::super::scout::run::api::Duration,
            convert = Box::new
        )
    )]
    #[serde(rename = "windowWidth")]
    window_width: Box<super::super::super::super::scout::run::api::Duration>,
    #[builder(
        custom(
            type = super::super::super::super::scout::compute::api::Context,
            convert = Box::new
        )
    )]
    #[serde(rename = "context")]
    context: Box<super::super::super::super::scout::compute::api::Context>,
    #[builder(default, into)]
    #[serde(rename = "sourceRid", skip_serializing_if = "Option::is_none", default)]
    source_rid: Option<conjure_object::ResourceIdentifier>,
}
impl StreamingComputeNodeRequest {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        node: super::super::super::super::scout::compute::api::ComputableNode,
        window_width: super::super::super::super::scout::run::api::Duration,
        context: super::super::super::super::scout::compute::api::Context,
    ) -> Self {
        Self::builder().node(node).window_width(window_width).context(context).build()
    }
    #[inline]
    pub fn node(
        &self,
    ) -> &super::super::super::super::scout::compute::api::ComputableNode {
        &*self.node
    }
    #[inline]
    pub fn window_width(
        &self,
    ) -> &super::super::super::super::scout::run::api::Duration {
        &*self.window_width
    }
    #[inline]
    pub fn context(&self) -> &super::super::super::super::scout::compute::api::Context {
        &*self.context
    }
    /// Optional RID identifying the resource that initiated this query (e.g. workbook/notebook RID, checklist RID).
    /// Used for observability only — trusted as-is, no permission checks are performed on this value.
    #[inline]
    pub fn source_rid(&self) -> Option<&conjure_object::ResourceIdentifier> {
        self.source_rid.as_ref().map(|o| &*o)
    }
}