#[non_exhaustive]pub struct SecurityPolicyAdvancedOptionsConfig {
pub json_custom_config: Option<SecurityPolicyAdvancedOptionsConfigJsonCustomConfig>,
pub json_parsing: Option<JsonParsing>,
pub log_level: Option<LogLevel>,
pub request_body_inspection_size: Option<String>,
pub user_ip_request_headers: Vec<String>,
/* private fields */
}Available on crate features
organization-security-policies or region-security-policies or security-policies only.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.json_custom_config: Option<SecurityPolicyAdvancedOptionsConfigJsonCustomConfig>Custom configuration to apply the JSON parsing. Only applicable when json_parsing is set to STANDARD.
json_parsing: Option<JsonParsing>§log_level: Option<LogLevel>§request_body_inspection_size: Option<String>The maximum request size chosen by the customer with Waf enabled. Values supported are “8KB”, “16KB, “32KB”, “48KB” and “64KB”. Values are case insensitive.
user_ip_request_headers: Vec<String>An optional list of case-insensitive request header names to use for resolving the callers client IP address.
Implementations§
Source§impl SecurityPolicyAdvancedOptionsConfig
impl SecurityPolicyAdvancedOptionsConfig
pub fn new() -> Self
Sourcepub fn set_json_custom_config<T>(self, v: T) -> Self
pub fn set_json_custom_config<T>(self, v: T) -> Self
Sets the value of json_custom_config.
§Example
ⓘ
use google_cloud_compute_v1::model::SecurityPolicyAdvancedOptionsConfigJsonCustomConfig;
let x = SecurityPolicyAdvancedOptionsConfig::new().set_json_custom_config(SecurityPolicyAdvancedOptionsConfigJsonCustomConfig::default()/* use setters */);Sourcepub fn set_or_clear_json_custom_config<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_json_custom_config<T>(self, v: Option<T>) -> Self
Sets or clears the value of json_custom_config.
§Example
ⓘ
use google_cloud_compute_v1::model::SecurityPolicyAdvancedOptionsConfigJsonCustomConfig;
let x = SecurityPolicyAdvancedOptionsConfig::new().set_or_clear_json_custom_config(Some(SecurityPolicyAdvancedOptionsConfigJsonCustomConfig::default()/* use setters */));
let x = SecurityPolicyAdvancedOptionsConfig::new().set_or_clear_json_custom_config(None::<SecurityPolicyAdvancedOptionsConfigJsonCustomConfig>);Sourcepub fn set_json_parsing<T>(self, v: T) -> Selfwhere
T: Into<JsonParsing>,
pub fn set_json_parsing<T>(self, v: T) -> Selfwhere
T: Into<JsonParsing>,
Sets the value of json_parsing.
§Example
ⓘ
use google_cloud_compute_v1::model::security_policy_advanced_options_config::JsonParsing;
let x0 = SecurityPolicyAdvancedOptionsConfig::new().set_json_parsing(JsonParsing::Standard);
let x1 = SecurityPolicyAdvancedOptionsConfig::new().set_json_parsing(JsonParsing::StandardWithGraphql);Sourcepub fn set_or_clear_json_parsing<T>(self, v: Option<T>) -> Selfwhere
T: Into<JsonParsing>,
pub fn set_or_clear_json_parsing<T>(self, v: Option<T>) -> Selfwhere
T: Into<JsonParsing>,
Sets or clears the value of json_parsing.
§Example
ⓘ
use google_cloud_compute_v1::model::security_policy_advanced_options_config::JsonParsing;
let x0 = SecurityPolicyAdvancedOptionsConfig::new().set_or_clear_json_parsing(Some(JsonParsing::Standard));
let x1 = SecurityPolicyAdvancedOptionsConfig::new().set_or_clear_json_parsing(Some(JsonParsing::StandardWithGraphql));
let x_none = SecurityPolicyAdvancedOptionsConfig::new().set_or_clear_json_parsing(None::<JsonParsing>);Sourcepub fn set_log_level<T>(self, v: T) -> Self
pub fn set_log_level<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_log_level<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_log_level<T>(self, v: Option<T>) -> Self
Sets or clears the value of log_level.
§Example
ⓘ
use google_cloud_compute_v1::model::security_policy_advanced_options_config::LogLevel;
let x0 = SecurityPolicyAdvancedOptionsConfig::new().set_or_clear_log_level(Some(LogLevel::Verbose));
let x_none = SecurityPolicyAdvancedOptionsConfig::new().set_or_clear_log_level(None::<LogLevel>);Sourcepub fn set_request_body_inspection_size<T>(self, v: T) -> Self
pub fn set_request_body_inspection_size<T>(self, v: T) -> Self
Sets the value of request_body_inspection_size.
§Example
ⓘ
let x = SecurityPolicyAdvancedOptionsConfig::new().set_request_body_inspection_size("example");Sourcepub fn set_or_clear_request_body_inspection_size<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_request_body_inspection_size<T>(self, v: Option<T>) -> Self
Sets or clears the value of request_body_inspection_size.
§Example
ⓘ
let x = SecurityPolicyAdvancedOptionsConfig::new().set_or_clear_request_body_inspection_size(Some("example"));
let x = SecurityPolicyAdvancedOptionsConfig::new().set_or_clear_request_body_inspection_size(None::<String>);Sourcepub fn set_user_ip_request_headers<T, V>(self, v: T) -> Self
pub fn set_user_ip_request_headers<T, V>(self, v: T) -> Self
Sets the value of user_ip_request_headers.
§Example
ⓘ
let x = SecurityPolicyAdvancedOptionsConfig::new().set_user_ip_request_headers(["a", "b", "c"]);Trait Implementations§
Source§impl Clone for SecurityPolicyAdvancedOptionsConfig
impl Clone for SecurityPolicyAdvancedOptionsConfig
Source§fn clone(&self) -> SecurityPolicyAdvancedOptionsConfig
fn clone(&self) -> SecurityPolicyAdvancedOptionsConfig
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 Default for SecurityPolicyAdvancedOptionsConfig
impl Default for SecurityPolicyAdvancedOptionsConfig
Source§fn default() -> SecurityPolicyAdvancedOptionsConfig
fn default() -> SecurityPolicyAdvancedOptionsConfig
Returns the “default value” for a type. Read more
Source§impl PartialEq for SecurityPolicyAdvancedOptionsConfig
impl PartialEq for SecurityPolicyAdvancedOptionsConfig
Source§fn eq(&self, other: &SecurityPolicyAdvancedOptionsConfig) -> bool
fn eq(&self, other: &SecurityPolicyAdvancedOptionsConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SecurityPolicyAdvancedOptionsConfig
Auto Trait Implementations§
impl Freeze for SecurityPolicyAdvancedOptionsConfig
impl RefUnwindSafe for SecurityPolicyAdvancedOptionsConfig
impl Send for SecurityPolicyAdvancedOptionsConfig
impl Sync for SecurityPolicyAdvancedOptionsConfig
impl Unpin for SecurityPolicyAdvancedOptionsConfig
impl UnwindSafe for SecurityPolicyAdvancedOptionsConfig
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