Skip to main content

gitea_client/models/
tag_protection.rs

1/*
2 * Gitea API
3 *
4 * This documentation describes the Gitea API.
5 *
6 * The version of the OpenAPI document: 1.25.2
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// TagProtection : TagProtection represents a tag protection
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct TagProtection {
17    #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
18    pub created_at: Option<String>,
19    /// The unique identifier of the tag protection
20    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
21    pub id: Option<i64>,
22    /// The pattern to match tag names for protection
23    #[serde(rename = "name_pattern", skip_serializing_if = "Option::is_none")]
24    pub name_pattern: Option<String>,
25    #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
26    pub updated_at: Option<String>,
27    /// List of team names allowed to create/delete protected tags
28    #[serde(rename = "whitelist_teams", skip_serializing_if = "Option::is_none")]
29    pub whitelist_teams: Option<Vec<String>>,
30    /// List of usernames allowed to create/delete protected tags
31    #[serde(rename = "whitelist_usernames", skip_serializing_if = "Option::is_none")]
32    pub whitelist_usernames: Option<Vec<String>>,
33}
34
35impl TagProtection {
36    /// TagProtection represents a tag protection
37    pub fn new() -> TagProtection {
38        TagProtection {
39            created_at: None,
40            id: None,
41            name_pattern: None,
42            updated_at: None,
43            whitelist_teams: None,
44            whitelist_usernames: None,
45        }
46    }
47}
48