#[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 Module {
    #[builder(custom(type = super::ModuleMetadata, convert = Box::new))]
    #[serde(rename = "metadata")]
    metadata: Box<super::ModuleMetadata>,
    #[builder(custom(type = super::ModuleVersionMetadata, convert = Box::new))]
    #[serde(rename = "versionMetadata")]
    version_metadata: Box<super::ModuleVersionMetadata>,
    #[builder(custom(type = super::ModuleVersionDefinition, convert = Box::new))]
    #[serde(rename = "definition")]
    definition: Box<super::ModuleVersionDefinition>,
}
impl Module {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        metadata: super::ModuleMetadata,
        version_metadata: super::ModuleVersionMetadata,
        definition: super::ModuleVersionDefinition,
    ) -> Self {
        Self::builder()
            .metadata(metadata)
            .version_metadata(version_metadata)
            .definition(definition)
            .build()
    }
    #[inline]
    pub fn metadata(&self) -> &super::ModuleMetadata {
        &*self.metadata
    }
    #[inline]
    pub fn version_metadata(&self) -> &super::ModuleVersionMetadata {
        &*self.version_metadata
    }
    #[inline]
    pub fn definition(&self) -> &super::ModuleVersionDefinition {
        &*self.definition
    }
}
