#[non_exhaustive]pub struct PolicyViolationDetails {
pub policy: String,
pub rule_id: String,
pub failure_message: String,
/* private fields */
}
Expand description
Policy violation details.
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.policy: String
Name of the policy that was violated.
Policy resource will be in the format of
projects/{project}/locations/{location}/policies/{policy}
.
rule_id: String
Id of the rule that triggered the policy violation.
failure_message: String
User readable message about why the request violated a policy. This is not intended for machine parsing.
Implementations§
Source§impl PolicyViolationDetails
impl PolicyViolationDetails
pub fn new() -> Self
Sourcepub fn set_policy<T: Into<String>>(self, v: T) -> Self
pub fn set_policy<T: Into<String>>(self, v: T) -> Self
Sets the value of policy.
Sourcepub fn set_rule_id<T: Into<String>>(self, v: T) -> Self
pub fn set_rule_id<T: Into<String>>(self, v: T) -> Self
Sets the value of rule_id.
Sourcepub fn set_failure_message<T: Into<String>>(self, v: T) -> Self
pub fn set_failure_message<T: Into<String>>(self, v: T) -> Self
Sets the value of failure_message.
Trait Implementations§
Source§impl Clone for PolicyViolationDetails
impl Clone for PolicyViolationDetails
Source§fn clone(&self) -> PolicyViolationDetails
fn clone(&self) -> PolicyViolationDetails
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 PolicyViolationDetails
impl Debug for PolicyViolationDetails
Source§impl Default for PolicyViolationDetails
impl Default for PolicyViolationDetails
Source§fn default() -> PolicyViolationDetails
fn default() -> PolicyViolationDetails
Returns the “default value” for a type. Read more
Source§impl Message for PolicyViolationDetails
impl Message for PolicyViolationDetails
Source§impl PartialEq for PolicyViolationDetails
impl PartialEq for PolicyViolationDetails
impl StructuralPartialEq for PolicyViolationDetails
Auto Trait Implementations§
impl Freeze for PolicyViolationDetails
impl RefUnwindSafe for PolicyViolationDetails
impl Send for PolicyViolationDetails
impl Sync for PolicyViolationDetails
impl Unpin for PolicyViolationDetails
impl UnwindSafe for PolicyViolationDetails
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