Struct google_api_proto::google::cloud::compute::v1::RouterNatRule
source · pub struct RouterNatRule {
pub action: Option<RouterNatRuleAction>,
pub description: Option<String>,
pub match: Option<String>,
pub rule_number: Option<u32>,
}
Expand description
Fields§
§action: Option<RouterNatRuleAction>
The action to be enforced for traffic that matches this rule.
description: Option<String>
An optional description of this rule.
match: Option<String>
CEL expression that specifies the match condition that egress traffic from a VM is evaluated against. If it evaluates to true, the corresponding action
is enforced. The following examples are valid match expressions for public NAT: “inIpRange(destination.ip, ‘1.1.0.0/16’) || inIpRange(destination.ip, ‘2.2.0.0/16’)” “destination.ip == ‘1.1.0.1’ || destination.ip == ‘8.8.8.8’” The following example is a valid match expression for private NAT: “nexthop.hub == ‘//networkconnectivity.googleapis.com/projects/my-project/locations/global/hubs/hub-1’”
rule_number: Option<u32>
An integer uniquely identifying a rule in the list. The rule number must be a positive value between 0 and 65000, and must be unique among rules within a NAT.
Implementations§
source§impl RouterNatRule
impl RouterNatRule
sourcepub fn match(&self) -> &str
pub fn match(&self) -> &str
Returns the value of match
, or the default value if match
is unset.
sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Returns the value of description
, or the default value if description
is unset.
sourcepub fn rule_number(&self) -> u32
pub fn rule_number(&self) -> u32
Returns the value of rule_number
, or the default value if rule_number
is unset.
Trait Implementations§
source§impl Clone for RouterNatRule
impl Clone for RouterNatRule
source§fn clone(&self) -> RouterNatRule
fn clone(&self) -> RouterNatRule
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for RouterNatRule
impl Debug for RouterNatRule
source§impl Default for RouterNatRule
impl Default for RouterNatRule
source§impl Message for RouterNatRule
impl Message for RouterNatRule
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for RouterNatRule
impl PartialEq for RouterNatRule
source§fn eq(&self, other: &RouterNatRule) -> bool
fn eq(&self, other: &RouterNatRule) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for RouterNatRule
Auto Trait Implementations§
impl Freeze for RouterNatRule
impl RefUnwindSafe for RouterNatRule
impl Send for RouterNatRule
impl Sync for RouterNatRule
impl Unpin for RouterNatRule
impl UnwindSafe for RouterNatRule
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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