#[non_exhaustive]pub struct SecurityPolicyRuleMatcher {
pub config: Option<SecurityPolicyRuleMatcherConfig>,
pub expr: Option<Expr>,
pub expr_options: Option<SecurityPolicyRuleMatcherExprOptions>,
pub versioned_expr: Option<VersionedExpr>,
/* private fields */
}organization-security-policies or region-security-policies or security-policies only.Expand description
Represents a match condition that incoming traffic is evaluated against. Exactly one field must be specified.
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.config: Option<SecurityPolicyRuleMatcherConfig>The configuration options available when specifying versioned_expr. This field must be specified if versioned_expr is specified and cannot be specified if versioned_expr is not specified.
expr: Option<Expr>User defined CEVAL expression.
A CEVAL expression is used to specify match criteria such as origin.ip,
source.region_code and contents in the request header.
Expressions containing evaluateThreatIntelligence require a Cloud
Armor Enterprise subscription and are not supported in Edge Policies
nor in Regional Policies. Expressions containing
evaluatePreconfiguredExpr('sourceiplist-*') require a Cloud Armor
Enterprise subscription and are only supported in Global Security
Policies.
expr_options: Option<SecurityPolicyRuleMatcherExprOptions>The configuration options available when specifying a user defined CEVAL expression (i.e., ‘expr’).
versioned_expr: Option<VersionedExpr>Preconfigured versioned expression. If this field is specified, config must also be specified. Available preconfigured expressions along with their requirements are: SRC_IPS_V1 - must specify the corresponding src_ip_range field in config.
Implementations§
Source§impl SecurityPolicyRuleMatcher
impl SecurityPolicyRuleMatcher
Sourcepub fn set_config<T>(self, v: T) -> Selfwhere
T: Into<SecurityPolicyRuleMatcherConfig>,
pub fn set_config<T>(self, v: T) -> Selfwhere
T: Into<SecurityPolicyRuleMatcherConfig>,
Sourcepub fn set_or_clear_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<SecurityPolicyRuleMatcherConfig>,
pub fn set_or_clear_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<SecurityPolicyRuleMatcherConfig>,
Sets or clears the value of config.
§Example
use google_cloud_compute_v1::model::SecurityPolicyRuleMatcherConfig;
let x = SecurityPolicyRuleMatcher::new().set_or_clear_config(Some(SecurityPolicyRuleMatcherConfig::default()/* use setters */));
let x = SecurityPolicyRuleMatcher::new().set_or_clear_config(None::<SecurityPolicyRuleMatcherConfig>);Sourcepub fn set_or_clear_expr<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_expr<T>(self, v: Option<T>) -> Self
Sourcepub fn set_expr_options<T>(self, v: T) -> Selfwhere
T: Into<SecurityPolicyRuleMatcherExprOptions>,
pub fn set_expr_options<T>(self, v: T) -> Selfwhere
T: Into<SecurityPolicyRuleMatcherExprOptions>,
Sets the value of expr_options.
§Example
use google_cloud_compute_v1::model::SecurityPolicyRuleMatcherExprOptions;
let x = SecurityPolicyRuleMatcher::new().set_expr_options(SecurityPolicyRuleMatcherExprOptions::default()/* use setters */);Sourcepub fn set_or_clear_expr_options<T>(self, v: Option<T>) -> Selfwhere
T: Into<SecurityPolicyRuleMatcherExprOptions>,
pub fn set_or_clear_expr_options<T>(self, v: Option<T>) -> Selfwhere
T: Into<SecurityPolicyRuleMatcherExprOptions>,
Sets or clears the value of expr_options.
§Example
use google_cloud_compute_v1::model::SecurityPolicyRuleMatcherExprOptions;
let x = SecurityPolicyRuleMatcher::new().set_or_clear_expr_options(Some(SecurityPolicyRuleMatcherExprOptions::default()/* use setters */));
let x = SecurityPolicyRuleMatcher::new().set_or_clear_expr_options(None::<SecurityPolicyRuleMatcherExprOptions>);Sourcepub fn set_versioned_expr<T>(self, v: T) -> Selfwhere
T: Into<VersionedExpr>,
pub fn set_versioned_expr<T>(self, v: T) -> Selfwhere
T: Into<VersionedExpr>,
Sets the value of versioned_expr.
§Example
use google_cloud_compute_v1::model::security_policy_rule_matcher::VersionedExpr;
let x0 = SecurityPolicyRuleMatcher::new().set_versioned_expr(VersionedExpr::SrcIpsV1);Sourcepub fn set_or_clear_versioned_expr<T>(self, v: Option<T>) -> Selfwhere
T: Into<VersionedExpr>,
pub fn set_or_clear_versioned_expr<T>(self, v: Option<T>) -> Selfwhere
T: Into<VersionedExpr>,
Sets or clears the value of versioned_expr.
§Example
use google_cloud_compute_v1::model::security_policy_rule_matcher::VersionedExpr;
let x0 = SecurityPolicyRuleMatcher::new().set_or_clear_versioned_expr(Some(VersionedExpr::SrcIpsV1));
let x_none = SecurityPolicyRuleMatcher::new().set_or_clear_versioned_expr(None::<VersionedExpr>);Trait Implementations§
Source§impl Clone for SecurityPolicyRuleMatcher
impl Clone for SecurityPolicyRuleMatcher
Source§fn clone(&self) -> SecurityPolicyRuleMatcher
fn clone(&self) -> SecurityPolicyRuleMatcher
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 SecurityPolicyRuleMatcher
impl Debug for SecurityPolicyRuleMatcher
Source§impl Default for SecurityPolicyRuleMatcher
impl Default for SecurityPolicyRuleMatcher
Source§fn default() -> SecurityPolicyRuleMatcher
fn default() -> SecurityPolicyRuleMatcher
Source§impl Message for SecurityPolicyRuleMatcher
impl Message for SecurityPolicyRuleMatcher
impl StructuralPartialEq for SecurityPolicyRuleMatcher
Auto Trait Implementations§
impl Freeze for SecurityPolicyRuleMatcher
impl RefUnwindSafe for SecurityPolicyRuleMatcher
impl Send for SecurityPolicyRuleMatcher
impl Sync for SecurityPolicyRuleMatcher
impl Unpin for SecurityPolicyRuleMatcher
impl UnsafeUnpin for SecurityPolicyRuleMatcher
impl UnwindSafe for SecurityPolicyRuleMatcher
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