countPrintJobsByUser method
Get a summary of printing done by each user.
Request parameters:
customer
- Required. Customer ID prefixed with "customers/" or
"customers/my_customer" to use the customer associated to the account
making the request.
Value must have pattern ^customers/\[^/\]+$
.
filter
- Query string to filter results, AND-separated fields in EBNF
syntax. Note: OR operations are not supported in this filter. Note: Only
>= and <= comparators are supported in this filter. Supported filter
fields: * complete_time
orderBy
- Field used to order results. If omitted, results will be
ordered in ascending order of the 'user_email' field. Supported order_by
fields: * user_email * job_count * printer_count * device_count
pageSize
- Maximum number of results to return. Maximum and default are
100.
pageToken
- Token to specify the page of the response to be returned.
printerOrgUnitId
- The ID of the organizational unit for printers. If
specified, only print jobs initiated with printers from the specified
organizational unit will be counted. If omitted, all print jobs will be
counted.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a GoogleChromeManagementV1CountPrintJobsByUserResponse.
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<GoogleChromeManagementV1CountPrintJobsByUserResponse>
countPrintJobsByUser(
core.String customer, {
core.String? filter,
core.String? orderBy,
core.int? pageSize,
core.String? pageToken,
core.String? printerOrgUnitId,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (filter != null) 'filter': [filter],
if (orderBy != null) 'orderBy': [orderBy],
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if (printerOrgUnitId != null) 'printerOrgUnitId': [printerOrgUnitId],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' +
core.Uri.encodeFull('$customer') +
'/reports:countPrintJobsByUser';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return GoogleChromeManagementV1CountPrintJobsByUserResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}