#[non_exhaustive]pub struct VulnerabilityNote {
pub cvss_score: f32,
pub severity: Severity,
pub details: Vec<Detail>,
pub cvss_v3: Option<CVSSv3>,
pub windows_details: Vec<WindowsDetail>,
pub source_update_time: Option<Timestamp>,
pub cvss_version: CVSSVersion,
pub cvss_v2: Option<Cvss>,
/* private fields */
}Expand description
A security vulnerability that can be found in resources.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.cvss_score: f32The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10 where 0 indicates low severity and 10 indicates high severity.
severity: SeverityThe note provider assigned severity of this vulnerability.
details: Vec<Detail>Details of all known distros and packages affected by this vulnerability.
cvss_v3: Option<CVSSv3>The full description of the CVSSv3 for this vulnerability.
windows_details: Vec<WindowsDetail>Windows details get their own format because the information format and model don’t match a normal detail. Specifically Windows updates are done as patches, thus Windows vulnerabilities really are a missing package, rather than a package being at an incorrect version.
source_update_time: Option<Timestamp>The time this information was last changed at the source. This is an upstream timestamp from the underlying information source - e.g. Ubuntu security tracker.
cvss_version: CVSSVersionCVSS version used to populate cvss_score and severity.
cvss_v2: Option<Cvss>The full description of the v2 CVSS for this vulnerability.
Implementations§
Source§impl VulnerabilityNote
impl VulnerabilityNote
pub fn new() -> Self
Sourcepub fn set_cvss_score<T: Into<f32>>(self, v: T) -> Self
pub fn set_cvss_score<T: Into<f32>>(self, v: T) -> Self
Sourcepub fn set_severity<T: Into<Severity>>(self, v: T) -> Self
pub fn set_severity<T: Into<Severity>>(self, v: T) -> Self
Sourcepub fn set_details<T, V>(self, v: T) -> Self
pub fn set_details<T, V>(self, v: T) -> Self
Sourcepub fn set_cvss_v3<T>(self, v: T) -> Self
pub fn set_cvss_v3<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_cvss_v3<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_cvss_v3<T>(self, v: Option<T>) -> Self
Sourcepub fn set_windows_details<T, V>(self, v: T) -> Self
pub fn set_windows_details<T, V>(self, v: T) -> Self
Sets the value of windows_details.
§Example
use google_cloud_grafeas_v1::model::vulnerability_note::WindowsDetail;
let x = VulnerabilityNote::new()
.set_windows_details([
WindowsDetail::default()/* use setters */,
WindowsDetail::default()/* use (different) setters */,
]);Sourcepub fn set_source_update_time<T>(self, v: T) -> Self
pub fn set_source_update_time<T>(self, v: T) -> Self
Sets the value of source_update_time.
§Example
use wkt::Timestamp;
let x = VulnerabilityNote::new().set_source_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_source_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_source_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of source_update_time.
§Example
use wkt::Timestamp;
let x = VulnerabilityNote::new().set_or_clear_source_update_time(Some(Timestamp::default()/* use setters */));
let x = VulnerabilityNote::new().set_or_clear_source_update_time(None::<Timestamp>);Sourcepub fn set_cvss_version<T: Into<CVSSVersion>>(self, v: T) -> Self
pub fn set_cvss_version<T: Into<CVSSVersion>>(self, v: T) -> Self
Sets the value of cvss_version.
§Example
use google_cloud_grafeas_v1::model::CVSSVersion;
let x0 = VulnerabilityNote::new().set_cvss_version(CVSSVersion::CvssVersion2);
let x1 = VulnerabilityNote::new().set_cvss_version(CVSSVersion::CvssVersion3);Sourcepub fn set_cvss_v2<T>(self, v: T) -> Self
pub fn set_cvss_v2<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_cvss_v2<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_cvss_v2<T>(self, v: Option<T>) -> Self
Trait Implementations§
Source§impl Clone for VulnerabilityNote
impl Clone for VulnerabilityNote
Source§fn clone(&self) -> VulnerabilityNote
fn clone(&self) -> VulnerabilityNote
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more