list method
Lists all the folders and projects in an organization or folder, along with their enrollments.
Request parameters:
parent - Required. Parent organization or folder to list enrollment
statuses for, in one of the following formats: *
folders/{folder}/locations/{location} *
organizations/{organization}/locations/{location}
Value must have pattern ^organizations/\[^/\]+/locations/\[^/\]+$.
pageSize - Optional. Maximum number of items to return in a single page.
The service might return fewer items than this value. If unspecified, the
service picks an appropriate default. The maximum value is 100; values
above 100 are reduced to 100.
pageToken - Optional. A page token, received from a previous call, to
retrieve the next page of results.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a ListResourceEnrollmentStatusesResponse.
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<ListResourceEnrollmentStatusesResponse> 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_ =
'v1/' + core.Uri.encodeFull('$parent') + '/resourceEnrollmentStatuses';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListResourceEnrollmentStatusesResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}