Skip to main content

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