openapi_github/models/dependabot_alert_security_advisory_cvss.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/// DependabotAlertSecurityAdvisoryCvss : Details for the advisory pertaining to the Common Vulnerability Scoring System.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct DependabotAlertSecurityAdvisoryCvss {
17 /// The overall CVSS score of the advisory.
18 #[serde(rename = "score")]
19 pub score: f64,
20 /// The full CVSS vector string for the advisory.
21 #[serde(rename = "vector_string", deserialize_with = "Option::deserialize")]
22 pub vector_string: Option<String>,
23}
24
25impl DependabotAlertSecurityAdvisoryCvss {
26 /// Details for the advisory pertaining to the Common Vulnerability Scoring System.
27 pub fn new(score: f64, vector_string: Option<String>) -> DependabotAlertSecurityAdvisoryCvss {
28 DependabotAlertSecurityAdvisoryCvss {
29 score,
30 vector_string,
31 }
32 }
33}
34