nominal-api 0.1239.0

API bindings for the Nominal platform
Documentation
/// A workbook input is a value managed at the workbook level
/// that can be applied to multiple elements.
#[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 WorkbookInput {
    #[serde(rename = "id")]
    id: conjure_object::Uuid,
    #[builder(default, into)]
    #[serde(rename = "label", skip_serializing_if = "Option::is_none", default)]
    label: Option<String>,
    #[builder(custom(type = super::InputType, convert = Box::new))]
    #[serde(rename = "value")]
    value: Box<super::InputType>,
}
impl WorkbookInput {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(id: conjure_object::Uuid, value: super::InputType) -> Self {
        Self::builder().id(id).value(value).build()
    }
    /// The unique identifier of the input.
    #[inline]
    pub fn id(&self) -> conjure_object::Uuid {
        self.id
    }
    /// The label of the input for display purposes.
    #[inline]
    pub fn label(&self) -> Option<&str> {
        self.label.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn value(&self) -> &super::InputType {
        &*self.value
    }
}