openapi_github/models/
webhook_fork.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/// WebhookFork : A user forks a repository.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct WebhookFork {
17    #[serde(rename = "enterprise", skip_serializing_if = "Option::is_none")]
18    pub enterprise: Option<Box<models::EnterpriseWebhooks>>,
19    #[serde(rename = "forkee")]
20    pub forkee: Box<models::WebhookForkForkee>,
21    #[serde(rename = "installation", skip_serializing_if = "Option::is_none")]
22    pub installation: Option<Box<models::SimpleInstallation>>,
23    #[serde(rename = "organization", skip_serializing_if = "Option::is_none")]
24    pub organization: Option<Box<models::OrganizationSimpleWebhooks>>,
25    #[serde(rename = "repository")]
26    pub repository: Box<models::RepositoryWebhooks>,
27    #[serde(rename = "sender")]
28    pub sender: Box<models::SimpleUserWebhooks>,
29}
30
31impl WebhookFork {
32    /// A user forks a repository.
33    pub fn new(forkee: models::WebhookForkForkee, repository: models::RepositoryWebhooks, sender: models::SimpleUserWebhooks) -> WebhookFork {
34        WebhookFork {
35            enterprise: None,
36            forkee: Box::new(forkee),
37            installation: None,
38            organization: None,
39            repository: Box::new(repository),
40            sender: Box::new(sender),
41        }
42    }
43}
44