pub struct Space {
Show 13 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 admin_installed: bool,
}
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

Resource name of the space.

Format: spaces/{space}

§type: i32
👎Deprecated

Output only. Deprecated: Use space_type instead. The type of a space.

§space_type: i32

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

Output only. Deprecated: Use spaceThreadingState instead. Whether messages are threaded in this space.

§display_name: String

The space’s display name. Required when creating a 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

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.

  • The space is used to [import data to Google Chat] (https://developers.google.com/chat/api/guides/import-data-overview) because import mode spaces must only permit members from the same Google Workspace organization. However, as part of the Google Workspace Developer Preview Program, import mode spaces can permit any Google Chat user so this field can then be set for import mode spaces.

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>

Details about the space including description and rules.

§space_history_state: i32

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.

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

§admin_installed: bool

Output only. Whether the Chat app was installed by a Google Workspace administrator. Administrators can install a Chat app for their domain, organizational unit, or a group of users.

Administrators can only install Chat apps for direct messaging between users and the app. To support admin install, your app must feature direct messaging.

Implementations§

source§

impl Space

source

pub fn type(&self) -> Type

Returns the enum value of type, or the default if the field is set to an invalid enum value.

source

pub fn set_type(&mut self, value: Type)

Sets type to the provided enum value.

source

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.

source

pub fn set_space_threading_state(&mut self, value: SpaceThreadingState)

Sets space_threading_state to the provided enum value.

source

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.

source

pub fn set_space_type(&mut self, value: SpaceType)

Sets space_type to the provided enum value.

source

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.

source

pub fn set_space_history_state(&mut self, value: HistoryState)

Sets space_history_state to the provided enum value.

Trait Implementations§

source§

impl Clone for Space

source§

fn clone(&self) -> Space

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Space

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Space

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Message for Space

source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
source§

fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message to a buffer. Read more
source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
source§

fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
source§

fn decode<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes an instance of the message from a buffer. Read more
source§

fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes a length-delimited instance of the message from the buffer.
source§

fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
source§

fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
source§

impl PartialEq for Space

source§

fn eq(&self, other: &Space) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more