openapi_github/models/
webhooks_security_advisory_vulnerabilities_inner.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 WebhooksSecurityAdvisoryVulnerabilitiesInner {
16    #[serde(rename = "first_patched_version", deserialize_with = "Option::deserialize")]
17    pub first_patched_version: Option<Box<models::WebhooksSecurityAdvisoryVulnerabilitiesInnerFirstPatchedVersion>>,
18    #[serde(rename = "package")]
19    pub package: Box<models::WebhooksSecurityAdvisoryVulnerabilitiesInnerPackage>,
20    #[serde(rename = "severity")]
21    pub severity: String,
22    #[serde(rename = "vulnerable_version_range")]
23    pub vulnerable_version_range: String,
24}
25
26impl WebhooksSecurityAdvisoryVulnerabilitiesInner {
27    pub fn new(first_patched_version: Option<models::WebhooksSecurityAdvisoryVulnerabilitiesInnerFirstPatchedVersion>, package: models::WebhooksSecurityAdvisoryVulnerabilitiesInnerPackage, severity: String, vulnerable_version_range: String) -> WebhooksSecurityAdvisoryVulnerabilitiesInner {
28        WebhooksSecurityAdvisoryVulnerabilitiesInner {
29            first_patched_version: first_patched_version.map(Box::new),
30            package: Box::new(package),
31            severity,
32            vulnerable_version_range,
33        }
34    }
35}
36