Skip to main content

nominal_api/conjure/errors/scout/integrations/api/
integrations_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 IntegrationsNotFound {
16    #[builder(
17        default,
18        set(
19            item(
20                type = super::super::super::super::super::objects::scout::integrations::api::IntegrationRid
21            )
22        )
23    )]
24    #[serde(
25        rename = "integrationRids",
26        skip_serializing_if = "std::collections::BTreeSet::is_empty",
27        default
28    )]
29    integration_rids: std::collections::BTreeSet<
30        super::super::super::super::super::objects::scout::integrations::api::IntegrationRid,
31    >,
32}
33impl IntegrationsNotFound {
34    /// Constructs a new instance of the type.
35    #[inline]
36    pub fn new() -> Self {
37        Self::builder().build()
38    }
39    #[inline]
40    pub fn integration_rids(
41        &self,
42    ) -> &std::collections::BTreeSet<
43        super::super::super::super::super::objects::scout::integrations::api::IntegrationRid,
44    > {
45        &self.integration_rids
46    }
47}
48impl conjure_error::ErrorType for IntegrationsNotFound {
49    #[inline]
50    fn code() -> conjure_error::ErrorCode {
51        conjure_error::ErrorCode::NotFound
52    }
53    #[inline]
54    fn name() -> &'static str {
55        "Scout:IntegrationsNotFound"
56    }
57    #[inline]
58    fn safe_args() -> &'static [&'static str] {
59        &["integrationRids"]
60    }
61}