Skip to main content

nominal_api/conjure/errors/module/
module_rids_not_found.rs

1/// One or more modules were not found in the current workspace.
2#[derive(
3    Debug,
4    Clone,
5    conjure_object::serde::Serialize,
6    conjure_object::serde::Deserialize,
7    PartialEq,
8    Eq,
9    PartialOrd,
10    Ord,
11    Hash
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 ModuleRidsNotFound {
17    #[builder(
18        default,
19        set(item(type = super::super::super::objects::modules::api::ModuleRid))
20    )]
21    #[serde(
22        rename = "moduleRids",
23        skip_serializing_if = "std::collections::BTreeSet::is_empty",
24        default
25    )]
26    module_rids: std::collections::BTreeSet<
27        super::super::super::objects::modules::api::ModuleRid,
28    >,
29}
30impl ModuleRidsNotFound {
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 module_rids(
38        &self,
39    ) -> &std::collections::BTreeSet<
40        super::super::super::objects::modules::api::ModuleRid,
41    > {
42        &self.module_rids
43    }
44}
45impl conjure_error::ErrorType for ModuleRidsNotFound {
46    #[inline]
47    fn code() -> conjure_error::ErrorCode {
48        conjure_error::ErrorCode::NotFound
49    }
50    #[inline]
51    fn name() -> &'static str {
52        "Module:ModuleRidsNotFound"
53    }
54    #[inline]
55    fn safe_args() -> &'static [&'static str] {
56        &["moduleRids"]
57    }
58}