/// A data scope input that binds a variable name to an asset or run RID.
/// The variable name is the map key.
#[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 WorkbookDataScopeInput {
    #[serde(rename = "name")]
    name: super::WorkbookDataScopeInputName,
    #[builder(default, into)]
    #[serde(rename = "label", skip_serializing_if = "Option::is_none", default)]
    label: Option<String>,
    #[builder(custom(type = super::DataScopeInputValue, convert = Box::new))]
    #[serde(rename = "value")]
    value: Box<super::DataScopeInputValue>,
}
impl WorkbookDataScopeInput {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        name: super::WorkbookDataScopeInputName,
        value: super::DataScopeInputValue,
    ) -> Self {
        Self::builder().name(name).value(value).build()
    }
    #[deprecated(note = "Deprecated in favor of label.")]
    #[inline]
    pub fn name(&self) -> &super::WorkbookDataScopeInputName {
        &self.name
    }
    #[inline]
    pub fn label(&self) -> Option<&str> {
        self.label.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn value(&self) -> &super::DataScopeInputValue {
        &*self.value
    }
}
