nominal-api-conjure 0.1449.0

Conjure HTTP API bindings for the Nominal platform
Documentation
#[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 ChecklistVariable {
    #[serde(rename = "name")]
    name: super::super::super::compute::api::VariableName,
    #[builder(default, into)]
    #[serde(rename = "displayName", skip_serializing_if = "Option::is_none", default)]
    display_name: Option<String>,
    #[builder(custom(type = super::VariableLocator, convert = Box::new))]
    #[serde(rename = "value")]
    value: Box<super::VariableLocator>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::ComputeExpression>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(
        rename = "computeExpression",
        skip_serializing_if = "Option::is_none",
        default
    )]
    compute_expression: Option<Box<super::ComputeExpression>>,
}
impl ChecklistVariable {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        name: super::super::super::compute::api::VariableName,
        value: super::VariableLocator,
    ) -> Self {
        Self::builder().name(name).value(value).build()
    }
    #[inline]
    pub fn name(&self) -> &super::super::super::compute::api::VariableName {
        &self.name
    }
    #[inline]
    pub fn display_name(&self) -> Option<&str> {
        self.display_name.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn value(&self) -> &super::VariableLocator {
        &*self.value
    }
    /// Code representation of the compute for this checklist variable. Authoritative when present:
    /// `value` must be exactly what this expression compiles to. The server persists it verbatim and
    /// does not verify that correspondence. The source is preamble-stripped — it does not include the
    /// auto-injected compute imports.
    #[inline]
    pub fn compute_expression(&self) -> Option<&super::ComputeExpression> {
        self.compute_expression.as_ref().map(|o| &**o)
    }
}