list method
Lists all browser device enrollment tokens.
Request parameters:
parent - Required. The parent resource where this enrollment token will
be created. Format: customers/{customer}
Value must have pattern ^customers/\[^/\]+$.
filter - Optional. Filter to apply to list results. The following fields
can be used in the filter: * device_type (currently only
"CHROME_BROWSER" is supported) * token_state (supported values:
"ACTIVE", "EXPIRED", "REVOKED") * org_unit_path The full path of
the org unit, such as /Montreal/Sales. * org_unit_id The obfuscated id
of the org unit, not the full path.
pageSize - Optional. Maximum number of results to return. Maximum and
default are 100.
pageToken - Optional. Token to specify next page in the list.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a GoogleChromeManagementVersionsV1ListEnrollmentTokensResponse.
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<GoogleChromeManagementVersionsV1ListEnrollmentTokensResponse>
list(
core.String parent, {
core.String? filter,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'filter': ?filter == null ? null : [filter],
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/enrollmentTokens';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return GoogleChromeManagementVersionsV1ListEnrollmentTokensResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}