#[non_exhaustive]pub struct GatewaySecurityPolicyRule {
pub name: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub enabled: bool,
pub priority: i32,
pub description: String,
pub session_matcher: String,
pub application_matcher: String,
pub tls_inspection_enabled: bool,
pub profile: Option<Profile>,
/* private fields */
}Expand description
The GatewaySecurityPolicyRule resource is in a nested collection within a GatewaySecurityPolicy and represents a traffic matching condition and associated action to perform.
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: StringRequired. Immutable. Name of the resource. ame is the full resource name so projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule} rule should match the pattern: (^a-z?$).
create_time: Option<Timestamp>Output only. Time when the rule was created.
update_time: Option<Timestamp>Output only. Time when the rule was updated.
enabled: boolRequired. Whether the rule is enforced.
priority: i32Required. Priority of the rule. Lower number corresponds to higher precedence.
description: StringOptional. Free-text description of the resource.
session_matcher: StringRequired. CEL expression for matching on session criteria.
application_matcher: StringOptional. CEL expression for matching on L7/application level criteria.
tls_inspection_enabled: boolOptional. Flag to enable TLS inspection of traffic matching on <session_matcher>, can only be true if the parent GatewaySecurityPolicy references a TLSInspectionConfig.
profile: Option<Profile>Implementations§
Source§impl GatewaySecurityPolicyRule
impl GatewaySecurityPolicyRule
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 = GatewaySecurityPolicyRule::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 = GatewaySecurityPolicyRule::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = GatewaySecurityPolicyRule::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 = GatewaySecurityPolicyRule::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 = GatewaySecurityPolicyRule::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = GatewaySecurityPolicyRule::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_enabled<T: Into<bool>>(self, v: T) -> Self
pub fn set_enabled<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_priority<T: Into<i32>>(self, v: T) -> Self
pub fn set_priority<T: Into<i32>>(self, v: T) -> 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 = GatewaySecurityPolicyRule::new().set_description("example");Sourcepub fn set_session_matcher<T: Into<String>>(self, v: T) -> Self
pub fn set_session_matcher<T: Into<String>>(self, v: T) -> Self
Sets the value of session_matcher.
§Example
let x = GatewaySecurityPolicyRule::new().set_session_matcher("example");Sourcepub fn set_application_matcher<T: Into<String>>(self, v: T) -> Self
pub fn set_application_matcher<T: Into<String>>(self, v: T) -> Self
Sets the value of application_matcher.
§Example
let x = GatewaySecurityPolicyRule::new().set_application_matcher("example");Sourcepub fn set_tls_inspection_enabled<T: Into<bool>>(self, v: T) -> Self
pub fn set_tls_inspection_enabled<T: Into<bool>>(self, v: T) -> Self
Sets the value of tls_inspection_enabled.
§Example
let x = GatewaySecurityPolicyRule::new().set_tls_inspection_enabled(true);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::gateway_security_policy_rule::BasicProfile;
let x0 = GatewaySecurityPolicyRule::new().set_profile(Some(
google_cloud_networksecurity_v1::model::gateway_security_policy_rule::Profile::BasicProfile(BasicProfile::Allow)));
let x1 = GatewaySecurityPolicyRule::new().set_profile(Some(
google_cloud_networksecurity_v1::model::gateway_security_policy_rule::Profile::BasicProfile(BasicProfile::Deny)));Sourcepub fn basic_profile(&self) -> Option<&BasicProfile>
pub fn basic_profile(&self) -> Option<&BasicProfile>
The value of profile
if it holds a BasicProfile, None if the field is not set or
holds a different branch.
Sourcepub fn set_basic_profile<T: Into<BasicProfile>>(self, v: T) -> Self
pub fn set_basic_profile<T: Into<BasicProfile>>(self, v: T) -> Self
Sets the value of profile
to hold a BasicProfile.
Note that all the setters affecting profile are
mutually exclusive.
§Example
use google_cloud_networksecurity_v1::model::gateway_security_policy_rule::BasicProfile;
let x0 = GatewaySecurityPolicyRule::new().set_basic_profile(BasicProfile::Allow);
let x1 = GatewaySecurityPolicyRule::new().set_basic_profile(BasicProfile::Deny);
assert!(x0.basic_profile().is_some());
assert!(x1.basic_profile().is_some());Trait Implementations§
Source§impl Clone for GatewaySecurityPolicyRule
impl Clone for GatewaySecurityPolicyRule
Source§fn clone(&self) -> GatewaySecurityPolicyRule
fn clone(&self) -> GatewaySecurityPolicyRule
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 GatewaySecurityPolicyRule
impl Debug for GatewaySecurityPolicyRule
Source§impl Default for GatewaySecurityPolicyRule
impl Default for GatewaySecurityPolicyRule
Source§fn default() -> GatewaySecurityPolicyRule
fn default() -> GatewaySecurityPolicyRule
Source§impl Message for GatewaySecurityPolicyRule
impl Message for GatewaySecurityPolicyRule
impl StructuralPartialEq for GatewaySecurityPolicyRule
Auto Trait Implementations§
impl Freeze for GatewaySecurityPolicyRule
impl RefUnwindSafe for GatewaySecurityPolicyRule
impl Send for GatewaySecurityPolicyRule
impl Sync for GatewaySecurityPolicyRule
impl Unpin for GatewaySecurityPolicyRule
impl UnsafeUnpin for GatewaySecurityPolicyRule
impl UnwindSafe for GatewaySecurityPolicyRule
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