list method
List all locations that provides at least one type of CMLE capability.
Request parameters:
parent
- Required. The name of the project for which available locations
are to be listed (since some locations might be whitelisted for specific
projects).
Value must have pattern ^projects/\[^/\]+$
.
pageSize
- Optional. The number of locations to retrieve per "page" of
results. If there are more remaining results than this number, the
response message will contain a valid value in the next_page_token
field. The default value is 20, and the maximum page size is 100.
pageToken
- Optional. A page token to request the next page of results.
You get the token from the next_page_token
field of the response from
the previous call.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a GoogleCloudMlV1ListLocationsResponse.
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<GoogleCloudMlV1ListLocationsResponse> list(
core.String parent, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/locations';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return GoogleCloudMlV1ListLocationsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}