222 lines
9.7 KiB
Rust
222 lines
9.7 KiB
Rust
/*
|
|
* 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};
|
|
|
|
/// Repository : Repository represents a repository
|
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
|
pub struct Repository {
|
|
#[serde(rename = "allow_fast_forward_only_merge", skip_serializing_if = "Option::is_none")]
|
|
pub allow_fast_forward_only_merge: Option<bool>,
|
|
#[serde(rename = "allow_merge_commits", skip_serializing_if = "Option::is_none")]
|
|
pub allow_merge_commits: Option<bool>,
|
|
#[serde(rename = "allow_rebase", skip_serializing_if = "Option::is_none")]
|
|
pub allow_rebase: Option<bool>,
|
|
#[serde(rename = "allow_rebase_explicit", skip_serializing_if = "Option::is_none")]
|
|
pub allow_rebase_explicit: Option<bool>,
|
|
#[serde(rename = "allow_rebase_update", skip_serializing_if = "Option::is_none")]
|
|
pub allow_rebase_update: Option<bool>,
|
|
#[serde(rename = "allow_squash_merge", skip_serializing_if = "Option::is_none")]
|
|
pub allow_squash_merge: Option<bool>,
|
|
#[serde(rename = "archived", skip_serializing_if = "Option::is_none")]
|
|
pub archived: Option<bool>,
|
|
#[serde(rename = "archived_at", skip_serializing_if = "Option::is_none")]
|
|
pub archived_at: Option<String>,
|
|
#[serde(rename = "avatar_url", skip_serializing_if = "Option::is_none")]
|
|
pub avatar_url: Option<String>,
|
|
#[serde(rename = "clone_url", skip_serializing_if = "Option::is_none")]
|
|
pub clone_url: Option<String>,
|
|
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
|
|
pub created_at: Option<String>,
|
|
#[serde(rename = "default_allow_maintainer_edit", skip_serializing_if = "Option::is_none")]
|
|
pub default_allow_maintainer_edit: Option<bool>,
|
|
#[serde(rename = "default_branch", skip_serializing_if = "Option::is_none")]
|
|
pub default_branch: Option<String>,
|
|
#[serde(rename = "default_delete_branch_after_merge", skip_serializing_if = "Option::is_none")]
|
|
pub default_delete_branch_after_merge: Option<bool>,
|
|
#[serde(rename = "default_merge_style", skip_serializing_if = "Option::is_none")]
|
|
pub default_merge_style: Option<String>,
|
|
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
|
|
pub description: Option<String>,
|
|
#[serde(rename = "empty", skip_serializing_if = "Option::is_none")]
|
|
pub empty: Option<bool>,
|
|
#[serde(rename = "external_tracker", skip_serializing_if = "Option::is_none")]
|
|
pub external_tracker: Option<Box<models::ExternalTracker>>,
|
|
#[serde(rename = "external_wiki", skip_serializing_if = "Option::is_none")]
|
|
pub external_wiki: Option<Box<models::ExternalWiki>>,
|
|
#[serde(rename = "fork", skip_serializing_if = "Option::is_none")]
|
|
pub fork: Option<bool>,
|
|
#[serde(rename = "forks_count", skip_serializing_if = "Option::is_none")]
|
|
pub forks_count: Option<i64>,
|
|
#[serde(rename = "full_name", skip_serializing_if = "Option::is_none")]
|
|
pub full_name: Option<String>,
|
|
#[serde(rename = "has_actions", skip_serializing_if = "Option::is_none")]
|
|
pub has_actions: Option<bool>,
|
|
#[serde(rename = "has_issues", skip_serializing_if = "Option::is_none")]
|
|
pub has_issues: Option<bool>,
|
|
#[serde(rename = "has_packages", skip_serializing_if = "Option::is_none")]
|
|
pub has_packages: Option<bool>,
|
|
#[serde(rename = "has_projects", skip_serializing_if = "Option::is_none")]
|
|
pub has_projects: Option<bool>,
|
|
#[serde(rename = "has_pull_requests", skip_serializing_if = "Option::is_none")]
|
|
pub has_pull_requests: Option<bool>,
|
|
#[serde(rename = "has_releases", skip_serializing_if = "Option::is_none")]
|
|
pub has_releases: Option<bool>,
|
|
#[serde(rename = "has_wiki", skip_serializing_if = "Option::is_none")]
|
|
pub has_wiki: Option<bool>,
|
|
#[serde(rename = "html_url", skip_serializing_if = "Option::is_none")]
|
|
pub html_url: Option<String>,
|
|
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
|
pub id: Option<i64>,
|
|
#[serde(rename = "ignore_whitespace_conflicts", skip_serializing_if = "Option::is_none")]
|
|
pub ignore_whitespace_conflicts: Option<bool>,
|
|
#[serde(rename = "internal", skip_serializing_if = "Option::is_none")]
|
|
pub internal: Option<bool>,
|
|
#[serde(rename = "internal_tracker", skip_serializing_if = "Option::is_none")]
|
|
pub internal_tracker: Option<Box<models::InternalTracker>>,
|
|
#[serde(rename = "language", skip_serializing_if = "Option::is_none")]
|
|
pub language: Option<String>,
|
|
#[serde(rename = "languages_url", skip_serializing_if = "Option::is_none")]
|
|
pub languages_url: Option<String>,
|
|
#[serde(rename = "link", skip_serializing_if = "Option::is_none")]
|
|
pub link: Option<String>,
|
|
#[serde(rename = "mirror", skip_serializing_if = "Option::is_none")]
|
|
pub mirror: Option<bool>,
|
|
#[serde(rename = "mirror_interval", skip_serializing_if = "Option::is_none")]
|
|
pub mirror_interval: Option<String>,
|
|
#[serde(rename = "mirror_updated", skip_serializing_if = "Option::is_none")]
|
|
pub mirror_updated: Option<String>,
|
|
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
|
|
pub name: Option<String>,
|
|
/// ObjectFormatName of the underlying git repository
|
|
#[serde(rename = "object_format_name", skip_serializing_if = "Option::is_none")]
|
|
pub object_format_name: Option<ObjectFormatName>,
|
|
#[serde(rename = "open_issues_count", skip_serializing_if = "Option::is_none")]
|
|
pub open_issues_count: Option<i64>,
|
|
#[serde(rename = "open_pr_counter", skip_serializing_if = "Option::is_none")]
|
|
pub open_pr_counter: Option<i64>,
|
|
#[serde(rename = "original_url", skip_serializing_if = "Option::is_none")]
|
|
pub original_url: Option<String>,
|
|
#[serde(rename = "owner", skip_serializing_if = "Option::is_none")]
|
|
pub owner: Option<Box<models::User>>,
|
|
#[serde(rename = "parent", skip_serializing_if = "Option::is_none")]
|
|
pub parent: Option<Box<models::Repository>>,
|
|
#[serde(rename = "permissions", skip_serializing_if = "Option::is_none")]
|
|
pub permissions: Option<Box<models::Permission>>,
|
|
#[serde(rename = "private", skip_serializing_if = "Option::is_none")]
|
|
pub private: Option<bool>,
|
|
#[serde(rename = "projects_mode", skip_serializing_if = "Option::is_none")]
|
|
pub projects_mode: Option<String>,
|
|
#[serde(rename = "release_counter", skip_serializing_if = "Option::is_none")]
|
|
pub release_counter: Option<i64>,
|
|
#[serde(rename = "repo_transfer", skip_serializing_if = "Option::is_none")]
|
|
pub repo_transfer: Option<Box<models::RepoTransfer>>,
|
|
#[serde(rename = "size", skip_serializing_if = "Option::is_none")]
|
|
pub size: Option<i64>,
|
|
#[serde(rename = "ssh_url", skip_serializing_if = "Option::is_none")]
|
|
pub ssh_url: Option<String>,
|
|
#[serde(rename = "stars_count", skip_serializing_if = "Option::is_none")]
|
|
pub stars_count: Option<i64>,
|
|
#[serde(rename = "template", skip_serializing_if = "Option::is_none")]
|
|
pub template: Option<bool>,
|
|
#[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
|
|
pub updated_at: Option<String>,
|
|
#[serde(rename = "url", skip_serializing_if = "Option::is_none")]
|
|
pub url: Option<String>,
|
|
#[serde(rename = "watchers_count", skip_serializing_if = "Option::is_none")]
|
|
pub watchers_count: Option<i64>,
|
|
#[serde(rename = "website", skip_serializing_if = "Option::is_none")]
|
|
pub website: Option<String>,
|
|
}
|
|
|
|
impl Repository {
|
|
/// Repository represents a repository
|
|
pub fn new() -> Repository {
|
|
Repository {
|
|
allow_fast_forward_only_merge: None,
|
|
allow_merge_commits: None,
|
|
allow_rebase: None,
|
|
allow_rebase_explicit: None,
|
|
allow_rebase_update: None,
|
|
allow_squash_merge: None,
|
|
archived: None,
|
|
archived_at: None,
|
|
avatar_url: None,
|
|
clone_url: None,
|
|
created_at: None,
|
|
default_allow_maintainer_edit: None,
|
|
default_branch: None,
|
|
default_delete_branch_after_merge: None,
|
|
default_merge_style: None,
|
|
description: None,
|
|
empty: None,
|
|
external_tracker: None,
|
|
external_wiki: None,
|
|
fork: None,
|
|
forks_count: None,
|
|
full_name: None,
|
|
has_actions: None,
|
|
has_issues: None,
|
|
has_packages: None,
|
|
has_projects: None,
|
|
has_pull_requests: None,
|
|
has_releases: None,
|
|
has_wiki: None,
|
|
html_url: None,
|
|
id: None,
|
|
ignore_whitespace_conflicts: None,
|
|
internal: None,
|
|
internal_tracker: None,
|
|
language: None,
|
|
languages_url: None,
|
|
link: None,
|
|
mirror: None,
|
|
mirror_interval: None,
|
|
mirror_updated: None,
|
|
name: None,
|
|
object_format_name: None,
|
|
open_issues_count: None,
|
|
open_pr_counter: None,
|
|
original_url: None,
|
|
owner: None,
|
|
parent: None,
|
|
permissions: None,
|
|
private: None,
|
|
projects_mode: None,
|
|
release_counter: None,
|
|
repo_transfer: None,
|
|
size: None,
|
|
ssh_url: None,
|
|
stars_count: None,
|
|
template: None,
|
|
updated_at: None,
|
|
url: None,
|
|
watchers_count: None,
|
|
website: None,
|
|
}
|
|
}
|
|
}
|
|
/// ObjectFormatName of the underlying git repository
|
|
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
|
|
pub enum ObjectFormatName {
|
|
#[serde(rename = "sha1")]
|
|
Sha1,
|
|
#[serde(rename = "sha256")]
|
|
Sha256,
|
|
}
|
|
|
|
impl Default for ObjectFormatName {
|
|
fn default() -> ObjectFormatName {
|
|
Self::Sha1
|
|
}
|
|
}
|
|
|