nominal_api_conjure/conjure/objects/scout/compute/api/
range_duration_series.rs1#[derive(
3 Debug,
4 Clone,
5 conjure_object::serde::Serialize,
6 conjure_object::serde::Deserialize,
7 conjure_object::private::DeriveWith
8)]
9#[serde(crate = "conjure_object::serde")]
10#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
11#[conjure_object::private::staged_builder::staged_builder]
12#[builder(crate = conjure_object::private::staged_builder, update, inline)]
13pub struct RangeDurationSeries {
14 #[builder(custom(type = super::RangeSeries, convert = Box::new))]
15 #[serde(rename = "input")]
16 input: Box<super::RangeSeries>,
17 #[builder(custom(type = super::UnboundedRangeBehavior, convert = Box::new))]
18 #[serde(rename = "unboundedRangeBehavior")]
19 unbounded_range_behavior: Box<super::UnboundedRangeBehavior>,
20 #[builder(default, into)]
21 #[serde(rename = "timeUnit", skip_serializing_if = "Option::is_none", default)]
22 time_unit: Option<super::super::super::super::api::TimeUnit>,
23}
24impl RangeDurationSeries {
25 #[inline]
27 pub fn new(
28 input: super::RangeSeries,
29 unbounded_range_behavior: super::UnboundedRangeBehavior,
30 ) -> Self {
31 Self::builder()
32 .input(input)
33 .unbounded_range_behavior(unbounded_range_behavior)
34 .build()
35 }
36 #[inline]
37 pub fn input(&self) -> &super::RangeSeries {
38 &*self.input
39 }
40 #[inline]
42 pub fn unbounded_range_behavior(&self) -> &super::UnboundedRangeBehavior {
43 &*self.unbounded_range_behavior
44 }
45 #[inline]
47 pub fn time_unit(&self) -> Option<&super::super::super::super::api::TimeUnit> {
48 self.time_unit.as_ref().map(|o| &*o)
49 }
50}