Skip to main content

nominal_api_conjure/conjure/objects/scout/compute/resolved/api/
scatter_node.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 ScatterNode {
13    #[builder(custom(type = super::NumericSeriesNode, convert = Box::new))]
14    #[serde(rename = "x")]
15    x: Box<super::NumericSeriesNode>,
16    #[builder(custom(type = super::NumericSeriesNode, convert = Box::new))]
17    #[serde(rename = "y")]
18    y: Box<super::NumericSeriesNode>,
19    #[builder(custom(type = super::AlignmentConfiguration, convert = Box::new))]
20    #[serde(rename = "alignmentConfiguration")]
21    alignment_configuration: Box<super::AlignmentConfiguration>,
22}
23impl ScatterNode {
24    /// Constructs a new instance of the type.
25    #[inline]
26    pub fn new(
27        x: super::NumericSeriesNode,
28        y: super::NumericSeriesNode,
29        alignment_configuration: super::AlignmentConfiguration,
30    ) -> Self {
31        Self::builder()
32            .x(x)
33            .y(y)
34            .alignment_configuration(alignment_configuration)
35            .build()
36    }
37    #[inline]
38    pub fn x(&self) -> &super::NumericSeriesNode {
39        &*self.x
40    }
41    #[inline]
42    pub fn y(&self) -> &super::NumericSeriesNode {
43        &*self.y
44    }
45    #[inline]
46    pub fn alignment_configuration(&self) -> &super::AlignmentConfiguration {
47        &*self.alignment_configuration
48    }
49}