Skip to main content

nominal_api/conjure/objects/scout/compute/api/
parameterized_context.rs

1#[derive(
2    Debug,
3    Clone,
4    conjure_object::serde::Serialize,
5    conjure_object::serde::Deserialize,
6    conjure_object::private::DeriveWith
7)]
8#[serde(crate = "conjure_object::serde")]
9#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
10#[conjure_object::private::staged_builder::staged_builder]
11#[builder(crate = conjure_object::private::staged_builder, update, inline)]
12pub struct ParameterizedContext {
13    #[builder(default, list(item(type = super::ParameterInput)))]
14    #[serde(rename = "parameterInputs", skip_serializing_if = "Vec::is_empty", default)]
15    parameter_inputs: Vec<super::ParameterInput>,
16}
17impl ParameterizedContext {
18    /// Constructs a new instance of the type.
19    #[inline]
20    pub fn new() -> Self {
21        Self::builder().build()
22    }
23    /// Each parameter input provides a satisfying set of values for the parameterized compute node.
24    #[inline]
25    pub fn parameter_inputs(&self) -> &[super::ParameterInput] {
26        &*self.parameter_inputs
27    }
28}