/// The start time of the provided Range is greater than its end time.
#[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 InvalidRange {
    #[builder(
        custom(
            type = super::super::super::super::objects::api::Range,
            convert = Box::new
        )
    )]
    #[serde(rename = "range")]
    range: Box<super::super::super::super::objects::api::Range>,
}
impl InvalidRange {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(range: super::super::super::super::objects::api::Range) -> Self {
        Self::builder().range(range).build()
    }
    #[inline]
    pub fn range(&self) -> &super::super::super::super::objects::api::Range {
        &*self.range
    }
}
impl conjure_error::ErrorType for InvalidRange {
    #[inline]
    fn code() -> conjure_error::ErrorCode {
        conjure_error::ErrorCode::InvalidArgument
    }
    #[inline]
    fn name() -> &'static str {
        "Scout:InvalidRange"
    }
    #[inline]
    fn safe_args() -> &'static [&'static str] {
        &["range"]
    }
}
