#[non_exhaustive]pub struct BooleanConstraint {
pub custom_constraint_definition: Option<CustomConstraintDefinition>,
/* private fields */
}Expand description
A constraint type is enforced or not enforced, which is configured in the
PolicyRule.
If customConstraintDefinition is defined, this constraint is a managed
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.custom_constraint_definition: Option<CustomConstraintDefinition>Custom constraint definition. Defines this as a managed constraint.
Implementations§
Source§impl BooleanConstraint
impl BooleanConstraint
Sourcepub fn set_custom_constraint_definition<T>(self, v: T) -> Selfwhere
T: Into<CustomConstraintDefinition>,
pub fn set_custom_constraint_definition<T>(self, v: T) -> Selfwhere
T: Into<CustomConstraintDefinition>,
Sets the value of custom_constraint_definition.
§Example
ⓘ
use google_cloud_orgpolicy_v2::model::constraint::CustomConstraintDefinition;
let x = BooleanConstraint::new().set_custom_constraint_definition(CustomConstraintDefinition::default()/* use setters */);Sourcepub fn set_or_clear_custom_constraint_definition<T>(self, v: Option<T>) -> Selfwhere
T: Into<CustomConstraintDefinition>,
pub fn set_or_clear_custom_constraint_definition<T>(self, v: Option<T>) -> Selfwhere
T: Into<CustomConstraintDefinition>,
Sets or clears the value of custom_constraint_definition.
§Example
ⓘ
use google_cloud_orgpolicy_v2::model::constraint::CustomConstraintDefinition;
let x = BooleanConstraint::new().set_or_clear_custom_constraint_definition(Some(CustomConstraintDefinition::default()/* use setters */));
let x = BooleanConstraint::new().set_or_clear_custom_constraint_definition(None::<CustomConstraintDefinition>);Trait Implementations§
Source§impl Clone for BooleanConstraint
impl Clone for BooleanConstraint
Source§fn clone(&self) -> BooleanConstraint
fn clone(&self) -> BooleanConstraint
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 BooleanConstraint
impl Debug for BooleanConstraint
Source§impl Default for BooleanConstraint
impl Default for BooleanConstraint
Source§fn default() -> BooleanConstraint
fn default() -> BooleanConstraint
Returns the “default value” for a type. Read more
Source§impl Message for BooleanConstraint
impl Message for BooleanConstraint
Source§impl PartialEq for BooleanConstraint
impl PartialEq for BooleanConstraint
Source§fn eq(&self, other: &BooleanConstraint) -> bool
fn eq(&self, other: &BooleanConstraint) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for BooleanConstraint
Auto Trait Implementations§
impl Freeze for BooleanConstraint
impl RefUnwindSafe for BooleanConstraint
impl Send for BooleanConstraint
impl Sync for BooleanConstraint
impl Unpin for BooleanConstraint
impl UnsafeUnpin for BooleanConstraint
impl UnwindSafe for BooleanConstraint
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