Skip to main content

gitbundle_sdk/models/
repo_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 RepoCreateInput {
17    #[serde(rename = "default_branch", skip_serializing_if = "Option::is_none")]
18    pub default_branch: Option<String>,
19    #[serde(rename = "description")]
20    pub description: String,
21    #[serde(
22        rename = "fork_id",
23        default,
24        with = "::serde_with::rust::double_option",
25        skip_serializing_if = "Option::is_none"
26    )]
27    pub fork_id: Option<Option<i64>>,
28    #[serde(rename = "git_ignore")]
29    pub git_ignore: String,
30    #[serde(rename = "identifier")]
31    pub identifier: String,
32    #[serde(rename = "is_public")]
33    pub is_public: bool,
34    #[serde(rename = "license")]
35    pub license: String,
36    #[serde(rename = "parent_ref")]
37    pub parent_ref: String,
38    #[serde(rename = "readme")]
39    pub readme: bool,
40    #[serde(rename = "single_branch")]
41    pub single_branch: String,
42}
43
44impl RepoCreateInput {
45    pub fn new(
46        description: String,
47        git_ignore: String,
48        identifier: String,
49        is_public: bool,
50        license: String,
51        parent_ref: String,
52        readme: bool,
53        single_branch: String,
54    ) -> RepoCreateInput {
55        RepoCreateInput {
56            default_branch: None,
57            description,
58            fork_id: None,
59            git_ignore,
60            identifier,
61            is_public,
62            license,
63            parent_ref,
64            readme,
65            single_branch,
66        }
67    }
68}