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
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
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