gitea_rs/models/
generate_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/// GenerateRepoOption : GenerateRepoOption options when creating repository using a template
12
13
14
15#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
16pub struct GenerateRepoOption {
17    /// include avatar of the template repo
18    #[serde(rename = "avatar", skip_serializing_if = "Option::is_none")]
19    pub avatar: Option<bool>,
20    /// Default branch of the new repository
21    #[serde(rename = "default_branch", skip_serializing_if = "Option::is_none")]
22    pub default_branch: Option<String>,
23    /// Description of the repository to create
24    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
25    pub description: Option<String>,
26    /// include git content of default branch in template repo
27    #[serde(rename = "git_content", skip_serializing_if = "Option::is_none")]
28    pub git_content: Option<bool>,
29    /// include git hooks in template repo
30    #[serde(rename = "git_hooks", skip_serializing_if = "Option::is_none")]
31    pub git_hooks: Option<bool>,
32    /// include labels in template repo
33    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
34    pub labels: Option<bool>,
35    /// Name of the repository to create
36    #[serde(rename = "name")]
37    pub name: String,
38    /// The organization or person who will own the new repository
39    #[serde(rename = "owner")]
40    pub owner: String,
41    /// Whether the repository is private
42    #[serde(rename = "private", skip_serializing_if = "Option::is_none")]
43    pub private: Option<bool>,
44    /// include topics in template repo
45    #[serde(rename = "topics", skip_serializing_if = "Option::is_none")]
46    pub topics: Option<bool>,
47    /// include webhooks in template repo
48    #[serde(rename = "webhooks", skip_serializing_if = "Option::is_none")]
49    pub webhooks: Option<bool>,
50}
51
52impl GenerateRepoOption {
53    /// GenerateRepoOption options when creating repository using a template
54    pub fn new(name: String, owner: String) -> GenerateRepoOption {
55        GenerateRepoOption {
56            avatar: None,
57            default_branch: None,
58            description: None,
59            git_content: None,
60            git_hooks: None,
61            labels: None,
62            name,
63            owner,
64            private: None,
65            topics: None,
66            webhooks: None,
67        }
68    }
69}
70
71