listPrinterModels method
Lists the supported printer models.
Request parameters:
parent - Required. The name of the customer who owns this collection of
printers. Format: customers/{customer_id}
Value must have pattern ^customers/\[^/\]+$.
filter - Filer to list only models by a given manufacturer in format:
"manufacturer:Brother". Search syntax is shared between this api and Admin
Console printers pages.
pageSize - The maximum number of objects to return. The service may
return fewer than this value.
pageToken - A page token, received from a previous call.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a ListPrinterModelsResponse.
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<ListPrinterModelsResponse> listPrinterModels(
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_ =
'admin/directory/v1/' +
core.Uri.encodeFull('$parent') +
'/chrome/printers:listPrinterModels';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListPrinterModelsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}