#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct NoPointsInRange {
    #[serde(rename = "logicalSeriesRid")]
    logical_series_rid: conjure_object::ResourceIdentifier,
    #[builder(
        custom(
            type = super::super::super::super::super::objects::api::Timestamp,
            convert = Box::new
        )
    )]
    #[serde(rename = "start")]
    start: Box<super::super::super::super::super::objects::api::Timestamp>,
    #[builder(
        custom(
            type = super::super::super::super::super::objects::api::Timestamp,
            convert = Box::new
        )
    )]
    #[serde(rename = "end")]
    end: Box<super::super::super::super::super::objects::api::Timestamp>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::super::super::super::super::objects::scout::run::api::Duration>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "offset", skip_serializing_if = "Option::is_none", default)]
    offset: Option<
        Box<super::super::super::super::super::objects::scout::run::api::Duration>,
    >,
}
impl NoPointsInRange {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        logical_series_rid: conjure_object::ResourceIdentifier,
        start: super::super::super::super::super::objects::api::Timestamp,
        end: super::super::super::super::super::objects::api::Timestamp,
    ) -> Self {
        Self::builder()
            .logical_series_rid(logical_series_rid)
            .start(start)
            .end(end)
            .build()
    }
    #[inline]
    pub fn logical_series_rid(&self) -> &conjure_object::ResourceIdentifier {
        &self.logical_series_rid
    }
    #[inline]
    pub fn start(&self) -> &super::super::super::super::super::objects::api::Timestamp {
        &*self.start
    }
    #[inline]
    pub fn end(&self) -> &super::super::super::super::super::objects::api::Timestamp {
        &*self.end
    }
    #[inline]
    pub fn offset(
        &self,
    ) -> Option<&super::super::super::super::super::objects::scout::run::api::Duration> {
        self.offset.as_ref().map(|o| &**o)
    }
}
impl conjure_error::ErrorType for NoPointsInRange {
    #[inline]
    fn code() -> conjure_error::ErrorCode {
        conjure_error::ErrorCode::InvalidArgument
    }
    #[inline]
    fn name() -> &'static str {
        "DataReview:NoPointsInRange"
    }
    #[inline]
    fn safe_args() -> &'static [&'static str] {
        &["end", "logicalSeriesRid", "offset", "start"]
    }
}
