Rewrite rust (#38)
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

Co-authored-by: kjuulh <contact@kjuulh.io>
Reviewed-on: #38
This commit is contained in:
2022-11-27 11:21:35 +00:00
parent 0d6e8bc4a0
commit 991861db99
445 changed files with 53358 additions and 2568 deletions

View File

@@ -0,0 +1,37 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct AccessToken {
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<i64>,
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "sha1", skip_serializing_if = "Option::is_none")]
pub sha1: Option<String>,
#[serde(rename = "token_last_eight", skip_serializing_if = "Option::is_none")]
pub token_last_eight: Option<String>,
}
impl AccessToken {
pub fn new() -> AccessToken {
AccessToken {
id: None,
name: None,
sha1: None,
token_last_eight: None,
}
}
}

View File

@@ -0,0 +1,30 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// AddCollaboratorOption : AddCollaboratorOption options when adding a user as a collaborator of a repository
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct AddCollaboratorOption {
#[serde(rename = "permission", skip_serializing_if = "Option::is_none")]
pub permission: Option<String>,
}
impl AddCollaboratorOption {
/// AddCollaboratorOption options when adding a user as a collaborator of a repository
pub fn new() -> AddCollaboratorOption {
AddCollaboratorOption {
permission: None,
}
}
}

View File

@@ -0,0 +1,38 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// AddTimeOption : AddTimeOption options for adding time to an issue
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct AddTimeOption {
#[serde(rename = "created", skip_serializing_if = "Option::is_none")]
pub created: Option<String>,
/// time in seconds
#[serde(rename = "time")]
pub time: i64,
/// User who spent the time (optional)
#[serde(rename = "user_name", skip_serializing_if = "Option::is_none")]
pub user_name: Option<String>,
}
impl AddTimeOption {
/// AddTimeOption options for adding time to an issue
pub fn new(time: i64) -> AddTimeOption {
AddTimeOption {
created: None,
time,
user_name: None,
}
}
}

View File

@@ -0,0 +1,48 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// AnnotatedTag : AnnotatedTag represents an annotated tag
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct AnnotatedTag {
#[serde(rename = "message", skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
#[serde(rename = "object", skip_serializing_if = "Option::is_none")]
pub object: Option<Box<crate::models::AnnotatedTagObject>>,
#[serde(rename = "sha", skip_serializing_if = "Option::is_none")]
pub sha: Option<String>,
#[serde(rename = "tag", skip_serializing_if = "Option::is_none")]
pub tag: Option<String>,
#[serde(rename = "tagger", skip_serializing_if = "Option::is_none")]
pub tagger: Option<Box<crate::models::CommitUser>>,
#[serde(rename = "url", skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
#[serde(rename = "verification", skip_serializing_if = "Option::is_none")]
pub verification: Option<Box<crate::models::PayloadCommitVerification>>,
}
impl AnnotatedTag {
/// AnnotatedTag represents an annotated tag
pub fn new() -> AnnotatedTag {
AnnotatedTag {
message: None,
object: None,
sha: None,
tag: None,
tagger: None,
url: None,
verification: None,
}
}
}

View File

@@ -0,0 +1,36 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// AnnotatedTagObject : AnnotatedTagObject contains meta information of the tag object
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct AnnotatedTagObject {
#[serde(rename = "sha", skip_serializing_if = "Option::is_none")]
pub sha: Option<String>,
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
pub r#type: Option<String>,
#[serde(rename = "url", skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
}
impl AnnotatedTagObject {
/// AnnotatedTagObject contains meta information of the tag object
pub fn new() -> AnnotatedTagObject {
AnnotatedTagObject {
sha: None,
r#type: None,
url: None,
}
}
}

View File

@@ -0,0 +1,33 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// ApiError : APIError is an api error with a message
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct ApiError {
#[serde(rename = "message", skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
#[serde(rename = "url", skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
}
impl ApiError {
/// APIError is an api error with a message
pub fn new() -> ApiError {
ApiError {
message: None,
url: None,
}
}
}

View File

@@ -0,0 +1,48 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// Attachment : Attachment a generic attachment
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Attachment {
#[serde(rename = "browser_download_url", skip_serializing_if = "Option::is_none")]
pub browser_download_url: Option<String>,
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
#[serde(rename = "download_count", skip_serializing_if = "Option::is_none")]
pub download_count: Option<i64>,
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<i64>,
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "size", skip_serializing_if = "Option::is_none")]
pub size: Option<i64>,
#[serde(rename = "uuid", skip_serializing_if = "Option::is_none")]
pub uuid: Option<String>,
}
impl Attachment {
/// Attachment a generic attachment
pub fn new() -> Attachment {
Attachment {
browser_download_url: None,
created_at: None,
download_count: None,
id: None,
name: None,
size: None,
uuid: None,
}
}
}

View File

@@ -0,0 +1,54 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// Branch : Branch represents a repository branch
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Branch {
#[serde(rename = "commit", skip_serializing_if = "Option::is_none")]
pub commit: Option<Box<crate::models::PayloadCommit>>,
#[serde(rename = "effective_branch_protection_name", skip_serializing_if = "Option::is_none")]
pub effective_branch_protection_name: Option<String>,
#[serde(rename = "enable_status_check", skip_serializing_if = "Option::is_none")]
pub enable_status_check: Option<bool>,
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "protected", skip_serializing_if = "Option::is_none")]
pub protected: Option<bool>,
#[serde(rename = "required_approvals", skip_serializing_if = "Option::is_none")]
pub required_approvals: Option<i64>,
#[serde(rename = "status_check_contexts", skip_serializing_if = "Option::is_none")]
pub status_check_contexts: Option<Vec<String>>,
#[serde(rename = "user_can_merge", skip_serializing_if = "Option::is_none")]
pub user_can_merge: Option<bool>,
#[serde(rename = "user_can_push", skip_serializing_if = "Option::is_none")]
pub user_can_push: Option<bool>,
}
impl Branch {
/// Branch represents a repository branch
pub fn new() -> Branch {
Branch {
commit: None,
effective_branch_protection_name: None,
enable_status_check: None,
name: None,
protected: None,
required_approvals: None,
status_check_contexts: None,
user_can_merge: None,
user_can_push: None,
}
}
}

View File

@@ -0,0 +1,99 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// BranchProtection : BranchProtection represents a branch protection for a repository
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct BranchProtection {
#[serde(rename = "approvals_whitelist_teams", skip_serializing_if = "Option::is_none")]
pub approvals_whitelist_teams: Option<Vec<String>>,
#[serde(rename = "approvals_whitelist_username", skip_serializing_if = "Option::is_none")]
pub approvals_whitelist_username: Option<Vec<String>>,
#[serde(rename = "block_on_official_review_requests", skip_serializing_if = "Option::is_none")]
pub block_on_official_review_requests: Option<bool>,
#[serde(rename = "block_on_outdated_branch", skip_serializing_if = "Option::is_none")]
pub block_on_outdated_branch: Option<bool>,
#[serde(rename = "block_on_rejected_reviews", skip_serializing_if = "Option::is_none")]
pub block_on_rejected_reviews: Option<bool>,
#[serde(rename = "branch_name", skip_serializing_if = "Option::is_none")]
pub branch_name: Option<String>,
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
#[serde(rename = "dismiss_stale_approvals", skip_serializing_if = "Option::is_none")]
pub dismiss_stale_approvals: Option<bool>,
#[serde(rename = "enable_approvals_whitelist", skip_serializing_if = "Option::is_none")]
pub enable_approvals_whitelist: Option<bool>,
#[serde(rename = "enable_merge_whitelist", skip_serializing_if = "Option::is_none")]
pub enable_merge_whitelist: Option<bool>,
#[serde(rename = "enable_push", skip_serializing_if = "Option::is_none")]
pub enable_push: Option<bool>,
#[serde(rename = "enable_push_whitelist", skip_serializing_if = "Option::is_none")]
pub enable_push_whitelist: Option<bool>,
#[serde(rename = "enable_status_check", skip_serializing_if = "Option::is_none")]
pub enable_status_check: Option<bool>,
#[serde(rename = "merge_whitelist_teams", skip_serializing_if = "Option::is_none")]
pub merge_whitelist_teams: Option<Vec<String>>,
#[serde(rename = "merge_whitelist_usernames", skip_serializing_if = "Option::is_none")]
pub merge_whitelist_usernames: Option<Vec<String>>,
#[serde(rename = "protected_file_patterns", skip_serializing_if = "Option::is_none")]
pub protected_file_patterns: Option<String>,
#[serde(rename = "push_whitelist_deploy_keys", skip_serializing_if = "Option::is_none")]
pub push_whitelist_deploy_keys: Option<bool>,
#[serde(rename = "push_whitelist_teams", skip_serializing_if = "Option::is_none")]
pub push_whitelist_teams: Option<Vec<String>>,
#[serde(rename = "push_whitelist_usernames", skip_serializing_if = "Option::is_none")]
pub push_whitelist_usernames: Option<Vec<String>>,
#[serde(rename = "require_signed_commits", skip_serializing_if = "Option::is_none")]
pub require_signed_commits: Option<bool>,
#[serde(rename = "required_approvals", skip_serializing_if = "Option::is_none")]
pub required_approvals: Option<i64>,
#[serde(rename = "status_check_contexts", skip_serializing_if = "Option::is_none")]
pub status_check_contexts: Option<Vec<String>>,
#[serde(rename = "unprotected_file_patterns", skip_serializing_if = "Option::is_none")]
pub unprotected_file_patterns: Option<String>,
#[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
pub updated_at: Option<String>,
}
impl BranchProtection {
/// BranchProtection represents a branch protection for a repository
pub fn new() -> BranchProtection {
BranchProtection {
approvals_whitelist_teams: None,
approvals_whitelist_username: None,
block_on_official_review_requests: None,
block_on_outdated_branch: None,
block_on_rejected_reviews: None,
branch_name: None,
created_at: None,
dismiss_stale_approvals: None,
enable_approvals_whitelist: None,
enable_merge_whitelist: None,
enable_push: None,
enable_push_whitelist: None,
enable_status_check: None,
merge_whitelist_teams: None,
merge_whitelist_usernames: None,
protected_file_patterns: None,
push_whitelist_deploy_keys: None,
push_whitelist_teams: None,
push_whitelist_usernames: None,
require_signed_commits: None,
required_approvals: None,
status_check_contexts: None,
unprotected_file_patterns: None,
updated_at: None,
}
}
}

View File

@@ -0,0 +1,49 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// CombinedStatus : CombinedStatus holds the combined state of several statuses for a single commit
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CombinedStatus {
#[serde(rename = "commit_url", skip_serializing_if = "Option::is_none")]
pub commit_url: Option<String>,
#[serde(rename = "repository", skip_serializing_if = "Option::is_none")]
pub repository: Option<Box<crate::models::Repository>>,
#[serde(rename = "sha", skip_serializing_if = "Option::is_none")]
pub sha: Option<String>,
/// CommitStatusState holds the state of a CommitStatus It can be \"pending\", \"success\", \"error\", \"failure\", and \"warning\"
#[serde(rename = "state", skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename = "statuses", skip_serializing_if = "Option::is_none")]
pub statuses: Option<Vec<crate::models::CommitStatus>>,
#[serde(rename = "total_count", skip_serializing_if = "Option::is_none")]
pub total_count: Option<i64>,
#[serde(rename = "url", skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
}
impl CombinedStatus {
/// CombinedStatus holds the combined state of several statuses for a single commit
pub fn new() -> CombinedStatus {
CombinedStatus {
commit_url: None,
repository: None,
sha: None,
state: None,
statuses: None,
total_count: None,
url: None,
}
}
}

View File

@@ -0,0 +1,57 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// Comment : Comment represents a comment on a commit or issue
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Comment {
#[serde(rename = "body", skip_serializing_if = "Option::is_none")]
pub body: Option<String>,
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
#[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 = "issue_url", skip_serializing_if = "Option::is_none")]
pub issue_url: Option<String>,
#[serde(rename = "original_author", skip_serializing_if = "Option::is_none")]
pub original_author: Option<String>,
#[serde(rename = "original_author_id", skip_serializing_if = "Option::is_none")]
pub original_author_id: Option<i64>,
#[serde(rename = "pull_request_url", skip_serializing_if = "Option::is_none")]
pub pull_request_url: Option<String>,
#[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
pub updated_at: Option<String>,
#[serde(rename = "user", skip_serializing_if = "Option::is_none")]
pub user: Option<Box<crate::models::User>>,
}
impl Comment {
/// Comment represents a comment on a commit or issue
pub fn new() -> Comment {
Comment {
body: None,
created_at: None,
html_url: None,
id: None,
issue_url: None,
original_author: None,
original_author_id: None,
pull_request_url: None,
updated_at: None,
user: None,
}
}
}

View File

@@ -0,0 +1,55 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Commit {
#[serde(rename = "author", skip_serializing_if = "Option::is_none")]
pub author: Option<Box<crate::models::User>>,
#[serde(rename = "commit", skip_serializing_if = "Option::is_none")]
pub commit: Option<Box<crate::models::RepoCommit>>,
#[serde(rename = "committer", skip_serializing_if = "Option::is_none")]
pub committer: Option<Box<crate::models::User>>,
#[serde(rename = "created", skip_serializing_if = "Option::is_none")]
pub created: Option<String>,
#[serde(rename = "files", skip_serializing_if = "Option::is_none")]
pub files: Option<Vec<crate::models::CommitAffectedFiles>>,
#[serde(rename = "html_url", skip_serializing_if = "Option::is_none")]
pub html_url: Option<String>,
#[serde(rename = "parents", skip_serializing_if = "Option::is_none")]
pub parents: Option<Vec<crate::models::CommitMeta>>,
#[serde(rename = "sha", skip_serializing_if = "Option::is_none")]
pub sha: Option<String>,
#[serde(rename = "stats", skip_serializing_if = "Option::is_none")]
pub stats: Option<Box<crate::models::CommitStats>>,
#[serde(rename = "url", skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
}
impl Commit {
pub fn new() -> Commit {
Commit {
author: None,
commit: None,
committer: None,
created: None,
files: None,
html_url: None,
parents: None,
sha: None,
stats: None,
url: None,
}
}
}

View File

@@ -0,0 +1,30 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// CommitAffectedFiles : CommitAffectedFiles store information about files affected by the commit
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CommitAffectedFiles {
#[serde(rename = "filename", skip_serializing_if = "Option::is_none")]
pub filename: Option<String>,
}
impl CommitAffectedFiles {
/// CommitAffectedFiles store information about files affected by the commit
pub fn new() -> CommitAffectedFiles {
CommitAffectedFiles {
filename: None,
}
}
}

View File

@@ -0,0 +1,33 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// CommitDateOptions : CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CommitDateOptions {
#[serde(rename = "author", skip_serializing_if = "Option::is_none")]
pub author: Option<String>,
#[serde(rename = "committer", skip_serializing_if = "Option::is_none")]
pub committer: Option<String>,
}
impl CommitDateOptions {
/// CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE
pub fn new() -> CommitDateOptions {
CommitDateOptions {
author: None,
committer: None,
}
}
}

View File

@@ -0,0 +1,34 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CommitMeta {
#[serde(rename = "created", skip_serializing_if = "Option::is_none")]
pub created: Option<String>,
#[serde(rename = "sha", skip_serializing_if = "Option::is_none")]
pub sha: Option<String>,
#[serde(rename = "url", skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
}
impl CommitMeta {
pub fn new() -> CommitMeta {
CommitMeta {
created: None,
sha: None,
url: None,
}
}
}

View File

@@ -0,0 +1,36 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// CommitStats : CommitStats is statistics for a RepoCommit
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CommitStats {
#[serde(rename = "additions", skip_serializing_if = "Option::is_none")]
pub additions: Option<i64>,
#[serde(rename = "deletions", skip_serializing_if = "Option::is_none")]
pub deletions: Option<i64>,
#[serde(rename = "total", skip_serializing_if = "Option::is_none")]
pub total: Option<i64>,
}
impl CommitStats {
/// CommitStats is statistics for a RepoCommit
pub fn new() -> CommitStats {
CommitStats {
additions: None,
deletions: None,
total: None,
}
}
}

View File

@@ -0,0 +1,55 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// CommitStatus : CommitStatus holds a single status of a single Commit
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CommitStatus {
#[serde(rename = "context", skip_serializing_if = "Option::is_none")]
pub context: Option<String>,
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
#[serde(rename = "creator", skip_serializing_if = "Option::is_none")]
pub creator: Option<Box<crate::models::User>>,
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<i64>,
/// CommitStatusState holds the state of a CommitStatus It can be \"pending\", \"success\", \"error\", \"failure\", and \"warning\"
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "target_url", skip_serializing_if = "Option::is_none")]
pub target_url: Option<String>,
#[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>,
}
impl CommitStatus {
/// CommitStatus holds a single status of a single Commit
pub fn new() -> CommitStatus {
CommitStatus {
context: None,
created_at: None,
creator: None,
description: None,
id: None,
status: None,
target_url: None,
updated_at: None,
url: None,
}
}
}

View File

@@ -0,0 +1,34 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CommitUser {
#[serde(rename = "date", skip_serializing_if = "Option::is_none")]
pub date: Option<String>,
#[serde(rename = "email", skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
impl CommitUser {
pub fn new() -> CommitUser {
CommitUser {
date: None,
email: None,
name: None,
}
}
}

View File

@@ -0,0 +1,74 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// ContentsResponse : ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct ContentsResponse {
#[serde(rename = "_links", skip_serializing_if = "Option::is_none")]
pub _links: Option<Box<crate::models::FileLinksResponse>>,
/// `content` is populated when `type` is `file`, otherwise null
#[serde(rename = "content", skip_serializing_if = "Option::is_none")]
pub content: Option<String>,
#[serde(rename = "download_url", skip_serializing_if = "Option::is_none")]
pub download_url: Option<String>,
/// `encoding` is populated when `type` is `file`, otherwise null
#[serde(rename = "encoding", skip_serializing_if = "Option::is_none")]
pub encoding: Option<String>,
#[serde(rename = "git_url", skip_serializing_if = "Option::is_none")]
pub git_url: Option<String>,
#[serde(rename = "html_url", skip_serializing_if = "Option::is_none")]
pub html_url: Option<String>,
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "path", skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
#[serde(rename = "sha", skip_serializing_if = "Option::is_none")]
pub sha: Option<String>,
#[serde(rename = "size", skip_serializing_if = "Option::is_none")]
pub size: Option<i64>,
/// `submodule_git_url` is populated when `type` is `submodule`, otherwise null
#[serde(rename = "submodule_git_url", skip_serializing_if = "Option::is_none")]
pub submodule_git_url: Option<String>,
/// `target` is populated when `type` is `symlink`, otherwise null
#[serde(rename = "target", skip_serializing_if = "Option::is_none")]
pub target: Option<String>,
/// `type` will be `file`, `dir`, `symlink`, or `submodule`
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
pub r#type: Option<String>,
#[serde(rename = "url", skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
}
impl ContentsResponse {
/// ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content
pub fn new() -> ContentsResponse {
ContentsResponse {
_links: None,
content: None,
download_url: None,
encoding: None,
git_url: None,
html_url: None,
name: None,
path: None,
sha: None,
size: None,
submodule_git_url: None,
target: None,
r#type: None,
url: None,
}
}
}

View File

@@ -0,0 +1,30 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// CreateAccessTokenOption : CreateAccessTokenOption options when create access token
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreateAccessTokenOption {
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
impl CreateAccessTokenOption {
/// CreateAccessTokenOption options when create access token
pub fn new() -> CreateAccessTokenOption {
CreateAccessTokenOption {
name: None,
}
}
}

View File

@@ -0,0 +1,93 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// CreateBranchProtectionOption : CreateBranchProtectionOption options for creating a branch protection
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreateBranchProtectionOption {
#[serde(rename = "approvals_whitelist_teams", skip_serializing_if = "Option::is_none")]
pub approvals_whitelist_teams: Option<Vec<String>>,
#[serde(rename = "approvals_whitelist_username", skip_serializing_if = "Option::is_none")]
pub approvals_whitelist_username: Option<Vec<String>>,
#[serde(rename = "block_on_official_review_requests", skip_serializing_if = "Option::is_none")]
pub block_on_official_review_requests: Option<bool>,
#[serde(rename = "block_on_outdated_branch", skip_serializing_if = "Option::is_none")]
pub block_on_outdated_branch: Option<bool>,
#[serde(rename = "block_on_rejected_reviews", skip_serializing_if = "Option::is_none")]
pub block_on_rejected_reviews: Option<bool>,
#[serde(rename = "branch_name", skip_serializing_if = "Option::is_none")]
pub branch_name: Option<String>,
#[serde(rename = "dismiss_stale_approvals", skip_serializing_if = "Option::is_none")]
pub dismiss_stale_approvals: Option<bool>,
#[serde(rename = "enable_approvals_whitelist", skip_serializing_if = "Option::is_none")]
pub enable_approvals_whitelist: Option<bool>,
#[serde(rename = "enable_merge_whitelist", skip_serializing_if = "Option::is_none")]
pub enable_merge_whitelist: Option<bool>,
#[serde(rename = "enable_push", skip_serializing_if = "Option::is_none")]
pub enable_push: Option<bool>,
#[serde(rename = "enable_push_whitelist", skip_serializing_if = "Option::is_none")]
pub enable_push_whitelist: Option<bool>,
#[serde(rename = "enable_status_check", skip_serializing_if = "Option::is_none")]
pub enable_status_check: Option<bool>,
#[serde(rename = "merge_whitelist_teams", skip_serializing_if = "Option::is_none")]
pub merge_whitelist_teams: Option<Vec<String>>,
#[serde(rename = "merge_whitelist_usernames", skip_serializing_if = "Option::is_none")]
pub merge_whitelist_usernames: Option<Vec<String>>,
#[serde(rename = "protected_file_patterns", skip_serializing_if = "Option::is_none")]
pub protected_file_patterns: Option<String>,
#[serde(rename = "push_whitelist_deploy_keys", skip_serializing_if = "Option::is_none")]
pub push_whitelist_deploy_keys: Option<bool>,
#[serde(rename = "push_whitelist_teams", skip_serializing_if = "Option::is_none")]
pub push_whitelist_teams: Option<Vec<String>>,
#[serde(rename = "push_whitelist_usernames", skip_serializing_if = "Option::is_none")]
pub push_whitelist_usernames: Option<Vec<String>>,
#[serde(rename = "require_signed_commits", skip_serializing_if = "Option::is_none")]
pub require_signed_commits: Option<bool>,
#[serde(rename = "required_approvals", skip_serializing_if = "Option::is_none")]
pub required_approvals: Option<i64>,
#[serde(rename = "status_check_contexts", skip_serializing_if = "Option::is_none")]
pub status_check_contexts: Option<Vec<String>>,
#[serde(rename = "unprotected_file_patterns", skip_serializing_if = "Option::is_none")]
pub unprotected_file_patterns: Option<String>,
}
impl CreateBranchProtectionOption {
/// CreateBranchProtectionOption options for creating a branch protection
pub fn new() -> CreateBranchProtectionOption {
CreateBranchProtectionOption {
approvals_whitelist_teams: None,
approvals_whitelist_username: None,
block_on_official_review_requests: None,
block_on_outdated_branch: None,
block_on_rejected_reviews: None,
branch_name: None,
dismiss_stale_approvals: None,
enable_approvals_whitelist: None,
enable_merge_whitelist: None,
enable_push: None,
enable_push_whitelist: None,
enable_status_check: None,
merge_whitelist_teams: None,
merge_whitelist_usernames: None,
protected_file_patterns: None,
push_whitelist_deploy_keys: None,
push_whitelist_teams: None,
push_whitelist_usernames: None,
require_signed_commits: None,
required_approvals: None,
status_check_contexts: None,
unprotected_file_patterns: None,
}
}
}

View File

@@ -0,0 +1,35 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// CreateBranchRepoOption : CreateBranchRepoOption options when creating a branch in a repository
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreateBranchRepoOption {
/// Name of the branch to create
#[serde(rename = "new_branch_name")]
pub new_branch_name: String,
/// Name of the old branch to create from
#[serde(rename = "old_branch_name", skip_serializing_if = "Option::is_none")]
pub old_branch_name: Option<String>,
}
impl CreateBranchRepoOption {
/// CreateBranchRepoOption options when creating a branch in a repository
pub fn new(new_branch_name: String) -> CreateBranchRepoOption {
CreateBranchRepoOption {
new_branch_name,
old_branch_name: None,
}
}
}

View File

@@ -0,0 +1,31 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// CreateEmailOption : CreateEmailOption options when creating email addresses
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreateEmailOption {
/// email addresses to add
#[serde(rename = "emails", skip_serializing_if = "Option::is_none")]
pub emails: Option<Vec<String>>,
}
impl CreateEmailOption {
/// CreateEmailOption options when creating email addresses
pub fn new() -> CreateEmailOption {
CreateEmailOption {
emails: None,
}
}
}

View File

@@ -0,0 +1,56 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// CreateFileOptions : CreateFileOptions options for creating files Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreateFileOptions {
#[serde(rename = "author", skip_serializing_if = "Option::is_none")]
pub author: Option<Box<crate::models::Identity>>,
/// branch (optional) to base this file from. if not given, the default branch is used
#[serde(rename = "branch", skip_serializing_if = "Option::is_none")]
pub branch: Option<String>,
#[serde(rename = "committer", skip_serializing_if = "Option::is_none")]
pub committer: Option<Box<crate::models::Identity>>,
/// content must be base64 encoded
#[serde(rename = "content")]
pub content: String,
#[serde(rename = "dates", skip_serializing_if = "Option::is_none")]
pub dates: Option<Box<crate::models::CommitDateOptions>>,
/// message (optional) for the commit of this file. if not supplied, a default message will be used
#[serde(rename = "message", skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
/// new_branch (optional) will make a new branch from `branch` before creating the file
#[serde(rename = "new_branch", skip_serializing_if = "Option::is_none")]
pub new_branch: Option<String>,
/// Add a Signed-off-by trailer by the committer at the end of the commit log message.
#[serde(rename = "signoff", skip_serializing_if = "Option::is_none")]
pub signoff: Option<bool>,
}
impl CreateFileOptions {
/// CreateFileOptions options for creating files Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)
pub fn new(content: String) -> CreateFileOptions {
CreateFileOptions {
author: None,
branch: None,
committer: None,
content,
dates: None,
message: None,
new_branch: None,
signoff: None,
}
}
}

View File

@@ -0,0 +1,35 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// CreateForkOption : CreateForkOption options for creating a fork
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreateForkOption {
/// name of the forked repository
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// organization name, if forking into an organization
#[serde(rename = "organization", skip_serializing_if = "Option::is_none")]
pub organization: Option<String>,
}
impl CreateForkOption {
/// CreateForkOption options for creating a fork
pub fn new() -> CreateForkOption {
CreateForkOption {
name: None,
organization: None,
}
}
}

View File

@@ -0,0 +1,34 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// CreateGpgKeyOption : CreateGPGKeyOption options create user GPG key
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreateGpgKeyOption {
/// An armored GPG key to add
#[serde(rename = "armored_public_key")]
pub armored_public_key: String,
#[serde(rename = "armored_signature", skip_serializing_if = "Option::is_none")]
pub armored_signature: Option<String>,
}
impl CreateGpgKeyOption {
/// CreateGPGKeyOption options create user GPG key
pub fn new(armored_public_key: String) -> CreateGpgKeyOption {
CreateGpgKeyOption {
armored_public_key,
armored_signature: None,
}
}
}

View File

@@ -0,0 +1,73 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// CreateHookOption : CreateHookOption options when create a hook
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreateHookOption {
#[serde(rename = "active", skip_serializing_if = "Option::is_none")]
pub active: Option<bool>,
#[serde(rename = "branch_filter", skip_serializing_if = "Option::is_none")]
pub branch_filter: Option<String>,
/// CreateHookOptionConfig has all config options in it required are \"content_type\" and \"url\" Required
#[serde(rename = "config")]
pub config: ::std::collections::HashMap<String, String>,
#[serde(rename = "events", skip_serializing_if = "Option::is_none")]
pub events: Option<Vec<String>>,
#[serde(rename = "type")]
pub r#type: RHashType,
}
impl CreateHookOption {
/// CreateHookOption options when create a hook
pub fn new(config: ::std::collections::HashMap<String, String>, r#type: RHashType) -> CreateHookOption {
CreateHookOption {
active: None,
branch_filter: None,
config,
events: None,
r#type,
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum RHashType {
#[serde(rename = "dingtalk")]
Dingtalk,
#[serde(rename = "discord")]
Discord,
#[serde(rename = "gitea")]
Gitea,
#[serde(rename = "gogs")]
Gogs,
#[serde(rename = "msteams")]
Msteams,
#[serde(rename = "slack")]
Slack,
#[serde(rename = "telegram")]
Telegram,
#[serde(rename = "feishu")]
Feishu,
#[serde(rename = "wechatwork")]
Wechatwork,
#[serde(rename = "packagist")]
Packagist,
}
impl Default for RHashType {
fn default() -> RHashType {
Self::Dingtalk
}
}

View File

@@ -0,0 +1,30 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// CreateIssueCommentOption : CreateIssueCommentOption options for creating a comment on an issue
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreateIssueCommentOption {
#[serde(rename = "body")]
pub body: String,
}
impl CreateIssueCommentOption {
/// CreateIssueCommentOption options for creating a comment on an issue
pub fn new(body: String) -> CreateIssueCommentOption {
CreateIssueCommentOption {
body,
}
}
}

View File

@@ -0,0 +1,57 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// CreateIssueOption : CreateIssueOption options to create one issue
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreateIssueOption {
/// deprecated
#[serde(rename = "assignee", skip_serializing_if = "Option::is_none")]
pub assignee: Option<String>,
#[serde(rename = "assignees", skip_serializing_if = "Option::is_none")]
pub assignees: Option<Vec<String>>,
#[serde(rename = "body", skip_serializing_if = "Option::is_none")]
pub body: Option<String>,
#[serde(rename = "closed", skip_serializing_if = "Option::is_none")]
pub closed: Option<bool>,
#[serde(rename = "due_date", skip_serializing_if = "Option::is_none")]
pub due_date: Option<String>,
/// list of label ids
#[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
pub labels: Option<Vec<i64>>,
/// milestone id
#[serde(rename = "milestone", skip_serializing_if = "Option::is_none")]
pub milestone: Option<i64>,
#[serde(rename = "ref", skip_serializing_if = "Option::is_none")]
pub r#ref: Option<String>,
#[serde(rename = "title")]
pub title: String,
}
impl CreateIssueOption {
/// CreateIssueOption options to create one issue
pub fn new(title: String) -> CreateIssueOption {
CreateIssueOption {
assignee: None,
assignees: None,
body: None,
closed: None,
due_date: None,
labels: None,
milestone: None,
r#ref: None,
title,
}
}
}

View File

@@ -0,0 +1,39 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// CreateKeyOption : CreateKeyOption options when creating a key
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreateKeyOption {
/// An armored SSH key to add
#[serde(rename = "key")]
pub key: String,
/// Describe if the key has only read access or read/write
#[serde(rename = "read_only", skip_serializing_if = "Option::is_none")]
pub read_only: Option<bool>,
/// Title of the key to add
#[serde(rename = "title")]
pub title: String,
}
impl CreateKeyOption {
/// CreateKeyOption options when creating a key
pub fn new(key: String, title: String) -> CreateKeyOption {
CreateKeyOption {
key,
read_only: None,
title,
}
}
}

View File

@@ -0,0 +1,36 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// CreateLabelOption : CreateLabelOption options for creating a label
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreateLabelOption {
#[serde(rename = "color")]
pub color: String,
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "name")]
pub name: String,
}
impl CreateLabelOption {
/// CreateLabelOption options for creating a label
pub fn new(color: String, name: String) -> CreateLabelOption {
CreateLabelOption {
color,
description: None,
name,
}
}
}

View File

@@ -0,0 +1,53 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// CreateMilestoneOption : CreateMilestoneOption options for creating a milestone
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreateMilestoneOption {
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "due_on", skip_serializing_if = "Option::is_none")]
pub due_on: Option<String>,
#[serde(rename = "state", skip_serializing_if = "Option::is_none")]
pub state: Option<State>,
#[serde(rename = "title", skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
}
impl CreateMilestoneOption {
/// CreateMilestoneOption options for creating a milestone
pub fn new() -> CreateMilestoneOption {
CreateMilestoneOption {
description: None,
due_on: None,
state: None,
title: None,
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum State {
#[serde(rename = "open")]
Open,
#[serde(rename = "closed")]
Closed,
}
impl Default for State {
fn default() -> State {
Self::Open
}
}

View File

@@ -0,0 +1,33 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// CreateOAuth2ApplicationOptions : CreateOAuth2ApplicationOptions holds options to create an oauth2 application
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreateOAuth2ApplicationOptions {
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "redirect_uris", skip_serializing_if = "Option::is_none")]
pub redirect_uris: Option<Vec<String>>,
}
impl CreateOAuth2ApplicationOptions {
/// CreateOAuth2ApplicationOptions holds options to create an oauth2 application
pub fn new() -> CreateOAuth2ApplicationOptions {
CreateOAuth2ApplicationOptions {
name: None,
redirect_uris: None,
}
}
}

View File

@@ -0,0 +1,65 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// CreateOrgOption : CreateOrgOption options for creating an organization
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreateOrgOption {
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "full_name", skip_serializing_if = "Option::is_none")]
pub full_name: Option<String>,
#[serde(rename = "location", skip_serializing_if = "Option::is_none")]
pub location: Option<String>,
#[serde(rename = "repo_admin_change_team_access", skip_serializing_if = "Option::is_none")]
pub repo_admin_change_team_access: Option<bool>,
#[serde(rename = "username")]
pub username: String,
/// possible values are `public` (default), `limited` or `private`
#[serde(rename = "visibility", skip_serializing_if = "Option::is_none")]
pub visibility: Option<Visibility>,
#[serde(rename = "website", skip_serializing_if = "Option::is_none")]
pub website: Option<String>,
}
impl CreateOrgOption {
/// CreateOrgOption options for creating an organization
pub fn new(username: String) -> CreateOrgOption {
CreateOrgOption {
description: None,
full_name: None,
location: None,
repo_admin_change_team_access: None,
username,
visibility: None,
website: None,
}
}
}
/// possible values are `public` (default), `limited` or `private`
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Visibility {
#[serde(rename = "public")]
Public,
#[serde(rename = "limited")]
Limited,
#[serde(rename = "private")]
Private,
}
impl Default for Visibility {
fn default() -> Visibility {
Self::Public
}
}

View File

@@ -0,0 +1,54 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// CreatePullRequestOption : CreatePullRequestOption options when creating a pull request
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreatePullRequestOption {
#[serde(rename = "assignee", skip_serializing_if = "Option::is_none")]
pub assignee: Option<String>,
#[serde(rename = "assignees", skip_serializing_if = "Option::is_none")]
pub assignees: Option<Vec<String>>,
#[serde(rename = "base", skip_serializing_if = "Option::is_none")]
pub base: Option<String>,
#[serde(rename = "body", skip_serializing_if = "Option::is_none")]
pub body: Option<String>,
#[serde(rename = "due_date", skip_serializing_if = "Option::is_none")]
pub due_date: Option<String>,
#[serde(rename = "head", skip_serializing_if = "Option::is_none")]
pub head: Option<String>,
#[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
pub labels: Option<Vec<i64>>,
#[serde(rename = "milestone", skip_serializing_if = "Option::is_none")]
pub milestone: Option<i64>,
#[serde(rename = "title", skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
}
impl CreatePullRequestOption {
/// CreatePullRequestOption options when creating a pull request
pub fn new() -> CreatePullRequestOption {
CreatePullRequestOption {
assignee: None,
assignees: None,
base: None,
body: None,
due_date: None,
head: None,
labels: None,
milestone: None,
title: None,
}
}
}

View File

@@ -0,0 +1,42 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// CreatePullReviewComment : CreatePullReviewComment represent a review comment for creation api
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreatePullReviewComment {
#[serde(rename = "body", skip_serializing_if = "Option::is_none")]
pub body: Option<String>,
/// if comment to new file line or 0
#[serde(rename = "new_position", skip_serializing_if = "Option::is_none")]
pub new_position: Option<i64>,
/// if comment to old file line or 0
#[serde(rename = "old_position", skip_serializing_if = "Option::is_none")]
pub old_position: Option<i64>,
/// the tree path
#[serde(rename = "path", skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
}
impl CreatePullReviewComment {
/// CreatePullReviewComment represent a review comment for creation api
pub fn new() -> CreatePullReviewComment {
CreatePullReviewComment {
body: None,
new_position: None,
old_position: None,
path: None,
}
}
}

View File

@@ -0,0 +1,40 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// CreatePullReviewOptions : CreatePullReviewOptions are options to create a pull review
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreatePullReviewOptions {
#[serde(rename = "body", skip_serializing_if = "Option::is_none")]
pub body: Option<String>,
#[serde(rename = "comments", skip_serializing_if = "Option::is_none")]
pub comments: Option<Vec<crate::models::CreatePullReviewComment>>,
#[serde(rename = "commit_id", skip_serializing_if = "Option::is_none")]
pub commit_id: Option<String>,
/// ReviewStateType review state type
#[serde(rename = "event", skip_serializing_if = "Option::is_none")]
pub event: Option<String>,
}
impl CreatePullReviewOptions {
/// CreatePullReviewOptions are options to create a pull review
pub fn new() -> CreatePullReviewOptions {
CreatePullReviewOptions {
body: None,
comments: None,
commit_id: None,
event: None,
}
}
}

View File

@@ -0,0 +1,45 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// CreateReleaseOption : CreateReleaseOption options when creating a release
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreateReleaseOption {
#[serde(rename = "body", skip_serializing_if = "Option::is_none")]
pub body: Option<String>,
#[serde(rename = "draft", skip_serializing_if = "Option::is_none")]
pub draft: Option<bool>,
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "prerelease", skip_serializing_if = "Option::is_none")]
pub prerelease: Option<bool>,
#[serde(rename = "tag_name")]
pub tag_name: String,
#[serde(rename = "target_commitish", skip_serializing_if = "Option::is_none")]
pub target_commitish: Option<String>,
}
impl CreateReleaseOption {
/// CreateReleaseOption options when creating a release
pub fn new(tag_name: String) -> CreateReleaseOption {
CreateReleaseOption {
body: None,
draft: None,
name: None,
prerelease: None,
tag_name,
target_commitish: None,
}
}
}

View File

@@ -0,0 +1,89 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// CreateRepoOption : CreateRepoOption options when creating repository
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreateRepoOption {
/// Whether the repository should be auto-initialized?
#[serde(rename = "auto_init", skip_serializing_if = "Option::is_none")]
pub auto_init: Option<bool>,
/// DefaultBranch of the repository (used when initializes and in template)
#[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>,
/// Gitignores to use
#[serde(rename = "gitignores", skip_serializing_if = "Option::is_none")]
pub gitignores: Option<String>,
/// Label-Set to use
#[serde(rename = "issue_labels", skip_serializing_if = "Option::is_none")]
pub issue_labels: Option<String>,
/// License to use
#[serde(rename = "license", skip_serializing_if = "Option::is_none")]
pub license: Option<String>,
/// Name of the repository to create
#[serde(rename = "name")]
pub name: String,
/// Whether the repository is private
#[serde(rename = "private", skip_serializing_if = "Option::is_none")]
pub private: Option<bool>,
/// Readme of the repository to create
#[serde(rename = "readme", skip_serializing_if = "Option::is_none")]
pub readme: Option<String>,
/// Whether the repository is template
#[serde(rename = "template", skip_serializing_if = "Option::is_none")]
pub template: Option<bool>,
/// TrustModel of the repository
#[serde(rename = "trust_model", skip_serializing_if = "Option::is_none")]
pub trust_model: Option<TrustModel>,
}
impl CreateRepoOption {
/// CreateRepoOption options when creating repository
pub fn new(name: String) -> CreateRepoOption {
CreateRepoOption {
auto_init: None,
default_branch: None,
description: None,
gitignores: None,
issue_labels: None,
license: None,
name,
private: None,
readme: None,
template: None,
trust_model: None,
}
}
}
/// TrustModel of the repository
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum TrustModel {
#[serde(rename = "default")]
Default,
#[serde(rename = "collaborator")]
Collaborator,
#[serde(rename = "committer")]
Committer,
#[serde(rename = "collaboratorcommitter")]
Collaboratorcommitter,
}
impl Default for TrustModel {
fn default() -> TrustModel {
Self::Default
}
}

View File

@@ -0,0 +1,40 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// CreateStatusOption : CreateStatusOption holds the information needed to create a new CommitStatus for a Commit
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreateStatusOption {
#[serde(rename = "context", skip_serializing_if = "Option::is_none")]
pub context: Option<String>,
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
/// CommitStatusState holds the state of a CommitStatus It can be \"pending\", \"success\", \"error\", \"failure\", and \"warning\"
#[serde(rename = "state", skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename = "target_url", skip_serializing_if = "Option::is_none")]
pub target_url: Option<String>,
}
impl CreateStatusOption {
/// CreateStatusOption holds the information needed to create a new CommitStatus for a Commit
pub fn new() -> CreateStatusOption {
CreateStatusOption {
context: None,
description: None,
state: None,
target_url: None,
}
}
}

View File

@@ -0,0 +1,36 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// CreateTagOption : CreateTagOption options when creating a tag
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreateTagOption {
#[serde(rename = "message", skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
#[serde(rename = "tag_name")]
pub tag_name: String,
#[serde(rename = "target", skip_serializing_if = "Option::is_none")]
pub target: Option<String>,
}
impl CreateTagOption {
/// CreateTagOption options when creating a tag
pub fn new(tag_name: String) -> CreateTagOption {
CreateTagOption {
message: None,
tag_name,
target: None,
}
}
}

View File

@@ -0,0 +1,64 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// CreateTeamOption : CreateTeamOption options for creating a team
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreateTeamOption {
#[serde(rename = "can_create_org_repo", skip_serializing_if = "Option::is_none")]
pub can_create_org_repo: Option<bool>,
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "includes_all_repositories", skip_serializing_if = "Option::is_none")]
pub includes_all_repositories: Option<bool>,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "permission", skip_serializing_if = "Option::is_none")]
pub permission: Option<Permission>,
#[serde(rename = "units", skip_serializing_if = "Option::is_none")]
pub units: Option<Vec<String>>,
#[serde(rename = "units_map", skip_serializing_if = "Option::is_none")]
pub units_map: Option<::std::collections::HashMap<String, String>>,
}
impl CreateTeamOption {
/// CreateTeamOption options for creating a team
pub fn new(name: String) -> CreateTeamOption {
CreateTeamOption {
can_create_org_repo: None,
description: None,
includes_all_repositories: None,
name,
permission: None,
units: None,
units_map: None,
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Permission {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
#[serde(rename = "admin")]
Admin,
}
impl Default for Permission {
fn default() -> Permission {
Self::Read
}
}

View File

@@ -0,0 +1,57 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// CreateUserOption : CreateUserOption create user options
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreateUserOption {
#[serde(rename = "email")]
pub email: String,
#[serde(rename = "full_name", skip_serializing_if = "Option::is_none")]
pub full_name: Option<String>,
#[serde(rename = "login_name", skip_serializing_if = "Option::is_none")]
pub login_name: Option<String>,
#[serde(rename = "must_change_password", skip_serializing_if = "Option::is_none")]
pub must_change_password: Option<bool>,
#[serde(rename = "password")]
pub password: String,
#[serde(rename = "restricted", skip_serializing_if = "Option::is_none")]
pub restricted: Option<bool>,
#[serde(rename = "send_notify", skip_serializing_if = "Option::is_none")]
pub send_notify: Option<bool>,
#[serde(rename = "source_id", skip_serializing_if = "Option::is_none")]
pub source_id: Option<i64>,
#[serde(rename = "username")]
pub username: String,
#[serde(rename = "visibility", skip_serializing_if = "Option::is_none")]
pub visibility: Option<String>,
}
impl CreateUserOption {
/// CreateUserOption create user options
pub fn new(email: String, password: String, username: String) -> CreateUserOption {
CreateUserOption {
email,
full_name: None,
login_name: None,
must_change_password: None,
password,
restricted: None,
send_notify: None,
source_id: None,
username,
visibility: None,
}
}
}

View File

@@ -0,0 +1,39 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// CreateWikiPageOptions : CreateWikiPageOptions form for creating wiki
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreateWikiPageOptions {
/// content must be base64 encoded
#[serde(rename = "content_base64", skip_serializing_if = "Option::is_none")]
pub content_base64: Option<String>,
/// optional commit message summarizing the change
#[serde(rename = "message", skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
/// page title. leave empty to keep unchanged
#[serde(rename = "title", skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
}
impl CreateWikiPageOptions {
/// CreateWikiPageOptions form for creating wiki
pub fn new() -> CreateWikiPageOptions {
CreateWikiPageOptions {
content_base64: None,
message: None,
title: None,
}
}
}

View File

@@ -0,0 +1,42 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// Cron : Cron represents a Cron task
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Cron {
#[serde(rename = "exec_times", skip_serializing_if = "Option::is_none")]
pub exec_times: Option<i64>,
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "next", skip_serializing_if = "Option::is_none")]
pub next: Option<String>,
#[serde(rename = "prev", skip_serializing_if = "Option::is_none")]
pub prev: Option<String>,
#[serde(rename = "schedule", skip_serializing_if = "Option::is_none")]
pub schedule: Option<String>,
}
impl Cron {
/// Cron represents a Cron task
pub fn new() -> Cron {
Cron {
exec_times: None,
name: None,
next: None,
prev: None,
schedule: None,
}
}
}

View File

@@ -0,0 +1,31 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// DeleteEmailOption : DeleteEmailOption options when deleting email addresses
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct DeleteEmailOption {
/// email addresses to delete
#[serde(rename = "emails", skip_serializing_if = "Option::is_none")]
pub emails: Option<Vec<String>>,
}
impl DeleteEmailOption {
/// DeleteEmailOption options when deleting email addresses
pub fn new() -> DeleteEmailOption {
DeleteEmailOption {
emails: None,
}
}
}

View File

@@ -0,0 +1,56 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// DeleteFileOptions : DeleteFileOptions options for deleting files (used for other File structs below) Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct DeleteFileOptions {
#[serde(rename = "author", skip_serializing_if = "Option::is_none")]
pub author: Option<Box<crate::models::Identity>>,
/// branch (optional) to base this file from. if not given, the default branch is used
#[serde(rename = "branch", skip_serializing_if = "Option::is_none")]
pub branch: Option<String>,
#[serde(rename = "committer", skip_serializing_if = "Option::is_none")]
pub committer: Option<Box<crate::models::Identity>>,
#[serde(rename = "dates", skip_serializing_if = "Option::is_none")]
pub dates: Option<Box<crate::models::CommitDateOptions>>,
/// message (optional) for the commit of this file. if not supplied, a default message will be used
#[serde(rename = "message", skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
/// new_branch (optional) will make a new branch from `branch` before creating the file
#[serde(rename = "new_branch", skip_serializing_if = "Option::is_none")]
pub new_branch: Option<String>,
/// sha is the SHA for the file that already exists
#[serde(rename = "sha")]
pub sha: String,
/// Add a Signed-off-by trailer by the committer at the end of the commit log message.
#[serde(rename = "signoff", skip_serializing_if = "Option::is_none")]
pub signoff: Option<bool>,
}
impl DeleteFileOptions {
/// DeleteFileOptions options for deleting files (used for other File structs below) Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)
pub fn new(sha: String) -> DeleteFileOptions {
DeleteFileOptions {
author: None,
branch: None,
committer: None,
dates: None,
message: None,
new_branch: None,
sha,
signoff: None,
}
}
}

View File

@@ -0,0 +1,54 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// DeployKey : DeployKey a deploy key
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct DeployKey {
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
#[serde(rename = "fingerprint", skip_serializing_if = "Option::is_none")]
pub fingerprint: Option<String>,
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<i64>,
#[serde(rename = "key", skip_serializing_if = "Option::is_none")]
pub key: Option<String>,
#[serde(rename = "key_id", skip_serializing_if = "Option::is_none")]
pub key_id: Option<i64>,
#[serde(rename = "read_only", skip_serializing_if = "Option::is_none")]
pub read_only: Option<bool>,
#[serde(rename = "repository", skip_serializing_if = "Option::is_none")]
pub repository: Option<Box<crate::models::Repository>>,
#[serde(rename = "title", skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
#[serde(rename = "url", skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
}
impl DeployKey {
/// DeployKey a deploy key
pub fn new() -> DeployKey {
DeployKey {
created_at: None,
fingerprint: None,
id: None,
key: None,
key_id: None,
read_only: None,
repository: None,
title: None,
url: None,
}
}
}

View File

@@ -0,0 +1,33 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// DismissPullReviewOptions : DismissPullReviewOptions are options to dismiss a pull review
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct DismissPullReviewOptions {
#[serde(rename = "message", skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
#[serde(rename = "priors", skip_serializing_if = "Option::is_none")]
pub priors: Option<bool>,
}
impl DismissPullReviewOptions {
/// DismissPullReviewOptions are options to dismiss a pull review
pub fn new() -> DismissPullReviewOptions {
DismissPullReviewOptions {
message: None,
priors: None,
}
}
}

View File

@@ -0,0 +1,30 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// EditAttachmentOptions : EditAttachmentOptions options for editing attachments
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct EditAttachmentOptions {
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
impl EditAttachmentOptions {
/// EditAttachmentOptions options for editing attachments
pub fn new() -> EditAttachmentOptions {
EditAttachmentOptions {
name: None,
}
}
}

View File

@@ -0,0 +1,90 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// EditBranchProtectionOption : EditBranchProtectionOption options for editing a branch protection
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct EditBranchProtectionOption {
#[serde(rename = "approvals_whitelist_teams", skip_serializing_if = "Option::is_none")]
pub approvals_whitelist_teams: Option<Vec<String>>,
#[serde(rename = "approvals_whitelist_username", skip_serializing_if = "Option::is_none")]
pub approvals_whitelist_username: Option<Vec<String>>,
#[serde(rename = "block_on_official_review_requests", skip_serializing_if = "Option::is_none")]
pub block_on_official_review_requests: Option<bool>,
#[serde(rename = "block_on_outdated_branch", skip_serializing_if = "Option::is_none")]
pub block_on_outdated_branch: Option<bool>,
#[serde(rename = "block_on_rejected_reviews", skip_serializing_if = "Option::is_none")]
pub block_on_rejected_reviews: Option<bool>,
#[serde(rename = "dismiss_stale_approvals", skip_serializing_if = "Option::is_none")]
pub dismiss_stale_approvals: Option<bool>,
#[serde(rename = "enable_approvals_whitelist", skip_serializing_if = "Option::is_none")]
pub enable_approvals_whitelist: Option<bool>,
#[serde(rename = "enable_merge_whitelist", skip_serializing_if = "Option::is_none")]
pub enable_merge_whitelist: Option<bool>,
#[serde(rename = "enable_push", skip_serializing_if = "Option::is_none")]
pub enable_push: Option<bool>,
#[serde(rename = "enable_push_whitelist", skip_serializing_if = "Option::is_none")]
pub enable_push_whitelist: Option<bool>,
#[serde(rename = "enable_status_check", skip_serializing_if = "Option::is_none")]
pub enable_status_check: Option<bool>,
#[serde(rename = "merge_whitelist_teams", skip_serializing_if = "Option::is_none")]
pub merge_whitelist_teams: Option<Vec<String>>,
#[serde(rename = "merge_whitelist_usernames", skip_serializing_if = "Option::is_none")]
pub merge_whitelist_usernames: Option<Vec<String>>,
#[serde(rename = "protected_file_patterns", skip_serializing_if = "Option::is_none")]
pub protected_file_patterns: Option<String>,
#[serde(rename = "push_whitelist_deploy_keys", skip_serializing_if = "Option::is_none")]
pub push_whitelist_deploy_keys: Option<bool>,
#[serde(rename = "push_whitelist_teams", skip_serializing_if = "Option::is_none")]
pub push_whitelist_teams: Option<Vec<String>>,
#[serde(rename = "push_whitelist_usernames", skip_serializing_if = "Option::is_none")]
pub push_whitelist_usernames: Option<Vec<String>>,
#[serde(rename = "require_signed_commits", skip_serializing_if = "Option::is_none")]
pub require_signed_commits: Option<bool>,
#[serde(rename = "required_approvals", skip_serializing_if = "Option::is_none")]
pub required_approvals: Option<i64>,
#[serde(rename = "status_check_contexts", skip_serializing_if = "Option::is_none")]
pub status_check_contexts: Option<Vec<String>>,
#[serde(rename = "unprotected_file_patterns", skip_serializing_if = "Option::is_none")]
pub unprotected_file_patterns: Option<String>,
}
impl EditBranchProtectionOption {
/// EditBranchProtectionOption options for editing a branch protection
pub fn new() -> EditBranchProtectionOption {
EditBranchProtectionOption {
approvals_whitelist_teams: None,
approvals_whitelist_username: None,
block_on_official_review_requests: None,
block_on_outdated_branch: None,
block_on_rejected_reviews: None,
dismiss_stale_approvals: None,
enable_approvals_whitelist: None,
enable_merge_whitelist: None,
enable_push: None,
enable_push_whitelist: None,
enable_status_check: None,
merge_whitelist_teams: None,
merge_whitelist_usernames: None,
protected_file_patterns: None,
push_whitelist_deploy_keys: None,
push_whitelist_teams: None,
push_whitelist_usernames: None,
require_signed_commits: None,
required_approvals: None,
status_check_contexts: None,
unprotected_file_patterns: None,
}
}
}

View File

@@ -0,0 +1,30 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// EditDeadlineOption : EditDeadlineOption options for creating a deadline
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct EditDeadlineOption {
#[serde(rename = "due_date")]
pub due_date: String,
}
impl EditDeadlineOption {
/// EditDeadlineOption options for creating a deadline
pub fn new(due_date: String) -> EditDeadlineOption {
EditDeadlineOption {
due_date,
}
}
}

View File

@@ -0,0 +1,30 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// EditGitHookOption : EditGitHookOption options when modifying one Git hook
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct EditGitHookOption {
#[serde(rename = "content", skip_serializing_if = "Option::is_none")]
pub content: Option<String>,
}
impl EditGitHookOption {
/// EditGitHookOption options when modifying one Git hook
pub fn new() -> EditGitHookOption {
EditGitHookOption {
content: None,
}
}
}

View File

@@ -0,0 +1,39 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// EditHookOption : EditHookOption options when modify one hook
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct EditHookOption {
#[serde(rename = "active", skip_serializing_if = "Option::is_none")]
pub active: Option<bool>,
#[serde(rename = "branch_filter", skip_serializing_if = "Option::is_none")]
pub branch_filter: Option<String>,
#[serde(rename = "config", skip_serializing_if = "Option::is_none")]
pub config: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "events", skip_serializing_if = "Option::is_none")]
pub events: Option<Vec<String>>,
}
impl EditHookOption {
/// EditHookOption options when modify one hook
pub fn new() -> EditHookOption {
EditHookOption {
active: None,
branch_filter: None,
config: None,
events: None,
}
}
}

View File

@@ -0,0 +1,30 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// EditIssueCommentOption : EditIssueCommentOption options for editing a comment
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct EditIssueCommentOption {
#[serde(rename = "body")]
pub body: String,
}
impl EditIssueCommentOption {
/// EditIssueCommentOption options for editing a comment
pub fn new(body: String) -> EditIssueCommentOption {
EditIssueCommentOption {
body,
}
}
}

View File

@@ -0,0 +1,55 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// EditIssueOption : EditIssueOption options for editing an issue
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct EditIssueOption {
/// deprecated
#[serde(rename = "assignee", skip_serializing_if = "Option::is_none")]
pub assignee: Option<String>,
#[serde(rename = "assignees", skip_serializing_if = "Option::is_none")]
pub assignees: Option<Vec<String>>,
#[serde(rename = "body", skip_serializing_if = "Option::is_none")]
pub body: Option<String>,
#[serde(rename = "due_date", skip_serializing_if = "Option::is_none")]
pub due_date: Option<String>,
#[serde(rename = "milestone", skip_serializing_if = "Option::is_none")]
pub milestone: Option<i64>,
#[serde(rename = "ref", skip_serializing_if = "Option::is_none")]
pub r#ref: Option<String>,
#[serde(rename = "state", skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename = "title", skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
#[serde(rename = "unset_due_date", skip_serializing_if = "Option::is_none")]
pub unset_due_date: Option<bool>,
}
impl EditIssueOption {
/// EditIssueOption options for editing an issue
pub fn new() -> EditIssueOption {
EditIssueOption {
assignee: None,
assignees: None,
body: None,
due_date: None,
milestone: None,
r#ref: None,
state: None,
title: None,
unset_due_date: None,
}
}
}

View File

@@ -0,0 +1,36 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// EditLabelOption : EditLabelOption options for editing a label
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct EditLabelOption {
#[serde(rename = "color", skip_serializing_if = "Option::is_none")]
pub color: Option<String>,
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
impl EditLabelOption {
/// EditLabelOption options for editing a label
pub fn new() -> EditLabelOption {
EditLabelOption {
color: None,
description: None,
name: None,
}
}
}

View File

@@ -0,0 +1,39 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// EditMilestoneOption : EditMilestoneOption options for editing a milestone
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct EditMilestoneOption {
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "due_on", skip_serializing_if = "Option::is_none")]
pub due_on: Option<String>,
#[serde(rename = "state", skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename = "title", skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
}
impl EditMilestoneOption {
/// EditMilestoneOption options for editing a milestone
pub fn new() -> EditMilestoneOption {
EditMilestoneOption {
description: None,
due_on: None,
state: None,
title: None,
}
}
}

View File

@@ -0,0 +1,62 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// EditOrgOption : EditOrgOption options for editing an organization
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct EditOrgOption {
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "full_name", skip_serializing_if = "Option::is_none")]
pub full_name: Option<String>,
#[serde(rename = "location", skip_serializing_if = "Option::is_none")]
pub location: Option<String>,
#[serde(rename = "repo_admin_change_team_access", skip_serializing_if = "Option::is_none")]
pub repo_admin_change_team_access: Option<bool>,
/// possible values are `public`, `limited` or `private`
#[serde(rename = "visibility", skip_serializing_if = "Option::is_none")]
pub visibility: Option<Visibility>,
#[serde(rename = "website", skip_serializing_if = "Option::is_none")]
pub website: Option<String>,
}
impl EditOrgOption {
/// EditOrgOption options for editing an organization
pub fn new() -> EditOrgOption {
EditOrgOption {
description: None,
full_name: None,
location: None,
repo_admin_change_team_access: None,
visibility: None,
website: None,
}
}
}
/// possible values are `public`, `limited` or `private`
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Visibility {
#[serde(rename = "public")]
Public,
#[serde(rename = "limited")]
Limited,
#[serde(rename = "private")]
Private,
}
impl Default for Visibility {
fn default() -> Visibility {
Self::Public
}
}

View File

@@ -0,0 +1,60 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// EditPullRequestOption : EditPullRequestOption options when modify pull request
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct EditPullRequestOption {
#[serde(rename = "allow_maintainer_edit", skip_serializing_if = "Option::is_none")]
pub allow_maintainer_edit: Option<bool>,
#[serde(rename = "assignee", skip_serializing_if = "Option::is_none")]
pub assignee: Option<String>,
#[serde(rename = "assignees", skip_serializing_if = "Option::is_none")]
pub assignees: Option<Vec<String>>,
#[serde(rename = "base", skip_serializing_if = "Option::is_none")]
pub base: Option<String>,
#[serde(rename = "body", skip_serializing_if = "Option::is_none")]
pub body: Option<String>,
#[serde(rename = "due_date", skip_serializing_if = "Option::is_none")]
pub due_date: Option<String>,
#[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
pub labels: Option<Vec<i64>>,
#[serde(rename = "milestone", skip_serializing_if = "Option::is_none")]
pub milestone: Option<i64>,
#[serde(rename = "state", skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename = "title", skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
#[serde(rename = "unset_due_date", skip_serializing_if = "Option::is_none")]
pub unset_due_date: Option<bool>,
}
impl EditPullRequestOption {
/// EditPullRequestOption options when modify pull request
pub fn new() -> EditPullRequestOption {
EditPullRequestOption {
allow_maintainer_edit: None,
assignee: None,
assignees: None,
base: None,
body: None,
due_date: None,
labels: None,
milestone: None,
state: None,
title: None,
unset_due_date: None,
}
}
}

View File

@@ -0,0 +1,30 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// EditReactionOption : EditReactionOption contain the reaction type
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct EditReactionOption {
#[serde(rename = "content", skip_serializing_if = "Option::is_none")]
pub content: Option<String>,
}
impl EditReactionOption {
/// EditReactionOption contain the reaction type
pub fn new() -> EditReactionOption {
EditReactionOption {
content: None,
}
}
}

View File

@@ -0,0 +1,45 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// EditReleaseOption : EditReleaseOption options when editing a release
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct EditReleaseOption {
#[serde(rename = "body", skip_serializing_if = "Option::is_none")]
pub body: Option<String>,
#[serde(rename = "draft", skip_serializing_if = "Option::is_none")]
pub draft: Option<bool>,
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "prerelease", skip_serializing_if = "Option::is_none")]
pub prerelease: Option<bool>,
#[serde(rename = "tag_name", skip_serializing_if = "Option::is_none")]
pub tag_name: Option<String>,
#[serde(rename = "target_commitish", skip_serializing_if = "Option::is_none")]
pub target_commitish: Option<String>,
}
impl EditReleaseOption {
/// EditReleaseOption options when editing a release
pub fn new() -> EditReleaseOption {
EditReleaseOption {
body: None,
draft: None,
name: None,
prerelease: None,
tag_name: None,
target_commitish: None,
}
}
}

View File

@@ -0,0 +1,128 @@
/*
* 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<bool>,
/// 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<bool>,
/// 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<bool>,
/// 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<bool>,
/// 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<bool>,
/// 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<bool>,
/// set to `true` to archive this repository.
#[serde(rename = "archived", skip_serializing_if = "Option::is_none")]
pub archived: Option<bool>,
/// 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<bool>,
/// sets the default branch for this repository.
#[serde(rename = "default_branch", skip_serializing_if = "Option::is_none")]
pub default_branch: Option<String>,
/// 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<bool>,
/// 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<String>,
/// a short description of the repository.
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
/// enable prune - remove obsolete remote-tracking references
#[serde(rename = "enable_prune", skip_serializing_if = "Option::is_none")]
pub enable_prune: Option<bool>,
#[serde(rename = "external_tracker", skip_serializing_if = "Option::is_none")]
pub external_tracker: Option<Box<crate::models::ExternalTracker>>,
#[serde(rename = "external_wiki", skip_serializing_if = "Option::is_none")]
pub external_wiki: Option<Box<crate::models::ExternalWiki>>,
/// 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<bool>,
/// 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<bool>,
/// 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<bool>,
/// 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<bool>,
/// 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<bool>,
#[serde(rename = "internal_tracker", skip_serializing_if = "Option::is_none")]
pub internal_tracker: Option<Box<crate::models::InternalTracker>>,
/// 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<String>,
/// name of the repository
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// 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<bool>,
/// 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<bool>,
/// a URL with more information about the repository.
#[serde(rename = "website", skip_serializing_if = "Option::is_none")]
pub website: Option<String>,
}
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,
}
}
}

View File

@@ -0,0 +1,64 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// EditTeamOption : EditTeamOption options for editing a team
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct EditTeamOption {
#[serde(rename = "can_create_org_repo", skip_serializing_if = "Option::is_none")]
pub can_create_org_repo: Option<bool>,
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "includes_all_repositories", skip_serializing_if = "Option::is_none")]
pub includes_all_repositories: Option<bool>,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "permission", skip_serializing_if = "Option::is_none")]
pub permission: Option<Permission>,
#[serde(rename = "units", skip_serializing_if = "Option::is_none")]
pub units: Option<Vec<String>>,
#[serde(rename = "units_map", skip_serializing_if = "Option::is_none")]
pub units_map: Option<::std::collections::HashMap<String, String>>,
}
impl EditTeamOption {
/// EditTeamOption options for editing a team
pub fn new(name: String) -> EditTeamOption {
EditTeamOption {
can_create_org_repo: None,
description: None,
includes_all_repositories: None,
name,
permission: None,
units: None,
units_map: None,
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Permission {
#[serde(rename = "read")]
Read,
#[serde(rename = "write")]
Write,
#[serde(rename = "admin")]
Admin,
}
impl Default for Permission {
fn default() -> Permission {
Self::Read
}
}

View File

@@ -0,0 +1,81 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// EditUserOption : EditUserOption edit user options
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct EditUserOption {
#[serde(rename = "active", skip_serializing_if = "Option::is_none")]
pub active: Option<bool>,
#[serde(rename = "admin", skip_serializing_if = "Option::is_none")]
pub admin: Option<bool>,
#[serde(rename = "allow_create_organization", skip_serializing_if = "Option::is_none")]
pub allow_create_organization: Option<bool>,
#[serde(rename = "allow_git_hook", skip_serializing_if = "Option::is_none")]
pub allow_git_hook: Option<bool>,
#[serde(rename = "allow_import_local", skip_serializing_if = "Option::is_none")]
pub allow_import_local: Option<bool>,
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "email", skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
#[serde(rename = "full_name", skip_serializing_if = "Option::is_none")]
pub full_name: Option<String>,
#[serde(rename = "location", skip_serializing_if = "Option::is_none")]
pub location: Option<String>,
#[serde(rename = "login_name")]
pub login_name: String,
#[serde(rename = "max_repo_creation", skip_serializing_if = "Option::is_none")]
pub max_repo_creation: Option<i64>,
#[serde(rename = "must_change_password", skip_serializing_if = "Option::is_none")]
pub must_change_password: Option<bool>,
#[serde(rename = "password", skip_serializing_if = "Option::is_none")]
pub password: Option<String>,
#[serde(rename = "prohibit_login", skip_serializing_if = "Option::is_none")]
pub prohibit_login: Option<bool>,
#[serde(rename = "restricted", skip_serializing_if = "Option::is_none")]
pub restricted: Option<bool>,
#[serde(rename = "source_id")]
pub source_id: i64,
#[serde(rename = "visibility", skip_serializing_if = "Option::is_none")]
pub visibility: Option<String>,
#[serde(rename = "website", skip_serializing_if = "Option::is_none")]
pub website: Option<String>,
}
impl EditUserOption {
/// EditUserOption edit user options
pub fn new(login_name: String, source_id: i64) -> EditUserOption {
EditUserOption {
active: None,
admin: None,
allow_create_organization: None,
allow_git_hook: None,
allow_import_local: None,
description: None,
email: None,
full_name: None,
location: None,
login_name,
max_repo_creation: None,
must_change_password: None,
password: None,
prohibit_login: None,
restricted: None,
source_id,
visibility: None,
website: None,
}
}
}

View File

@@ -0,0 +1,36 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// Email : Email an email address belonging to a user
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Email {
#[serde(rename = "email", skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
#[serde(rename = "primary", skip_serializing_if = "Option::is_none")]
pub primary: Option<bool>,
#[serde(rename = "verified", skip_serializing_if = "Option::is_none")]
pub verified: Option<bool>,
}
impl Email {
/// Email an email address belonging to a user
pub fn new() -> Email {
Email {
email: None,
primary: None,
verified: None,
}
}
}

View File

@@ -0,0 +1,39 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// ExternalTracker : ExternalTracker represents settings for external tracker
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct ExternalTracker {
/// External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index.
#[serde(rename = "external_tracker_format", skip_serializing_if = "Option::is_none")]
pub external_tracker_format: Option<String>,
/// External Issue Tracker Number Format, either `numeric` or `alphanumeric`
#[serde(rename = "external_tracker_style", skip_serializing_if = "Option::is_none")]
pub external_tracker_style: Option<String>,
/// URL of external issue tracker.
#[serde(rename = "external_tracker_url", skip_serializing_if = "Option::is_none")]
pub external_tracker_url: Option<String>,
}
impl ExternalTracker {
/// ExternalTracker represents settings for external tracker
pub fn new() -> ExternalTracker {
ExternalTracker {
external_tracker_format: None,
external_tracker_style: None,
external_tracker_url: None,
}
}
}

View File

@@ -0,0 +1,31 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// ExternalWiki : ExternalWiki represents setting for external wiki
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct ExternalWiki {
/// URL of external wiki.
#[serde(rename = "external_wiki_url", skip_serializing_if = "Option::is_none")]
pub external_wiki_url: Option<String>,
}
impl ExternalWiki {
/// ExternalWiki represents setting for external wiki
pub fn new() -> ExternalWiki {
ExternalWiki {
external_wiki_url: None,
}
}
}

View File

@@ -0,0 +1,52 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct FileCommitResponse {
#[serde(rename = "author", skip_serializing_if = "Option::is_none")]
pub author: Option<Box<crate::models::CommitUser>>,
#[serde(rename = "committer", skip_serializing_if = "Option::is_none")]
pub committer: Option<Box<crate::models::CommitUser>>,
#[serde(rename = "created", skip_serializing_if = "Option::is_none")]
pub created: Option<String>,
#[serde(rename = "html_url", skip_serializing_if = "Option::is_none")]
pub html_url: Option<String>,
#[serde(rename = "message", skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
#[serde(rename = "parents", skip_serializing_if = "Option::is_none")]
pub parents: Option<Vec<crate::models::CommitMeta>>,
#[serde(rename = "sha", skip_serializing_if = "Option::is_none")]
pub sha: Option<String>,
#[serde(rename = "tree", skip_serializing_if = "Option::is_none")]
pub tree: Option<Box<crate::models::CommitMeta>>,
#[serde(rename = "url", skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
}
impl FileCommitResponse {
pub fn new() -> FileCommitResponse {
FileCommitResponse {
author: None,
committer: None,
created: None,
html_url: None,
message: None,
parents: None,
sha: None,
tree: None,
url: None,
}
}
}

View File

@@ -0,0 +1,36 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// FileDeleteResponse : FileDeleteResponse contains information about a repo's file that was deleted
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct FileDeleteResponse {
#[serde(rename = "commit", skip_serializing_if = "Option::is_none")]
pub commit: Option<Box<crate::models::FileCommitResponse>>,
#[serde(rename = "content", skip_serializing_if = "Option::is_none")]
pub content: Option<serde_json::Value>,
#[serde(rename = "verification", skip_serializing_if = "Option::is_none")]
pub verification: Option<Box<crate::models::PayloadCommitVerification>>,
}
impl FileDeleteResponse {
/// FileDeleteResponse contains information about a repo's file that was deleted
pub fn new() -> FileDeleteResponse {
FileDeleteResponse {
commit: None,
content: None,
verification: None,
}
}
}

View File

@@ -0,0 +1,36 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// FileLinksResponse : FileLinksResponse contains the links for a repo's file
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct FileLinksResponse {
#[serde(rename = "git", skip_serializing_if = "Option::is_none")]
pub git: Option<String>,
#[serde(rename = "html", skip_serializing_if = "Option::is_none")]
pub html: Option<String>,
#[serde(rename = "self", skip_serializing_if = "Option::is_none")]
pub param_self: Option<String>,
}
impl FileLinksResponse {
/// FileLinksResponse contains the links for a repo's file
pub fn new() -> FileLinksResponse {
FileLinksResponse {
git: None,
html: None,
param_self: None,
}
}
}

View File

@@ -0,0 +1,36 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// FileResponse : FileResponse contains information about a repo's file
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct FileResponse {
#[serde(rename = "commit", skip_serializing_if = "Option::is_none")]
pub commit: Option<Box<crate::models::FileCommitResponse>>,
#[serde(rename = "content", skip_serializing_if = "Option::is_none")]
pub content: Option<Box<crate::models::ContentsResponse>>,
#[serde(rename = "verification", skip_serializing_if = "Option::is_none")]
pub verification: Option<Box<crate::models::PayloadCommitVerification>>,
}
impl FileResponse {
/// FileResponse contains information about a repo's file
pub fn new() -> FileResponse {
FileResponse {
commit: None,
content: None,
verification: None,
}
}
}

View File

@@ -0,0 +1,39 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// GeneralApiSettings : GeneralAPISettings contains global api settings exposed by it
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct GeneralApiSettings {
#[serde(rename = "default_git_trees_per_page", skip_serializing_if = "Option::is_none")]
pub default_git_trees_per_page: Option<i64>,
#[serde(rename = "default_max_blob_size", skip_serializing_if = "Option::is_none")]
pub default_max_blob_size: Option<i64>,
#[serde(rename = "default_paging_num", skip_serializing_if = "Option::is_none")]
pub default_paging_num: Option<i64>,
#[serde(rename = "max_response_items", skip_serializing_if = "Option::is_none")]
pub max_response_items: Option<i64>,
}
impl GeneralApiSettings {
/// GeneralAPISettings contains global api settings exposed by it
pub fn new() -> GeneralApiSettings {
GeneralApiSettings {
default_git_trees_per_page: None,
default_max_blob_size: None,
default_paging_num: None,
max_response_items: None,
}
}
}

View File

@@ -0,0 +1,39 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// GeneralAttachmentSettings : GeneralAttachmentSettings contains global Attachment settings exposed by API
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct GeneralAttachmentSettings {
#[serde(rename = "allowed_types", skip_serializing_if = "Option::is_none")]
pub allowed_types: Option<String>,
#[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
pub enabled: Option<bool>,
#[serde(rename = "max_files", skip_serializing_if = "Option::is_none")]
pub max_files: Option<i64>,
#[serde(rename = "max_size", skip_serializing_if = "Option::is_none")]
pub max_size: Option<i64>,
}
impl GeneralAttachmentSettings {
/// GeneralAttachmentSettings contains global Attachment settings exposed by API
pub fn new() -> GeneralAttachmentSettings {
GeneralAttachmentSettings {
allowed_types: None,
enabled: None,
max_files: None,
max_size: None,
}
}
}

View File

@@ -0,0 +1,45 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// GeneralRepoSettings : GeneralRepoSettings contains global repository settings exposed by API
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct GeneralRepoSettings {
#[serde(rename = "http_git_disabled", skip_serializing_if = "Option::is_none")]
pub http_git_disabled: Option<bool>,
#[serde(rename = "lfs_disabled", skip_serializing_if = "Option::is_none")]
pub lfs_disabled: Option<bool>,
#[serde(rename = "migrations_disabled", skip_serializing_if = "Option::is_none")]
pub migrations_disabled: Option<bool>,
#[serde(rename = "mirrors_disabled", skip_serializing_if = "Option::is_none")]
pub mirrors_disabled: Option<bool>,
#[serde(rename = "stars_disabled", skip_serializing_if = "Option::is_none")]
pub stars_disabled: Option<bool>,
#[serde(rename = "time_tracking_disabled", skip_serializing_if = "Option::is_none")]
pub time_tracking_disabled: Option<bool>,
}
impl GeneralRepoSettings {
/// GeneralRepoSettings contains global repository settings exposed by API
pub fn new() -> GeneralRepoSettings {
GeneralRepoSettings {
http_git_disabled: None,
lfs_disabled: None,
migrations_disabled: None,
mirrors_disabled: None,
stars_disabled: None,
time_tracking_disabled: None,
}
}
}

View File

@@ -0,0 +1,36 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// GeneralUiSettings : GeneralUISettings contains global ui settings exposed by API
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct GeneralUiSettings {
#[serde(rename = "allowed_reactions", skip_serializing_if = "Option::is_none")]
pub allowed_reactions: Option<Vec<String>>,
#[serde(rename = "custom_emojis", skip_serializing_if = "Option::is_none")]
pub custom_emojis: Option<Vec<String>>,
#[serde(rename = "default_theme", skip_serializing_if = "Option::is_none")]
pub default_theme: Option<String>,
}
impl GeneralUiSettings {
/// GeneralUISettings contains global ui settings exposed by API
pub fn new() -> GeneralUiSettings {
GeneralUiSettings {
allowed_reactions: None,
custom_emojis: None,
default_theme: None,
}
}
}

View File

@@ -0,0 +1,71 @@
/*
* 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,
}
}
}

View File

@@ -0,0 +1,42 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// GitBlobResponse : GitBlobResponse represents a git blob
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct GitBlobResponse {
#[serde(rename = "content", skip_serializing_if = "Option::is_none")]
pub content: Option<String>,
#[serde(rename = "encoding", skip_serializing_if = "Option::is_none")]
pub encoding: Option<String>,
#[serde(rename = "sha", skip_serializing_if = "Option::is_none")]
pub sha: Option<String>,
#[serde(rename = "size", skip_serializing_if = "Option::is_none")]
pub size: Option<i64>,
#[serde(rename = "url", skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
}
impl GitBlobResponse {
/// GitBlobResponse represents a git blob
pub fn new() -> GitBlobResponse {
GitBlobResponse {
content: None,
encoding: None,
sha: None,
size: None,
url: None,
}
}
}

View File

@@ -0,0 +1,45 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// GitEntry : GitEntry represents a git tree
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct GitEntry {
#[serde(rename = "mode", skip_serializing_if = "Option::is_none")]
pub mode: Option<String>,
#[serde(rename = "path", skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
#[serde(rename = "sha", skip_serializing_if = "Option::is_none")]
pub sha: Option<String>,
#[serde(rename = "size", skip_serializing_if = "Option::is_none")]
pub size: Option<i64>,
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
pub r#type: Option<String>,
#[serde(rename = "url", skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
}
impl GitEntry {
/// GitEntry represents a git tree
pub fn new() -> GitEntry {
GitEntry {
mode: None,
path: None,
sha: None,
size: None,
r#type: None,
url: None,
}
}
}

View File

@@ -0,0 +1,36 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// GitHook : GitHook represents a Git repository hook
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct GitHook {
#[serde(rename = "content", skip_serializing_if = "Option::is_none")]
pub content: Option<String>,
#[serde(rename = "is_active", skip_serializing_if = "Option::is_none")]
pub is_active: Option<bool>,
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
impl GitHook {
/// GitHook represents a Git repository hook
pub fn new() -> GitHook {
GitHook {
content: None,
is_active: None,
name: None,
}
}
}

View File

@@ -0,0 +1,34 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct GitObject {
#[serde(rename = "sha", skip_serializing_if = "Option::is_none")]
pub sha: Option<String>,
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
pub r#type: Option<String>,
#[serde(rename = "url", skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
}
impl GitObject {
pub fn new() -> GitObject {
GitObject {
sha: None,
r#type: None,
url: None,
}
}
}

View File

@@ -0,0 +1,45 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// GitTreeResponse : GitTreeResponse returns a git tree
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct GitTreeResponse {
#[serde(rename = "page", skip_serializing_if = "Option::is_none")]
pub page: Option<i64>,
#[serde(rename = "sha", skip_serializing_if = "Option::is_none")]
pub sha: Option<String>,
#[serde(rename = "total_count", skip_serializing_if = "Option::is_none")]
pub total_count: Option<i64>,
#[serde(rename = "tree", skip_serializing_if = "Option::is_none")]
pub tree: Option<Vec<crate::models::GitEntry>>,
#[serde(rename = "truncated", skip_serializing_if = "Option::is_none")]
pub truncated: Option<bool>,
#[serde(rename = "url", skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
}
impl GitTreeResponse {
/// GitTreeResponse returns a git tree
pub fn new() -> GitTreeResponse {
GitTreeResponse {
page: None,
sha: None,
total_count: None,
tree: None,
truncated: None,
url: None,
}
}
}

View File

@@ -0,0 +1,66 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// GpgKey : GPGKey a user GPG key to sign commit and tag in repository
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct GpgKey {
#[serde(rename = "can_certify", skip_serializing_if = "Option::is_none")]
pub can_certify: Option<bool>,
#[serde(rename = "can_encrypt_comms", skip_serializing_if = "Option::is_none")]
pub can_encrypt_comms: Option<bool>,
#[serde(rename = "can_encrypt_storage", skip_serializing_if = "Option::is_none")]
pub can_encrypt_storage: Option<bool>,
#[serde(rename = "can_sign", skip_serializing_if = "Option::is_none")]
pub can_sign: Option<bool>,
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
#[serde(rename = "emails", skip_serializing_if = "Option::is_none")]
pub emails: Option<Vec<crate::models::GpgKeyEmail>>,
#[serde(rename = "expires_at", skip_serializing_if = "Option::is_none")]
pub expires_at: Option<String>,
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<i64>,
#[serde(rename = "key_id", skip_serializing_if = "Option::is_none")]
pub key_id: Option<String>,
#[serde(rename = "primary_key_id", skip_serializing_if = "Option::is_none")]
pub primary_key_id: Option<String>,
#[serde(rename = "public_key", skip_serializing_if = "Option::is_none")]
pub public_key: Option<String>,
#[serde(rename = "subkeys", skip_serializing_if = "Option::is_none")]
pub subkeys: Option<Vec<crate::models::GpgKey>>,
#[serde(rename = "verified", skip_serializing_if = "Option::is_none")]
pub verified: Option<bool>,
}
impl GpgKey {
/// GPGKey a user GPG key to sign commit and tag in repository
pub fn new() -> GpgKey {
GpgKey {
can_certify: None,
can_encrypt_comms: None,
can_encrypt_storage: None,
can_sign: None,
created_at: None,
emails: None,
expires_at: None,
id: None,
key_id: None,
primary_key_id: None,
public_key: None,
subkeys: None,
verified: None,
}
}
}

View File

@@ -0,0 +1,33 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// GpgKeyEmail : GPGKeyEmail an email attached to a GPGKey
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct GpgKeyEmail {
#[serde(rename = "email", skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
#[serde(rename = "verified", skip_serializing_if = "Option::is_none")]
pub verified: Option<bool>,
}
impl GpgKeyEmail {
/// GPGKeyEmail an email attached to a GPGKey
pub fn new() -> GpgKeyEmail {
GpgKeyEmail {
email: None,
verified: None,
}
}
}

View File

@@ -0,0 +1,48 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// Hook : Hook a hook is a web hook when one repository changed
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Hook {
#[serde(rename = "active", skip_serializing_if = "Option::is_none")]
pub active: Option<bool>,
#[serde(rename = "config", skip_serializing_if = "Option::is_none")]
pub config: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
#[serde(rename = "events", skip_serializing_if = "Option::is_none")]
pub events: Option<Vec<String>>,
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<i64>,
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
pub r#type: Option<String>,
#[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
pub updated_at: Option<String>,
}
impl Hook {
/// Hook a hook is a web hook when one repository changed
pub fn new() -> Hook {
Hook {
active: None,
config: None,
created_at: None,
events: None,
id: None,
r#type: None,
updated_at: None,
}
}
}

View File

@@ -0,0 +1,33 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// Identity : Identity for a person's identity like an author or committer
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Identity {
#[serde(rename = "email", skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
impl Identity {
/// Identity for a person's identity like an author or committer
pub fn new() -> Identity {
Identity {
email: None,
name: None,
}
}
}

View File

@@ -0,0 +1,39 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// InternalTracker : InternalTracker represents settings for internal tracker
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct InternalTracker {
/// Let only contributors track time (Built-in issue tracker)
#[serde(rename = "allow_only_contributors_to_track_time", skip_serializing_if = "Option::is_none")]
pub allow_only_contributors_to_track_time: Option<bool>,
/// Enable dependencies for issues and pull requests (Built-in issue tracker)
#[serde(rename = "enable_issue_dependencies", skip_serializing_if = "Option::is_none")]
pub enable_issue_dependencies: Option<bool>,
/// Enable time tracking (Built-in issue tracker)
#[serde(rename = "enable_time_tracker", skip_serializing_if = "Option::is_none")]
pub enable_time_tracker: Option<bool>,
}
impl InternalTracker {
/// InternalTracker represents settings for internal tracker
pub fn new() -> InternalTracker {
InternalTracker {
allow_only_contributors_to_track_time: None,
enable_issue_dependencies: None,
enable_time_tracker: None,
}
}
}

View File

@@ -0,0 +1,97 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// Issue : Issue represents an issue in a repository
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Issue {
#[serde(rename = "assignee", skip_serializing_if = "Option::is_none")]
pub assignee: Option<Box<crate::models::User>>,
#[serde(rename = "assignees", skip_serializing_if = "Option::is_none")]
pub assignees: Option<Vec<crate::models::User>>,
#[serde(rename = "body", skip_serializing_if = "Option::is_none")]
pub body: Option<String>,
#[serde(rename = "closed_at", skip_serializing_if = "Option::is_none")]
pub closed_at: Option<String>,
#[serde(rename = "comments", skip_serializing_if = "Option::is_none")]
pub comments: Option<i64>,
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
#[serde(rename = "due_date", skip_serializing_if = "Option::is_none")]
pub due_date: Option<String>,
#[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 = "is_locked", skip_serializing_if = "Option::is_none")]
pub is_locked: Option<bool>,
#[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
pub labels: Option<Vec<crate::models::Label>>,
#[serde(rename = "milestone", skip_serializing_if = "Option::is_none")]
pub milestone: Option<Box<crate::models::Milestone>>,
#[serde(rename = "number", skip_serializing_if = "Option::is_none")]
pub number: Option<i64>,
#[serde(rename = "original_author", skip_serializing_if = "Option::is_none")]
pub original_author: Option<String>,
#[serde(rename = "original_author_id", skip_serializing_if = "Option::is_none")]
pub original_author_id: Option<i64>,
#[serde(rename = "pull_request", skip_serializing_if = "Option::is_none")]
pub pull_request: Option<Box<crate::models::PullRequestMeta>>,
#[serde(rename = "ref", skip_serializing_if = "Option::is_none")]
pub r#ref: Option<String>,
#[serde(rename = "repository", skip_serializing_if = "Option::is_none")]
pub repository: Option<Box<crate::models::RepositoryMeta>>,
/// StateType issue state type
#[serde(rename = "state", skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename = "title", skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
#[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 = "user", skip_serializing_if = "Option::is_none")]
pub user: Option<Box<crate::models::User>>,
}
impl Issue {
/// Issue represents an issue in a repository
pub fn new() -> Issue {
Issue {
assignee: None,
assignees: None,
body: None,
closed_at: None,
comments: None,
created_at: None,
due_date: None,
html_url: None,
id: None,
is_locked: None,
labels: None,
milestone: None,
number: None,
original_author: None,
original_author_id: None,
pull_request: None,
r#ref: None,
repository: None,
state: None,
title: None,
updated_at: None,
url: None,
user: None,
}
}
}

View File

@@ -0,0 +1,30 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// IssueDeadline : IssueDeadline represents an issue deadline
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct IssueDeadline {
#[serde(rename = "due_date", skip_serializing_if = "Option::is_none")]
pub due_date: Option<String>,
}
impl IssueDeadline {
/// IssueDeadline represents an issue deadline
pub fn new() -> IssueDeadline {
IssueDeadline {
due_date: None,
}
}
}

View File

@@ -0,0 +1,31 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// IssueLabelsOption : IssueLabelsOption a collection of labels
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct IssueLabelsOption {
/// list of label IDs
#[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
pub labels: Option<Vec<i64>>,
}
impl IssueLabelsOption {
/// IssueLabelsOption a collection of labels
pub fn new() -> IssueLabelsOption {
IssueLabelsOption {
labels: None,
}
}
}

View File

@@ -0,0 +1,48 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// IssueTemplate : IssueTemplate represents an issue template for a repository
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct IssueTemplate {
#[serde(rename = "about", skip_serializing_if = "Option::is_none")]
pub about: Option<String>,
#[serde(rename = "content", skip_serializing_if = "Option::is_none")]
pub content: Option<String>,
#[serde(rename = "file_name", skip_serializing_if = "Option::is_none")]
pub file_name: Option<String>,
#[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
pub labels: Option<Vec<String>>,
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "ref", skip_serializing_if = "Option::is_none")]
pub r#ref: Option<String>,
#[serde(rename = "title", skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
}
impl IssueTemplate {
/// IssueTemplate represents an issue template for a repository
pub fn new() -> IssueTemplate {
IssueTemplate {
about: None,
content: None,
file_name: None,
labels: None,
name: None,
r#ref: None,
title: None,
}
}
}

View File

@@ -0,0 +1,42 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// Label : Label a label to an issue or a pr
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Label {
#[serde(rename = "color", skip_serializing_if = "Option::is_none")]
pub color: Option<String>,
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<i64>,
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "url", skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
}
impl Label {
/// Label a label to an issue or a pr
pub fn new() -> Label {
Label {
color: None,
description: None,
id: None,
name: None,
url: None,
}
}
}

View File

@@ -0,0 +1,43 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// MarkdownOption : MarkdownOption markdown options
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct MarkdownOption {
/// Context to render in: body
#[serde(rename = "Context", skip_serializing_if = "Option::is_none")]
pub context: Option<String>,
/// Mode to render in: body
#[serde(rename = "Mode", skip_serializing_if = "Option::is_none")]
pub mode: Option<String>,
/// Text markdown to render in: body
#[serde(rename = "Text", skip_serializing_if = "Option::is_none")]
pub text: Option<String>,
/// Is it a wiki page ? in: body
#[serde(rename = "Wiki", skip_serializing_if = "Option::is_none")]
pub wiki: Option<bool>,
}
impl MarkdownOption {
/// MarkdownOption markdown options
pub fn new() -> MarkdownOption {
MarkdownOption {
context: None,
mode: None,
text: None,
wiki: None,
}
}
}

View File

@@ -0,0 +1,71 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// MergePullRequestOption : MergePullRequestForm form for merging Pull Request
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct MergePullRequestOption {
#[serde(rename = "Do")]
pub r#do: RHashDo,
#[serde(rename = "MergeCommitID", skip_serializing_if = "Option::is_none")]
pub merge_commit_id: Option<String>,
#[serde(rename = "MergeMessageField", skip_serializing_if = "Option::is_none")]
pub merge_message_field: Option<String>,
#[serde(rename = "MergeTitleField", skip_serializing_if = "Option::is_none")]
pub merge_title_field: Option<String>,
#[serde(rename = "delete_branch_after_merge", skip_serializing_if = "Option::is_none")]
pub delete_branch_after_merge: Option<bool>,
#[serde(rename = "force_merge", skip_serializing_if = "Option::is_none")]
pub force_merge: Option<bool>,
#[serde(rename = "head_commit_id", skip_serializing_if = "Option::is_none")]
pub head_commit_id: Option<String>,
#[serde(rename = "merge_when_checks_succeed", skip_serializing_if = "Option::is_none")]
pub merge_when_checks_succeed: Option<bool>,
}
impl MergePullRequestOption {
/// MergePullRequestForm form for merging Pull Request
pub fn new(r#do: RHashDo) -> MergePullRequestOption {
MergePullRequestOption {
r#do,
merge_commit_id: None,
merge_message_field: None,
merge_title_field: None,
delete_branch_after_merge: None,
force_merge: None,
head_commit_id: None,
merge_when_checks_succeed: None,
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum RHashDo {
#[serde(rename = "merge")]
Merge,
#[serde(rename = "rebase")]
Rebase,
#[serde(rename = "rebase-merge")]
RebaseMerge,
#[serde(rename = "squash")]
Squash,
#[serde(rename = "manually-merged")]
ManuallyMerged,
}
impl Default for RHashDo {
fn default() -> RHashDo {
Self::Merge
}
}

View File

@@ -0,0 +1,85 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// MigrateRepoForm : MigrateRepoForm form for migrating repository this is used to interact with web ui
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct MigrateRepoForm {
#[serde(rename = "auth_password", skip_serializing_if = "Option::is_none")]
pub auth_password: Option<String>,
#[serde(rename = "auth_token", skip_serializing_if = "Option::is_none")]
pub auth_token: Option<String>,
#[serde(rename = "auth_username", skip_serializing_if = "Option::is_none")]
pub auth_username: Option<String>,
#[serde(rename = "clone_addr")]
pub clone_addr: String,
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "issues", skip_serializing_if = "Option::is_none")]
pub issues: Option<bool>,
#[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
pub labels: Option<bool>,
#[serde(rename = "lfs", skip_serializing_if = "Option::is_none")]
pub lfs: Option<bool>,
#[serde(rename = "lfs_endpoint", skip_serializing_if = "Option::is_none")]
pub lfs_endpoint: Option<String>,
#[serde(rename = "milestones", skip_serializing_if = "Option::is_none")]
pub milestones: Option<bool>,
#[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 = "private", skip_serializing_if = "Option::is_none")]
pub private: Option<bool>,
#[serde(rename = "pull_requests", skip_serializing_if = "Option::is_none")]
pub pull_requests: Option<bool>,
#[serde(rename = "releases", skip_serializing_if = "Option::is_none")]
pub releases: Option<bool>,
#[serde(rename = "repo_name")]
pub repo_name: String,
/// GitServiceType represents a git service
#[serde(rename = "service", skip_serializing_if = "Option::is_none")]
pub service: Option<i64>,
#[serde(rename = "uid")]
pub uid: i64,
#[serde(rename = "wiki", skip_serializing_if = "Option::is_none")]
pub wiki: Option<bool>,
}
impl MigrateRepoForm {
/// MigrateRepoForm form for migrating repository this is used to interact with web ui
pub fn new(clone_addr: String, repo_name: String, uid: i64) -> MigrateRepoForm {
MigrateRepoForm {
auth_password: None,
auth_token: None,
auth_username: None,
clone_addr,
description: None,
issues: None,
labels: None,
lfs: None,
lfs_endpoint: None,
milestones: None,
mirror: None,
mirror_interval: None,
private: None,
pull_requests: None,
releases: None,
repo_name,
service: None,
uid,
wiki: None,
}
}
}

View File

@@ -0,0 +1,107 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// MigrateRepoOptions : MigrateRepoOptions options for migrating repository's this is used to interact with api v1
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct MigrateRepoOptions {
#[serde(rename = "auth_password", skip_serializing_if = "Option::is_none")]
pub auth_password: Option<String>,
#[serde(rename = "auth_token", skip_serializing_if = "Option::is_none")]
pub auth_token: Option<String>,
#[serde(rename = "auth_username", skip_serializing_if = "Option::is_none")]
pub auth_username: Option<String>,
#[serde(rename = "clone_addr")]
pub clone_addr: String,
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "issues", skip_serializing_if = "Option::is_none")]
pub issues: Option<bool>,
#[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
pub labels: Option<bool>,
#[serde(rename = "lfs", skip_serializing_if = "Option::is_none")]
pub lfs: Option<bool>,
#[serde(rename = "lfs_endpoint", skip_serializing_if = "Option::is_none")]
pub lfs_endpoint: Option<String>,
#[serde(rename = "milestones", skip_serializing_if = "Option::is_none")]
pub milestones: Option<bool>,
#[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 = "private", skip_serializing_if = "Option::is_none")]
pub private: Option<bool>,
#[serde(rename = "pull_requests", skip_serializing_if = "Option::is_none")]
pub pull_requests: Option<bool>,
#[serde(rename = "releases", skip_serializing_if = "Option::is_none")]
pub releases: Option<bool>,
#[serde(rename = "repo_name")]
pub repo_name: String,
/// Name of User or Organisation who will own Repo after migration
#[serde(rename = "repo_owner", skip_serializing_if = "Option::is_none")]
pub repo_owner: Option<String>,
#[serde(rename = "service", skip_serializing_if = "Option::is_none")]
pub service: Option<Service>,
/// deprecated (only for backwards compatibility)
#[serde(rename = "uid", skip_serializing_if = "Option::is_none")]
pub uid: Option<i64>,
#[serde(rename = "wiki", skip_serializing_if = "Option::is_none")]
pub wiki: Option<bool>,
}
impl MigrateRepoOptions {
/// MigrateRepoOptions options for migrating repository's this is used to interact with api v1
pub fn new(clone_addr: String, repo_name: String) -> MigrateRepoOptions {
MigrateRepoOptions {
auth_password: None,
auth_token: None,
auth_username: None,
clone_addr,
description: None,
issues: None,
labels: None,
lfs: None,
lfs_endpoint: None,
milestones: None,
mirror: None,
mirror_interval: None,
private: None,
pull_requests: None,
releases: None,
repo_name,
repo_owner: None,
service: None,
uid: None,
wiki: None,
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Service {
#[serde(rename = "git")]
Git,
#[serde(rename = "github")]
Github,
#[serde(rename = "gitea")]
Gitea,
#[serde(rename = "gitlab")]
Gitlab,
}
impl Default for Service {
fn default() -> Service {
Self::Git
}
}

View File

@@ -0,0 +1,58 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// Milestone : Milestone milestone is a collection of issues on one repository
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct Milestone {
#[serde(rename = "closed_at", skip_serializing_if = "Option::is_none")]
pub closed_at: Option<String>,
#[serde(rename = "closed_issues", skip_serializing_if = "Option::is_none")]
pub closed_issues: Option<i64>,
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "due_on", skip_serializing_if = "Option::is_none")]
pub due_on: Option<String>,
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<i64>,
#[serde(rename = "open_issues", skip_serializing_if = "Option::is_none")]
pub open_issues: Option<i64>,
/// StateType issue state type
#[serde(rename = "state", skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename = "title", skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
#[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
pub updated_at: Option<String>,
}
impl Milestone {
/// Milestone milestone is a collection of issues on one repository
pub fn new() -> Milestone {
Milestone {
closed_at: None,
closed_issues: None,
created_at: None,
description: None,
due_on: None,
id: None,
open_issues: None,
state: None,
title: None,
updated_at: None,
}
}
}

View File

@@ -0,0 +1,308 @@
pub mod access_token;
pub use self::access_token::AccessToken;
pub mod add_collaborator_option;
pub use self::add_collaborator_option::AddCollaboratorOption;
pub mod add_time_option;
pub use self::add_time_option::AddTimeOption;
pub mod annotated_tag;
pub use self::annotated_tag::AnnotatedTag;
pub mod annotated_tag_object;
pub use self::annotated_tag_object::AnnotatedTagObject;
pub mod api_error;
pub use self::api_error::ApiError;
pub mod attachment;
pub use self::attachment::Attachment;
pub mod branch;
pub use self::branch::Branch;
pub mod branch_protection;
pub use self::branch_protection::BranchProtection;
pub mod combined_status;
pub use self::combined_status::CombinedStatus;
pub mod comment;
pub use self::comment::Comment;
pub mod commit;
pub use self::commit::Commit;
pub mod commit_affected_files;
pub use self::commit_affected_files::CommitAffectedFiles;
pub mod commit_date_options;
pub use self::commit_date_options::CommitDateOptions;
pub mod commit_meta;
pub use self::commit_meta::CommitMeta;
pub mod commit_stats;
pub use self::commit_stats::CommitStats;
pub mod commit_status;
pub use self::commit_status::CommitStatus;
pub mod commit_user;
pub use self::commit_user::CommitUser;
pub mod contents_response;
pub use self::contents_response::ContentsResponse;
pub mod create_access_token_option;
pub use self::create_access_token_option::CreateAccessTokenOption;
pub mod create_branch_protection_option;
pub use self::create_branch_protection_option::CreateBranchProtectionOption;
pub mod create_branch_repo_option;
pub use self::create_branch_repo_option::CreateBranchRepoOption;
pub mod create_email_option;
pub use self::create_email_option::CreateEmailOption;
pub mod create_file_options;
pub use self::create_file_options::CreateFileOptions;
pub mod create_fork_option;
pub use self::create_fork_option::CreateForkOption;
pub mod create_gpg_key_option;
pub use self::create_gpg_key_option::CreateGpgKeyOption;
pub mod create_hook_option;
pub use self::create_hook_option::CreateHookOption;
pub mod create_issue_comment_option;
pub use self::create_issue_comment_option::CreateIssueCommentOption;
pub mod create_issue_option;
pub use self::create_issue_option::CreateIssueOption;
pub mod create_key_option;
pub use self::create_key_option::CreateKeyOption;
pub mod create_label_option;
pub use self::create_label_option::CreateLabelOption;
pub mod create_milestone_option;
pub use self::create_milestone_option::CreateMilestoneOption;
pub mod create_o_auth2_application_options;
pub use self::create_o_auth2_application_options::CreateOAuth2ApplicationOptions;
pub mod create_org_option;
pub use self::create_org_option::CreateOrgOption;
pub mod create_pull_request_option;
pub use self::create_pull_request_option::CreatePullRequestOption;
pub mod create_pull_review_comment;
pub use self::create_pull_review_comment::CreatePullReviewComment;
pub mod create_pull_review_options;
pub use self::create_pull_review_options::CreatePullReviewOptions;
pub mod create_release_option;
pub use self::create_release_option::CreateReleaseOption;
pub mod create_repo_option;
pub use self::create_repo_option::CreateRepoOption;
pub mod create_status_option;
pub use self::create_status_option::CreateStatusOption;
pub mod create_tag_option;
pub use self::create_tag_option::CreateTagOption;
pub mod create_team_option;
pub use self::create_team_option::CreateTeamOption;
pub mod create_user_option;
pub use self::create_user_option::CreateUserOption;
pub mod create_wiki_page_options;
pub use self::create_wiki_page_options::CreateWikiPageOptions;
pub mod cron;
pub use self::cron::Cron;
pub mod delete_email_option;
pub use self::delete_email_option::DeleteEmailOption;
pub mod delete_file_options;
pub use self::delete_file_options::DeleteFileOptions;
pub mod deploy_key;
pub use self::deploy_key::DeployKey;
pub mod dismiss_pull_review_options;
pub use self::dismiss_pull_review_options::DismissPullReviewOptions;
pub mod edit_attachment_options;
pub use self::edit_attachment_options::EditAttachmentOptions;
pub mod edit_branch_protection_option;
pub use self::edit_branch_protection_option::EditBranchProtectionOption;
pub mod edit_deadline_option;
pub use self::edit_deadline_option::EditDeadlineOption;
pub mod edit_git_hook_option;
pub use self::edit_git_hook_option::EditGitHookOption;
pub mod edit_hook_option;
pub use self::edit_hook_option::EditHookOption;
pub mod edit_issue_comment_option;
pub use self::edit_issue_comment_option::EditIssueCommentOption;
pub mod edit_issue_option;
pub use self::edit_issue_option::EditIssueOption;
pub mod edit_label_option;
pub use self::edit_label_option::EditLabelOption;
pub mod edit_milestone_option;
pub use self::edit_milestone_option::EditMilestoneOption;
pub mod edit_org_option;
pub use self::edit_org_option::EditOrgOption;
pub mod edit_pull_request_option;
pub use self::edit_pull_request_option::EditPullRequestOption;
pub mod edit_reaction_option;
pub use self::edit_reaction_option::EditReactionOption;
pub mod edit_release_option;
pub use self::edit_release_option::EditReleaseOption;
pub mod edit_repo_option;
pub use self::edit_repo_option::EditRepoOption;
pub mod edit_team_option;
pub use self::edit_team_option::EditTeamOption;
pub mod edit_user_option;
pub use self::edit_user_option::EditUserOption;
pub mod email;
pub use self::email::Email;
pub mod external_tracker;
pub use self::external_tracker::ExternalTracker;
pub mod external_wiki;
pub use self::external_wiki::ExternalWiki;
pub mod file_commit_response;
pub use self::file_commit_response::FileCommitResponse;
pub mod file_delete_response;
pub use self::file_delete_response::FileDeleteResponse;
pub mod file_links_response;
pub use self::file_links_response::FileLinksResponse;
pub mod file_response;
pub use self::file_response::FileResponse;
pub mod general_api_settings;
pub use self::general_api_settings::GeneralApiSettings;
pub mod general_attachment_settings;
pub use self::general_attachment_settings::GeneralAttachmentSettings;
pub mod general_repo_settings;
pub use self::general_repo_settings::GeneralRepoSettings;
pub mod general_ui_settings;
pub use self::general_ui_settings::GeneralUiSettings;
pub mod generate_repo_option;
pub use self::generate_repo_option::GenerateRepoOption;
pub mod git_blob_response;
pub use self::git_blob_response::GitBlobResponse;
pub mod git_entry;
pub use self::git_entry::GitEntry;
pub mod git_hook;
pub use self::git_hook::GitHook;
pub mod git_object;
pub use self::git_object::GitObject;
pub mod git_tree_response;
pub use self::git_tree_response::GitTreeResponse;
pub mod gpg_key;
pub use self::gpg_key::GpgKey;
pub mod gpg_key_email;
pub use self::gpg_key_email::GpgKeyEmail;
pub mod hook;
pub use self::hook::Hook;
pub mod identity;
pub use self::identity::Identity;
pub mod internal_tracker;
pub use self::internal_tracker::InternalTracker;
pub mod issue;
pub use self::issue::Issue;
pub mod issue_deadline;
pub use self::issue_deadline::IssueDeadline;
pub mod issue_labels_option;
pub use self::issue_labels_option::IssueLabelsOption;
pub mod issue_template;
pub use self::issue_template::IssueTemplate;
pub mod label;
pub use self::label::Label;
pub mod markdown_option;
pub use self::markdown_option::MarkdownOption;
pub mod merge_pull_request_option;
pub use self::merge_pull_request_option::MergePullRequestOption;
pub mod migrate_repo_form;
pub use self::migrate_repo_form::MigrateRepoForm;
pub mod migrate_repo_options;
pub use self::migrate_repo_options::MigrateRepoOptions;
pub mod milestone;
pub use self::milestone::Milestone;
pub mod node_info;
pub use self::node_info::NodeInfo;
pub mod node_info_services;
pub use self::node_info_services::NodeInfoServices;
pub mod node_info_software;
pub use self::node_info_software::NodeInfoSoftware;
pub mod node_info_usage;
pub use self::node_info_usage::NodeInfoUsage;
pub mod node_info_usage_users;
pub use self::node_info_usage_users::NodeInfoUsageUsers;
pub mod note;
pub use self::note::Note;
pub mod notification_count;
pub use self::notification_count::NotificationCount;
pub mod notification_subject;
pub use self::notification_subject::NotificationSubject;
pub mod notification_thread;
pub use self::notification_thread::NotificationThread;
pub mod o_auth2_application;
pub use self::o_auth2_application::OAuth2Application;
pub mod organization;
pub use self::organization::Organization;
pub mod organization_permissions;
pub use self::organization_permissions::OrganizationPermissions;
pub mod package;
pub use self::package::Package;
pub mod package_file;
pub use self::package_file::PackageFile;
pub mod payload_commit;
pub use self::payload_commit::PayloadCommit;
pub mod payload_commit_verification;
pub use self::payload_commit_verification::PayloadCommitVerification;
pub mod payload_user;
pub use self::payload_user::PayloadUser;
pub mod permission;
pub use self::permission::Permission;
pub mod pr_branch_info;
pub use self::pr_branch_info::PrBranchInfo;
pub mod public_key;
pub use self::public_key::PublicKey;
pub mod pull_request;
pub use self::pull_request::PullRequest;
pub mod pull_request_meta;
pub use self::pull_request_meta::PullRequestMeta;
pub mod pull_review;
pub use self::pull_review::PullReview;
pub mod pull_review_comment;
pub use self::pull_review_comment::PullReviewComment;
pub mod pull_review_request_options;
pub use self::pull_review_request_options::PullReviewRequestOptions;
pub mod reaction;
pub use self::reaction::Reaction;
pub mod reference;
pub use self::reference::Reference;
pub mod release;
pub use self::release::Release;
pub mod repo_collaborator_permission;
pub use self::repo_collaborator_permission::RepoCollaboratorPermission;
pub mod repo_commit;
pub use self::repo_commit::RepoCommit;
pub mod repo_topic_options;
pub use self::repo_topic_options::RepoTopicOptions;
pub mod repo_transfer;
pub use self::repo_transfer::RepoTransfer;
pub mod repository;
pub use self::repository::Repository;
pub mod repository_meta;
pub use self::repository_meta::RepositoryMeta;
pub mod search_results;
pub use self::search_results::SearchResults;
pub mod server_version;
pub use self::server_version::ServerVersion;
pub mod stop_watch;
pub use self::stop_watch::StopWatch;
pub mod submit_pull_review_options;
pub use self::submit_pull_review_options::SubmitPullReviewOptions;
pub mod tag;
pub use self::tag::Tag;
pub mod team;
pub use self::team::Team;
pub mod team_search_200_response;
pub use self::team_search_200_response::TeamSearch200Response;
pub mod timeline_comment;
pub use self::timeline_comment::TimelineComment;
pub mod topic_name;
pub use self::topic_name::TopicName;
pub mod topic_response;
pub use self::topic_response::TopicResponse;
pub mod tracked_time;
pub use self::tracked_time::TrackedTime;
pub mod transfer_repo_option;
pub use self::transfer_repo_option::TransferRepoOption;
pub mod update_file_options;
pub use self::update_file_options::UpdateFileOptions;
pub mod user;
pub use self::user::User;
pub mod user_heatmap_data;
pub use self::user_heatmap_data::UserHeatmapData;
pub mod user_search_200_response;
pub use self::user_search_200_response::UserSearch200Response;
pub mod user_settings;
pub use self::user_settings::UserSettings;
pub mod user_settings_options;
pub use self::user_settings_options::UserSettingsOptions;
pub mod watch_info;
pub use self::watch_info::WatchInfo;
pub mod wiki_commit;
pub use self::wiki_commit::WikiCommit;
pub mod wiki_commit_list;
pub use self::wiki_commit_list::WikiCommitList;
pub mod wiki_page;
pub use self::wiki_page::WikiPage;
pub mod wiki_page_meta_data;
pub use self::wiki_page_meta_data::WikiPageMetaData;

View File

@@ -0,0 +1,48 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// NodeInfo : NodeInfo contains standardized way of exposing metadata about a server running one of the distributed social networks
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct NodeInfo {
#[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
pub metadata: Option<serde_json::Value>,
#[serde(rename = "openRegistrations", skip_serializing_if = "Option::is_none")]
pub open_registrations: Option<bool>,
#[serde(rename = "protocols", skip_serializing_if = "Option::is_none")]
pub protocols: Option<Vec<String>>,
#[serde(rename = "services", skip_serializing_if = "Option::is_none")]
pub services: Option<Box<crate::models::NodeInfoServices>>,
#[serde(rename = "software", skip_serializing_if = "Option::is_none")]
pub software: Option<Box<crate::models::NodeInfoSoftware>>,
#[serde(rename = "usage", skip_serializing_if = "Option::is_none")]
pub usage: Option<Box<crate::models::NodeInfoUsage>>,
#[serde(rename = "version", skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
impl NodeInfo {
/// NodeInfo contains standardized way of exposing metadata about a server running one of the distributed social networks
pub fn new() -> NodeInfo {
NodeInfo {
metadata: None,
open_registrations: None,
protocols: None,
services: None,
software: None,
usage: None,
version: None,
}
}
}

View File

@@ -0,0 +1,33 @@
/*
* Gitea API.
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.17.3
*
* Generated by: https://openapi-generator.tech
*/
/// NodeInfoServices : NodeInfoServices contains the third party sites this server can connect to via their application API
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct NodeInfoServices {
#[serde(rename = "inbound", skip_serializing_if = "Option::is_none")]
pub inbound: Option<Vec<String>>,
#[serde(rename = "outbound", skip_serializing_if = "Option::is_none")]
pub outbound: Option<Vec<String>>,
}
impl NodeInfoServices {
/// NodeInfoServices contains the third party sites this server can connect to via their application API
pub fn new() -> NodeInfoServices {
NodeInfoServices {
inbound: None,
outbound: None,
}
}
}

Some files were not shown because too many files have changed in this diff Show More