openapi_github/models/
webhook_security_and_analysis.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct WebhookSecurityAndAnalysis {
16 #[serde(rename = "changes")]
17 pub changes: Box<models::WebhookSecurityAndAnalysisChanges>,
18 #[serde(rename = "enterprise", skip_serializing_if = "Option::is_none")]
19 pub enterprise: Option<Box<models::EnterpriseWebhooks>>,
20 #[serde(rename = "installation", skip_serializing_if = "Option::is_none")]
21 pub installation: Option<Box<models::SimpleInstallation>>,
22 #[serde(rename = "organization", skip_serializing_if = "Option::is_none")]
23 pub organization: Option<Box<models::OrganizationSimpleWebhooks>>,
24 #[serde(rename = "repository")]
25 pub repository: Box<models::FullRepository>,
26 #[serde(rename = "sender", skip_serializing_if = "Option::is_none")]
27 pub sender: Option<Box<models::SimpleUserWebhooks>>,
28}
29
30impl WebhookSecurityAndAnalysis {
31 pub fn new(changes: models::WebhookSecurityAndAnalysisChanges, repository: models::FullRepository) -> WebhookSecurityAndAnalysis {
32 WebhookSecurityAndAnalysis {
33 changes: Box::new(changes),
34 enterprise: None,
35 installation: None,
36 organization: None,
37 repository: Box::new(repository),
38 sender: None,
39 }
40 }
41}
42