gitea_rs/models/
edit_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/// EditRepoOption : EditRepoOption options when editing a repository's properties
12
13
14
15#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
16pub struct EditRepoOption {
17    /// either `true` to allow mark pr as merged manually, or `false` to prevent it.
18    #[serde(rename = "allow_manual_merge", skip_serializing_if = "Option::is_none")]
19    pub allow_manual_merge: Option<bool>,
20    /// either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits.
21    #[serde(rename = "allow_merge_commits", skip_serializing_if = "Option::is_none")]
22    pub allow_merge_commits: Option<bool>,
23    /// either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging.
24    #[serde(rename = "allow_rebase", skip_serializing_if = "Option::is_none")]
25    pub allow_rebase: Option<bool>,
26    /// either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits.
27    #[serde(rename = "allow_rebase_explicit", skip_serializing_if = "Option::is_none")]
28    pub allow_rebase_explicit: Option<bool>,
29    /// either `true` to allow updating pull request branch by rebase, or `false` to prevent it.
30    #[serde(rename = "allow_rebase_update", skip_serializing_if = "Option::is_none")]
31    pub allow_rebase_update: Option<bool>,
32    /// either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging.
33    #[serde(rename = "allow_squash_merge", skip_serializing_if = "Option::is_none")]
34    pub allow_squash_merge: Option<bool>,
35    /// set to `true` to archive this repository.
36    #[serde(rename = "archived", skip_serializing_if = "Option::is_none")]
37    pub archived: Option<bool>,
38    /// either `true` to enable AutodetectManualMerge, or `false` to prevent it. Note: In some special cases, misjudgments can occur.
39    #[serde(rename = "autodetect_manual_merge", skip_serializing_if = "Option::is_none")]
40    pub autodetect_manual_merge: Option<bool>,
41    /// set to `true` to allow edits from maintainers by default
42    #[serde(rename = "default_allow_maintainer_edit", skip_serializing_if = "Option::is_none")]
43    pub default_allow_maintainer_edit: Option<bool>,
44    /// sets the default branch for this repository.
45    #[serde(rename = "default_branch", skip_serializing_if = "Option::is_none")]
46    pub default_branch: Option<String>,
47    /// set to `true` to delete pr branch after merge by default
48    #[serde(rename = "default_delete_branch_after_merge", skip_serializing_if = "Option::is_none")]
49    pub default_delete_branch_after_merge: Option<bool>,
50    /// set to a merge style to be used by this repository: \"merge\", \"rebase\", \"rebase-merge\", or \"squash\".
51    #[serde(rename = "default_merge_style", skip_serializing_if = "Option::is_none")]
52    pub default_merge_style: Option<String>,
53    /// a short description of the repository.
54    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
55    pub description: Option<String>,
56    /// enable prune - remove obsolete remote-tracking references
57    #[serde(rename = "enable_prune", skip_serializing_if = "Option::is_none")]
58    pub enable_prune: Option<bool>,
59    #[serde(rename = "external_tracker", skip_serializing_if = "Option::is_none")]
60    pub external_tracker: Option<Box<crate::models::ExternalTracker>>,
61    #[serde(rename = "external_wiki", skip_serializing_if = "Option::is_none")]
62    pub external_wiki: Option<Box<crate::models::ExternalWiki>>,
63    /// either `true` to enable issues for this repository or `false` to disable them.
64    #[serde(rename = "has_issues", skip_serializing_if = "Option::is_none")]
65    pub has_issues: Option<bool>,
66    /// either `true` to enable project unit, or `false` to disable them.
67    #[serde(rename = "has_projects", skip_serializing_if = "Option::is_none")]
68    pub has_projects: Option<bool>,
69    /// either `true` to allow pull requests, or `false` to prevent pull request.
70    #[serde(rename = "has_pull_requests", skip_serializing_if = "Option::is_none")]
71    pub has_pull_requests: Option<bool>,
72    /// either `true` to enable the wiki for this repository or `false` to disable it.
73    #[serde(rename = "has_wiki", skip_serializing_if = "Option::is_none")]
74    pub has_wiki: Option<bool>,
75    /// either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace.
76    #[serde(rename = "ignore_whitespace_conflicts", skip_serializing_if = "Option::is_none")]
77    pub ignore_whitespace_conflicts: Option<bool>,
78    #[serde(rename = "internal_tracker", skip_serializing_if = "Option::is_none")]
79    pub internal_tracker: Option<Box<crate::models::InternalTracker>>,
80    /// set to a string like `8h30m0s` to set the mirror interval time
81    #[serde(rename = "mirror_interval", skip_serializing_if = "Option::is_none")]
82    pub mirror_interval: Option<String>,
83    /// name of the repository
84    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
85    pub name: Option<String>,
86    /// either `true` to make the repository private or `false` to make it public. Note: you will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private.
87    #[serde(rename = "private", skip_serializing_if = "Option::is_none")]
88    pub private: Option<bool>,
89    /// either `true` to make this repository a template or `false` to make it a normal repository
90    #[serde(rename = "template", skip_serializing_if = "Option::is_none")]
91    pub template: Option<bool>,
92    /// a URL with more information about the repository.
93    #[serde(rename = "website", skip_serializing_if = "Option::is_none")]
94    pub website: Option<String>,
95}
96
97impl EditRepoOption {
98    /// EditRepoOption options when editing a repository's properties
99    pub fn new() -> EditRepoOption {
100        EditRepoOption {
101            allow_manual_merge: None,
102            allow_merge_commits: None,
103            allow_rebase: None,
104            allow_rebase_explicit: None,
105            allow_rebase_update: None,
106            allow_squash_merge: None,
107            archived: None,
108            autodetect_manual_merge: None,
109            default_allow_maintainer_edit: None,
110            default_branch: None,
111            default_delete_branch_after_merge: None,
112            default_merge_style: None,
113            description: None,
114            enable_prune: None,
115            external_tracker: None,
116            external_wiki: None,
117            has_issues: None,
118            has_projects: None,
119            has_pull_requests: None,
120            has_wiki: None,
121            ignore_whitespace_conflicts: None,
122            internal_tracker: None,
123            mirror_interval: None,
124            name: None,
125            private: None,
126            template: None,
127            website: None,
128        }
129    }
130}
131
132