Skip to main content

nominal_api/conjure/errors/secrets/api/
secrets_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 SecretsNotFound {
16    #[builder(
17        default,
18        set(item(type = super::super::super::super::objects::secrets::api::SecretRid))
19    )]
20    #[serde(
21        rename = "secretRids",
22        skip_serializing_if = "std::collections::BTreeSet::is_empty",
23        default
24    )]
25    secret_rids: std::collections::BTreeSet<
26        super::super::super::super::objects::secrets::api::SecretRid,
27    >,
28}
29impl SecretsNotFound {
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 secret_rids(
37        &self,
38    ) -> &std::collections::BTreeSet<
39        super::super::super::super::objects::secrets::api::SecretRid,
40    > {
41        &self.secret_rids
42    }
43}
44impl conjure_error::ErrorType for SecretsNotFound {
45    #[inline]
46    fn code() -> conjure_error::ErrorCode {
47        conjure_error::ErrorCode::NotFound
48    }
49    #[inline]
50    fn name() -> &'static str {
51        "Secrets:SecretsNotFound"
52    }
53    #[inline]
54    fn safe_args() -> &'static [&'static str] {
55        &["secretRids"]
56    }
57}