openapi_github/models/
webhook_gollum.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 WebhookGollum {
16    #[serde(rename = "enterprise", skip_serializing_if = "Option::is_none")]
17    pub enterprise: Option<Box<models::EnterpriseWebhooks>>,
18    #[serde(rename = "installation", skip_serializing_if = "Option::is_none")]
19    pub installation: Option<Box<models::SimpleInstallation>>,
20    #[serde(rename = "organization", skip_serializing_if = "Option::is_none")]
21    pub organization: Option<Box<models::OrganizationSimpleWebhooks>>,
22    /// The pages that were updated.
23    #[serde(rename = "pages")]
24    pub pages: Vec<models::WebhookGollumPagesInner>,
25    #[serde(rename = "repository")]
26    pub repository: Box<models::RepositoryWebhooks>,
27    #[serde(rename = "sender")]
28    pub sender: Box<models::SimpleUserWebhooks>,
29}
30
31impl WebhookGollum {
32    pub fn new(pages: Vec<models::WebhookGollumPagesInner>, repository: models::RepositoryWebhooks, sender: models::SimpleUserWebhooks) -> WebhookGollum {
33        WebhookGollum {
34            enterprise: None,
35            installation: None,
36            organization: None,
37            pages,
38            repository: Box::new(repository),
39            sender: Box::new(sender),
40        }
41    }
42}
43