use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WebhooksSecurityAdvisory {
#[serde(rename = "cvss")]
pub cvss: Box<models::WebhooksSecurityAdvisoryCvss>,
#[serde(rename = "cwes")]
pub cwes: Vec<models::WebhooksSecurityAdvisoryCwesInner>,
#[serde(rename = "description")]
pub description: String,
#[serde(rename = "ghsa_id")]
pub ghsa_id: String,
#[serde(rename = "identifiers")]
pub identifiers: Vec<models::WebhooksSecurityAdvisoryIdentifiersInner>,
#[serde(rename = "published_at")]
pub published_at: String,
#[serde(rename = "references")]
pub references: Vec<models::WebhooksSecurityAdvisoryReferencesInner>,
#[serde(rename = "severity")]
pub severity: String,
#[serde(rename = "summary")]
pub summary: String,
#[serde(rename = "updated_at")]
pub updated_at: String,
#[serde(rename = "vulnerabilities")]
pub vulnerabilities: Vec<models::WebhooksSecurityAdvisoryVulnerabilitiesInner>,
#[serde(rename = "withdrawn_at", deserialize_with = "Option::deserialize")]
pub withdrawn_at: Option<String>,
}
impl WebhooksSecurityAdvisory {
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 {
WebhooksSecurityAdvisory {
cvss: Box::new(cvss),
cwes,
description,
ghsa_id,
identifiers,
published_at,
references,
severity,
summary,
updated_at,
vulnerabilities,
withdrawn_at,
}
}
}