Skip to main content

nominal_api_conjure/conjure/errors/attachments/api/
attachment_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    conjure_object::log_safety::derive::LogSafe
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 AttachmentNotFound {
17    #[serde(rename = "attachmentRid")]
18    attachment_rid: super::super::super::super::objects::api::rids::AttachmentRid,
19}
20impl AttachmentNotFound {
21    /// Constructs a new instance of the type.
22    #[inline]
23    pub fn new(
24        attachment_rid: super::super::super::super::objects::api::rids::AttachmentRid,
25    ) -> Self {
26        Self::builder().attachment_rid(attachment_rid).build()
27    }
28    #[inline]
29    pub fn attachment_rid(
30        &self,
31    ) -> &super::super::super::super::objects::api::rids::AttachmentRid {
32        &self.attachment_rid
33    }
34}
35impl conjure_error::ErrorType for AttachmentNotFound {
36    #[inline]
37    fn code() -> conjure_error::ErrorCode {
38        conjure_error::ErrorCode::NotFound
39    }
40    #[inline]
41    fn name() -> &'static str {
42        "Attachment:AttachmentNotFound"
43    }
44    #[inline]
45    fn safe_args() -> &'static [&'static str] {
46        &["attachmentRid"]
47    }
48}