#[non_exhaustive]pub struct MuteConfig {
pub name: String,
pub description: String,
pub filter: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub most_recent_editor: String,
pub type: MuteConfigType,
pub expiry_time: Option<Timestamp>,
/* private fields */
}Expand description
A mute config is a Cloud SCC resource that contains the configuration to mute create/update events of findings.
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. This field will be ignored if provided on config creation. The following list shows some examples of the format:
organizations/{organization}/muteConfigs/{mute_config}
organizations/{organization}locations/{location}//muteConfigs/{mute_config}
folders/{folder}/muteConfigs/{mute_config}folders/{folder}/locations/{location}/muteConfigs/{mute_config}projects/{project}/muteConfigs/{mute_config}projects/{project}/locations/{location}/muteConfigs/{mute_config}
description: StringA description of the mute config.
filter: StringRequired. An expression that defines the filter to apply across create/update events of findings. While creating a filter string, be mindful of the scope in which the mute configuration is being created. E.g., If a filter contains project = X but is created under the project = Y scope, it might not match any findings.
The following field and operator combinations are supported:
- severity:
=,: - category:
=,: - resource.name:
=,: - resource.project_name:
=,: - resource.project_display_name:
=,: - resource.folders.resource_folder:
=,: - resource.parent_name:
=,: - resource.parent_display_name:
=,: - resource.type:
=,: - finding_class:
=,: - indicator.ip_addresses:
=,: - indicator.domains:
=,:
create_time: Option<Timestamp>Output only. The time at which the mute config was created. This field is set by the server and will be ignored if provided on config creation.
update_time: Option<Timestamp>Output only. The most recent time at which the mute config was updated. This field is set by the server and will be ignored if provided on config creation or update.
most_recent_editor: StringOutput only. Email address of the user who last edited the mute config. This field is set by the server and will be ignored if provided on config creation or update.
type: MuteConfigTypeRequired. The type of the mute config, which determines what type of mute state the config affects. Immutable after creation.
expiry_time: Option<Timestamp>Optional. The expiry of the mute config. Only applicable for dynamic configs. If the expiry is set, when the config expires, it is removed from all findings.
Implementations§
Source§impl MuteConfig
impl MuteConfig
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
Sourcepub fn set_filter<T: Into<String>>(self, v: T) -> Self
pub fn set_filter<T: Into<String>>(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 = MuteConfig::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 = MuteConfig::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = MuteConfig::new().set_or_clear_create_time(None::<Timestamp>);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 = MuteConfig::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 = MuteConfig::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = MuteConfig::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_most_recent_editor<T: Into<String>>(self, v: T) -> Self
pub fn set_most_recent_editor<T: Into<String>>(self, v: T) -> Self
Sets the value of most_recent_editor.
§Example
let x = MuteConfig::new().set_most_recent_editor("example");Sourcepub fn set_type<T: Into<MuteConfigType>>(self, v: T) -> Self
pub fn set_type<T: Into<MuteConfigType>>(self, v: T) -> Self
Sourcepub fn set_expiry_time<T>(self, v: T) -> Self
pub fn set_expiry_time<T>(self, v: T) -> Self
Sets the value of expiry_time.
§Example
use wkt::Timestamp;
let x = MuteConfig::new().set_expiry_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_expiry_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_expiry_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of expiry_time.
§Example
use wkt::Timestamp;
let x = MuteConfig::new().set_or_clear_expiry_time(Some(Timestamp::default()/* use setters */));
let x = MuteConfig::new().set_or_clear_expiry_time(None::<Timestamp>);Trait Implementations§
Source§impl Clone for MuteConfig
impl Clone for MuteConfig
Source§fn clone(&self) -> MuteConfig
fn clone(&self) -> MuteConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more