list method
List datasets of a bucket.
Request parameters:
parent - Required. The parent bucket that owns this collection of
datasets. The format is:
projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
Value must have pattern
^projects/\[^/\]+/locations/\[^/\]+/buckets/\[^/\]+$.
pageSize - Optional. The maximum number of datasets to return. If
unspecified, then at most 100 datasets are returned. The maximum value is
1000; values above 1000 are coerced to 1000.
pageToken - Optional. A page token, received from a previous
ListDatasets call. Provide this to retrieve the subsequent page.
showDeleted - Optional. If true, then the response will include deleted
datasets.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a ListDatasetsResponse.
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<ListDatasetsResponse> 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>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'showDeleted': ?showDeleted == null ? null : ['${showDeleted}'],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/datasets';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListDatasetsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}