/* * Gitea API * * This documentation describes the Gitea API. * * The version of the OpenAPI document: 1.22.1 * * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// GenerateRepoOption : GenerateRepoOption options when creating repository using a template #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GenerateRepoOption { /// include avatar of the template repo #[serde(rename = "avatar", skip_serializing_if = "Option::is_none")] pub avatar: Option, /// Default branch of the new repository #[serde(rename = "default_branch", skip_serializing_if = "Option::is_none")] pub default_branch: Option, /// Description of the repository to create #[serde(rename = "description", skip_serializing_if = "Option::is_none")] pub description: Option, /// include git content of default branch in template repo #[serde(rename = "git_content", skip_serializing_if = "Option::is_none")] pub git_content: Option, /// include git hooks in template repo #[serde(rename = "git_hooks", skip_serializing_if = "Option::is_none")] pub git_hooks: Option, /// include labels in template repo #[serde(rename = "labels", skip_serializing_if = "Option::is_none")] pub labels: Option, /// Name of the repository to create #[serde(rename = "name")] pub name: String, /// The organization or person who will own the new repository #[serde(rename = "owner")] pub owner: String, /// Whether the repository is private #[serde(rename = "private", skip_serializing_if = "Option::is_none")] pub private: Option, /// include protected branches in template repo #[serde(rename = "protected_branch", skip_serializing_if = "Option::is_none")] pub protected_branch: Option, /// include topics in template repo #[serde(rename = "topics", skip_serializing_if = "Option::is_none")] pub topics: Option, /// include webhooks in template repo #[serde(rename = "webhooks", skip_serializing_if = "Option::is_none")] pub webhooks: Option, } impl GenerateRepoOption { /// GenerateRepoOption options when creating repository using a template pub fn new(name: String, owner: String) -> GenerateRepoOption { GenerateRepoOption { avatar: None, default_branch: None, description: None, git_content: None, git_hooks: None, labels: None, name, owner, private: None, protected_branch: None, topics: None, webhooks: None, } } }