#[non_exhaustive]pub struct NotificationConfig {
pub name: String,
pub description: String,
pub pubsub_topic: String,
pub service_account: String,
pub update_time: Option<Timestamp>,
pub notify_config: Option<NotifyConfig>,
/* private fields */
}Expand description
Cloud Security Command Center (Cloud SCC) notification configs.
A notification config is a Cloud SCC resource that contains the configuration to send notifications for create/update events of findings, assets and etc.
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.name: StringIdentifier. The relative resource name of this notification config. See:
https://cloud.google.com/apis/design/resource_names#relative_resource_name
The following list shows some examples:
+
organizations/{organization_id}/locations/{location_id}/notificationConfigs/notify_public_bucket
+
folders/{folder_id}/locations/{location_id}/notificationConfigs/notify_public_bucket
+
projects/{project_id}/locations/{location_id}/notificationConfigs/notify_public_bucket
description: StringThe description of the notification config (max of 1024 characters).
pubsub_topic: StringThe Pub/Sub topic to send notifications to. Its format is “projects/[project_id]/topics/[topic]”.
service_account: StringOutput only. The service account that needs “pubsub.topics.publish” permission to publish to the Pub/Sub topic.
update_time: Option<Timestamp>Output only. The timestamp of when the notification config was last updated.
notify_config: Option<NotifyConfig>The config for triggering notifications.
Implementations§
Source§impl NotificationConfig
impl NotificationConfig
pub fn new() -> Self
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sets the value of description.
§Example
let x = NotificationConfig::new().set_description("example");Sourcepub fn set_pubsub_topic<T: Into<String>>(self, v: T) -> Self
pub fn set_pubsub_topic<T: Into<String>>(self, v: T) -> Self
Sets the value of pubsub_topic.
§Example
let x = NotificationConfig::new().set_pubsub_topic("example");Sourcepub fn set_service_account<T: Into<String>>(self, v: T) -> Self
pub fn set_service_account<T: Into<String>>(self, v: T) -> Self
Sets the value of service_account.
§Example
let x = NotificationConfig::new().set_service_account("example");Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
§Example
use wkt::Timestamp;
let x = NotificationConfig::new().set_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
§Example
use wkt::Timestamp;
let x = NotificationConfig::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = NotificationConfig::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_notify_config<T: Into<Option<NotifyConfig>>>(self, v: T) -> Self
pub fn set_notify_config<T: Into<Option<NotifyConfig>>>(self, v: T) -> Self
Sets the value of notify_config.
Note that all the setters affecting notify_config are mutually
exclusive.
§Example
use google_cloud_securitycenter_v2::model::notification_config::StreamingConfig;
let x = NotificationConfig::new().set_notify_config(Some(
google_cloud_securitycenter_v2::model::notification_config::NotifyConfig::StreamingConfig(StreamingConfig::default().into())));Sourcepub fn streaming_config(&self) -> Option<&Box<StreamingConfig>>
pub fn streaming_config(&self) -> Option<&Box<StreamingConfig>>
The value of notify_config
if it holds a StreamingConfig, None if the field is not set or
holds a different branch.
Sourcepub fn set_streaming_config<T: Into<Box<StreamingConfig>>>(self, v: T) -> Self
pub fn set_streaming_config<T: Into<Box<StreamingConfig>>>(self, v: T) -> Self
Sets the value of notify_config
to hold a StreamingConfig.
Note that all the setters affecting notify_config are
mutually exclusive.
§Example
use google_cloud_securitycenter_v2::model::notification_config::StreamingConfig;
let x = NotificationConfig::new().set_streaming_config(StreamingConfig::default()/* use setters */);
assert!(x.streaming_config().is_some());Trait Implementations§
Source§impl Clone for NotificationConfig
impl Clone for NotificationConfig
Source§fn clone(&self) -> NotificationConfig
fn clone(&self) -> NotificationConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more