Files
octopush/crates/gitea_raw_client/src/models/generate_repo_option.rs
Kasper Juul Hermansen 991861db99
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
Rewrite rust (#38)
Co-authored-by: kjuulh <contact@kjuulh.io>
Reviewed-on: https://git.front.kjuulh.io/kjuulh/octopush/pulls/38
2022-11-27 11:21:35 +00:00

72 lines
2.4 KiB
Rust

/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// GenerateRepoOption : GenerateRepoOption options when creating repository using a template
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct GenerateRepoOption {
/// include avatar of the template repo
#[serde(rename = "avatar", skip_serializing_if = "Option::is_none")]
pub avatar: Option<bool>,
/// Default branch of the new repository
#[serde(rename = "default_branch", skip_serializing_if = "Option::is_none")]
pub default_branch: Option<String>,
/// Description of the repository to create
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
/// include git content of default branch in template repo
#[serde(rename = "git_content", skip_serializing_if = "Option::is_none")]
pub git_content: Option<bool>,
/// include git hooks in template repo
#[serde(rename = "git_hooks", skip_serializing_if = "Option::is_none")]
pub git_hooks: Option<bool>,
/// include labels in template repo
#[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
pub labels: Option<bool>,
/// 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<bool>,
/// include topics in template repo
#[serde(rename = "topics", skip_serializing_if = "Option::is_none")]
pub topics: Option<bool>,
/// include webhooks in template repo
#[serde(rename = "webhooks", skip_serializing_if = "Option::is_none")]
pub webhooks: Option<bool>,
}
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,
topics: None,
webhooks: None,
}
}
}