enumeratePrintJobs method

Future<GoogleChromeManagementV1EnumeratePrintJobsResponse> enumeratePrintJobs(
  1. String customer, {
  2. String? filter,
  3. String? orderBy,
  4. int? pageSize,
  5. String? pageToken,
  6. String? printerOrgUnitId,
  7. String? $fields,
})

Get a list of print jobs.

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 for complete_time. Note: Only = comparator supported for user_id and printer_id. Supported filter fields: * complete_time * printer_id * user_id

orderBy - Field used to order results. If not specified, results will be ordered in descending order of the complete_time field. Supported order by fields: * title * state * create_time * complete_time * document_page_count * color_mode * duplex_mode * printer * user_email

pageSize - The number of print jobs in the page from 0 to 100 inclusive, if page_size is not specified or zero, the size will be 50.

pageToken - A page token received from a previous EnumeratePrintJobs call. Provide this to retrieve the subsequent page. If omitted, the first page of results will be returned. When paginating, all other parameters provided to EnumeratePrintJobs must match the call that provided the page token.

printerOrgUnitId - The ID of the organizational unit for printers. If specified, only print jobs submitted to printers from the specified organizational unit will be returned.

$fields - Selector specifying which fields to include in a partial response.

Completes with a GoogleChromeManagementV1EnumeratePrintJobsResponse.

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<GoogleChromeManagementV1EnumeratePrintJobsResponse>
    enumeratePrintJobs(
  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:enumeratePrintJobs';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return GoogleChromeManagementV1EnumeratePrintJobsResponse.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}