#[non_exhaustive]pub struct OrgPolicyConstraint {
pub canned_constraint_id: String,
pub policy_rules: Vec<PolicyRule>,
/* private fields */
}Expand description
Message for Org Policy Canned Constraint.
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.canned_constraint_id: StringRequired. Org Policy Canned Constraint id.
policy_rules: Vec<PolicyRule>Required. Org PolicySpec rules.
Implementations§
Source§impl OrgPolicyConstraint
impl OrgPolicyConstraint
pub fn new() -> Self
Sourcepub fn set_canned_constraint_id<T: Into<String>>(self, v: T) -> Self
pub fn set_canned_constraint_id<T: Into<String>>(self, v: T) -> Self
Sets the value of canned_constraint_id.
§Example
ⓘ
let x = OrgPolicyConstraint::new().set_canned_constraint_id("example");Sourcepub fn set_policy_rules<T, V>(self, v: T) -> Self
pub fn set_policy_rules<T, V>(self, v: T) -> Self
Sets the value of policy_rules.
§Example
ⓘ
use google_cloud_securityposture_v1::model::PolicyRule;
let x = OrgPolicyConstraint::new()
.set_policy_rules([
PolicyRule::default()/* use setters */,
PolicyRule::default()/* use (different) setters */,
]);Trait Implementations§
Source§impl Clone for OrgPolicyConstraint
impl Clone for OrgPolicyConstraint
Source§fn clone(&self) -> OrgPolicyConstraint
fn clone(&self) -> OrgPolicyConstraint
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 OrgPolicyConstraint
impl Debug for OrgPolicyConstraint
Source§impl Default for OrgPolicyConstraint
impl Default for OrgPolicyConstraint
Source§fn default() -> OrgPolicyConstraint
fn default() -> OrgPolicyConstraint
Returns the “default value” for a type. Read more
Source§impl Message for OrgPolicyConstraint
impl Message for OrgPolicyConstraint
Source§impl PartialEq for OrgPolicyConstraint
impl PartialEq for OrgPolicyConstraint
impl StructuralPartialEq for OrgPolicyConstraint
Auto Trait Implementations§
impl Freeze for OrgPolicyConstraint
impl RefUnwindSafe for OrgPolicyConstraint
impl Send for OrgPolicyConstraint
impl Sync for OrgPolicyConstraint
impl Unpin for OrgPolicyConstraint
impl UnwindSafe for OrgPolicyConstraint
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