#[non_exhaustive]pub struct Notification {
pub name: String,
pub subject: Option<Subject>,
pub messages: Vec<Message>,
pub create_time: Option<Timestamp>,
pub notification_type: NotificationType,
/* private fields */
}Expand description
A notification object for notifying customers about security and privacy issues.
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.name: StringThe resource name of the notification. Format: organizations/{organization}/locations/{location}/notifications/{notification} or projects/{project}/locations/{location}/notifications/{notification}.
subject: Option<Subject>The subject line of the notification.
messages: Vec<Message>A list of messages in the notification.
create_time: Option<Timestamp>Output only. Time the notification was created.
notification_type: NotificationTypeType of notification
Implementations§
Source§impl Notification
impl Notification
Sourcepub fn set_subject<T>(self, v: T) -> Self
pub fn set_subject<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_subject<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_subject<T>(self, v: Option<T>) -> Self
Sourcepub fn set_messages<T, V>(self, v: T) -> Self
pub fn set_messages<T, V>(self, v: T) -> Self
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
ⓘ
use wkt::Timestamp;
let x = Notification::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
ⓘ
use wkt::Timestamp;
let x = Notification::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Notification::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_notification_type<T: Into<NotificationType>>(self, v: T) -> Self
pub fn set_notification_type<T: Into<NotificationType>>(self, v: T) -> Self
Sets the value of notification_type.
§Example
ⓘ
use google_cloud_advisorynotifications_v1::model::NotificationType;
let x0 = Notification::new().set_notification_type(NotificationType::SecurityPrivacyAdvisory);
let x1 = Notification::new().set_notification_type(NotificationType::SensitiveActions);
let x2 = Notification::new().set_notification_type(NotificationType::SecurityMsa);Trait Implementations§
Source§impl Clone for Notification
impl Clone for Notification
Source§fn clone(&self) -> Notification
fn clone(&self) -> Notification
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 Notification
impl Debug for Notification
Source§impl Default for Notification
impl Default for Notification
Source§fn default() -> Notification
fn default() -> Notification
Returns the “default value” for a type. Read more
Source§impl Message for Notification
impl Message for Notification
Source§impl PartialEq for Notification
impl PartialEq for Notification
impl StructuralPartialEq for Notification
Auto Trait Implementations§
impl Freeze for Notification
impl RefUnwindSafe for Notification
impl Send for Notification
impl Sync for Notification
impl Unpin for Notification
impl UnsafeUnpin for Notification
impl UnwindSafe for Notification
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