/// Transforms a dataset by adding a time offset to all its data.
#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    conjure_object::private::DeriveWith
)]
#[serde(crate = "conjure_object::serde")]
#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct TimeShiftedDataset {
    #[builder(custom(type = super::Dataset, convert = Box::new))]
    #[serde(rename = "input")]
    input: Box<super::Dataset>,
    #[builder(custom(type = super::Duration, convert = Box::new))]
    #[serde(rename = "offset")]
    offset: Box<super::Duration>,
}
impl TimeShiftedDataset {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(input: super::Dataset, offset: super::Duration) -> Self {
        Self::builder().input(input).offset(offset).build()
    }
    /// The underlying dataset to time-shift.
    #[inline]
    pub fn input(&self) -> &super::Dataset {
        &*self.input
    }
    /// The time shift to apply. Positive values shift data forward in time,
    /// negative values shift backward.
    #[inline]
    pub fn offset(&self) -> &super::Duration {
        &*self.offset
    }
}
