/// An append result won't cover the full `StreamingComputeNodeRequest#windowWidth` but rather just a smaller
/// window. The end of the window that the append covers is guaranteed to be later than previously sent results.
/// The start, however, can and most likely will overlap with previous results. That allows us to support
/// out-of-order points. The client will have to merge this new `AppendResult` with previous results.
/// Example of time windows that might be covered by results for a subscription:
/// We send a full result for window [0s, 120s] followed by an append result for [116s, 121s] and another
/// append result for [117s, 122s].
#[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 AppendResult {
    #[builder(
        custom(type = super::super::super::super::api::Timestamp, convert = Box::new)
    )]
    #[serde(rename = "start")]
    start: Box<super::super::super::super::api::Timestamp>,
    #[builder(
        custom(type = super::super::super::super::api::Timestamp, convert = Box::new)
    )]
    #[serde(rename = "end")]
    end: Box<super::super::super::super::api::Timestamp>,
    #[builder(custom(type = super::ComputeNodeAppendResponse, convert = Box::new))]
    #[serde(rename = "result")]
    result: Box<super::ComputeNodeAppendResponse>,
}
impl AppendResult {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        start: super::super::super::super::api::Timestamp,
        end: super::super::super::super::api::Timestamp,
        result: super::ComputeNodeAppendResponse,
    ) -> Self {
        Self::builder().start(start).end(end).result(result).build()
    }
    /// The start of the time range that the append result covers
    #[inline]
    pub fn start(&self) -> &super::super::super::super::api::Timestamp {
        &*self.start
    }
    /// The end of the time range that the append result covers
    #[inline]
    pub fn end(&self) -> &super::super::super::super::api::Timestamp {
        &*self.end
    }
    #[inline]
    pub fn result(&self) -> &super::ComputeNodeAppendResponse {
        &*self.result
    }
}
