nominal_api_conjure/conjure/objects/scout/compute/api/
select_series.rs1#[derive(
8 Debug,
9 Clone,
10 conjure_object::serde::Serialize,
11 conjure_object::serde::Deserialize,
12 conjure_object::private::DeriveWith
13)]
14#[serde(crate = "conjure_object::serde")]
15#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
16#[conjure_object::private::staged_builder::staged_builder]
17#[builder(crate = conjure_object::private::staged_builder, update, inline)]
18pub struct SelectSeries {
19 #[builder(
20 default,
21 custom(
22 type = impl
23 Into<Option<super::StringConstant>>,
24 convert = |v|v.into().map(Box::new)
25 )
26 )]
27 #[serde(rename = "name", skip_serializing_if = "Option::is_none", default)]
28 name: Option<Box<super::StringConstant>>,
29 #[builder(
30 default,
31 custom(
32 type = impl
33 Into<Option<super::Dataset>>,
34 convert = |v|v.into().map(Box::new)
35 )
36 )]
37 #[serde(rename = "dataset", skip_serializing_if = "Option::is_none", default)]
38 dataset: Option<Box<super::Dataset>>,
39 #[builder(
40 default,
41 custom(
42 type = impl
43 Into<Option<super::Sampling>>,
44 convert = |v|v.into().map(Box::new)
45 )
46 )]
47 #[serde(rename = "sampling", skip_serializing_if = "Option::is_none", default)]
48 sampling: Option<Box<super::Sampling>>,
49}
50impl SelectSeries {
51 #[inline]
53 pub fn new() -> Self {
54 Self::builder().build()
55 }
56 #[inline]
58 pub fn name(&self) -> Option<&super::StringConstant> {
59 self.name.as_ref().map(|o| &**o)
60 }
61 #[inline]
64 pub fn dataset(&self) -> Option<&super::Dataset> {
65 self.dataset.as_ref().map(|o| &**o)
66 }
67 #[inline]
69 pub fn sampling(&self) -> Option<&super::Sampling> {
70 self.sampling.as_ref().map(|o| &**o)
71 }
72}