#[non_exhaustive]pub struct Constraint {
pub implementation: Option<Implementation>,
/* private fields */
}Expand description
Representation of a Constraint.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.implementation: Option<Implementation>Implementations§
Source§impl Constraint
impl Constraint
pub fn new() -> Self
Sourcepub fn set_implementation<T: Into<Option<Implementation>>>(self, v: T) -> Self
pub fn set_implementation<T: Into<Option<Implementation>>>(self, v: T) -> Self
Sets the value of implementation.
Note that all the setters affecting implementation are mutually
exclusive.
§Example
use google_cloud_securityposture_v1::model::SecurityHealthAnalyticsModule;
let x = Constraint::new().set_implementation(Some(
google_cloud_securityposture_v1::model::constraint::Implementation::SecurityHealthAnalyticsModule(SecurityHealthAnalyticsModule::default().into())));Sourcepub fn security_health_analytics_module(
&self,
) -> Option<&Box<SecurityHealthAnalyticsModule>>
pub fn security_health_analytics_module( &self, ) -> Option<&Box<SecurityHealthAnalyticsModule>>
The value of implementation
if it holds a SecurityHealthAnalyticsModule, None if the field is not set or
holds a different branch.
Sourcepub fn set_security_health_analytics_module<T: Into<Box<SecurityHealthAnalyticsModule>>>(
self,
v: T,
) -> Self
pub fn set_security_health_analytics_module<T: Into<Box<SecurityHealthAnalyticsModule>>>( self, v: T, ) -> Self
Sets the value of implementation
to hold a SecurityHealthAnalyticsModule.
Note that all the setters affecting implementation are
mutually exclusive.
§Example
use google_cloud_securityposture_v1::model::SecurityHealthAnalyticsModule;
let x = Constraint::new().set_security_health_analytics_module(SecurityHealthAnalyticsModule::default()/* use setters */);
assert!(x.security_health_analytics_module().is_some());
assert!(x.security_health_analytics_custom_module().is_none());
assert!(x.org_policy_constraint().is_none());
assert!(x.org_policy_constraint_custom().is_none());Sourcepub fn security_health_analytics_custom_module(
&self,
) -> Option<&Box<SecurityHealthAnalyticsCustomModule>>
pub fn security_health_analytics_custom_module( &self, ) -> Option<&Box<SecurityHealthAnalyticsCustomModule>>
The value of implementation
if it holds a SecurityHealthAnalyticsCustomModule, None if the field is not set or
holds a different branch.
Sourcepub fn set_security_health_analytics_custom_module<T: Into<Box<SecurityHealthAnalyticsCustomModule>>>(
self,
v: T,
) -> Self
pub fn set_security_health_analytics_custom_module<T: Into<Box<SecurityHealthAnalyticsCustomModule>>>( self, v: T, ) -> Self
Sets the value of implementation
to hold a SecurityHealthAnalyticsCustomModule.
Note that all the setters affecting implementation are
mutually exclusive.
§Example
use google_cloud_securityposture_v1::model::SecurityHealthAnalyticsCustomModule;
let x = Constraint::new().set_security_health_analytics_custom_module(SecurityHealthAnalyticsCustomModule::default()/* use setters */);
assert!(x.security_health_analytics_custom_module().is_some());
assert!(x.security_health_analytics_module().is_none());
assert!(x.org_policy_constraint().is_none());
assert!(x.org_policy_constraint_custom().is_none());Sourcepub fn org_policy_constraint(&self) -> Option<&Box<OrgPolicyConstraint>>
pub fn org_policy_constraint(&self) -> Option<&Box<OrgPolicyConstraint>>
The value of implementation
if it holds a OrgPolicyConstraint, None if the field is not set or
holds a different branch.
Sourcepub fn set_org_policy_constraint<T: Into<Box<OrgPolicyConstraint>>>(
self,
v: T,
) -> Self
pub fn set_org_policy_constraint<T: Into<Box<OrgPolicyConstraint>>>( self, v: T, ) -> Self
Sets the value of implementation
to hold a OrgPolicyConstraint.
Note that all the setters affecting implementation are
mutually exclusive.
§Example
use google_cloud_securityposture_v1::model::OrgPolicyConstraint;
let x = Constraint::new().set_org_policy_constraint(OrgPolicyConstraint::default()/* use setters */);
assert!(x.org_policy_constraint().is_some());
assert!(x.security_health_analytics_module().is_none());
assert!(x.security_health_analytics_custom_module().is_none());
assert!(x.org_policy_constraint_custom().is_none());Sourcepub fn org_policy_constraint_custom(
&self,
) -> Option<&Box<OrgPolicyConstraintCustom>>
pub fn org_policy_constraint_custom( &self, ) -> Option<&Box<OrgPolicyConstraintCustom>>
The value of implementation
if it holds a OrgPolicyConstraintCustom, None if the field is not set or
holds a different branch.
Sourcepub fn set_org_policy_constraint_custom<T: Into<Box<OrgPolicyConstraintCustom>>>(
self,
v: T,
) -> Self
pub fn set_org_policy_constraint_custom<T: Into<Box<OrgPolicyConstraintCustom>>>( self, v: T, ) -> Self
Sets the value of implementation
to hold a OrgPolicyConstraintCustom.
Note that all the setters affecting implementation are
mutually exclusive.
§Example
use google_cloud_securityposture_v1::model::OrgPolicyConstraintCustom;
let x = Constraint::new().set_org_policy_constraint_custom(OrgPolicyConstraintCustom::default()/* use setters */);
assert!(x.org_policy_constraint_custom().is_some());
assert!(x.security_health_analytics_module().is_none());
assert!(x.security_health_analytics_custom_module().is_none());
assert!(x.org_policy_constraint().is_none());Trait Implementations§
Source§impl Clone for Constraint
impl Clone for Constraint
Source§fn clone(&self) -> Constraint
fn clone(&self) -> Constraint
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more