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(default, set(item(type = conjure_object::ResourceIdentifier)))]
18    #[serde(
19        rename = "seriesRids",
20        skip_serializing_if = "std::collections::BTreeSet::is_empty",
21        default
22    )]
23    series_rids: std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
24    #[builder(default, set(item(type = super::DataSourceAndChannel)))]
25    #[serde(
26        rename = "channels",
27        skip_serializing_if = "std::collections::BTreeSet::is_empty",
28        default
29    )]
30    channels: std::collections::BTreeSet<super::DataSourceAndChannel>,
31}
32impl UnitsMissing {
33    /// Constructs a new instance of the type.
34    #[inline]
35    pub fn new() -> Self {
36        Self::builder().build()
37    }
38    #[deprecated(note = "Use channels instead.\n")]
39    #[inline]
40    pub fn series_rids(
41        &self,
42    ) -> &std::collections::BTreeSet<conjure_object::ResourceIdentifier> {
43        &self.series_rids
44    }
45    #[inline]
46    pub fn channels(&self) -> &std::collections::BTreeSet<super::DataSourceAndChannel> {
47        &self.channels
48    }
49}