#[non_exhaustive]pub struct RouterNatLogConfig {
pub enable: Option<bool>,
pub filter: Option<Filter>,
/* private fields */
}Available on crate feature
routers only.Expand description
Configuration of logging on a NAT.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.enable: Option<bool>Indicates whether or not to export logs. This is false by default.
filter: Option<Filter>Specify the desired filtering of logs on this NAT. If unspecified, logs are exported for all connections handled by this NAT. This option can take one of the following values:
- ERRORS_ONLY: Export logs only for connection failures.
- TRANSLATIONS_ONLY: Export logs only for successful connections.
- ALL: Export logs for all connections, successful and unsuccessful.
Implementations§
Source§impl RouterNatLogConfig
impl RouterNatLogConfig
pub fn new() -> Self
Sourcepub fn set_enable<T>(self, v: T) -> Self
pub fn set_enable<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_enable<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_enable<T>(self, v: Option<T>) -> Self
Sourcepub fn set_filter<T>(self, v: T) -> Self
pub fn set_filter<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_filter<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_filter<T>(self, v: Option<T>) -> Self
Sets or clears the value of filter.
§Example
ⓘ
use google_cloud_compute_v1::model::router_nat_log_config::Filter;
let x0 = RouterNatLogConfig::new().set_or_clear_filter(Some(Filter::ErrorsOnly));
let x1 = RouterNatLogConfig::new().set_or_clear_filter(Some(Filter::TranslationsOnly));
let x_none = RouterNatLogConfig::new().set_or_clear_filter(None::<Filter>);Trait Implementations§
Source§impl Clone for RouterNatLogConfig
impl Clone for RouterNatLogConfig
Source§fn clone(&self) -> RouterNatLogConfig
fn clone(&self) -> RouterNatLogConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RouterNatLogConfig
impl Debug for RouterNatLogConfig
Source§impl Default for RouterNatLogConfig
impl Default for RouterNatLogConfig
Source§fn default() -> RouterNatLogConfig
fn default() -> RouterNatLogConfig
Returns the “default value” for a type. Read more
Source§impl Message for RouterNatLogConfig
impl Message for RouterNatLogConfig
Source§impl PartialEq for RouterNatLogConfig
impl PartialEq for RouterNatLogConfig
impl StructuralPartialEq for RouterNatLogConfig
Auto Trait Implementations§
impl Freeze for RouterNatLogConfig
impl RefUnwindSafe for RouterNatLogConfig
impl Send for RouterNatLogConfig
impl Sync for RouterNatLogConfig
impl Unpin for RouterNatLogConfig
impl UnwindSafe for RouterNatLogConfig
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
Mutably borrows from an owned value. Read more