openapi_github/models/
org_hook.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/// OrgHook : Org Hook
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct OrgHook {
17    #[serde(rename = "id")]
18    pub id: i32,
19    #[serde(rename = "url")]
20    pub url: String,
21    #[serde(rename = "ping_url")]
22    pub ping_url: String,
23    #[serde(rename = "deliveries_url", skip_serializing_if = "Option::is_none")]
24    pub deliveries_url: Option<String>,
25    #[serde(rename = "name")]
26    pub name: String,
27    #[serde(rename = "events")]
28    pub events: Vec<String>,
29    #[serde(rename = "active")]
30    pub active: bool,
31    #[serde(rename = "config")]
32    pub config: Box<models::OrgHookConfig>,
33    #[serde(rename = "updated_at")]
34    pub updated_at: String,
35    #[serde(rename = "created_at")]
36    pub created_at: String,
37    #[serde(rename = "type")]
38    pub r#type: String,
39}
40
41impl OrgHook {
42    /// Org Hook
43    pub fn new(id: i32, url: String, ping_url: String, name: String, events: Vec<String>, active: bool, config: models::OrgHookConfig, updated_at: String, created_at: String, r#type: String) -> OrgHook {
44        OrgHook {
45            id,
46            url,
47            ping_url,
48            deliveries_url: None,
49            name,
50            events,
51            active,
52            config: Box::new(config),
53            updated_at,
54            created_at,
55            r#type,
56        }
57    }
58}
59