gitea_rs/models/
create_branch_repo_option.rs

1/*
2 * Gitea API.
3 *
4 * This documentation describes the Gitea API.
5 *
6 * The version of the OpenAPI document: 1.19.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// CreateBranchRepoOption : CreateBranchRepoOption options when creating a branch in a repository
12
13
14
15#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
16pub struct CreateBranchRepoOption {
17    /// Name of the branch to create
18    #[serde(rename = "new_branch_name")]
19    pub new_branch_name: String,
20    /// Name of the old branch to create from
21    #[serde(rename = "old_branch_name", skip_serializing_if = "Option::is_none")]
22    pub old_branch_name: Option<String>,
23}
24
25impl CreateBranchRepoOption {
26    /// CreateBranchRepoOption options when creating a branch in a repository
27    pub fn new(new_branch_name: String) -> CreateBranchRepoOption {
28        CreateBranchRepoOption {
29            new_branch_name,
30            old_branch_name: None,
31        }
32    }
33}
34
35