nominal_api/conjure/errors/scout/notebook/api/
save_notebook_conflict.rs1#[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 SaveNotebookConflict {
16 #[serde(rename = "notebookRid")]
17 notebook_rid: super::super::super::super::super::objects::scout::rids::api::NotebookRid,
18 #[serde(rename = "otherSnapshotRid")]
19 other_snapshot_rid: super::super::super::super::super::objects::scout::rids::api::SnapshotRid,
20 #[serde(rename = "otherSnapshotAuthorRid")]
21 other_snapshot_author_rid: super::super::super::super::super::objects::scout::rids::api::UserRid,
22}
23impl SaveNotebookConflict {
24 #[inline]
26 pub fn new(
27 notebook_rid: super::super::super::super::super::objects::scout::rids::api::NotebookRid,
28 other_snapshot_rid: super::super::super::super::super::objects::scout::rids::api::SnapshotRid,
29 other_snapshot_author_rid: super::super::super::super::super::objects::scout::rids::api::UserRid,
30 ) -> Self {
31 Self::builder()
32 .notebook_rid(notebook_rid)
33 .other_snapshot_rid(other_snapshot_rid)
34 .other_snapshot_author_rid(other_snapshot_author_rid)
35 .build()
36 }
37 #[inline]
38 pub fn notebook_rid(
39 &self,
40 ) -> &super::super::super::super::super::objects::scout::rids::api::NotebookRid {
41 &self.notebook_rid
42 }
43 #[inline]
44 pub fn other_snapshot_rid(
45 &self,
46 ) -> &super::super::super::super::super::objects::scout::rids::api::SnapshotRid {
47 &self.other_snapshot_rid
48 }
49 #[inline]
50 pub fn other_snapshot_author_rid(
51 &self,
52 ) -> &super::super::super::super::super::objects::scout::rids::api::UserRid {
53 &self.other_snapshot_author_rid
54 }
55}
56impl conjure_error::ErrorType for SaveNotebookConflict {
57 #[inline]
58 fn code() -> conjure_error::ErrorCode {
59 conjure_error::ErrorCode::Conflict
60 }
61 #[inline]
62 fn name() -> &'static str {
63 "Scout:SaveNotebookConflict"
64 }
65 #[inline]
66 fn safe_args() -> &'static [&'static str] {
67 &["notebookRid", "otherSnapshotAuthorRid", "otherSnapshotRid"]
68 }
69}