summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCyborus <cyborus@cyborus.xyz>2024-10-23 20:22:24 +0200
committerCyborus <cyborus@cyborus.xyz>2024-10-23 20:22:24 +0200
commit194f05da65c73882c4c9628c3954b768ac816e65 (patch)
tree22556bb2efd8420ae45f261d040bb8426951dd46 /src
parentfix: add missing `"format": "url"` fields (diff)
downloadforgejo-api-194f05da65c73882c4c9628c3954b768ac816e65.tar.xz
forgejo-api-194f05da65c73882c4c9628c3954b768ac816e65.zip
feat: make quota subjects an enum
Diffstat (limited to 'src')
-rw-r--r--src/generated/structs.rs33
1 files changed, 32 insertions, 1 deletions
diff --git a/src/generated/structs.rs b/src/generated/structs.rs
index 1687c0c..a65f45d 100644
--- a/src/generated/structs.rs
+++ b/src/generated/structs.rs
@@ -807,9 +807,40 @@ pub struct CreateQuotaRuleOptions {
/// Name of the rule to create
pub name: Option<String>,
/// The subjects affected by the rule
- pub subjects: Option<Vec<String>>,
+ pub subjects: Option<Vec<CreateQuotaRuleOptionsSubjects>>,
}
+#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
+pub enum CreateQuotaRuleOptionsSubjects {
+ #[serde(rename = "none")]
+ None,
+ #[serde(rename = "size:all")]
+ SizeAll,
+ #[serde(rename = "size:repos:all")]
+ SizeReposAll,
+ #[serde(rename = "size:repos:public")]
+ SizeReposPublic,
+ #[serde(rename = "size:repos:private")]
+ SizeReposPrivate,
+ #[serde(rename = "size:git:all")]
+ SizeGitAll,
+ #[serde(rename = "size:git:lfs")]
+ SizeGitLfs,
+ #[serde(rename = "size:assets:all")]
+ SizeAssetsAll,
+ #[serde(rename = "size:assets:attachments:all")]
+ SizeAssetsAttachmentsAll,
+ #[serde(rename = "size:assets:attachments:issues")]
+ SizeAssetsAttachmentsIssues,
+ #[serde(rename = "size:assets:attachments:releases")]
+ SizeAssetsAttachmentsReleases,
+ #[serde(rename = "size:assets:artifacts")]
+ SizeAssetsArtifacts,
+ #[serde(rename = "size:assets:packages:all")]
+ SizeAssetsPackagesAll,
+ #[serde(rename = "size:assets:wiki")]
+ SizeAssetsWiki,
+}
/// CreateReleaseOption options when creating a release
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
pub struct CreateReleaseOption {