#[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
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Constraint
impl Debug for Constraint
Source§impl Default for Constraint
impl Default for Constraint
Source§fn default() -> Constraint
fn default() -> Constraint
Source§impl PartialEq for Constraint
impl PartialEq for Constraint
impl StructuralPartialEq for Constraint
Auto Trait Implementations§
impl Freeze for Constraint
impl RefUnwindSafe for Constraint
impl Send for Constraint
impl Sync for Constraint
impl Unpin for Constraint
impl UnsafeUnpin for Constraint
impl UnwindSafe for Constraint
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request