Struct google_api_proto::google::chat::v1::Membership
source · 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
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
source§fn eq(&self, other: &Membership) -> bool
fn eq(&self, other: &Membership) -> bool
self
and other
values to be equal, and is used
by ==
.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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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