Struct google_api_proto::google::cloud::recommender::v1beta1::Insight
source · pub struct Insight {
pub name: String,
pub description: String,
pub target_resources: Vec<String>,
pub insight_subtype: String,
pub content: Option<Struct>,
pub last_refresh_time: Option<Timestamp>,
pub observation_period: Option<Duration>,
pub state_info: Option<InsightStateInfo>,
pub category: i32,
pub severity: i32,
pub etag: String,
pub associated_recommendations: Vec<RecommendationReference>,
}
Expand description
An insight along with the information used to derive the insight. The insight may have associated recommendations as well.
Fields§
§name: String
Name of the insight.
description: String
Free-form human readable summary in English. The maximum length is 500 characters.
target_resources: Vec<String>
Fully qualified resource names that this insight is targeting.
insight_subtype: String
Insight subtype. Insight content schema will be stable for a given subtype.
content: Option<Struct>
A struct of custom fields to explain the insight. Example: “grantedPermissionsCount”: “1000”
last_refresh_time: Option<Timestamp>
Timestamp of the latest data used to generate the insight.
observation_period: Option<Duration>
Observation period that led to the insight. The source data used to generate the insight ends at last_refresh_time and begins at (last_refresh_time - observation_period).
state_info: Option<InsightStateInfo>
Information state and metadata.
category: i32
Category being targeted by the insight.
severity: i32
Insight’s severity.
etag: String
Fingerprint of the Insight. Provides optimistic locking when updating states.
associated_recommendations: Vec<RecommendationReference>
Recommendations derived from this insight.
Implementations§
source§impl Insight
impl Insight
sourcepub fn category(&self) -> Category
pub fn category(&self) -> Category
Returns the enum value of category
, or the default if the field is set to an invalid enum value.
sourcepub fn set_category(&mut self, value: Category)
pub fn set_category(&mut self, value: Category)
Sets category
to the provided enum value.
sourcepub fn severity(&self) -> Severity
pub fn severity(&self) -> Severity
Returns the enum value of severity
, or the default if the field is set to an invalid enum value.
sourcepub fn set_severity(&mut self, value: Severity)
pub fn set_severity(&mut self, value: Severity)
Sets severity
to the provided enum value.
Trait Implementations§
source§impl Message for Insight
impl Message for Insight
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for Insight
impl PartialEq for Insight
impl StructuralPartialEq for Insight
Auto Trait Implementations§
impl Freeze for Insight
impl RefUnwindSafe for Insight
impl Send for Insight
impl Sync for Insight
impl Unpin for Insight
impl UnwindSafe for Insight
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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