googleapis_tonic_google_chat_v1::google::chat::v1

Struct Space

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

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

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

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(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where 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( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where 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(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

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

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

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

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

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

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where 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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

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,

Source§

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

Source§

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

Source§

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

impl<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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