/// Defines an input parameter to be provided to the extractor.
#[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 FileExtractionParameter {
    #[serde(rename = "environmentVariable")]
    environment_variable: super::EnvironmentVariable,
    #[builder(into)]
    #[serde(rename = "name")]
    name: String,
    #[builder(default, into)]
    #[serde(rename = "description", skip_serializing_if = "Option::is_none", default)]
    description: Option<String>,
    #[builder(default, into)]
    #[serde(rename = "required", skip_serializing_if = "Option::is_none", default)]
    required: Option<bool>,
}
impl FileExtractionParameter {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        environment_variable: super::EnvironmentVariable,
        name: impl Into<String>,
    ) -> Self {
        Self::builder().environment_variable(environment_variable).name(name).build()
    }
    /// The environment variable that stores the argument
    #[inline]
    pub fn environment_variable(&self) -> &super::EnvironmentVariable {
        &self.environment_variable
    }
    /// Name of the parameter which users will be prompted with
    #[inline]
    pub fn name(&self) -> &str {
        &*self.name
    }
    /// Description of the parameter which users will be prompted with
    #[inline]
    pub fn description(&self) -> Option<&str> {
        self.description.as_ref().map(|o| &**o)
    }
    /// Whether the parameter is required for the extractor to run.
    #[inline]
    pub fn required(&self) -> Option<bool> {
        self.required.as_ref().map(|o| *o)
    }
}
