openapi_github/models/
webhooks_security_advisory.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct WebhooksSecurityAdvisory {
17 #[serde(rename = "cvss")]
18 pub cvss: Box<models::WebhooksSecurityAdvisoryCvss>,
19 #[serde(rename = "cwes")]
20 pub cwes: Vec<models::WebhooksSecurityAdvisoryCwesInner>,
21 #[serde(rename = "description")]
22 pub description: String,
23 #[serde(rename = "ghsa_id")]
24 pub ghsa_id: String,
25 #[serde(rename = "identifiers")]
26 pub identifiers: Vec<models::WebhooksSecurityAdvisoryIdentifiersInner>,
27 #[serde(rename = "published_at")]
28 pub published_at: String,
29 #[serde(rename = "references")]
30 pub references: Vec<models::WebhooksSecurityAdvisoryReferencesInner>,
31 #[serde(rename = "severity")]
32 pub severity: String,
33 #[serde(rename = "summary")]
34 pub summary: String,
35 #[serde(rename = "updated_at")]
36 pub updated_at: String,
37 #[serde(rename = "vulnerabilities")]
38 pub vulnerabilities: Vec<models::WebhooksSecurityAdvisoryVulnerabilitiesInner>,
39 #[serde(rename = "withdrawn_at", deserialize_with = "Option::deserialize")]
40 pub withdrawn_at: Option<String>,
41}
42
43impl WebhooksSecurityAdvisory {
44 pub fn new(cvss: models::WebhooksSecurityAdvisoryCvss, cwes: Vec<models::WebhooksSecurityAdvisoryCwesInner>, description: String, ghsa_id: String, identifiers: Vec<models::WebhooksSecurityAdvisoryIdentifiersInner>, published_at: String, references: Vec<models::WebhooksSecurityAdvisoryReferencesInner>, severity: String, summary: String, updated_at: String, vulnerabilities: Vec<models::WebhooksSecurityAdvisoryVulnerabilitiesInner>, withdrawn_at: Option<String>) -> WebhooksSecurityAdvisory {
46 WebhooksSecurityAdvisory {
47 cvss: Box::new(cvss),
48 cwes,
49 description,
50 ghsa_id,
51 identifiers,
52 published_at,
53 references,
54 severity,
55 summary,
56 updated_at,
57 vulnerabilities,
58 withdrawn_at,
59 }
60 }
61}
62