openapi_github/models/
webhook_ping.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct WebhookPing {
16    #[serde(rename = "hook", skip_serializing_if = "Option::is_none")]
17    pub hook: Option<Box<models::Webhook>>,
18    /// The ID of the webhook that triggered the ping.
19    #[serde(rename = "hook_id", skip_serializing_if = "Option::is_none")]
20    pub hook_id: Option<i32>,
21    #[serde(rename = "organization", skip_serializing_if = "Option::is_none")]
22    pub organization: Option<Box<models::OrganizationSimpleWebhooks>>,
23    #[serde(rename = "repository", skip_serializing_if = "Option::is_none")]
24    pub repository: Option<Box<models::RepositoryWebhooks>>,
25    #[serde(rename = "sender", skip_serializing_if = "Option::is_none")]
26    pub sender: Option<Box<models::SimpleUserWebhooks>>,
27    /// Random string of GitHub zen.
28    #[serde(rename = "zen", skip_serializing_if = "Option::is_none")]
29    pub zen: Option<String>,
30}
31
32impl WebhookPing {
33    pub fn new() -> WebhookPing {
34        WebhookPing {
35            hook: None,
36            hook_id: None,
37            organization: None,
38            repository: None,
39            sender: None,
40            zen: None,
41        }
42    }
43}
44