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