pub struct Membership {
pub name: String,
pub state: i32,
pub role: i32,
pub create_time: Option<Timestamp>,
pub delete_time: Option<Timestamp>,
pub member_type: Option<MemberType>,
}
Expand description
Represents a membership relation in Google Chat, such as whether a user or Chat app is invited to, part of, or absent from a space.
Fields§
§name: String
Identifier. Resource name of the membership, assigned by the server.
Format: spaces/{space}/members/{member}
state: i32
Output only. State of the membership.
role: i32
Optional. User’s role within a Chat space, which determines their permitted actions in the space.
This field can only be used as input in UpdateMembership
.
create_time: Option<Timestamp>
Optional. Immutable. The creation time of the membership, such as when a member joined or was invited to join a space. This field is output only, except when used to import historical memberships in import mode spaces.
delete_time: Option<Timestamp>
Optional. Immutable. The deletion time of the membership, such as when a member left or was removed from a space. This field is output only, except when used to import historical memberships in import mode spaces.
member_type: Option<MemberType>
Member associated with this membership. Other member types might be supported in the future.
Implementations§
Source§impl Membership
impl Membership
Sourcepub fn state(&self) -> MembershipState
pub fn state(&self) -> MembershipState
Returns the enum value of state
, or the default if the field is set to an invalid enum value.
Sourcepub fn set_state(&mut self, value: MembershipState)
pub fn set_state(&mut self, value: MembershipState)
Sets state
to the provided enum value.
Sourcepub fn role(&self) -> MembershipRole
pub fn role(&self) -> MembershipRole
Returns the enum value of role
, or the default if the field is set to an invalid enum value.
Sourcepub fn set_role(&mut self, value: MembershipRole)
pub fn set_role(&mut self, value: MembershipRole)
Sets role
to the provided enum value.
Trait Implementations§
Source§impl Clone for Membership
impl Clone for Membership
Source§fn clone(&self) -> Membership
fn clone(&self) -> Membership
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for Membership
impl Debug for Membership
Source§impl Default for Membership
impl Default for Membership
Source§impl Message for Membership
impl Message for Membership
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.Source§impl PartialEq for Membership
impl PartialEq for Membership
impl StructuralPartialEq for Membership
Auto Trait Implementations§
impl Freeze for Membership
impl RefUnwindSafe for Membership
impl Send for Membership
impl Sync for Membership
impl Unpin for Membership
impl UnwindSafe for Membership
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> 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