nominal_api/conjure/errors/scout/versioning/api/
commit_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 CommitConflict {
16 #[serde(rename = "resourceRid")]
17 resource_rid: conjure_object::ResourceIdentifier,
18 #[serde(rename = "trueLatestCommit")]
19 true_latest_commit: super::super::super::super::super::objects::scout::versioning::api::CommitId,
20 #[serde(rename = "providedLatestCommit")]
21 provided_latest_commit: super::super::super::super::super::objects::scout::versioning::api::CommitId,
22 #[serde(rename = "branchName")]
23 branch_name: super::super::super::super::super::objects::scout::versioning::api::BranchName,
24}
25impl CommitConflict {
26 #[inline]
27 pub fn resource_rid(&self) -> &conjure_object::ResourceIdentifier {
28 &self.resource_rid
29 }
30 #[inline]
31 pub fn true_latest_commit(
32 &self,
33 ) -> &super::super::super::super::super::objects::scout::versioning::api::CommitId {
34 &self.true_latest_commit
35 }
36 #[inline]
37 pub fn provided_latest_commit(
38 &self,
39 ) -> &super::super::super::super::super::objects::scout::versioning::api::CommitId {
40 &self.provided_latest_commit
41 }
42 #[inline]
43 pub fn branch_name(
44 &self,
45 ) -> &super::super::super::super::super::objects::scout::versioning::api::BranchName {
46 &self.branch_name
47 }
48}
49impl conjure_error::ErrorType for CommitConflict {
50 #[inline]
51 fn code() -> conjure_error::ErrorCode {
52 conjure_error::ErrorCode::Conflict
53 }
54 #[inline]
55 fn name() -> &'static str {
56 "Scout:CommitConflict"
57 }
58 #[inline]
59 fn safe_args() -> &'static [&'static str] {
60 &["providedLatestCommit", "resourceRid", "trueLatestCommit"]
61 }
62}