Struct google_api_proto::google::chat::v1::SetUpSpaceRequest
source · pub struct SetUpSpaceRequest {
pub space: Option<Space>,
pub request_id: String,
pub memberships: Vec<Membership>,
}
Expand description
Request to create a space and add specified users to it.
Fields§
§space: Option<Space>
Required. The Space.spaceType
field is required.
To create a space, set Space.spaceType
to SPACE
and set
Space.displayName
. If you receive the error message ALREADY_EXISTS
when
setting up a space, try a different displayName
. An existing space
within the Google Workspace organization might already use this display
name.
To create a group chat, set Space.spaceType
to
GROUP_CHAT
. Don’t set Space.displayName
.
To create a 1:1 conversation between humans,
set Space.spaceType
to DIRECT_MESSAGE
and set
Space.singleUserBotDm
to false
. Don’t set Space.displayName
or
Space.spaceDetails
.
To create an 1:1 conversation between a human and the calling Chat app, set
Space.spaceType
to DIRECT_MESSAGE
and
Space.singleUserBotDm
to true
. Don’t set Space.displayName
or
Space.spaceDetails
.
If a DIRECT_MESSAGE
space already exists, that space is returned instead
of creating a new space.
request_id: String
Optional. A unique identifier for this request. A random UUID is recommended. Specifying an existing request ID returns the space created with that ID instead of creating a new space. Specifying an existing request ID from the same Chat app with a different authenticated user returns an error.
memberships: Vec<Membership>
Optional. The Google Chat users or groups to invite to join the space. Omit the calling user, as they are added automatically.
The set currently allows up to 20 memberships (in addition to the caller).
For human membership, the Membership.member
field must contain a user
with name
populated (format: users/{user}
) and type
set to
User.Type.HUMAN
. You can only add human users when setting up a space
(adding Chat apps is only supported for direct message setup with the
calling app). You can also add members using the user’s email as an alias
for {user}. For example, the user.name
can be users/example@gmail.com
.
To invite Gmail users or users from external Google Workspace domains,
user’s email must be used for {user}
.
For Google group membership, the Membership.group_member
field must
contain a group
with name
populated (format groups/{group}
). You
can only add Google groups when setting Space.spaceType
to SPACE
.
Optional when setting Space.spaceType
to SPACE
.
Required when setting Space.spaceType
to GROUP_CHAT
, along with at
least two memberships.
Required when setting Space.spaceType
to DIRECT_MESSAGE
with a human
user, along with exactly one membership.
Must be empty when creating a 1:1 conversation between a human and the
calling Chat app (when setting Space.spaceType
to
DIRECT_MESSAGE
and Space.singleUserBotDm
to true
).
Trait Implementations§
source§impl Clone for SetUpSpaceRequest
impl Clone for SetUpSpaceRequest
source§fn clone(&self) -> SetUpSpaceRequest
fn clone(&self) -> SetUpSpaceRequest
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SetUpSpaceRequest
impl Debug for SetUpSpaceRequest
source§impl Default for SetUpSpaceRequest
impl Default for SetUpSpaceRequest
source§impl Message for SetUpSpaceRequest
impl Message for SetUpSpaceRequest
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 SetUpSpaceRequest
impl PartialEq for SetUpSpaceRequest
source§fn eq(&self, other: &SetUpSpaceRequest) -> bool
fn eq(&self, other: &SetUpSpaceRequest) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for SetUpSpaceRequest
Auto Trait Implementations§
impl Freeze for SetUpSpaceRequest
impl RefUnwindSafe for SetUpSpaceRequest
impl Send for SetUpSpaceRequest
impl Sync for SetUpSpaceRequest
impl Unpin for SetUpSpaceRequest
impl UnwindSafe for SetUpSpaceRequest
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