search method

Future<SearchGroupsResponse> search({
  1. int? pageSize,
  2. String? pageToken,
  3. String? query,
  4. String? view,
  5. String? $fields,
})

Searches for Group resources matching a specified query.

Request parameters:

pageSize - The maximum number of results to return. Note that the number of results returned may be less than this value even if there are more available results. To fetch all results, clients must continue calling this method repeatedly until the response no longer contains a next_page_token. If unspecified, defaults to 200 for GroupView.BASIC and 50 for GroupView.FULL. Must not be greater than 1000 for GroupView.BASIC or 500 for GroupView.FULL.

pageToken - The next_page_token value returned from a previous search request, if any.

query - Required. The search query. * Must be specified in Common Expression Language. * Must contain equality operators on the parent, e.g. parent == 'customers/{customer_id}'. The customer_id must begin with "C" (for example, 'C046psxkn'). Find your customer ID.

  • Can contain optional inclusion operators on labels such as 'cloudidentity.googleapis.com/groups.discussion_forum' in labels). * Can contain an optional equality operator on domain_name. e.g. domain_name == 'examplepetstore.com' * Can contain optional startsWith/contains/equality operators on group_key, e.g. group_key.startsWith('dev'), group_key.contains('dev'), group_key == '[email protected]' * Can contain optional startsWith/contains/equality operators on display_name, such as display_name.startsWith('dev') , display_name.contains('dev'), display_name == 'dev'

view - The level of detail to be returned. If unspecified, defaults to View.BASIC. Possible string values are:

  • "VIEW_UNSPECIFIED" : Default. Should not be used.
  • "BASIC" : Only basic resource information is returned.
  • "FULL" : All resource information is returned.

$fields - Selector specifying which fields to include in a partial response.

Completes with a SearchGroupsResponse.

Completes with a commons.ApiRequestError if the API endpoint returned an error.

If the used http.Client completes with an error when making a REST call, this method will complete with the same error.

Implementation

async.Future<SearchGroupsResponse> search({
  core.int? pageSize,
  core.String? pageToken,
  core.String? query,
  core.String? view,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (pageSize != null) 'pageSize': ['${pageSize}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if (query != null) 'query': [query],
    if (view != null) 'view': [view],
    if ($fields != null) 'fields': [$fields],
  };

  const url_ = 'v1/groups:search';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return SearchGroupsResponse.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}