nominal_api/conjure/errors/scout/versioning/api/
commit_not_found.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 CommitNotFound {
16 #[serde(rename = "resourceRid")]
17 resource_rid: conjure_object::ResourceIdentifier,
18 #[serde(rename = "commit")]
19 commit: super::super::super::super::super::objects::scout::versioning::api::CommitId,
20}
21impl CommitNotFound {
22 #[inline]
24 pub fn new(
25 resource_rid: conjure_object::ResourceIdentifier,
26 commit: super::super::super::super::super::objects::scout::versioning::api::CommitId,
27 ) -> Self {
28 Self::builder().resource_rid(resource_rid).commit(commit).build()
29 }
30 #[inline]
31 pub fn resource_rid(&self) -> &conjure_object::ResourceIdentifier {
32 &self.resource_rid
33 }
34 #[inline]
35 pub fn commit(
36 &self,
37 ) -> &super::super::super::super::super::objects::scout::versioning::api::CommitId {
38 &self.commit
39 }
40}
41impl conjure_error::ErrorType for CommitNotFound {
42 #[inline]
43 fn code() -> conjure_error::ErrorCode {
44 conjure_error::ErrorCode::NotFound
45 }
46 #[inline]
47 fn name() -> &'static str {
48 "Scout:CommitNotFound"
49 }
50 #[inline]
51 fn safe_args() -> &'static [&'static str] {
52 &["commit", "resourceRid"]
53 }
54}