pub struct Space {Show 19 fields
pub name: String,
pub type: i32,
pub space_type: i32,
pub single_user_bot_dm: bool,
pub threaded: bool,
pub display_name: String,
pub external_user_allowed: bool,
pub space_threading_state: i32,
pub space_details: Option<SpaceDetails>,
pub space_history_state: i32,
pub import_mode: bool,
pub create_time: Option<Timestamp>,
pub last_active_time: Option<Timestamp>,
pub admin_installed: bool,
pub membership_count: Option<MembershipCount>,
pub access_settings: Option<AccessSettings>,
pub space_uri: String,
pub import_mode_expire_time: Option<Timestamp>,
pub space_permission_settings: Option<SpacePermissionSettings>,
}
Expand description
A space in Google Chat. Spaces are conversations between two or more users or 1:1 messages between a user and a Chat app.
Fields§
§name: String
Identifier. Resource name of the space.
Format: spaces/{space}
Where {space}
represents the system-assigned ID for the space. You can
obtain the space ID by calling the
spaces.list()
method or from the space URL. For example, if the space URL
is <https://mail.google.com/mail/u/0/#chat/space/AAAAAAAAA
,> the space ID
is AAAAAAAAA
.
type: i32
Output only. Deprecated: Use space_type
instead.
The type of a space.
space_type: i32
Optional. The type of space. Required when creating a space or updating the space type of a space. Output only for other usage.
single_user_bot_dm: bool
Optional. Whether the space is a DM between a Chat app and a single human.
threaded: bool
Output only. Deprecated: Use spaceThreadingState
instead.
Whether messages are threaded in this space.
display_name: String
Optional. The space’s display name. Required when creating a
space
with a spaceType
of SPACE
. If you receive the error message
ALREADY_EXISTS
when creating a space or updating the displayName
, try a
different displayName
. An existing space within the Google Workspace
organization might already use this display name.
For direct messages, this field might be empty.
Supports up to 128 characters.
external_user_allowed: bool
Optional. Immutable. Whether this space permits any Google Chat user as a member. Input when creating a space in a Google Workspace organization. Omit this field when creating spaces in the following conditions:
- The authenticated user uses a consumer account (unmanaged user account). By default, a space created by a consumer account permits any Google Chat user.
For existing spaces, this field is output only.
space_threading_state: i32
Output only. The threading state in the Chat space.
space_details: Option<SpaceDetails>
Optional. Details about the space including description and rules.
space_history_state: i32
Optional. The message history state for messages and threads in this space.
import_mode: bool
Optional. Whether this space is created in Import Mode
as part of a data
migration into Google Workspace. While spaces are being imported, they
aren’t visible to users until the import is complete.
Creating a space in Import Mode
requires user
authentication.
create_time: Option<Timestamp>
Optional. Immutable. For spaces created in Chat, the time the space was created. This field is output only, except when used in import mode spaces.
For import mode spaces, set this field to the historical timestamp at which the space was created in the source in order to preserve the original creation time.
Only populated in the output when spaceType
is GROUP_CHAT
or SPACE
.
last_active_time: Option<Timestamp>
Output only. Timestamp of the last message in the space.
admin_installed: bool
Output only. For direct message (DM) spaces with a Chat app, whether the space was created by a Google Workspace administrator. Administrators can install and set up a direct message with a Chat app on behalf of users in their organization.
To support admin install, your Chat app must feature direct messaging.
membership_count: Option<MembershipCount>
Output only. The count of joined memberships grouped by member type.
Populated when the space_type
is SPACE
, DIRECT_MESSAGE
or
GROUP_CHAT
.
access_settings: Option<AccessSettings>
Optional. Specifies the access
setting of the space.
Only populated when the space_type
is SPACE
.
space_uri: String
Output only. The URI for a user to access the space.
import_mode_expire_time: Option<Timestamp>
Output only. The time when the space will be automatically deleted by the system if it remains in import mode.
Each space created in import mode must exit this mode before this expire
time using spaces.completeImport
.
This field is only populated for spaces that were created with import mode.
space_permission_settings: Option<SpacePermissionSettings>
Represents the [permission settings]
(https://support.google.com/chat/answer/13340792) of a space. Only
populated when the space_type
is SPACE
.
Requires user authentication.
Implementations§
Source§impl Space
impl Space
Sourcepub fn type(&self) -> Type
pub fn type(&self) -> Type
Returns the enum value of type
, or the default if the field is set to an invalid enum value.
Sourcepub fn space_threading_state(&self) -> SpaceThreadingState
pub fn space_threading_state(&self) -> SpaceThreadingState
Returns the enum value of space_threading_state
, or the default if the field is set to an invalid enum value.
Sourcepub fn set_space_threading_state(&mut self, value: SpaceThreadingState)
pub fn set_space_threading_state(&mut self, value: SpaceThreadingState)
Sets space_threading_state
to the provided enum value.
Sourcepub fn space_type(&self) -> SpaceType
pub fn space_type(&self) -> SpaceType
Returns the enum value of space_type
, or the default if the field is set to an invalid enum value.
Sourcepub fn set_space_type(&mut self, value: SpaceType)
pub fn set_space_type(&mut self, value: SpaceType)
Sets space_type
to the provided enum value.
Sourcepub fn space_history_state(&self) -> HistoryState
pub fn space_history_state(&self) -> HistoryState
Returns the enum value of space_history_state
, or the default if the field is set to an invalid enum value.
Sourcepub fn set_space_history_state(&mut self, value: HistoryState)
pub fn set_space_history_state(&mut self, value: HistoryState)
Sets space_history_state
to the provided enum value.
Trait Implementations§
Source§impl Message for Space
impl Message for Space
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
.impl StructuralPartialEq for Space
Auto Trait Implementations§
impl Freeze for Space
impl RefUnwindSafe for Space
impl Send for Space
impl Sync for Space
impl Unpin for Space
impl UnwindSafe for Space
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