Struct google_api_proto::google::chat::v1::CreateMembershipRequest
source · pub struct CreateMembershipRequest {
pub parent: String,
pub membership: Option<Membership>,
}
Expand description
Request message for creating a membership.
Fields§
§parent: String
Required. The resource name of the space for which to create the membership.
Format: spaces/{space}
membership: Option<Membership>
Required. The membership relation to create.
The memberType
field must contain a user with the user.name
and
user.type
fields populated. The server will assign a resource name
and overwrite anything specified.
When a Chat app creates a membership relation for a human user, it must use
the chat.memberships
scope, set user.type
to HUMAN
, and set
user.name
with format users/{user}
, where {user}
can be the email
address for the user. For users in the same Workspace organization {user}
can also be the id
of the
person from the
People API, or the id
for the user in the Directory API. For example, if
the People API Person profile ID for user@example.com
is 123456789
, you
can add the user to the space by setting the membership.member.name
to
users/user@example.com
or users/123456789
. When a Chat app creates a
membership relation for itself, it must use the chat.memberships.app
scope, set user.type
to BOT
, and set user.name
to users/app
.
Trait Implementations§
source§impl Clone for CreateMembershipRequest
impl Clone for CreateMembershipRequest
source§fn clone(&self) -> CreateMembershipRequest
fn clone(&self) -> CreateMembershipRequest
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CreateMembershipRequest
impl Debug for CreateMembershipRequest
source§impl Default for CreateMembershipRequest
impl Default for CreateMembershipRequest
source§impl Message for CreateMembershipRequest
impl Message for CreateMembershipRequest
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 CreateMembershipRequest
impl PartialEq for CreateMembershipRequest
source§fn eq(&self, other: &CreateMembershipRequest) -> bool
fn eq(&self, other: &CreateMembershipRequest) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for CreateMembershipRequest
Auto Trait Implementations§
impl Freeze for CreateMembershipRequest
impl RefUnwindSafe for CreateMembershipRequest
impl Send for CreateMembershipRequest
impl Sync for CreateMembershipRequest
impl Unpin for CreateMembershipRequest
impl UnwindSafe for CreateMembershipRequest
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