search method

Future<GoogleCloudIntegrationsV1alphaSearchIntegrationsResponse> search(
  1. String parent, {
  2. bool? enableNaturalLanguageQueryUnderstanding,
  3. String? filter,
  4. int? pageSize,
  5. String? pageToken,
  6. String? query,
  7. String? $fields,
})

Searches and returns the list of integrations in the specified project.

Request parameters:

parent - Required. Project and location from which the integrations should be listed. Format: projects / * /locations / * /resources/integrations Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+$.

enableNaturalLanguageQueryUnderstanding - Optional. Whether to enable natural language query understanding.

filter - Optional. The pre-filter to be applied to the search. This should follow the expressions defined in https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata. For example, "status:ANY("ACTIVE")" will return all the resources whose status contains the "ACTIVE".

pageSize - Optional. The maximum number of results to return. The service may return fewer than this value. If unspecified, at most 10 results will be returned. The maximum value is 100; values above 100 will be coerced to 100.

pageToken - Optional. A page token, received from a previous SearchIntegrations call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SearchIntegrations must match the call that provided the page token.

query - Required. The user query

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

Completes with a GoogleCloudIntegrationsV1alphaSearchIntegrationsResponse.

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<GoogleCloudIntegrationsV1alphaSearchIntegrationsResponse> search(
  core.String parent, {
  core.bool? enableNaturalLanguageQueryUnderstanding,
  core.String? filter,
  core.int? pageSize,
  core.String? pageToken,
  core.String? query,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    'enableNaturalLanguageQueryUnderstanding':
        ?enableNaturalLanguageQueryUnderstanding == null
        ? null
        : ['${enableNaturalLanguageQueryUnderstanding}'],
    'filter': ?filter == null ? null : [filter],
    'pageSize': ?pageSize == null ? null : ['${pageSize}'],
    'pageToken': ?pageToken == null ? null : [pageToken],
    'query': ?query == null ? null : [query],
    'fields': ?$fields == null ? null : [$fields],
  };

  final url_ =
      'v1/' + core.Uri.encodeFull('$parent') + '/integrations:search';

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