pub struct MemberRestriction {
pub evaluation: Option<RestrictionEvaluation>,
pub query: Option<String>,
}
Expand description
The definition of MemberRestriction
This type is not used in any activity, and only used as part of another schema.
Fields§
§evaluation: Option<RestrictionEvaluation>
The evaluated state of this restriction on a group.
query: Option<String>
Member Restriction as defined by CEL expression. Supported restrictions are: member.customer_id
and member.type
. Valid values for member.type
are 1
, 2
and 3
. They correspond to USER, SERVICE_ACCOUNT, and GROUP respectively. The value for member.customer_id
only supports groupCustomerId()
currently which means the customer id of the group will be used for restriction. Supported operators are &&
, ||
and ==
, corresponding to AND, OR, and EQUAL. Examples: Allow only service accounts of given customer to be members. member.type == 2 && member.customer_id == groupCustomerId()
Allow only users or groups to be members. member.type == 1 || member.type == 3
Trait Implementations§
Source§impl Clone for MemberRestriction
impl Clone for MemberRestriction
Source§fn clone(&self) -> MemberRestriction
fn clone(&self) -> MemberRestriction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MemberRestriction
impl Debug for MemberRestriction
Source§impl Default for MemberRestriction
impl Default for MemberRestriction
Source§fn default() -> MemberRestriction
fn default() -> MemberRestriction
Source§impl<'de> Deserialize<'de> for MemberRestriction
impl<'de> Deserialize<'de> for MemberRestriction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for MemberRestriction
impl Serialize for MemberRestriction
impl Part for MemberRestriction
Auto Trait Implementations§
impl Freeze for MemberRestriction
impl RefUnwindSafe for MemberRestriction
impl Send for MemberRestriction
impl Sync for MemberRestriction
impl Unpin for MemberRestriction
impl UnwindSafe for MemberRestriction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more