search method
Returns Top matching Connections for a given query.
Request parameters:
name
- Required. Parent resource of the Connection, of the form:
projects / * /locations / * /connections
Value must have pattern
^projects/\[^/\]+/locations/\[^/\]+/connections$
.
pageSize
- Optional. The number of top matching connectors to return
pageToken
- Optional. page_token
query
- Required. The query against which the search needs to be done.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a SearchConnectionsResponse.
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<SearchConnectionsResponse> search(
core.String name, {
core.int? pageSize,
core.String? pageToken,
core.String? query,
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 ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name') + ':search';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return SearchConnectionsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}