#[non_exhaustive]pub struct SecurityPolicyRuleNetworkMatcher {
pub dest_ip_ranges: Vec<String>,
pub dest_ports: Vec<String>,
pub ip_protocols: Vec<String>,
pub src_asns: Vec<u32>,
pub src_ip_ranges: Vec<String>,
pub src_ports: Vec<String>,
pub src_region_codes: Vec<String>,
pub user_defined_fields: Vec<SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch>,
/* private fields */
}organization-security-policies or region-security-policies or security-policies only.Expand description
Represents a match condition that incoming network traffic is evaluated against.
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.dest_ip_ranges: Vec<String>Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
dest_ports: Vec<String>Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit unsigned decimal number (e.g. “80”) or range (e.g. “0-1023”).
ip_protocols: Vec<String>IPv4 protocol / IPv6 next header (after extension headers). Each element can be an 8-bit unsigned decimal number (e.g. “6”), range (e.g. “253-254”), or one of the following protocol names: “tcp”, “udp”, “icmp”, “esp”, “ah”, “ipip”, or “sctp”.
src_asns: Vec<u32>BGP Autonomous System Number associated with the source IP address.
src_ip_ranges: Vec<String>Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.
src_ports: Vec<String>Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit unsigned decimal number (e.g. “80”) or range (e.g. “0-1023”).
src_region_codes: Vec<String>Two-letter ISO 3166-1 alpha-2 country code associated with the source IP address.
user_defined_fields: Vec<SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch>User-defined fields. Each element names a defined field and lists the matching values for that field.
Implementations§
Source§impl SecurityPolicyRuleNetworkMatcher
impl SecurityPolicyRuleNetworkMatcher
pub fn new() -> Self
Sourcepub fn set_dest_ip_ranges<T, V>(self, v: T) -> Self
pub fn set_dest_ip_ranges<T, V>(self, v: T) -> Self
Sets the value of dest_ip_ranges.
§Example
let x = SecurityPolicyRuleNetworkMatcher::new().set_dest_ip_ranges(["a", "b", "c"]);Sourcepub fn set_dest_ports<T, V>(self, v: T) -> Self
pub fn set_dest_ports<T, V>(self, v: T) -> Self
Sets the value of dest_ports.
§Example
let x = SecurityPolicyRuleNetworkMatcher::new().set_dest_ports(["a", "b", "c"]);Sourcepub fn set_ip_protocols<T, V>(self, v: T) -> Self
pub fn set_ip_protocols<T, V>(self, v: T) -> Self
Sets the value of ip_protocols.
§Example
let x = SecurityPolicyRuleNetworkMatcher::new().set_ip_protocols(["a", "b", "c"]);Sourcepub fn set_src_asns<T, V>(self, v: T) -> Self
pub fn set_src_asns<T, V>(self, v: T) -> Self
Sourcepub fn set_src_ip_ranges<T, V>(self, v: T) -> Self
pub fn set_src_ip_ranges<T, V>(self, v: T) -> Self
Sets the value of src_ip_ranges.
§Example
let x = SecurityPolicyRuleNetworkMatcher::new().set_src_ip_ranges(["a", "b", "c"]);Sourcepub fn set_src_ports<T, V>(self, v: T) -> Self
pub fn set_src_ports<T, V>(self, v: T) -> Self
Sourcepub fn set_src_region_codes<T, V>(self, v: T) -> Self
pub fn set_src_region_codes<T, V>(self, v: T) -> Self
Sets the value of src_region_codes.
§Example
let x = SecurityPolicyRuleNetworkMatcher::new().set_src_region_codes(["a", "b", "c"]);Sourcepub fn set_user_defined_fields<T, V>(self, v: T) -> Self
pub fn set_user_defined_fields<T, V>(self, v: T) -> Self
Sets the value of user_defined_fields.
§Example
use google_cloud_compute_v1::model::SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch;
let x = SecurityPolicyRuleNetworkMatcher::new()
.set_user_defined_fields([
SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch::default()/* use setters */,
SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch::default()/* use (different) setters */,
]);Trait Implementations§
Source§impl Clone for SecurityPolicyRuleNetworkMatcher
impl Clone for SecurityPolicyRuleNetworkMatcher
Source§fn clone(&self) -> SecurityPolicyRuleNetworkMatcher
fn clone(&self) -> SecurityPolicyRuleNetworkMatcher
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for SecurityPolicyRuleNetworkMatcher
impl Default for SecurityPolicyRuleNetworkMatcher
Source§fn default() -> SecurityPolicyRuleNetworkMatcher
fn default() -> SecurityPolicyRuleNetworkMatcher
Source§impl PartialEq for SecurityPolicyRuleNetworkMatcher
impl PartialEq for SecurityPolicyRuleNetworkMatcher
Source§fn eq(&self, other: &SecurityPolicyRuleNetworkMatcher) -> bool
fn eq(&self, other: &SecurityPolicyRuleNetworkMatcher) -> bool
self and other values to be equal, and is used by ==.