list method
Lists EMM-managed enterprises.
Only BASIC fields are returned.
Request parameters:
pageSize - The requested page size. The actual page size may be fixed to
a min or max value.
pageToken - A token identifying a page of results returned by the
server.
projectId - Required. The Cloud project ID of the EMM managing the
enterprises.
view - Specifies which Enterprise fields to return. This method only
supports BASIC.
Possible string values are:
- "ENTERPRISE_VIEW_UNSPECIFIED" : The API will default to the BASIC view for the List method.
- "BASIC" : Includes name and enterprise_display_name fields.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a ListEnterprisesResponse.
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<ListEnterprisesResponse> list({
core.int? pageSize,
core.String? pageToken,
core.String? projectId,
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],
'projectId': ?projectId == null ? null : [projectId],
'view': ?view == null ? null : [view],
'fields': ?$fields == null ? null : [$fields],
};
const url_ = 'v1/enterprises';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListEnterprisesResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}