/* * Gitea API. * * This documentation describes the Gitea API. * * The version of the OpenAPI document: 1.17.3 * * Generated by: https://openapi-generator.tech */ /// EditRepoOption : EditRepoOption options when editing a repository's properties #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EditRepoOption { /// either `true` to allow mark pr as merged manually, or `false` to prevent it. `has_pull_requests` must be `true`. #[serde(rename = "allow_manual_merge", skip_serializing_if = "Option::is_none")] pub allow_manual_merge: Option, /// either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. `has_pull_requests` must be `true`. #[serde(rename = "allow_merge_commits", skip_serializing_if = "Option::is_none")] pub allow_merge_commits: Option, /// either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. `has_pull_requests` must be `true`. #[serde(rename = "allow_rebase", skip_serializing_if = "Option::is_none")] pub allow_rebase: Option, /// either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits. `has_pull_requests` must be `true`. #[serde(rename = "allow_rebase_explicit", skip_serializing_if = "Option::is_none")] pub allow_rebase_explicit: Option, /// either `true` to allow updating pull request branch by rebase, or `false` to prevent it. `has_pull_requests` must be `true`. #[serde(rename = "allow_rebase_update", skip_serializing_if = "Option::is_none")] pub allow_rebase_update: Option, /// either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. `has_pull_requests` must be `true`. #[serde(rename = "allow_squash_merge", skip_serializing_if = "Option::is_none")] pub allow_squash_merge: Option, /// set to `true` to archive this repository. #[serde(rename = "archived", skip_serializing_if = "Option::is_none")] pub archived: Option, /// either `true` to enable AutodetectManualMerge, or `false` to prevent it. `has_pull_requests` must be `true`, Note: In some special cases, misjudgments can occur. #[serde(rename = "autodetect_manual_merge", skip_serializing_if = "Option::is_none")] pub autodetect_manual_merge: Option, /// sets the default branch for this repository. #[serde(rename = "default_branch", skip_serializing_if = "Option::is_none")] pub default_branch: Option, /// set to `true` to delete pr branch after merge by default #[serde(rename = "default_delete_branch_after_merge", skip_serializing_if = "Option::is_none")] pub default_delete_branch_after_merge: Option, /// set to a merge style to be used by this repository: \"merge\", \"rebase\", \"rebase-merge\", or \"squash\". `has_pull_requests` must be `true`. #[serde(rename = "default_merge_style", skip_serializing_if = "Option::is_none")] pub default_merge_style: Option, /// a short description of the repository. #[serde(rename = "description", skip_serializing_if = "Option::is_none")] pub description: Option, /// enable prune - remove obsolete remote-tracking references #[serde(rename = "enable_prune", skip_serializing_if = "Option::is_none")] pub enable_prune: Option, #[serde(rename = "external_tracker", skip_serializing_if = "Option::is_none")] pub external_tracker: Option>, #[serde(rename = "external_wiki", skip_serializing_if = "Option::is_none")] pub external_wiki: Option>, /// either `true` to enable issues for this repository or `false` to disable them. #[serde(rename = "has_issues", skip_serializing_if = "Option::is_none")] pub has_issues: Option, /// either `true` to enable project unit, or `false` to disable them. #[serde(rename = "has_projects", skip_serializing_if = "Option::is_none")] pub has_projects: Option, /// either `true` to allow pull requests, or `false` to prevent pull request. #[serde(rename = "has_pull_requests", skip_serializing_if = "Option::is_none")] pub has_pull_requests: Option, /// either `true` to enable the wiki for this repository or `false` to disable it. #[serde(rename = "has_wiki", skip_serializing_if = "Option::is_none")] pub has_wiki: Option, /// either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. `has_pull_requests` must be `true`. #[serde(rename = "ignore_whitespace_conflicts", skip_serializing_if = "Option::is_none")] pub ignore_whitespace_conflicts: Option, #[serde(rename = "internal_tracker", skip_serializing_if = "Option::is_none")] pub internal_tracker: Option>, /// set to a string like `8h30m0s` to set the mirror interval time #[serde(rename = "mirror_interval", skip_serializing_if = "Option::is_none")] pub mirror_interval: Option, /// name of the repository #[serde(rename = "name", skip_serializing_if = "Option::is_none")] pub name: Option, /// 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. #[serde(rename = "private", skip_serializing_if = "Option::is_none")] pub private: Option, /// either `true` to make this repository a template or `false` to make it a normal repository #[serde(rename = "template", skip_serializing_if = "Option::is_none")] pub template: Option, /// a URL with more information about the repository. #[serde(rename = "website", skip_serializing_if = "Option::is_none")] pub website: Option, } impl EditRepoOption { /// EditRepoOption options when editing a repository's properties pub fn new() -> EditRepoOption { EditRepoOption { allow_manual_merge: None, allow_merge_commits: None, allow_rebase: None, allow_rebase_explicit: None, allow_rebase_update: None, allow_squash_merge: None, archived: None, autodetect_manual_merge: None, default_branch: None, default_delete_branch_after_merge: None, default_merge_style: None, description: None, enable_prune: None, external_tracker: None, external_wiki: None, has_issues: None, has_projects: None, has_pull_requests: None, has_wiki: None, ignore_whitespace_conflicts: None, internal_tracker: None, mirror_interval: None, name: None, private: None, template: None, website: None, } } }