#[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
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AttackExposure
impl Debug for AttackExposure
Source§impl Default for AttackExposure
impl Default for AttackExposure
Source§fn default() -> AttackExposure
fn default() -> AttackExposure
Source§impl Message for AttackExposure
impl Message for AttackExposure
Source§impl PartialEq for AttackExposure
impl PartialEq for AttackExposure
impl StructuralPartialEq for AttackExposure
Auto Trait Implementations§
impl Freeze for AttackExposure
impl RefUnwindSafe for AttackExposure
impl Send for AttackExposure
impl Sync for AttackExposure
impl Unpin for AttackExposure
impl UnsafeUnpin for AttackExposure
impl UnwindSafe for AttackExposure
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request