search method

Future<GoogleCloudIntegrationsV1alphaSearchTemplatesResponse> search(
  1. String parent, {
  2. String? filter,
  3. String? orderBy,
  4. int? pageSize,
  5. String? pageToken,
  6. String? readMask,
  7. String? $fields,
})

Search templates based on user query and filters.

This api would query the templates and return a list of templates based on the user filter.

Request parameters:

parent - Required. The client, which owns this collection of Templates. Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+$.

filter - Optional. Standard filter field to filter templates. client_id filter won't be supported and will restrict to templates belonging to the current client only. Return all templates of the current client if the filter is empty. Also supports operators like AND, OR, NOT For example, "status="ACTIVE"

orderBy - Optional. The results would be returned in the order you specified here.

pageSize - Optional. The size of the response entries. If unspecified, defaults to 100. The maximum value is 1000; values above 1000 will be coerced to 1000.

pageToken - Optional. The token returned in the previous response.

readMask - Optional. The mask which specifies fields that need to be returned in the template's response.

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

Completes with a GoogleCloudIntegrationsV1alphaSearchTemplatesResponse.

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

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

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