list method
Return available scans given a Database-specific resource name.
Request parameters:
parent - Required. The unique name of the parent resource, specific to
the Database service implementing this interface.
Value must have pattern ^scans$.
filter - A filter expression to restrict the results based on
information present in the available Scan collection. The filter applies
to all fields within the Scan message except for data.
pageSize - The maximum number of items to return.
pageToken - The next_page_token value returned from a previous List
request, if any.
view - Specifies which parts of the Scan should be returned in the
response. Note, only the SUMMARY view (the default) is currently supported
for ListScans.
Possible string values are:
- "VIEW_UNSPECIFIED" : Not specified, equivalent to SUMMARY.
- "SUMMARY" : Server responses only include name,details,start_timeandend_time. The default value. Note, the ListScans method may only use this view type, others view types are not supported.
- "FULL" : Full representation of the scan is returned in the server
response, including data.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a ListScansResponse.
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<ListScansResponse> list(
  core.String parent, {
  core.String? filter,
  core.int? pageSize,
  core.String? pageToken,
  core.String? view,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (filter != null) 'filter': [filter],
    if (pageSize != null) 'pageSize': ['${pageSize}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if (view != null) 'view': [view],
    if ($fields != null) 'fields': [$fields],
  };
  final url_ = 'v1/' + core.Uri.encodeFull('$parent');
  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return ListScansResponse.fromJson(
    response_ as core.Map<core.String, core.dynamic>,
  );
}