#[non_exhaustive]pub struct AddRuleRequest {
pub project: String,
pub security_policy: String,
pub validate_only: Option<bool>,
pub body: Option<SecurityPolicyRule>,
/* private fields */
}Available on crate feature
security-policies only.Expand description
Synthetic request message for the addRule() 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.project: StringProject ID for this request.
security_policy: StringName of the security policy to update.
validate_only: Option<bool>If true, the request will not be committed.
body: Option<SecurityPolicyRule>Synthetic request body field for the addRule() method.
Implementations§
Source§impl AddRuleRequest
impl AddRuleRequest
pub fn new() -> Self
Sourcepub fn set_project<T: Into<String>>(self, v: T) -> Self
pub fn set_project<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_security_policy<T: Into<String>>(self, v: T) -> Self
pub fn set_security_policy<T: Into<String>>(self, v: T) -> Self
Sets the value of security_policy.
§Example
ⓘ
let x = AddRuleRequest::new().set_security_policy("example");Sourcepub fn set_validate_only<T>(self, v: T) -> Self
pub fn set_validate_only<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_validate_only<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_validate_only<T>(self, v: Option<T>) -> Self
Sets or clears the value of validate_only.
§Example
ⓘ
let x = AddRuleRequest::new().set_or_clear_validate_only(Some(false));
let x = AddRuleRequest::new().set_or_clear_validate_only(None::<bool>);Sourcepub fn set_body<T>(self, v: T) -> Selfwhere
T: Into<SecurityPolicyRule>,
pub fn set_body<T>(self, v: T) -> Selfwhere
T: Into<SecurityPolicyRule>,
Sourcepub fn set_or_clear_body<T>(self, v: Option<T>) -> Selfwhere
T: Into<SecurityPolicyRule>,
pub fn set_or_clear_body<T>(self, v: Option<T>) -> Selfwhere
T: Into<SecurityPolicyRule>,
Trait Implementations§
Source§impl Clone for AddRuleRequest
impl Clone for AddRuleRequest
Source§fn clone(&self) -> AddRuleRequest
fn clone(&self) -> AddRuleRequest
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 AddRuleRequest
impl Debug for AddRuleRequest
Source§impl Default for AddRuleRequest
impl Default for AddRuleRequest
Source§fn default() -> AddRuleRequest
fn default() -> AddRuleRequest
Returns the “default value” for a type. Read more
Source§impl PartialEq for AddRuleRequest
impl PartialEq for AddRuleRequest
impl StructuralPartialEq for AddRuleRequest
Auto Trait Implementations§
impl Freeze for AddRuleRequest
impl RefUnwindSafe for AddRuleRequest
impl Send for AddRuleRequest
impl Sync for AddRuleRequest
impl Unpin for AddRuleRequest
impl UnwindSafe for AddRuleRequest
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