pub struct SearchSpacesRequest {
pub use_admin_access: bool,
pub page_size: i32,
pub page_token: String,
pub query: String,
pub order_by: String,
}
Expand description
Request to search for a list of spaces based on a query.
Fields§
§use_admin_access: bool
When true
, the method runs using the user’s Google Workspace
administrator privileges.
The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege.
Requires either the chat.admin.spaces.readonly
or chat.admin.spaces
OAuth 2.0
scope.
This method currently only supports admin access, thus only true
is
accepted for this field.
page_size: i32
The maximum number of spaces to return. The service may return fewer than this value.
If unspecified, at most 100 spaces are returned.
The maximum value is 1000. If you use a value more than 1000, it’s automatically changed to 1000.
page_token: String
A token, received from the previous search spaces call. Provide this parameter to retrieve the subsequent page.
When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results.
query: String
Required. A search query.
You can search by using the following parameters:
create_time
customer
display_name
external_user_allowed
last_active_time
space_history_state
space_type
create_time
and last_active_time
accept a timestamp in
RFC-3339 format and the supported
comparison operators are: =
, <
, >
, <=
, >=
.
customer
is required and is used to indicate which customer
to fetch spaces from. customers/my_customer
is the only supported value.
display_name
only accepts the HAS
(:
) operator. The text to
match is first tokenized into tokens and each token is prefix-matched
case-insensitively and independently as a substring anywhere in the space’s
display_name
. For example, Fun Eve
matches Fun event
or The evening was fun
, but not notFun event
or even
.
external_user_allowed
accepts either true
or false
.
space_history_state
only accepts values from the [historyState
]
(https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.HistoryState)
field of a space
resource.
space_type
is required and the only valid value is SPACE
.
Across different fields, only AND
operators are supported. A valid
example is space_type = "SPACE" AND display_name:"Hello"
and an invalid
example is space_type = "SPACE" OR display_name:"Hello"
.
Among the same field,
space_type
doesn’t support AND
or OR
operators.
display_name
, ‘space_history_state’, and ‘external_user_allowed’ only
support OR
operators.
last_active_time
and create_time
support both AND
and OR
operators.
AND
can only be used to represent an interval, such as last_active_time < "2022-01-01T00:00:00+00:00" AND last_active_time > "2023-01-01T00:00:00+00:00"
.
The following example queries are valid:
customer = "customers/my_customer" AND space_type = "SPACE"
customer = "customers/my_customer" AND space_type = "SPACE" AND
display_name:"Hello World"
customer = "customers/my_customer" AND space_type = "SPACE" AND
(last_active_time < "2020-01-01T00:00:00+00:00" OR last_active_time >
"2022-01-01T00:00:00+00:00")
customer = "customers/my_customer" AND space_type = "SPACE" AND
(display_name:"Hello World" OR display_name:"Fun event") AND
(last_active_time > "2020-01-01T00:00:00+00:00" AND last_active_time <
"2022-01-01T00:00:00+00:00")
customer = "customers/my_customer" AND space_type = "SPACE" AND
(create_time > "2019-01-01T00:00:00+00:00" AND create_time <
"2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND
(space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF")
order_by: String
Optional. How the list of spaces is ordered.
Supported attributes to order by are:
membership_count.joined_direct_human_user_count
— Denotes the count of human users that have directly joined a space.last_active_time
— Denotes the time when last eligible item is added to any topic of this space.create_time
— Denotes the time of the space creation.
Valid ordering operation values are:
-
ASC
for ascending. Default value. -
DESC
for descending.
The supported syntax are:
membership_count.joined_direct_human_user_count DESC
membership_count.joined_direct_human_user_count ASC
last_active_time DESC
last_active_time ASC
create_time DESC
create_time ASC
Trait Implementations§
Source§impl Clone for SearchSpacesRequest
impl Clone for SearchSpacesRequest
Source§fn clone(&self) -> SearchSpacesRequest
fn clone(&self) -> SearchSpacesRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for SearchSpacesRequest
impl Debug for SearchSpacesRequest
Source§impl Default for SearchSpacesRequest
impl Default for SearchSpacesRequest
Source§impl Message for SearchSpacesRequest
impl Message for SearchSpacesRequest
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 SearchSpacesRequest
impl PartialEq for SearchSpacesRequest
impl StructuralPartialEq for SearchSpacesRequest
Auto Trait Implementations§
impl Freeze for SearchSpacesRequest
impl RefUnwindSafe for SearchSpacesRequest
impl Send for SearchSpacesRequest
impl Sync for SearchSpacesRequest
impl Unpin for SearchSpacesRequest
impl UnwindSafe for SearchSpacesRequest
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