Skip to main content

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

1/// At least one input is missing a unit.
2#[derive(
3    Debug,
4    Clone,
5    conjure_object::serde::Serialize,
6    conjure_object::serde::Deserialize,
7    PartialEq,
8    Eq,
9    PartialOrd,
10    Ord,
11    Hash
12)]
13#[serde(crate = "conjure_object::serde")]
14#[conjure_object::private::staged_builder::staged_builder]
15#[builder(crate = conjure_object::private::staged_builder, update, inline)]
16pub struct UnitsMissing {
17    #[builder(
18        default,
19        set(item(type = super::super::super::super::api::LogicalSeriesRid))
20    )]
21    #[serde(
22        rename = "seriesRids",
23        skip_serializing_if = "std::collections::BTreeSet::is_empty",
24        default
25    )]
26    series_rids: std::collections::BTreeSet<
27        super::super::super::super::api::LogicalSeriesRid,
28    >,
29    #[builder(default, set(item(type = super::DataSourceAndChannel)))]
30    #[serde(
31        rename = "channels",
32        skip_serializing_if = "std::collections::BTreeSet::is_empty",
33        default
34    )]
35    channels: std::collections::BTreeSet<super::DataSourceAndChannel>,
36}
37impl UnitsMissing {
38    /// Constructs a new instance of the type.
39    #[inline]
40    pub fn new() -> Self {
41        Self::builder().build()
42    }
43    #[deprecated(note = "Use channels instead.\n")]
44    #[inline]
45    pub fn series_rids(
46        &self,
47    ) -> &std::collections::BTreeSet<super::super::super::super::api::LogicalSeriesRid> {
48        &self.series_rids
49    }
50    #[inline]
51    pub fn channels(&self) -> &std::collections::BTreeSet<super::DataSourceAndChannel> {
52        &self.channels
53    }
54}