Skip to main content

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