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