public final class SearchSpacesRequest extends GeneratedMessage implements SearchSpacesRequestOrBuilder
Request to search for a list of spaces based on a query.
Protobuf type google.chat.v1.SearchSpacesRequest
Inherited Members
com.google.protobuf.GeneratedMessage.<ContainingT,T>newFileScopedGeneratedExtension(java.lang.Class<?>,com.google.protobuf.Message)
com.google.protobuf.GeneratedMessage.<ContainingT,T>newMessageScopedGeneratedExtension(com.google.protobuf.Message,int,java.lang.Class<?>,com.google.protobuf.Message)
com.google.protobuf.GeneratedMessage.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessage.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessage.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessage.<V>serializeBooleanMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.Boolean,V>,com.google.protobuf.MapEntry<java.lang.Boolean,V>,int)
com.google.protobuf.GeneratedMessage.<V>serializeIntegerMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.Integer,V>,com.google.protobuf.MapEntry<java.lang.Integer,V>,int)
com.google.protobuf.GeneratedMessage.<V>serializeLongMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.Long,V>,com.google.protobuf.MapEntry<java.lang.Long,V>,int)
com.google.protobuf.GeneratedMessage.<V>serializeStringMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.String,V>,com.google.protobuf.MapEntry<java.lang.String,V>,int)
com.google.protobuf.GeneratedMessage.canUseUnsafe()
com.google.protobuf.GeneratedMessage.emptyBooleanList()
com.google.protobuf.GeneratedMessage.emptyDoubleList()
com.google.protobuf.GeneratedMessage.emptyFloatList()
com.google.protobuf.GeneratedMessage.emptyIntList()
com.google.protobuf.GeneratedMessage.emptyLongList()
com.google.protobuf.GeneratedMessage.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessage.isStringEmpty(java.lang.Object)
com.google.protobuf.GeneratedMessage.mergeFromAndMakeImmutableInternal(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite)
com.google.protobuf.GeneratedMessage.newInstance(com.google.protobuf.GeneratedMessage.UnusedPrivateParameter)
com.google.protobuf.GeneratedMessage.parseUnknownFieldProto3(com.google.protobuf.CodedInputStream,com.google.protobuf.UnknownFieldSet.Builder,com.google.protobuf.ExtensionRegistryLite,int)
Static Fields
ORDER_BY_FIELD_NUMBER
public static final int ORDER_BY_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
PAGE_SIZE_FIELD_NUMBER
public static final int PAGE_SIZE_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
PAGE_TOKEN_FIELD_NUMBER
public static final int PAGE_TOKEN_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
QUERY_FIELD_NUMBER
public static final int QUERY_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
USE_ADMIN_ACCESS_FIELD_NUMBER
public static final int USE_ADMIN_ACCESS_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
Static Methods
getDefaultInstance()
public static SearchSpacesRequest getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static SearchSpacesRequest.Builder newBuilder()
newBuilder(SearchSpacesRequest prototype)
public static SearchSpacesRequest.Builder newBuilder(SearchSpacesRequest prototype)
public static SearchSpacesRequest parseDelimitedFrom(InputStream input)
public static SearchSpacesRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static SearchSpacesRequest parseFrom(byte[] data)
| Parameter |
| Name |
Description |
data |
byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static SearchSpacesRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static SearchSpacesRequest parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static SearchSpacesRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static SearchSpacesRequest parseFrom(CodedInputStream input)
public static SearchSpacesRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static SearchSpacesRequest parseFrom(InputStream input)
public static SearchSpacesRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static SearchSpacesRequest parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static SearchSpacesRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<SearchSpacesRequest> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
| Parameter |
| Name |
Description |
obj |
Object
|
Overrides
getDefaultInstanceForType()
public SearchSpacesRequest getDefaultInstanceForType()
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.
When useAdminAccess is false, only create_time and relevance are
supported for ordering. Only DESC is supported for these fields in
non-admin searches.
Valid ordering operation values are:
ASC for ascending. Default value.
DESC for descending.
The supported syntax are when useAdminAccess is set to true:
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
When useAdminAccess is set to false:
create_time DESC
relevance DESC
Developer Preview.
string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
| Returns |
| Type |
Description |
String |
The orderBy.
|
getOrderByBytes()
public ByteString getOrderByBytes()
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.
When useAdminAccess is false, only create_time and relevance are
supported for ordering. Only DESC is supported for these fields in
non-admin searches.
Valid ordering operation values are:
ASC for ascending. Default value.
DESC for descending.
The supported syntax are when useAdminAccess is set to true:
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
When useAdminAccess is set to false:
create_time DESC
relevance DESC
Developer Preview.
string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
| Returns |
| Type |
Description |
ByteString |
The bytes for orderBy.
|
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 when useAdminAccess is set to true.
Otherwise, the maximum value is 100. If you use a value more than the
maximum value, it's automatically changed to the maximum value.
int32 page_size = 2;
| Returns |
| Type |
Description |
int |
The pageSize.
|
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.
string page_token = 3;
| Returns |
| Type |
Description |
String |
The pageToken.
|
getPageTokenBytes()
public ByteString getPageTokenBytes()
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.
string page_token = 3;
| Returns |
| Type |
Description |
ByteString |
The bytes for pageToken.
|
getParserForType()
public Parser<SearchSpacesRequest> getParserForType()
Overrides
getQuery()
Required. A search query.
You can search by using the following parameters when useAdminAccess
is set to true:
create_time
customer
display_name
external_user_allowed
last_active_time
space_history_state
space_type
When useAdminAccess is set to false:
display_name
external_user_allowed
space_type
create_time and last_active_time accept a timestamp in
RFC-3339 format and the supported
comparison operators are: =, <, >, <=, >=.
customer is required when useAdminAccess is set to true, 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. When useAdminAccess
is set to false, display_name is required to retrieve meaningful
results. Otherwise, the default behavior is to return an empty response.
external_user_allowed accepts either true or false.
space_history_state only accepts values from the 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 when useAdminAccess is set to
true:
`
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")
The following example queries are valid when useAdminAccess is set to
false:
display_name:"Hello World" AND space_type = "SPACE"
(display_name:"Hello" OR display_name:"Fun") AND space_type = "SPACE"
(external_user_allowed = "true" AND space_type = "SPACE") // Returns an
empty response.
(external_user_allowed = "true" AND display_name:"Hello" AND space_type =
"SPACE")
The maximum query length is 1,000 characters.
Invalid queries are rejected by the server with an INVALID_ARGUMENT`
error.
string query = 4 [(.google.api.field_behavior) = REQUIRED];
| Returns |
| Type |
Description |
String |
The query.
|
getQueryBytes()
public ByteString getQueryBytes()
Required. A search query.
You can search by using the following parameters when useAdminAccess
is set to true:
create_time
customer
display_name
external_user_allowed
last_active_time
space_history_state
space_type
When useAdminAccess is set to false:
display_name
external_user_allowed
space_type
create_time and last_active_time accept a timestamp in
RFC-3339 format and the supported
comparison operators are: =, <, >, <=, >=.
customer is required when useAdminAccess is set to true, 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. When useAdminAccess
is set to false, display_name is required to retrieve meaningful
results. Otherwise, the default behavior is to return an empty response.
external_user_allowed accepts either true or false.
space_history_state only accepts values from the 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 when useAdminAccess is set to
true:
`
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")
The following example queries are valid when useAdminAccess is set to
false:
display_name:"Hello World" AND space_type = "SPACE"
(display_name:"Hello" OR display_name:"Fun") AND space_type = "SPACE"
(external_user_allowed = "true" AND space_type = "SPACE") // Returns an
empty response.
(external_user_allowed = "true" AND display_name:"Hello" AND space_type =
"SPACE")
The maximum query length is 1,000 characters.
Invalid queries are rejected by the server with an INVALID_ARGUMENT`
error.
string query = 4 [(.google.api.field_behavior) = REQUIRED];
| Returns |
| Type |
Description |
ByteString |
The bytes for query.
|
getSerializedSize()
public int getSerializedSize()
| Returns |
| Type |
Description |
int |
|
Overrides
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.
Requires either the chat.admin.spaces.readonly or chat.admin.spaces
OAuth 2.0
scope.
bool use_admin_access = 1;
| Returns |
| Type |
Description |
boolean |
The useAdminAccess.
|
hashCode()
| Returns |
| Type |
Description |
int |
|
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public SearchSpacesRequest.Builder newBuilderForType()
newBuilderForType(AbstractMessage.BuilderParent parent)
protected SearchSpacesRequest.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Overrides
toBuilder()
public SearchSpacesRequest.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides