#[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
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NotificationConfig
impl Debug for NotificationConfig
Source§impl Default for NotificationConfig
impl Default for NotificationConfig
Source§fn default() -> NotificationConfig
fn default() -> NotificationConfig
Source§impl Message for NotificationConfig
impl Message for NotificationConfig
Source§impl PartialEq for NotificationConfig
impl PartialEq for NotificationConfig
impl StructuralPartialEq for NotificationConfig
Auto Trait Implementations§
impl Freeze for NotificationConfig
impl RefUnwindSafe for NotificationConfig
impl Send for NotificationConfig
impl Sync for NotificationConfig
impl Unpin for NotificationConfig
impl UnsafeUnpin for NotificationConfig
impl UnwindSafe for NotificationConfig
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