#[non_exhaustive]pub struct SecurityProfile {
pub name: String,
pub description: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub etag: String,
pub labels: HashMap<String, String>,
pub type: ProfileType,
pub profile: Option<Profile>,
/* private fields */
}Expand description
SecurityProfile is a resource that defines the behavior for one of many ProfileTypes.
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: StringImmutable. Identifier. Name of the SecurityProfile resource. It matches
pattern
projects|organizations/*/locations/{location}/securityProfiles/{security_profile}.
description: StringOptional. An optional description of the profile. Max length 512 characters.
create_time: Option<Timestamp>Output only. Resource creation timestamp.
update_time: Option<Timestamp>Output only. Last resource update timestamp.
etag: StringOutput only. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
labels: HashMap<String, String>Optional. Labels as key value pairs.
type: ProfileTypeImmutable. The single ProfileType that the SecurityProfile resource configures.
profile: Option<Profile>The behavior for the ProfileType that the SecurityProfile resource is meant to configure. This field must correspond to the ProfileType of the SecurityProfile.
Implementations§
Source§impl SecurityProfile
impl SecurityProfile
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_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 = SecurityProfile::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 = SecurityProfile::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = SecurityProfile::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 = SecurityProfile::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 = SecurityProfile::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = SecurityProfile::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sourcepub fn set_type<T: Into<ProfileType>>(self, v: T) -> Self
pub fn set_type<T: Into<ProfileType>>(self, v: T) -> Self
Sets the value of r#type.
§Example
use google_cloud_networksecurity_v1::model::security_profile::ProfileType;
let x0 = SecurityProfile::new().set_type(ProfileType::ThreatPrevention);
let x1 = SecurityProfile::new().set_type(ProfileType::CustomMirroring);
let x2 = SecurityProfile::new().set_type(ProfileType::CustomIntercept);Sourcepub fn set_profile<T: Into<Option<Profile>>>(self, v: T) -> Self
pub fn set_profile<T: Into<Option<Profile>>>(self, v: T) -> Self
Sets the value of profile.
Note that all the setters affecting profile are mutually
exclusive.
§Example
use google_cloud_networksecurity_v1::model::ThreatPreventionProfile;
let x = SecurityProfile::new().set_profile(Some(
google_cloud_networksecurity_v1::model::security_profile::Profile::ThreatPreventionProfile(ThreatPreventionProfile::default().into())));Sourcepub fn threat_prevention_profile(&self) -> Option<&Box<ThreatPreventionProfile>>
pub fn threat_prevention_profile(&self) -> Option<&Box<ThreatPreventionProfile>>
The value of profile
if it holds a ThreatPreventionProfile, None if the field is not set or
holds a different branch.
Sourcepub fn set_threat_prevention_profile<T: Into<Box<ThreatPreventionProfile>>>(
self,
v: T,
) -> Self
pub fn set_threat_prevention_profile<T: Into<Box<ThreatPreventionProfile>>>( self, v: T, ) -> Self
Sets the value of profile
to hold a ThreatPreventionProfile.
Note that all the setters affecting profile are
mutually exclusive.
§Example
use google_cloud_networksecurity_v1::model::ThreatPreventionProfile;
let x = SecurityProfile::new().set_threat_prevention_profile(ThreatPreventionProfile::default()/* use setters */);
assert!(x.threat_prevention_profile().is_some());
assert!(x.custom_mirroring_profile().is_none());
assert!(x.custom_intercept_profile().is_none());
assert!(x.url_filtering_profile().is_none());Sourcepub fn custom_mirroring_profile(&self) -> Option<&Box<CustomMirroringProfile>>
pub fn custom_mirroring_profile(&self) -> Option<&Box<CustomMirroringProfile>>
The value of profile
if it holds a CustomMirroringProfile, None if the field is not set or
holds a different branch.
Sourcepub fn set_custom_mirroring_profile<T: Into<Box<CustomMirroringProfile>>>(
self,
v: T,
) -> Self
pub fn set_custom_mirroring_profile<T: Into<Box<CustomMirroringProfile>>>( self, v: T, ) -> Self
Sets the value of profile
to hold a CustomMirroringProfile.
Note that all the setters affecting profile are
mutually exclusive.
§Example
use google_cloud_networksecurity_v1::model::CustomMirroringProfile;
let x = SecurityProfile::new().set_custom_mirroring_profile(CustomMirroringProfile::default()/* use setters */);
assert!(x.custom_mirroring_profile().is_some());
assert!(x.threat_prevention_profile().is_none());
assert!(x.custom_intercept_profile().is_none());
assert!(x.url_filtering_profile().is_none());Sourcepub fn custom_intercept_profile(&self) -> Option<&Box<CustomInterceptProfile>>
pub fn custom_intercept_profile(&self) -> Option<&Box<CustomInterceptProfile>>
The value of profile
if it holds a CustomInterceptProfile, None if the field is not set or
holds a different branch.
Sourcepub fn set_custom_intercept_profile<T: Into<Box<CustomInterceptProfile>>>(
self,
v: T,
) -> Self
pub fn set_custom_intercept_profile<T: Into<Box<CustomInterceptProfile>>>( self, v: T, ) -> Self
Sets the value of profile
to hold a CustomInterceptProfile.
Note that all the setters affecting profile are
mutually exclusive.
§Example
use google_cloud_networksecurity_v1::model::CustomInterceptProfile;
let x = SecurityProfile::new().set_custom_intercept_profile(CustomInterceptProfile::default()/* use setters */);
assert!(x.custom_intercept_profile().is_some());
assert!(x.threat_prevention_profile().is_none());
assert!(x.custom_mirroring_profile().is_none());
assert!(x.url_filtering_profile().is_none());Sourcepub fn url_filtering_profile(&self) -> Option<&Box<UrlFilteringProfile>>
pub fn url_filtering_profile(&self) -> Option<&Box<UrlFilteringProfile>>
The value of profile
if it holds a UrlFilteringProfile, None if the field is not set or
holds a different branch.
Sourcepub fn set_url_filtering_profile<T: Into<Box<UrlFilteringProfile>>>(
self,
v: T,
) -> Self
pub fn set_url_filtering_profile<T: Into<Box<UrlFilteringProfile>>>( self, v: T, ) -> Self
Sets the value of profile
to hold a UrlFilteringProfile.
Note that all the setters affecting profile are
mutually exclusive.
§Example
use google_cloud_networksecurity_v1::model::UrlFilteringProfile;
let x = SecurityProfile::new().set_url_filtering_profile(UrlFilteringProfile::default()/* use setters */);
assert!(x.url_filtering_profile().is_some());
assert!(x.threat_prevention_profile().is_none());
assert!(x.custom_mirroring_profile().is_none());
assert!(x.custom_intercept_profile().is_none());Trait Implementations§
Source§impl Clone for SecurityProfile
impl Clone for SecurityProfile
Source§fn clone(&self) -> SecurityProfile
fn clone(&self) -> SecurityProfile
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more