list method
Lists information about memory layers.
Request parameters:
parent - Required. The unique name of the cluster for which a list of
memory layers is requested. Values are of the form
projects/{project}/instances/{instance}/clusters/{cluster}. Use
{cluster} = '-' to list MemoryLayers for all Clusters in an instance,
e.g., projects/myproject/instances/myinstance/clusters/-.
Value must have pattern
^projects/\[^/\]+/instances/\[^/\]+/clusters/\[^/\]+$.
pageSize - Optional. The maximum number of memory layers to return. The
service may return fewer than this value.
pageToken - Optional. A page token, received from a previous
ListMemoryLayers call. Provide this to retrieve the subsequent page.
When paginating, all other parameters provided to ListMemoryLayers must
match the call that provided the page token.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a ListMemoryLayersResponse.
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<ListMemoryLayersResponse> 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_ = 'v2/' + core.Uri.encodeFull('$parent') + '/memoryLayers';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListMemoryLayersResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}