#[non_exhaustive]pub struct AttackExposure {
pub score: f64,
pub latest_calculation_time: Option<Timestamp>,
pub attack_exposure_result: String,
pub state: State,
pub exposed_high_value_resources_count: i32,
pub exposed_medium_value_resources_count: i32,
pub exposed_low_value_resources_count: i32,
/* private fields */
}Expand description
An attack exposure contains the results of an attack path simulation run.
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.score: f64A number between 0 (inclusive) and infinity that represents how important this finding is to remediate. The higher the score, the more important it is to remediate.
latest_calculation_time: Option<Timestamp>The most recent time the attack exposure was updated on this finding.
attack_exposure_result: StringThe resource name of the attack path simulation result that contains the
details regarding this attack exposure score.
Example: organizations/123/simulations/456/attackExposureResults/789
state: StateOutput only. What state this AttackExposure is in. This captures whether or not an attack exposure has been calculated or not.
exposed_high_value_resources_count: i32The number of high value resources that are exposed as a result of this finding.
exposed_medium_value_resources_count: i32The number of medium value resources that are exposed as a result of this finding.
exposed_low_value_resources_count: i32The number of high value resources that are exposed as a result of this finding.
Implementations§
Source§impl AttackExposure
impl AttackExposure
pub fn new() -> Self
Sourcepub fn set_latest_calculation_time<T>(self, v: T) -> Self
pub fn set_latest_calculation_time<T>(self, v: T) -> Self
Sets the value of latest_calculation_time.
§Example
use wkt::Timestamp;
let x = AttackExposure::new().set_latest_calculation_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_latest_calculation_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_latest_calculation_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of latest_calculation_time.
§Example
use wkt::Timestamp;
let x = AttackExposure::new().set_or_clear_latest_calculation_time(Some(Timestamp::default()/* use setters */));
let x = AttackExposure::new().set_or_clear_latest_calculation_time(None::<Timestamp>);Sourcepub fn set_attack_exposure_result<T: Into<String>>(self, v: T) -> Self
pub fn set_attack_exposure_result<T: Into<String>>(self, v: T) -> Self
Sets the value of attack_exposure_result.
§Example
let x = AttackExposure::new().set_attack_exposure_result("example");Sourcepub fn set_exposed_high_value_resources_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_exposed_high_value_resources_count<T: Into<i32>>(self, v: T) -> Self
Sets the value of exposed_high_value_resources_count.
§Example
let x = AttackExposure::new().set_exposed_high_value_resources_count(42);Sourcepub fn set_exposed_medium_value_resources_count<T: Into<i32>>(
self,
v: T,
) -> Self
pub fn set_exposed_medium_value_resources_count<T: Into<i32>>( self, v: T, ) -> Self
Sets the value of exposed_medium_value_resources_count.
§Example
let x = AttackExposure::new().set_exposed_medium_value_resources_count(42);Sourcepub fn set_exposed_low_value_resources_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_exposed_low_value_resources_count<T: Into<i32>>(self, v: T) -> Self
Sets the value of exposed_low_value_resources_count.
§Example
let x = AttackExposure::new().set_exposed_low_value_resources_count(42);Trait Implementations§
Source§impl Clone for AttackExposure
impl Clone for AttackExposure
Source§fn clone(&self) -> AttackExposure
fn clone(&self) -> AttackExposure
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more