#[non_exhaustive]pub struct CELExpression {
pub expression: String,
pub criteria: Option<Criteria>,
/* private fields */
}Expand description
A Common Expression Language (CEL) expression that’s used to create a rule.
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.expression: StringRequired. The logical expression in CEL. The maximum length of the condition is 1000 characters. For more information, see CEL expression.
criteria: Option<Criteria>The criteria of the CEL expression.
Implementations§
Source§impl CELExpression
impl CELExpression
pub fn new() -> Self
Sourcepub fn set_expression<T: Into<String>>(self, v: T) -> Self
pub fn set_expression<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_criteria<T: Into<Option<Criteria>>>(self, v: T) -> Self
pub fn set_criteria<T: Into<Option<Criteria>>>(self, v: T) -> Self
Sets the value of criteria.
Note that all the setters affecting criteria are mutually
exclusive.
§Example
ⓘ
use google_cloud_cloudsecuritycompliance_v1::model::StringList;
let x = CELExpression::new().set_criteria(Some(
google_cloud_cloudsecuritycompliance_v1::model::cel_expression::Criteria::ResourceTypesValues(StringList::default().into())));Sourcepub fn resource_types_values(&self) -> Option<&Box<StringList>>
pub fn resource_types_values(&self) -> Option<&Box<StringList>>
The value of criteria
if it holds a ResourceTypesValues, None if the field is not set or
holds a different branch.
Sourcepub fn set_resource_types_values<T: Into<Box<StringList>>>(self, v: T) -> Self
pub fn set_resource_types_values<T: Into<Box<StringList>>>(self, v: T) -> Self
Sets the value of criteria
to hold a ResourceTypesValues.
Note that all the setters affecting criteria are
mutually exclusive.
§Example
ⓘ
use google_cloud_cloudsecuritycompliance_v1::model::StringList;
let x = CELExpression::new().set_resource_types_values(StringList::default()/* use setters */);
assert!(x.resource_types_values().is_some());Trait Implementations§
Source§impl Clone for CELExpression
impl Clone for CELExpression
Source§fn clone(&self) -> CELExpression
fn clone(&self) -> CELExpression
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 CELExpression
impl Debug for CELExpression
Source§impl Default for CELExpression
impl Default for CELExpression
Source§fn default() -> CELExpression
fn default() -> CELExpression
Returns the “default value” for a type. Read more
Source§impl Message for CELExpression
impl Message for CELExpression
Source§impl PartialEq for CELExpression
impl PartialEq for CELExpression
impl StructuralPartialEq for CELExpression
Auto Trait Implementations§
impl Freeze for CELExpression
impl RefUnwindSafe for CELExpression
impl Send for CELExpression
impl Sync for CELExpression
impl Unpin for CELExpression
impl UnwindSafe for CELExpression
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