#[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 RunNotFoundById {
    #[serde(rename = "runNumber")]
    run_number: conjure_object::SafeLong,
    #[builder(default, into)]
    #[serde(rename = "runPrefix", skip_serializing_if = "Option::is_none", default)]
    run_prefix: Option<String>,
}
impl RunNotFoundById {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(run_number: conjure_object::SafeLong) -> Self {
        Self::builder().run_number(run_number).build()
    }
    #[inline]
    pub fn run_number(&self) -> conjure_object::SafeLong {
        self.run_number
    }
    #[inline]
    pub fn run_prefix(&self) -> Option<&str> {
        self.run_prefix.as_ref().map(|o| &**o)
    }
}
impl conjure_error::ErrorType for RunNotFoundById {
    #[inline]
    fn code() -> conjure_error::ErrorCode {
        conjure_error::ErrorCode::NotFound
    }
    #[inline]
    fn name() -> &'static str {
        "Scout:RunNotFoundById"
    }
    #[inline]
    fn safe_args() -> &'static [&'static str] {
        &["runNumber", "runPrefix"]
    }
}
