/// Defines an input file 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 FileExtractionInput {
    #[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, list(item(type = super::FileFilter)))]
    #[serde(rename = "fileFilters", skip_serializing_if = "Vec::is_empty", default)]
    file_filters: Vec<super::FileFilter>,
    #[builder(default, into)]
    #[serde(rename = "required", skip_serializing_if = "Option::is_none", default)]
    required: Option<bool>,
}
impl FileExtractionInput {
    /// 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 path to the input file.
    #[inline]
    pub fn environment_variable(&self) -> &super::EnvironmentVariable {
        &self.environment_variable
    }
    /// Name of the input file which users will be prompted with
    #[inline]
    pub fn name(&self) -> &str {
        &*self.name
    }
    /// Description of the input file which users will be prompted with
    #[inline]
    pub fn description(&self) -> Option<&str> {
        self.description.as_ref().map(|o| &**o)
    }
    /// Optionally filter files for file selection
    #[inline]
    pub fn file_filters(&self) -> &[super::FileFilter] {
        &*self.file_filters
    }
    /// Whether the input file is required for the extractor to run.
    #[inline]
    pub fn required(&self) -> Option<bool> {
        self.required.as_ref().map(|o| *o)
    }
}
