/// A derived dataset definition pinned to the commit that produced it.
#[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 DerivedDefinition {
    #[builder(custom(type = super::super::compute::api::Dataset, convert = Box::new))]
    #[serde(rename = "spec")]
    spec: Box<super::super::compute::api::Dataset>,
    #[builder(custom(type = super::super::versioning::api::Commit, convert = Box::new))]
    #[serde(rename = "commit")]
    commit: Box<super::super::versioning::api::Commit>,
}
impl DerivedDefinition {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        spec: super::super::compute::api::Dataset,
        commit: super::super::versioning::api::Commit,
    ) -> Self {
        Self::builder().spec(spec).commit(commit).build()
    }
    #[inline]
    pub fn spec(&self) -> &super::super::compute::api::Dataset {
        &*self.spec
    }
    #[inline]
    pub fn commit(&self) -> &super::super::versioning::api::Commit {
        &*self.commit
    }
}
