target.apidocs.com.google.api.services.chat.v1.HangoutsChat.Spaces.Search.html Maven / Gradle / Ivy
HangoutsChat.Spaces.Search (Google Chat API v1-rev20240829-2.0.0)
com.google.api.services.chat.v1
Class HangoutsChat.Spaces.Search
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.googleapis.services.AbstractGoogleClientRequest<T>
-
- com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest<T>
-
- com.google.api.services.chat.v1.HangoutsChatRequest<SearchSpacesResponse>
-
- com.google.api.services.chat.v1.HangoutsChat.Spaces.Search
-
- Enclosing class:
- HangoutsChat.Spaces
public class HangoutsChat.Spaces.Search
extends HangoutsChatRequest<SearchSpacesResponse>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Modifier
Constructor and Description
protected
Search()
[Developer Preview](https://developers.google.com/workspace/preview).
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
com.google.api.client.http.HttpRequest
buildHttpRequestUsingHead()
com.google.api.client.http.HttpResponse
executeUsingHead()
String
getOrderBy()
Optional.
Integer
getPageSize()
The maximum number of spaces to return.
String
getPageToken()
A token, received from the previous search spaces call.
String
getQuery()
Required.
Boolean
getUseAdminAccess()
When `true`, the method runs using the user's Google Workspace administrator privileges.
HangoutsChat.Spaces.Search
set(String parameterName,
Object value)
HangoutsChat.Spaces.Search
set$Xgafv(String $Xgafv)
V1 error format.
HangoutsChat.Spaces.Search
setAccessToken(String accessToken)
OAuth access token.
HangoutsChat.Spaces.Search
setAlt(String alt)
Data format for response.
HangoutsChat.Spaces.Search
setCallback(String callback)
JSONP
HangoutsChat.Spaces.Search
setFields(String fields)
Selector specifying which fields to include in a partial response.
HangoutsChat.Spaces.Search
setKey(String key)
API key.
HangoutsChat.Spaces.Search
setOauthToken(String oauthToken)
OAuth 2.0 token for the current user.
HangoutsChat.Spaces.Search
setOrderBy(String orderBy)
Optional.
HangoutsChat.Spaces.Search
setPageSize(Integer pageSize)
The maximum number of spaces to return.
HangoutsChat.Spaces.Search
setPageToken(String pageToken)
A token, received from the previous search spaces call.
HangoutsChat.Spaces.Search
setPrettyPrint(Boolean prettyPrint)
Returns response with indentations and line breaks.
HangoutsChat.Spaces.Search
setQuery(String query)
Required.
HangoutsChat.Spaces.Search
setQuotaUser(String quotaUser)
Available to use for quota purposes for server-side applications.
HangoutsChat.Spaces.Search
setUploadProtocol(String uploadProtocol)
Upload protocol for media (e.g.
HangoutsChat.Spaces.Search
setUploadType(String uploadType)
Legacy upload protocol for media (e.g.
HangoutsChat.Spaces.Search
setUseAdminAccess(Boolean useAdminAccess)
When `true`, the method runs using the user's Google Workspace administrator privileges.
-
Methods inherited from class com.google.api.services.chat.v1.HangoutsChatRequest
get$Xgafv, getAbstractGoogleClient, getAccessToken, getAlt, getCallback, getFields, getKey, getOauthToken, getPrettyPrint, getQuotaUser, getUploadProtocol, getUploadType, setDisableGZipContent, setRequestHeaders
-
Methods inherited from class com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest
getJsonContent, newExceptionOnError, queue
-
Methods inherited from class com.google.api.client.googleapis.services.AbstractGoogleClientRequest
buildHttpRequest, buildHttpRequestUrl, checkRequiredParameter, execute, executeAndDownloadTo, executeAsInputStream, executeMedia, executeMediaAndDownloadTo, executeMediaAsInputStream, executeUnparsed, getDisableGZipContent, getHttpContent, getLastResponseHeaders, getLastStatusCode, getLastStatusMessage, getMediaHttpDownloader, getMediaHttpUploader, getRequestHeaders, getRequestMethod, getResponseClass, getReturnRawInputSteam, getUriTemplate, initializeMediaDownload, initializeMediaUpload, queue, setReturnRawInputStream
-
Methods inherited from class com.google.api.client.util.GenericData
clone, entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys, toString
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
Constructor Detail
-
Search
protected Search()
[Developer Preview](https://developers.google.com/workspace/preview). Returns a list of spaces
based on a user's search. Requires [user
authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
The user must be an administrator for the Google Workspace organization. In the request, set
`use_admin_access` to `true`.
Create a request for the method "spaces.search".
This request holds the parameters needed by the the chat server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation. HangoutsChat.initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)
must
be called to initialize this instance immediately after invoking the constructor.
- Since:
- 1.13
-
Method Detail
-
executeUsingHead
public com.google.api.client.http.HttpResponse executeUsingHead()
throws IOException
- Overrides:
executeUsingHead
in class com.google.api.client.googleapis.services.AbstractGoogleClientRequest<SearchSpacesResponse>
- Throws:
IOException
-
buildHttpRequestUsingHead
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead()
throws IOException
- Overrides:
buildHttpRequestUsingHead
in class com.google.api.client.googleapis.services.AbstractGoogleClientRequest<SearchSpacesResponse>
- Throws:
IOException
-
set$Xgafv
public HangoutsChat.Spaces.Search set$Xgafv(String $Xgafv)
Description copied from class: HangoutsChatRequest
V1 error format.
- Overrides:
set$Xgafv
in class HangoutsChatRequest<SearchSpacesResponse>
-
setAccessToken
public HangoutsChat.Spaces.Search setAccessToken(String accessToken)
Description copied from class: HangoutsChatRequest
OAuth access token.
- Overrides:
setAccessToken
in class HangoutsChatRequest<SearchSpacesResponse>
-
setAlt
public HangoutsChat.Spaces.Search setAlt(String alt)
Description copied from class: HangoutsChatRequest
Data format for response.
- Overrides:
setAlt
in class HangoutsChatRequest<SearchSpacesResponse>
-
setCallback
public HangoutsChat.Spaces.Search setCallback(String callback)
Description copied from class: HangoutsChatRequest
JSONP
- Overrides:
setCallback
in class HangoutsChatRequest<SearchSpacesResponse>
-
setFields
public HangoutsChat.Spaces.Search setFields(String fields)
Description copied from class: HangoutsChatRequest
Selector specifying which fields to include in a partial response.
- Overrides:
setFields
in class HangoutsChatRequest<SearchSpacesResponse>
-
setKey
public HangoutsChat.Spaces.Search setKey(String key)
Description copied from class: HangoutsChatRequest
API key. Your API key identifies your project and provides you with API access, quota, and
reports. Required unless you provide an OAuth 2.0 token.
- Overrides:
setKey
in class HangoutsChatRequest<SearchSpacesResponse>
-
setOauthToken
public HangoutsChat.Spaces.Search setOauthToken(String oauthToken)
Description copied from class: HangoutsChatRequest
OAuth 2.0 token for the current user.
- Overrides:
setOauthToken
in class HangoutsChatRequest<SearchSpacesResponse>
-
setPrettyPrint
public HangoutsChat.Spaces.Search setPrettyPrint(Boolean prettyPrint)
Description copied from class: HangoutsChatRequest
Returns response with indentations and line breaks.
- Overrides:
setPrettyPrint
in class HangoutsChatRequest<SearchSpacesResponse>
-
setQuotaUser
public HangoutsChat.Spaces.Search setQuotaUser(String quotaUser)
Description copied from class: HangoutsChatRequest
Available to use for quota purposes for server-side applications. Can be any arbitrary string
assigned to a user, but should not exceed 40 characters.
- Overrides:
setQuotaUser
in class HangoutsChatRequest<SearchSpacesResponse>
-
setUploadType
public HangoutsChat.Spaces.Search setUploadType(String uploadType)
Description copied from class: HangoutsChatRequest
Legacy upload protocol for media (e.g. "media", "multipart").
- Overrides:
setUploadType
in class HangoutsChatRequest<SearchSpacesResponse>
-
setUploadProtocol
public HangoutsChat.Spaces.Search setUploadProtocol(String uploadProtocol)
Description copied from class: HangoutsChatRequest
Upload protocol for media (e.g. "raw", "multipart").
- Overrides:
setUploadProtocol
in class HangoutsChatRequest<SearchSpacesResponse>
-
getOrderBy
public String getOrderBy()
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`
-
setOrderBy
public HangoutsChat.Spaces.Search setOrderBy(String orderBy)
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`
-
getPageSize
public Integer getPageSize()
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.
-
setPageSize
public HangoutsChat.Spaces.Search setPageSize(Integer pageSize)
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.
-
getPageToken
public String getPageToken()
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.
-
setPageToken
public HangoutsChat.Spaces.Search setPageToken(String pageToken)
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.
-
getQuery
public String getQuery()
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](https://www.rfc-editor.org/rfc/rfc3339) 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") ```
-
setQuery
public HangoutsChat.Spaces.Search setQuery(String query)
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](https://www.rfc-editor.org/rfc/rfc3339) 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") ```
-
getUseAdminAccess
public Boolean getUseAdminAccess()
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](https://support.google.com/a/answer/13369245). Requires either the
`chat.admin.spaces.readonly` or `chat.admin.spaces` [OAuth 2.0
scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). This
method currently only supports admin access, thus only `true` is accepted for this field.
-
setUseAdminAccess
public HangoutsChat.Spaces.Search setUseAdminAccess(Boolean useAdminAccess)
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](https://support.google.com/a/answer/13369245). Requires either the
`chat.admin.spaces.readonly` or `chat.admin.spaces` [OAuth 2.0
scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-
scopes). This method currently only supports admin access, thus only `true` is accepted for
this field.
-
set
public HangoutsChat.Spaces.Search set(String parameterName,
Object value)
- Overrides:
set
in class HangoutsChatRequest<SearchSpacesResponse>
Copyright © 2011–2024 Google. All rights reserved.
© 2015 - 2024 Weber Informatics LLC | Privacy Policy