#[non_exhaustive]pub struct AnalyzerOrgPolicyConstraint {
pub constraint_definition: Option<ConstraintDefinition>,
/* private fields */
}Expand description
The organization policy constraint definition.
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.constraint_definition: Option<ConstraintDefinition>Implementations§
Source§impl AnalyzerOrgPolicyConstraint
impl AnalyzerOrgPolicyConstraint
pub fn new() -> Self
Sourcepub fn set_constraint_definition<T: Into<Option<ConstraintDefinition>>>(
self,
v: T,
) -> Self
pub fn set_constraint_definition<T: Into<Option<ConstraintDefinition>>>( self, v: T, ) -> Self
Sets the value of constraint_definition.
Note that all the setters affecting constraint_definition are mutually
exclusive.
§Example
ⓘ
use google_cloud_asset_v1::model::analyzer_org_policy_constraint::Constraint;
let x = AnalyzerOrgPolicyConstraint::new().set_constraint_definition(Some(
google_cloud_asset_v1::model::analyzer_org_policy_constraint::ConstraintDefinition::GoogleDefinedConstraint(Constraint::default().into())));Sourcepub fn google_defined_constraint(&self) -> Option<&Box<Constraint>>
pub fn google_defined_constraint(&self) -> Option<&Box<Constraint>>
The value of constraint_definition
if it holds a GoogleDefinedConstraint, None if the field is not set or
holds a different branch.
Sourcepub fn set_google_defined_constraint<T: Into<Box<Constraint>>>(
self,
v: T,
) -> Self
pub fn set_google_defined_constraint<T: Into<Box<Constraint>>>( self, v: T, ) -> Self
Sets the value of constraint_definition
to hold a GoogleDefinedConstraint.
Note that all the setters affecting constraint_definition are
mutually exclusive.
§Example
ⓘ
use google_cloud_asset_v1::model::analyzer_org_policy_constraint::Constraint;
let x = AnalyzerOrgPolicyConstraint::new().set_google_defined_constraint(Constraint::default()/* use setters */);
assert!(x.google_defined_constraint().is_some());
assert!(x.custom_constraint().is_none());Sourcepub fn custom_constraint(&self) -> Option<&Box<CustomConstraint>>
pub fn custom_constraint(&self) -> Option<&Box<CustomConstraint>>
The value of constraint_definition
if it holds a CustomConstraint, None if the field is not set or
holds a different branch.
Sourcepub fn set_custom_constraint<T: Into<Box<CustomConstraint>>>(self, v: T) -> Self
pub fn set_custom_constraint<T: Into<Box<CustomConstraint>>>(self, v: T) -> Self
Sets the value of constraint_definition
to hold a CustomConstraint.
Note that all the setters affecting constraint_definition are
mutually exclusive.
§Example
ⓘ
use google_cloud_asset_v1::model::analyzer_org_policy_constraint::CustomConstraint;
let x = AnalyzerOrgPolicyConstraint::new().set_custom_constraint(CustomConstraint::default()/* use setters */);
assert!(x.custom_constraint().is_some());
assert!(x.google_defined_constraint().is_none());Trait Implementations§
Source§impl Clone for AnalyzerOrgPolicyConstraint
impl Clone for AnalyzerOrgPolicyConstraint
Source§fn clone(&self) -> AnalyzerOrgPolicyConstraint
fn clone(&self) -> AnalyzerOrgPolicyConstraint
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 AnalyzerOrgPolicyConstraint
impl Debug for AnalyzerOrgPolicyConstraint
Source§impl Default for AnalyzerOrgPolicyConstraint
impl Default for AnalyzerOrgPolicyConstraint
Source§fn default() -> AnalyzerOrgPolicyConstraint
fn default() -> AnalyzerOrgPolicyConstraint
Returns the “default value” for a type. Read more
impl StructuralPartialEq for AnalyzerOrgPolicyConstraint
Auto Trait Implementations§
impl Freeze for AnalyzerOrgPolicyConstraint
impl RefUnwindSafe for AnalyzerOrgPolicyConstraint
impl Send for AnalyzerOrgPolicyConstraint
impl Sync for AnalyzerOrgPolicyConstraint
impl Unpin for AnalyzerOrgPolicyConstraint
impl UnwindSafe for AnalyzerOrgPolicyConstraint
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