#[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 {
#[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
}
#[inline]
pub fn source_rid(&self) -> Option<&conjure_object::ResourceIdentifier> {
self.source_rid.as_ref().map(|o| &*o)
}
}