#[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 ComputeWithUnitsResult {
    #[builder(custom(type = super::ComputeNodeResult, convert = Box::new))]
    #[serde(rename = "computeResult")]
    compute_result: Box<super::ComputeNodeResult>,
    #[builder(custom(type = super::ComputeUnitResult, convert = Box::new))]
    #[serde(rename = "unitResult")]
    unit_result: Box<super::ComputeUnitResult>,
}
impl ComputeWithUnitsResult {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        compute_result: super::ComputeNodeResult,
        unit_result: super::ComputeUnitResult,
    ) -> Self {
        Self::builder().compute_result(compute_result).unit_result(unit_result).build()
    }
    #[inline]
    pub fn compute_result(&self) -> &super::ComputeNodeResult {
        &*self.compute_result
    }
    #[inline]
    pub fn unit_result(&self) -> &super::ComputeUnitResult {
        &*self.unit_result
    }
}
