Skip to main content

nominal_api/conjure/errors/event/
rids_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 RidsNotFound {
16    #[builder(default, set(item(type = conjure_object::ResourceIdentifier)))]
17    #[serde(
18        rename = "rids",
19        skip_serializing_if = "std::collections::BTreeSet::is_empty",
20        default
21    )]
22    rids: std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
23}
24impl RidsNotFound {
25    /// Constructs a new instance of the type.
26    #[inline]
27    pub fn new() -> Self {
28        Self::builder().build()
29    }
30    #[inline]
31    pub fn rids(
32        &self,
33    ) -> &std::collections::BTreeSet<conjure_object::ResourceIdentifier> {
34        &self.rids
35    }
36}
37impl conjure_error::ErrorType for RidsNotFound {
38    #[inline]
39    fn code() -> conjure_error::ErrorCode {
40        conjure_error::ErrorCode::NotFound
41    }
42    #[inline]
43    fn name() -> &'static str {
44        "Scout:RidsNotFound"
45    }
46    #[inline]
47    fn safe_args() -> &'static [&'static str] {
48        &["rids"]
49    }
50}