list method

Future<ListAuthorizedViewsResponse> list(
  1. String parent, {
  2. int? pageSize,
  3. String? pageToken,
  4. String? view,
  5. String? $fields,
})

Lists all AuthorizedViews from a specific table.

Request parameters:

parent - Required. The unique name of the table for which AuthorizedViews should be listed. Values are of the form projects/{project}/instances/{instance}/tables/{table}. Value must have pattern ^projects/\[^/\]+/instances/\[^/\]+/tables/\[^/\]+$.

pageSize - Optional. Maximum number of results per page. A page_size of zero lets the server choose the number of items to return. A page_size which is strictly positive will return at most that many items. A negative page_size will cause an error. Following the first request, subsequent paginated calls are not required to pass a page_size. If a page_size is set in subsequent calls, it must match the page_size given in the first request.

pageToken - Optional. The value of next_page_token returned by a previous call.

view - Optional. The resource_view to be applied to the returned AuthorizedViews' fields. Default to NAME_ONLY. Possible string values are:

  • "RESPONSE_VIEW_UNSPECIFIED" : Uses the default view for each method as documented in the request.
  • "NAME_ONLY" : Only populates name.
  • "BASIC" : Only populates the AuthorizedView's basic metadata. This includes: name, deletion_protection, etag.
  • "FULL" : Populates every fields.

$fields - Selector specifying which fields to include in a partial response.

Completes with a ListAuthorizedViewsResponse.

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<ListAuthorizedViewsResponse> list(
  core.String parent, {
  core.int? pageSize,
  core.String? pageToken,
  core.String? view,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (pageSize != null) 'pageSize': ['${pageSize}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if (view != null) 'view': [view],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v2/' + core.Uri.encodeFull('$parent') + '/authorizedViews';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return ListAuthorizedViewsResponse.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}