gitea_rs/models/
hook.rs

1/*
2 * Gitea API.
3 *
4 * This documentation describes the Gitea API.
5 *
6 * The version of the OpenAPI document: 1.19.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// Hook : Hook a hook is a web hook when one repository changed
12
13
14
15#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
16pub struct Hook {
17    #[serde(rename = "active", skip_serializing_if = "Option::is_none")]
18    pub active: Option<bool>,
19    #[serde(rename = "authorization_header", skip_serializing_if = "Option::is_none")]
20    pub authorization_header: Option<String>,
21    #[serde(rename = "config", skip_serializing_if = "Option::is_none")]
22    pub config: Option<::std::collections::HashMap<String, String>>,
23    #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
24    pub created_at: Option<String>,
25    #[serde(rename = "events", skip_serializing_if = "Option::is_none")]
26    pub events: Option<Vec<String>>,
27    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
28    pub id: Option<i64>,
29    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
30    pub r#type: Option<String>,
31    #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
32    pub updated_at: Option<String>,
33}
34
35impl Hook {
36    /// Hook a hook is a web hook when one repository changed
37    pub fn new() -> Hook {
38        Hook {
39            active: None,
40            authorization_header: None,
41            config: None,
42            created_at: None,
43            events: None,
44            id: None,
45            r#type: None,
46            updated_at: None,
47        }
48    }
49}
50
51