openapi_github/models/
repository_advisory_create_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 RepositoryAdvisoryCreateVulnerabilitiesInner {
16    #[serde(rename = "package")]
17    pub package: Box<models::RepositoryAdvisoryCreateVulnerabilitiesInnerPackage>,
18    /// The range of the package versions affected by the vulnerability.
19    #[serde(rename = "vulnerable_version_range", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
20    pub vulnerable_version_range: Option<Option<String>>,
21    /// The package version(s) that resolve the vulnerability.
22    #[serde(rename = "patched_versions", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
23    pub patched_versions: Option<Option<String>>,
24    /// The functions in the package that are affected.
25    #[serde(rename = "vulnerable_functions", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
26    pub vulnerable_functions: Option<Option<Vec<String>>>,
27}
28
29impl RepositoryAdvisoryCreateVulnerabilitiesInner {
30    pub fn new(package: models::RepositoryAdvisoryCreateVulnerabilitiesInnerPackage) -> RepositoryAdvisoryCreateVulnerabilitiesInner {
31        RepositoryAdvisoryCreateVulnerabilitiesInner {
32            package: Box::new(package),
33            vulnerable_version_range: None,
34            patched_versions: None,
35            vulnerable_functions: None,
36        }
37    }
38}
39