nominal-api 0.1239.0

API bindings for the Nominal platform
Documentation
/// A reference to a derived series resulting from applying a function to a set of arguments.
#[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 FunctionDerivedSeries {
    #[builder(custom(type = super::StringConstant, convert = Box::new))]
    #[serde(rename = "moduleName")]
    module_name: Box<super::StringConstant>,
    #[builder(custom(type = super::StringConstant, convert = Box::new))]
    #[serde(rename = "functionName")]
    function_name: Box<super::StringConstant>,
    #[builder(custom(type = super::ModuleVersionReference, convert = Box::new))]
    #[serde(rename = "versionReference")]
    version_reference: Box<super::ModuleVersionReference>,
    #[builder(
        default,
        map(
            key(type = super::FunctionParameterName),
            value(type = super::FunctionParameterValue)
        )
    )]
    #[serde(
        rename = "functionArgs",
        skip_serializing_if = "std::collections::BTreeMap::is_empty",
        default
    )]
    function_args: std::collections::BTreeMap<
        super::FunctionParameterName,
        super::FunctionParameterValue,
    >,
}
impl FunctionDerivedSeries {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        module_name: super::StringConstant,
        function_name: super::StringConstant,
        version_reference: super::ModuleVersionReference,
    ) -> Self {
        Self::builder()
            .module_name(module_name)
            .function_name(function_name)
            .version_reference(version_reference)
            .build()
    }
    #[inline]
    pub fn module_name(&self) -> &super::StringConstant {
        &*self.module_name
    }
    #[inline]
    pub fn function_name(&self) -> &super::StringConstant {
        &*self.function_name
    }
    #[inline]
    pub fn version_reference(&self) -> &super::ModuleVersionReference {
        &*self.version_reference
    }
    /// Map of function input names to their values. The function inputs must match the function's parameter
    /// names and types. An input must be specified for each of the referenced function's parameters.
    #[inline]
    pub fn function_args(
        &self,
    ) -> &std::collections::BTreeMap<
        super::FunctionParameterName,
        super::FunctionParameterValue,
    > {
        &self.function_args
    }
}