#[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 VariableWithAggregation {
    #[builder(custom(type = super::VariableLocator, convert = Box::new))]
    #[serde(rename = "locator")]
    locator: Box<super::VariableLocator>,
    #[builder(custom(type = super::AggregationType, convert = Box::new))]
    #[serde(rename = "aggregationType")]
    aggregation_type: Box<super::AggregationType>,
}
impl VariableWithAggregation {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        locator: super::VariableLocator,
        aggregation_type: super::AggregationType,
    ) -> Self {
        Self::builder().locator(locator).aggregation_type(aggregation_type).build()
    }
    #[inline]
    pub fn locator(&self) -> &super::VariableLocator {
        &*self.locator
    }
    #[inline]
    pub fn aggregation_type(&self) -> &super::AggregationType {
        &*self.aggregation_type
    }
}
