Skip to main content

gitbundle_sdk/models/
branch_create_input.rs

1/*
2 * GitBundle API
3 *
4 * GitBundle API documentation.
5 *
6 * The version of the OpenAPI document: 3.4.1
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct BranchCreateInput {
17    #[serde(rename = "bypass_rules")]
18    pub bypass_rules: bool,
19    #[serde(rename = "name")]
20    pub name: String,
21    #[serde(
22        rename = "target",
23        default,
24        with = "::serde_with::rust::double_option",
25        skip_serializing_if = "Option::is_none"
26    )]
27    pub target: Option<Option<String>>,
28}
29
30impl BranchCreateInput {
31    pub fn new(bypass_rules: bool, name: String) -> BranchCreateInput {
32        BranchCreateInput {
33            bypass_rules,
34            name,
35            target: None,
36        }
37    }
38}