Skip to main content

nominal_api/conjure/objects/scout/versioning/api/
create_branch_request.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 CreateBranchRequest {
16    #[serde(rename = "existingCommit")]
17    existing_commit: super::CommitId,
18    #[serde(rename = "branchName")]
19    branch_name: super::BranchName,
20}
21impl CreateBranchRequest {
22    /// Constructs a new instance of the type.
23    #[inline]
24    pub fn new(
25        existing_commit: super::CommitId,
26        branch_name: super::BranchName,
27    ) -> Self {
28        Self::builder().existing_commit(existing_commit).branch_name(branch_name).build()
29    }
30    #[inline]
31    pub fn existing_commit(&self) -> &super::CommitId {
32        &self.existing_commit
33    }
34    #[inline]
35    pub fn branch_name(&self) -> &super::BranchName {
36        &self.branch_name
37    }
38}