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