Skip to main content

nominal_api_conjure/conjure/errors/event/
events_not_found.rs

1#[derive(
2    Debug,
3    Clone,
4    conjure_object::serde::Serialize,
5    conjure_object::serde::Deserialize,
6    PartialEq,
7    Eq,
8    PartialOrd,
9    Ord,
10    Hash,
11    conjure_object::log_safety::derive::LogSafe
12)]
13#[serde(crate = "conjure_object::serde")]
14#[conjure_object::private::staged_builder::staged_builder]
15#[builder(crate = conjure_object::private::staged_builder, update, inline)]
16pub struct EventsNotFound {
17    #[builder(
18        default,
19        set(item(type = super::super::super::objects::api::rids::EventRid))
20    )]
21    #[serde(
22        rename = "eventRids",
23        skip_serializing_if = "std::collections::BTreeSet::is_empty",
24        default
25    )]
26    event_rids: std::collections::BTreeSet<
27        super::super::super::objects::api::rids::EventRid,
28    >,
29}
30impl EventsNotFound {
31    /// Constructs a new instance of the type.
32    #[inline]
33    pub fn new() -> Self {
34        Self::builder().build()
35    }
36    #[inline]
37    pub fn event_rids(
38        &self,
39    ) -> &std::collections::BTreeSet<super::super::super::objects::api::rids::EventRid> {
40        &self.event_rids
41    }
42}
43impl conjure_error::ErrorType for EventsNotFound {
44    #[inline]
45    fn code() -> conjure_error::ErrorCode {
46        conjure_error::ErrorCode::NotFound
47    }
48    #[inline]
49    fn name() -> &'static str {
50        "Scout:EventsNotFound"
51    }
52    #[inline]
53    fn safe_args() -> &'static [&'static str] {
54        &["eventRids"]
55    }
56}