#[non_exhaustive]pub struct CreateGatewaySecurityPolicyRuleRequest {
pub parent: String,
pub gateway_security_policy_rule: Option<GatewaySecurityPolicyRule>,
pub gateway_security_policy_rule_id: String,
/* private fields */
}Expand description
Methods for GatewaySecurityPolicy RULES/GatewaySecurityPolicyRules. Request used by the CreateGatewaySecurityPolicyRule method.
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.parent: StringRequired. The parent where this rule will be created. Format : projects/{project}/location/{location}/gatewaySecurityPolicies/*
gateway_security_policy_rule: Option<GatewaySecurityPolicyRule>Required. The rule to be created.
gateway_security_policy_rule_id: StringThe ID to use for the rule, which will become the final component of the rule’s resource name. This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.
Implementations§
Source§impl CreateGatewaySecurityPolicyRuleRequest
impl CreateGatewaySecurityPolicyRuleRequest
pub fn new() -> Self
Sourcepub fn set_parent<T: Into<String>>(self, v: T) -> Self
pub fn set_parent<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_gateway_security_policy_rule<T>(self, v: T) -> Selfwhere
T: Into<GatewaySecurityPolicyRule>,
pub fn set_gateway_security_policy_rule<T>(self, v: T) -> Selfwhere
T: Into<GatewaySecurityPolicyRule>,
Sets the value of gateway_security_policy_rule.
§Example
ⓘ
use google_cloud_networksecurity_v1::model::GatewaySecurityPolicyRule;
let x = CreateGatewaySecurityPolicyRuleRequest::new().set_gateway_security_policy_rule(GatewaySecurityPolicyRule::default()/* use setters */);Sourcepub fn set_or_clear_gateway_security_policy_rule<T>(self, v: Option<T>) -> Selfwhere
T: Into<GatewaySecurityPolicyRule>,
pub fn set_or_clear_gateway_security_policy_rule<T>(self, v: Option<T>) -> Selfwhere
T: Into<GatewaySecurityPolicyRule>,
Sets or clears the value of gateway_security_policy_rule.
§Example
ⓘ
use google_cloud_networksecurity_v1::model::GatewaySecurityPolicyRule;
let x = CreateGatewaySecurityPolicyRuleRequest::new().set_or_clear_gateway_security_policy_rule(Some(GatewaySecurityPolicyRule::default()/* use setters */));
let x = CreateGatewaySecurityPolicyRuleRequest::new().set_or_clear_gateway_security_policy_rule(None::<GatewaySecurityPolicyRule>);Sourcepub fn set_gateway_security_policy_rule_id<T: Into<String>>(self, v: T) -> Self
pub fn set_gateway_security_policy_rule_id<T: Into<String>>(self, v: T) -> Self
Sets the value of gateway_security_policy_rule_id.
§Example
ⓘ
let x = CreateGatewaySecurityPolicyRuleRequest::new().set_gateway_security_policy_rule_id("example");Trait Implementations§
Source§impl Clone for CreateGatewaySecurityPolicyRuleRequest
impl Clone for CreateGatewaySecurityPolicyRuleRequest
Source§fn clone(&self) -> CreateGatewaySecurityPolicyRuleRequest
fn clone(&self) -> CreateGatewaySecurityPolicyRuleRequest
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 CreateGatewaySecurityPolicyRuleRequest
impl Default for CreateGatewaySecurityPolicyRuleRequest
Source§fn default() -> CreateGatewaySecurityPolicyRuleRequest
fn default() -> CreateGatewaySecurityPolicyRuleRequest
Returns the “default value” for a type. Read more
Source§impl PartialEq for CreateGatewaySecurityPolicyRuleRequest
impl PartialEq for CreateGatewaySecurityPolicyRuleRequest
Source§fn eq(&self, other: &CreateGatewaySecurityPolicyRuleRequest) -> bool
fn eq(&self, other: &CreateGatewaySecurityPolicyRuleRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CreateGatewaySecurityPolicyRuleRequest
Auto Trait Implementations§
impl Freeze for CreateGatewaySecurityPolicyRuleRequest
impl RefUnwindSafe for CreateGatewaySecurityPolicyRuleRequest
impl Send for CreateGatewaySecurityPolicyRuleRequest
impl Sync for CreateGatewaySecurityPolicyRuleRequest
impl Unpin for CreateGatewaySecurityPolicyRuleRequest
impl UnsafeUnpin for CreateGatewaySecurityPolicyRuleRequest
impl UnwindSafe for CreateGatewaySecurityPolicyRuleRequest
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