list method
Lists Recognizers.
Request parameters:
parent
- Required. The project and location of Recognizers to list. The
expected format is projects/{project}/locations/{location}
.
Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+$
.
pageSize
- The maximum number of Recognizers to return. The service may
return fewer than this value. If unspecified, at most 5 Recognizers will
be returned. The maximum value is 100; values above 100 will be coerced to
100.
pageToken
- A page token, received from a previous ListRecognizers call.
Provide this to retrieve the subsequent page. When paginating, all other
parameters provided to ListRecognizers must match the call that provided
the page token.
showDeleted
- Whether, or not, to show resources that have been deleted.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a ListRecognizersResponse.
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<ListRecognizersResponse> list(
core.String parent, {
core.int? pageSize,
core.String? pageToken,
core.bool? showDeleted,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if (showDeleted != null) 'showDeleted': ['${showDeleted}'],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v2/' + core.Uri.encodeFull('$parent') + '/recognizers';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListRecognizersResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}