list method
Lists information about the supported locations for this service.
This method can be called in two ways: List all public locations: Use the path GET /v1/locations. List project-visible locations: Use the path GET /v1/projects/{project_id}/locations. This may include public locations as well as private or other locations specifically visible to the project.
Request parameters:
appsId - Part of name. The resource that owns the locations
collection, if applicable.
extraLocationTypes - Optional. Do not use this field. It is unsupported
and is ignored unless explicitly documented otherwise. This is primarily
for internal usage.
filter - A filter to narrow down results to a preferred subset. The
filtering language accepts strings like "displayName=tokyo", and is
documented in more detail in AIP-160 (https://google.aip.dev/160).
pageSize - The maximum number of results to return. If not set, the
service selects a default.
pageToken - A page token received from the next_page_token field in the
response. Send that page token to receive the subsequent page.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a ListLocationsResponse.
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<ListLocationsResponse> list(
core.String appsId, {
core.List<core.String>? extraLocationTypes,
core.String? filter,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'extraLocationTypes': ?extraLocationTypes,
'filter': ?filter == null ? null : [filter],
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/apps/' + commons.escapeVariable('$appsId') + '/locations';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListLocationsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}