#[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 CreateModuleRequest {
    #[builder(into)]
    #[serde(rename = "apiName")]
    api_name: String,
    #[builder(into)]
    #[serde(rename = "title")]
    title: String,
    #[builder(into)]
    #[serde(rename = "description")]
    description: String,
    #[builder(custom(type = super::ModuleVersionDefinition, convert = Box::new))]
    #[serde(rename = "definition")]
    definition: Box<super::ModuleVersionDefinition>,
    #[builder(default, into)]
    #[serde(rename = "workspace", skip_serializing_if = "Option::is_none", default)]
    workspace: Option<conjure_object::ResourceIdentifier>,
}
impl CreateModuleRequest {
    /// The API name for the module. This string will uniquely identify the module within the organization.
    #[inline]
    pub fn api_name(&self) -> &str {
        &*self.api_name
    }
    #[inline]
    pub fn title(&self) -> &str {
        &*self.title
    }
    #[inline]
    pub fn description(&self) -> &str {
        &*self.description
    }
    #[inline]
    pub fn definition(&self) -> &super::ModuleVersionDefinition {
        &*self.definition
    }
    #[inline]
    pub fn workspace(&self) -> Option<&conjure_object::ResourceIdentifier> {
        self.workspace.as_ref().map(|o| &*o)
    }
}
