nominal-api 0.1239.0

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 ParameterInput {
    #[builder(
        default,
        map(key(type = super::VariableName), value(type = super::VariableValue))
    )]
    #[serde(
        rename = "variables",
        skip_serializing_if = "std::collections::BTreeMap::is_empty",
        default
    )]
    variables: std::collections::BTreeMap<super::VariableName, super::VariableValue>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::Range>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "timeRange", skip_serializing_if = "Option::is_none", default)]
    time_range: Option<Box<super::Range>>,
}
impl ParameterInput {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new() -> Self {
        Self::builder().build()
    }
    #[inline]
    pub fn variables(
        &self,
    ) -> &std::collections::BTreeMap<super::VariableName, super::VariableValue> {
        &self.variables
    }
    /// Overrides the start and end time of the compute request. If either the start or end are not present, we
    /// default back to the start/end specified in the request.
    #[inline]
    pub fn time_range(&self) -> Option<&super::Range> {
        self.time_range.as_ref().map(|o| &**o)
    }
}