#[non_exhaustive]pub struct NotificationMessage {
pub notification_config_name: String,
pub resource: Option<Resource>,
pub event: Option<Event>,
/* private fields */
}Expand description
Cloud SCC’s Notification
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.notification_config_name: StringName of the notification config that generated current notification.
resource: Option<Resource>The Cloud resource tied to this notification’s Finding.
event: Option<Event>Notification Event.
Implementations§
Source§impl NotificationMessage
impl NotificationMessage
pub fn new() -> Self
Sourcepub fn set_notification_config_name<T: Into<String>>(self, v: T) -> Self
pub fn set_notification_config_name<T: Into<String>>(self, v: T) -> Self
Sets the value of notification_config_name.
§Example
ⓘ
let x = NotificationMessage::new().set_notification_config_name("example");Sourcepub fn set_resource<T>(self, v: T) -> Self
pub fn set_resource<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_resource<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_resource<T>(self, v: Option<T>) -> Self
Sourcepub fn set_event<T: Into<Option<Event>>>(self, v: T) -> Self
pub fn set_event<T: Into<Option<Event>>>(self, v: T) -> Self
Sets the value of event.
Note that all the setters affecting event are mutually
exclusive.
§Example
ⓘ
use google_cloud_securitycenter_v2::model::Finding;
let x = NotificationMessage::new().set_event(Some(
google_cloud_securitycenter_v2::model::notification_message::Event::Finding(Finding::default().into())));Sourcepub fn finding(&self) -> Option<&Box<Finding>>
pub fn finding(&self) -> Option<&Box<Finding>>
The value of event
if it holds a Finding, None if the field is not set or
holds a different branch.
Sourcepub fn set_finding<T: Into<Box<Finding>>>(self, v: T) -> Self
pub fn set_finding<T: Into<Box<Finding>>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for NotificationMessage
impl Clone for NotificationMessage
Source§fn clone(&self) -> NotificationMessage
fn clone(&self) -> NotificationMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NotificationMessage
impl Debug for NotificationMessage
Source§impl Default for NotificationMessage
impl Default for NotificationMessage
Source§fn default() -> NotificationMessage
fn default() -> NotificationMessage
Returns the “default value” for a type. Read more
Source§impl Message for NotificationMessage
impl Message for NotificationMessage
Source§impl PartialEq for NotificationMessage
impl PartialEq for NotificationMessage
impl StructuralPartialEq for NotificationMessage
Auto Trait Implementations§
impl Freeze for NotificationMessage
impl RefUnwindSafe for NotificationMessage
impl Send for NotificationMessage
impl Sync for NotificationMessage
impl Unpin for NotificationMessage
impl UnwindSafe for NotificationMessage
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
Mutably borrows from an owned value. Read more