list method
Lists all routines in the specified dataset.
Requires the READER dataset role.
Request parameters:
projectId
- Required. Project ID of the routines to list
Value must have pattern ^\[^/\]+$
.
datasetId
- Required. Dataset ID of the routines to list
Value must have pattern ^\[^/\]+$
.
filter
- If set, then only the Routines matching this filter are
returned. The supported format is routineType:{RoutineType}
, where
{RoutineType}
is a RoutineType enum. For example:
routineType:SCALAR_FUNCTION
.
maxResults
- The maximum number of results to return in a single
response page. Leverage the page tokens to iterate through the entire
collection.
pageToken
- Page token, returned by a previous call, to request the next
page of results
readMask
- If set, then only the Routine fields in the field mask, as
well as project_id, dataset_id and routine_id, are returned in the
response. If unset, then the following Routine fields are returned: etag,
project_id, dataset_id, routine_id, routine_type, creation_time,
last_modified_time, and language.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a ListRoutinesResponse.
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<ListRoutinesResponse> list(
core.String projectId,
core.String datasetId, {
core.String? filter,
core.int? maxResults,
core.String? pageToken,
core.String? readMask,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (filter != null) 'filter': [filter],
if (maxResults != null) 'maxResults': ['${maxResults}'],
if (pageToken != null) 'pageToken': [pageToken],
if (readMask != null) 'readMask': [readMask],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'projects/' +
core.Uri.encodeFull('$projectId') +
'/datasets/' +
core.Uri.encodeFull('$datasetId') +
'/routines';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListRoutinesResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}