openapi_github/models/
tag_protection.rs

1/*
2 * GitHub's official OpenAPI spec + Octokit extension
3 *
4 * OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs
5 *
6 * The version of the OpenAPI document: 16.6.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// TagProtection : Tag protection
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct TagProtection {
17    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
18    pub id: Option<i32>,
19    #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
20    pub created_at: Option<String>,
21    #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
22    pub updated_at: Option<String>,
23    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
24    pub enabled: Option<bool>,
25    #[serde(rename = "pattern")]
26    pub pattern: String,
27}
28
29impl TagProtection {
30    /// Tag protection
31    pub fn new(pattern: String) -> TagProtection {
32        TagProtection {
33            id: None,
34            created_at: None,
35            updated_at: None,
36            enabled: None,
37            pattern,
38        }
39    }
40}
41