#[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 ModuleRef {
    #[serde(rename = "rid")]
    rid: conjure_object::ResourceIdentifier,
    #[builder(into)]
    #[serde(rename = "apiName")]
    api_name: String,
    #[serde(rename = "version")]
    version: super::ModuleVersion,
}
impl ModuleRef {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        rid: conjure_object::ResourceIdentifier,
        api_name: impl Into<String>,
        version: super::ModuleVersion,
    ) -> Self {
        Self::builder().rid(rid).api_name(api_name).version(version).build()
    }
    #[inline]
    pub fn rid(&self) -> &conjure_object::ResourceIdentifier {
        &self.rid
    }
    #[inline]
    pub fn api_name(&self) -> &str {
        &*self.api_name
    }
    #[inline]
    pub fn version(&self) -> &super::ModuleVersion {
        &self.version
    }
}
