nominal_api/conjure/objects/scout/compute/resolved/api/
bode_node.rs1#[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 BodeNode {
13 #[builder(custom(type = super::NumericSeriesNode, convert = Box::new))]
14 #[serde(rename = "input")]
15 input: Box<super::NumericSeriesNode>,
16 #[builder(custom(type = super::NumericSeriesNode, convert = Box::new))]
17 #[serde(rename = "output")]
18 output: Box<super::NumericSeriesNode>,
19 #[builder(
20 default,
21 custom(
22 type = impl
23 Into<Option<super::AlignmentConfiguration>>,
24 convert = |v|v.into().map(Box::new)
25 )
26 )]
27 #[serde(
28 rename = "alignmentConfiguration",
29 skip_serializing_if = "Option::is_none",
30 default
31 )]
32 alignment_configuration: Option<Box<super::AlignmentConfiguration>>,
33 #[builder(
34 default,
35 custom(
36 type = impl
37 Into<Option<super::super::super::api::StftOptions>>,
38 convert = |v|v.into().map(Box::new)
39 )
40 )]
41 #[serde(rename = "stftOptions", skip_serializing_if = "Option::is_none", default)]
42 stft_options: Option<Box<super::super::super::api::StftOptions>>,
43 #[builder(default, into)]
44 #[serde(
45 rename = "magnitudeScaling",
46 skip_serializing_if = "Option::is_none",
47 default
48 )]
49 magnitude_scaling: Option<super::super::super::api::MagnitudeScaling>,
50 #[builder(default, into)]
51 #[serde(
52 rename = "outputFrequencyType",
53 skip_serializing_if = "Option::is_none",
54 default
55 )]
56 output_frequency_type: Option<super::super::super::api::OutputFrequencyType>,
57 #[builder(default, into)]
58 #[serde(rename = "unwrapPhase", skip_serializing_if = "Option::is_none", default)]
59 unwrap_phase: Option<bool>,
60}
61impl BodeNode {
62 #[inline]
64 pub fn new(
65 input: super::NumericSeriesNode,
66 output: super::NumericSeriesNode,
67 ) -> Self {
68 Self::builder().input(input).output(output).build()
69 }
70 #[inline]
71 pub fn input(&self) -> &super::NumericSeriesNode {
72 &*self.input
73 }
74 #[inline]
75 pub fn output(&self) -> &super::NumericSeriesNode {
76 &*self.output
77 }
78 #[inline]
79 pub fn alignment_configuration(&self) -> Option<&super::AlignmentConfiguration> {
80 self.alignment_configuration.as_ref().map(|o| &**o)
81 }
82 #[inline]
83 pub fn stft_options(&self) -> Option<&super::super::super::api::StftOptions> {
84 self.stft_options.as_ref().map(|o| &**o)
85 }
86 #[inline]
87 pub fn magnitude_scaling(
88 &self,
89 ) -> Option<&super::super::super::api::MagnitudeScaling> {
90 self.magnitude_scaling.as_ref().map(|o| &*o)
91 }
92 #[inline]
93 pub fn output_frequency_type(
94 &self,
95 ) -> Option<&super::super::super::api::OutputFrequencyType> {
96 self.output_frequency_type.as_ref().map(|o| &*o)
97 }
98 #[inline]
99 pub fn unwrap_phase(&self) -> Option<bool> {
100 self.unwrap_phase.as_ref().map(|o| *o)
101 }
102}