list method
Lists information about materialized views in an instance.
Request parameters:
parent - Required. The unique name of the instance for which the list of
materialized views is requested. Values are of the form
projects/{project}/instances/{instance}.
Value must have pattern ^projects/\[^/\]+/instances/\[^/\]+$.
pageSize - Optional. The maximum number of materialized views to return.
The service may return fewer than this value
pageToken - Optional. A page token, received from a previous
ListMaterializedViews call. Provide this to retrieve the subsequent
page. When paginating, all other parameters provided to
ListMaterializedViews must match the call that provided the page token.
view - Optional. Describes which of the materialized view's fields
should be populated in the response. For now, only the default value
SCHEMA_VIEW is supported.
Possible string values are:
- "VIEW_UNSPECIFIED" : Uses the default view for each method as documented in its request.
- "SCHEMA_VIEW" : Only populates fields related to the materialized view's schema.
- "REPLICATION_VIEW" : Only populates fields related to the materialized view's replication state.
- "FULL" : Populates all fields.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a ListMaterializedViewsResponse.
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<ListMaterializedViewsResponse> 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>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'view': ?view == null ? null : [view],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v2/' + core.Uri.encodeFull('$parent') + '/materializedViews';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListMaterializedViewsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}