nominal-api-conjure 0.1323.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 CustomCurveFit {
    #[builder(into)]
    #[serde(rename = "formula")]
    formula: String,
    #[builder(
        default,
        map(
            key(type = super::super::super::api::LocalVariableName),
            value(type = super::CurveFitVariable)
        )
    )]
    #[serde(
        rename = "variables",
        skip_serializing_if = "std::collections::BTreeMap::is_empty",
        default
    )]
    variables: std::collections::BTreeMap<
        super::super::super::api::LocalVariableName,
        super::CurveFitVariable,
    >,
    #[builder(default, map(key(type = String, into), value(type = f64)))]
    #[serde(
        rename = "parameters",
        skip_serializing_if = "std::collections::BTreeMap::is_empty",
        default
    )]
    #[derive_with(with = conjure_object::private::DoubleWrapper)]
    parameters: std::collections::BTreeMap<String, f64>,
    #[builder(custom(type = super::AlignmentConfiguration, convert = Box::new))]
    #[serde(rename = "alignmentConfiguration")]
    alignment_configuration: Box<super::AlignmentConfiguration>,
}
impl CustomCurveFit {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        formula: impl Into<String>,
        alignment_configuration: super::AlignmentConfiguration,
    ) -> Self {
        Self::builder()
            .formula(formula)
            .alignment_configuration(alignment_configuration)
            .build()
    }
    #[inline]
    pub fn formula(&self) -> &str {
        &*self.formula
    }
    #[inline]
    pub fn variables(
        &self,
    ) -> &std::collections::BTreeMap<
        super::super::super::api::LocalVariableName,
        super::CurveFitVariable,
    > {
        &self.variables
    }
    #[inline]
    pub fn parameters(&self) -> &std::collections::BTreeMap<String, f64> {
        &self.parameters
    }
    #[inline]
    pub fn alignment_configuration(&self) -> &super::AlignmentConfiguration {
        &*self.alignment_configuration
    }
}