openapi_github/models/
webhooks_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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct WebhooksSecurityAdvisoryCvss {
16    #[serde(rename = "score")]
17    pub score: f64,
18    #[serde(rename = "vector_string", deserialize_with = "Option::deserialize")]
19    pub vector_string: Option<String>,
20}
21
22impl WebhooksSecurityAdvisoryCvss {
23    pub fn new(score: f64, vector_string: Option<String>) -> WebhooksSecurityAdvisoryCvss {
24        WebhooksSecurityAdvisoryCvss {
25            score,
26            vector_string,
27        }
28    }
29}
30